From 1bea1470ccb1f4a5e6e9e17e5cced2988f50859a Mon Sep 17 00:00:00 2001
From: Alexander Pace <alexander.pace@ligo.org>
Date: Mon, 3 Feb 2025 19:12:56 +0000
Subject: [PATCH] gracedb-2.31.0

---
 config/settings/base.py                       |     6 +-
 docs/user_docs/source/queries.rst             |     4 +-
 gracedb/events/reports.py                     |    51 +-
 gracedb/events/translator.py                  |     1 -
 gracedb/search/constants.py                   |     6 +-
 gracedb/static/js/flexigrid.js                |  1486 --
 gracedb/static/js/grid.locale-en.js           |     1 -
 gracedb/static/js/jquery-1.3.2.min.js         |    19 -
 .../static/js/jquery-ui-1.7.2.custom.min.js   |   298 -
 gracedb/static/js/jquery.jqGrid.min.js        |   404 -
 gracedb/static/js/materialize.js              | 12374 ----------------
 gracedb/static/js/materialize.min.js          |     6 -
 gracedb/static/js/timeline.js                 |    47 -
 gracedb/templates/alerts/create_contact.html  |     7 +-
 .../templates/alerts/create_notification.html |     5 +-
 gracedb/templates/gracedb/reports.html        |    52 +-
 16 files changed, 109 insertions(+), 14658 deletions(-)
 delete mode 100755 gracedb/static/js/flexigrid.js
 delete mode 100644 gracedb/static/js/grid.locale-en.js
 delete mode 100644 gracedb/static/js/jquery-1.3.2.min.js
 delete mode 100644 gracedb/static/js/jquery-ui-1.7.2.custom.min.js
 delete mode 100644 gracedb/static/js/jquery.jqGrid.min.js
 delete mode 100644 gracedb/static/js/materialize.js
 delete mode 100644 gracedb/static/js/materialize.min.js
 delete mode 100644 gracedb/static/js/timeline.js

diff --git a/config/settings/base.py b/config/settings/base.py
index 72494dd79..2818bb2e8 100644
--- a/config/settings/base.py
+++ b/config/settings/base.py
@@ -48,7 +48,7 @@ INFO_BANNER_MESSAGE = "TEST MESSAGE"
 BETA_REPORTS_LINK = False
 
 # Version ---------------------------------------------------------------------
-PROJECT_VERSION = '2.30.0'
+PROJECT_VERSION = '2.31.0'
 
 # Unauthenticated access ------------------------------------------------------
 # This variable should eventually control whether unauthenticated access is
@@ -491,9 +491,6 @@ if UNAUTHENTICATED_ACCESS is True:
     REST_FRAMEWORK['DEFAULT_PERMISSION_CLASSES'] = \
         ('rest_framework.permissions.IsAuthenticatedOrReadOnly',)
 
-# Location of packages installed by bower
-BOWER_DIR = join(BASE_DIR, "..", "bower_components")
-
 # Location of static components, CSS, JS, etc.
 STATIC_ROOT = join(BASE_DIR, "static_root")
 STATIC_URL = "/static/"
@@ -504,7 +501,6 @@ STATICFILES_FINDERS = [
 ]
 STATICFILES_DIRS = [
     join(PROJECT_ROOT, "static"),
-    BOWER_DIR,
 ]
 
 # Added in order to perform data migrations on Django apps
diff --git a/docs/user_docs/source/queries.rst b/docs/user_docs/source/queries.rst
index 5a3254dc5..6fb1ca6d0 100644
--- a/docs/user_docs/source/queries.rst
+++ b/docs/user_docs/source/queries.rst
@@ -188,10 +188,10 @@ Examples and available options are below:
      - gpstime/t_0 range
 
    * - ``O4``
-     - (1422118818, 1433516418), (1396796418, 1422118818), (1396796418, 1423238418)
+     - (1422118818, 1443884418), (1396796418, 1422118818), (1368975618, 1389456018)
 
    * - ``O4c``
-     - (1422118818, 1433516418)
+     - (1422118818, 1443884418)
 
    * - ``O4b``
      - (1396796418, 1422118818)
diff --git a/gracedb/events/reports.py b/gracedb/events/reports.py
index 928c3c5f2..fdf4c11f5 100644
--- a/gracedb/events/reports.py
+++ b/gracedb/events/reports.py
@@ -131,6 +131,11 @@ def time_to_alert(start_date, end_date, superevent_category):
     sevents_values = list(sevents.values_list('superevent_id', 't_0', 'created'))
     label_values = list(labs.values_list('superevent__superevent_id', 'created'))
 
+    # Try and construct a list of the submission time of the first gw event for each
+    # of the superevents in the set. 
+    first_event_times = [s.get_internal_events().order_by('created').values_list('created', flat=True)[0]
+        for s in sevents]
+
     # Construct a list where each item looks like:
     # [superevent_id (string), created (datetime), time-to-alert (float)]
     #results = 
@@ -156,23 +161,65 @@ def time_to_alert(start_date, end_date, superevent_category):
     scatter_fig.update_traces(marker_size=10)
 
     scatter_fig.update_layout(title={
-                                'text': 'Superevent Time-to-Alert',
+                                'text': 'Superevent Event Time-to-Alert',
                                 'xanchor': 'center',
                                 'x':0.5,},
                                xaxis_title="Date",
-                               yaxis_title="Time-to-Alert (s)",
+                               yaxis_title="Event Time-to-Alert (s)",
                                autosize=True,
                                paper_bgcolor='rgba(0, 0, 0, 0)',
                                margin={'l': 0, 'r': 0},
                     )
 
 
+    # Now repeat the process for upload-to-alert (uta = label_time-first_event_time)
+    # [superevent_id (string), created (datetime), upload-to-alert (float)]
+    if sevents_values:
+        results = [[s[0], 
+                    s[2],
+                    (label_values[i][1] - first_event_times[i]).total_seconds()] for i, s in enumerate(sevents_values)]
+        np_results = np.array(results)
+    else:
+        np_results = np.zeros((1,3))
+
+    # Try making a pandas dataframe:
+    uta_pd_results = pd.DataFrame(np_results,
+                     columns=['superevent_id', 'created', 'upload_to_alert'],
+                     )
+
+    # Make a scatter plot:
+    uta_scatter_fig = px.scatter(uta_pd_results,
+                             x='created',
+                             y='upload_to_alert',
+                             hover_data='superevent_id',
+                          )
+    uta_scatter_fig.update_traces(marker_size=10)
+
+    uta_scatter_fig.update_layout(title={
+                                    'text': 'Superevent Upload Time-to-Alert',
+                                    'xanchor': 'center',
+                                    'x':0.5,},
+                                   xaxis_title="Date",
+                                   yaxis_title="Upload Time-to-Alert (s)",
+                                   autosize=True,
+                                   paper_bgcolor='rgba(0, 0, 0, 0)',
+                                   margin={'l': 0, 'r': 0},
+                        )
+
+
+
     return {'tta_plot_div': to_html(scatter_fig,
                                  include_plotlyjs=False,
                                  full_html=False,
                                  default_width='100%',),
             'tta_stats': {'med': pd_results['time_to_alert'].median(),
                           'nfp': pd_results['time_to_alert'].quantile(0.95)},
+            'uta_plot_div': to_html(uta_scatter_fig,
+                                 include_plotlyjs=False,
+                                 full_html=False,
+                                 default_width='100%',),
+            'uta_stats': {'med': uta_pd_results['upload_to_alert'].median(),
+                          'nfp': uta_pd_results['upload_to_alert'].quantile(0.95)},
        }
 
 
diff --git a/gracedb/events/translator.py b/gracedb/events/translator.py
index dff266820..def85d646 100644
--- a/gracedb/events/translator.py
+++ b/gracedb/events/translator.py
@@ -438,7 +438,6 @@ def handle_uploaded_data(event, datafilename,
         # Extract other attributes:
         event.central_freq  		= n_float(event_dict.get('central_freq', None))
         event.central_time  		= n_float(event_dict.get('central_time', None))
-        event.channel	  		= event_dict.get('channel', '')
         event.bandwidth     		= n_float(event_dict.get('bandwidth', None))
         event.duration      		= n_float(event_dict.get('duration', None))
         event.snr           		= n_float(event_dict.get('SNR', None))
diff --git a/gracedb/search/constants.py b/gracedb/search/constants.py
index 427cf72a1..94b3d9df5 100644
--- a/gracedb/search/constants.py
+++ b/gracedb/search/constants.py
@@ -20,8 +20,10 @@ RUN_MAP = {
     "O4": {
             # https://wiki.ligo.org/Operations/Agenda250109
             # O4b -> O4c transition will happen on Tuesday Jan. 28th at 1700 UTC
-            # (GPS: 1422118818)
-            "O4c": (1422118818, 1433516418),
+            # (GPS: 1422118818).
+            # EDIT: O4c extended to Oct 7 2025 1500UTC:
+            # https://observing.docs.ligo.org/plan/
+            "O4c": (1422118818, 1443884418),
             # https://observing.docs.ligo.org/plan/
             # The LIGO Hanford (LHO), LIGO Livingston (LLO), and Virgo detectors transitioned
             # to the regular observing run O4b at 15:00 UTC on 10 April 2024. O4b will run
diff --git a/gracedb/static/js/flexigrid.js b/gracedb/static/js/flexigrid.js
deleted file mode 100755
index d48a8edca..000000000
--- a/gracedb/static/js/flexigrid.js
+++ /dev/null
@@ -1,1486 +0,0 @@
-/*
- * Flexigrid for jQuery - New Wave Grid
- *
- * Copyright (c) 2008 Paulo P. Marinas (webplicity.net/flexigrid)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2008-07-14 00:09:43 +0800 (Tue, 14 Jul 2008) $
- */
- 
-(function($){
-		  
-	$.addFlex = function(t,p)
-	{
-
-		if (t.grid) return false; //return if already exist	
-		
-		// apply default properties
-		p = $.extend({
-			 height: 200, //default height
-			 width: 'auto', //auto width
-			 striped: true, //apply odd even stripes
-			 novstripe: false,
-			 minwidth: 30, //min width of columns
-			 minheight: 80, //min height of columns
-			 resizable: true, //resizable table
-			 url: false, //ajax url
-			 method: 'POST', // data sending method
-			 dataType: 'xml', // type of data loaded
-			 errormsg: 'Connection Error',
-			 usepager: false, //
-			 nowrap: true, //
-			 page: 1, //current page
-			 total: 1, //total pages
-			 useRp: true, //use the results per page select box
-			 rp: 15, // results per page
-			 rpOptions: [10,15,20,25,40],
-			 title: false,
-			 pagestat: 'Displaying {from} to {to} of {total} items',
-			 procmsg: 'Processing, please wait ...',
-			 query: '',
-			 qtype: '',
-			 nomsg: 'No items',
-			 minColToggle: 1, //minimum allowed column to be hidden
-			 showToggleBtn: true, //show or hide column toggle popup
-			 hideOnSubmit: true,
-			 autoload: true,
-			 blockOpacity: 0.5,
-			 onToggleCol: false,
-			 onChangeSort: false,
-			 onSuccess: false,
-			 onSubmit: false // using a custom populate function
-		  }, p);
-		  		
-
-		$(t)
-		.show() //show if hidden
-		.attr({cellPadding: 0, cellSpacing: 0, border: 0})  //remove padding and spacing
-		.removeAttr('width') //remove width properties	
-		;
-		
-		//create grid class
-		var g = {
-			hset : {},
-			rePosDrag: function () {
-
-			var cdleft = 0 - this.hDiv.scrollLeft;
-			if (this.hDiv.scrollLeft>0) cdleft -= Math.floor(p.cgwidth/2);
-			$(g.cDrag).css({top:g.hDiv.offsetTop+1});
-			var cdpad = this.cdpad;
-			
-			$('div',g.cDrag).hide();
-			
-			$('thead tr:first th:visible',this.hDiv).each
-				(
-			 	function ()
-					{
-					var n = $('thead tr:first th:visible',g.hDiv).index(this);
-
-					var cdpos = parseInt($('div',this).width());
-					var ppos = cdpos;
-					if (cdleft==0) 
-							cdleft -= Math.floor(p.cgwidth/2); 
-
-					cdpos = cdpos + cdleft + cdpad;
-					
-					$('div:eq('+n+')',g.cDrag).css({'left':cdpos+'px'}).show();
-
-					cdleft = cdpos;
-					}
-				);
-				
-			},
-			fixHeight: function (newH) {
-					newH = false;
-					if (!newH) newH = $(g.bDiv).height();
-					var hdHeight = $(this.hDiv).height();
-					$('div',this.cDrag).each(
-						function ()
-							{
-								$(this).height(newH+hdHeight);
-							}
-					);
-					
-					var nd = parseInt($(g.nDiv).height());
-					
-					if (nd>newH)
-						$(g.nDiv).height(newH).width(200);
-					else
-						$(g.nDiv).height('auto').width('auto');
-					
-					$(g.block).css({height:newH,marginBottom:(newH * -1)});
-					
-					var hrH = g.bDiv.offsetTop + newH;
-					if (p.height != 'auto' && p.resizable) hrH = g.vDiv.offsetTop;
-					$(g.rDiv).css({height: hrH});
-				
-			},
-			dragStart: function (dragtype,e,obj) { //default drag function start
-				
-				if (dragtype=='colresize') //column resize
-					{
-						$(g.nDiv).hide();$(g.nBtn).hide();
-						var n = $('div',this.cDrag).index(obj);
-						var ow = $('th:visible div:eq('+n+')',this.hDiv).width();
-						$(obj).addClass('dragging').siblings().hide();
-						$(obj).prev().addClass('dragging').show();
-						
-						this.colresize = {startX: e.pageX, ol: parseInt(obj.style.left), ow: ow, n : n };
-						$('body').css('cursor','col-resize');
-					}
-				else if (dragtype=='vresize') //table resize
-					{
-						var hgo = false;
-						$('body').css('cursor','row-resize');
-						if (obj) 
-							{
-							hgo = true;
-							$('body').css('cursor','col-resize');
-							}
-						this.vresize = {h: p.height, sy: e.pageY, w: p.width, sx: e.pageX, hgo: hgo};
-						
-					}
-
-				else if (dragtype=='colMove') //column header drag
-					{
-						$(g.nDiv).hide();$(g.nBtn).hide();
-						this.hset = $(this.hDiv).offset();
-						this.hset.right = this.hset.left + $('table',this.hDiv).width();
-						this.hset.bottom = this.hset.top + $('table',this.hDiv).height();
-						this.dcol = obj;
-						this.dcoln = $('th',this.hDiv).index(obj);
-						
-						this.colCopy = document.createElement("div");
-						this.colCopy.className = "colCopy";
-						this.colCopy.innerHTML = obj.innerHTML;
-						if ($.browser.msie)
-						{
-						this.colCopy.className = "colCopy ie";
-						}
-						
-						
-						$(this.colCopy).css({position:'absolute',float:'left',display:'none', textAlign: obj.align});
-						$('body').append(this.colCopy);
-						$(this.cDrag).hide();
-						
-					}
-														
-				$('body').noSelect();
-			
-			},
-			dragMove: function (e) {
-			
-				if (this.colresize) //column resize
-					{
-						var n = this.colresize.n;
-						var diff = e.pageX-this.colresize.startX;
-						var nleft = this.colresize.ol + diff;
-						var nw = this.colresize.ow + diff;
-						if (nw > p.minwidth)
-							{
-								$('div:eq('+n+')',this.cDrag).css('left',nleft);
-								this.colresize.nw = nw;
-							}
-					}
-				else if (this.vresize) //table resize
-					{
-						var v = this.vresize;
-						var y = e.pageY;
-						var diff = y-v.sy;
-						
-						if (!p.defwidth) p.defwidth = p.width;
-						
-						if (p.width != 'auto' && !p.nohresize && v.hgo)
-						{
-							var x = e.pageX;
-							var xdiff = x - v.sx;
-							var newW = v.w + xdiff;
-							if (newW > p.defwidth)
-								{
-									this.gDiv.style.width = newW + 'px';
-									p.width = newW;
-								}
-						}
-						
-						var newH = v.h + diff;
-						if ((newH > p.minheight || p.height < p.minheight) && !v.hgo)
-							{
-								this.bDiv.style.height = newH + 'px';
-								p.height = newH;
-								this.fixHeight(newH);
-							}
-						v = null;
-					}
-				else if (this.colCopy) {
-					$(this.dcol).addClass('thMove').removeClass('thOver'); 
-					if (e.pageX > this.hset.right || e.pageX < this.hset.left || e.pageY > this.hset.bottom || e.pageY < this.hset.top)
-					{
-						//this.dragEnd();
-						$('body').css('cursor','move');
-					}
-					else 
-					$('body').css('cursor','pointer');
-					$(this.colCopy).css({top:e.pageY + 10,left:e.pageX + 20, display: 'block'});
-				}													
-			
-			},
-			dragEnd: function () {
-
-				if (this.colresize)
-					{
-						var n = this.colresize.n;
-						var nw = this.colresize.nw;
-
-								$('th:visible div:eq('+n+')',this.hDiv).css('width',nw);
-								$('tr',this.bDiv).each (
-									function ()
-										{
-										$('td:visible div:eq('+n+')',this).css('width',nw);
-										}
-								);
-								this.hDiv.scrollLeft = this.bDiv.scrollLeft;
-
-
-						$('div:eq('+n+')',this.cDrag).siblings().show();
-						$('.dragging',this.cDrag).removeClass('dragging');
-						this.rePosDrag();
-						this.fixHeight();
-						this.colresize = false;
-					}
-				else if (this.vresize)
-					{
-						this.vresize = false;
-					}
-				else if (this.colCopy)
-					{
-						$(this.colCopy).remove();
-						if (this.dcolt != null)
-							{
-							
-							
-							if (this.dcoln>this.dcolt)
-								
-								$('th:eq('+this.dcolt+')',this.hDiv).before(this.dcol);
-							else
-								$('th:eq('+this.dcolt+')',this.hDiv).after(this.dcol);
-							
-							
-							
-							this.switchCol(this.dcoln,this.dcolt);
-							$(this.cdropleft).remove();
-							$(this.cdropright).remove();
-							this.rePosDrag();
-							
-																			
-							}
-						
-						this.dcol = null;
-						this.hset = null;
-						this.dcoln = null;
-						this.dcolt = null;
-						this.colCopy = null;
-						
-						$('.thMove',this.hDiv).removeClass('thMove');
-						$(this.cDrag).show();
-					}										
-				$('body').css('cursor','default');
-				$('body').noSelect(false);
-			},
-			toggleCol: function(cid,visible) {
-				
-				var ncol = $("th[axis='col"+cid+"']",this.hDiv)[0];
-				var n = $('thead th',g.hDiv).index(ncol);
-				var cb = $('input[value='+cid+']',g.nDiv)[0];
-				
-				
-				if (visible==null)
-					{
-						visible = ncol.hide;
-					}
-				
-				
-				
-				if ($('input:checked',g.nDiv).length<p.minColToggle&&!visible) return false;
-				
-				if (visible)
-					{
-						ncol.hide = false;
-						$(ncol).show();
-						cb.checked = true;
-					}
-				else
-					{
-						ncol.hide = true;
-						$(ncol).hide();
-						cb.checked = false;
-					}
-					
-						$('tbody tr',t).each
-							(
-								function ()
-									{
-										if (visible)
-											$('td:eq('+n+')',this).show();
-										else
-											$('td:eq('+n+')',this).hide();
-									}
-							);							
-				
-				this.rePosDrag();
-				
-				if (p.onToggleCol) p.onToggleCol(cid,visible);
-				
-				return visible;
-			},
-			switchCol: function(cdrag,cdrop) { //switch columns
-				
-				$('tbody tr',t).each
-					(
-						function ()
-							{
-								if (cdrag>cdrop)
-									$('td:eq('+cdrop+')',this).before($('td:eq('+cdrag+')',this));
-								else
-									$('td:eq('+cdrop+')',this).after($('td:eq('+cdrag+')',this));
-							}
-					);
-					
-					//switch order in nDiv
-					if (cdrag>cdrop)
-						$('tr:eq('+cdrop+')',this.nDiv).before($('tr:eq('+cdrag+')',this.nDiv));
-					else
-						$('tr:eq('+cdrop+')',this.nDiv).after($('tr:eq('+cdrag+')',this.nDiv));
-						
-					if ($.browser.msie&&$.browser.version<7.0) $('tr:eq('+cdrop+') input',this.nDiv)[0].checked = true;	
-					
-					this.hDiv.scrollLeft = this.bDiv.scrollLeft;
-			},			
-			scroll: function() {
-					this.hDiv.scrollLeft = this.bDiv.scrollLeft;
-					this.rePosDrag();
-			},
-			addData: function (data) { //parse data
-				
-				if (p.preProcess)
-					data = p.preProcess(data);
-				
-				$('.pReload',this.pDiv).removeClass('loading');
-				this.loading = false;
-
-				if (!data) 
-					{
-					$('.pPageStat',this.pDiv).html(p.errormsg);	
-					return false;
-					}
-
-				if (p.dataType=='xml')
-					p.total = +$('rows total',data).text();
-				else
-					p.total = data.total;
-					
-				if (p.total==0)
-					{
-					$('tr, a, td, div',t).unbind();
-					$(t).empty();
-					p.pages = 1;
-					p.page = 1;
-					this.buildpager();
-					$('.pPageStat',this.pDiv).html(p.nomsg);
-					return false;
-					}
-				
-				p.pages = Math.ceil(p.total/p.rp);
-				
-				if (p.dataType=='xml')
-					p.page = +$('rows page',data).text();
-				else
-					p.page = data.page;
-				
-				this.buildpager();
-
-				//build new body
-				var tbody = document.createElement('tbody');
-				
-				if (p.dataType=='json')
-				{
-					$.each
-					(
-					 data.rows,
-					 function(i,row) 
-					 	{
-							var tr = document.createElement('tr');
-							if (i % 2 && p.striped) tr.className = 'erow';
-							
-							if (row.id) tr.id = 'row' + row.id;
-							
-							//add cell
-							$('thead tr:first th',g.hDiv).each
-							(
-							 	function ()
-									{
-										
-										var td = document.createElement('td');
-										var idx = $(this).attr('axis').substr(3);
-										td.align = this.align;
-										td.innerHTML = row.cell[idx];
-										$(tr).append(td);
-										td = null;
-									}
-							); 
-							
-							
-							if ($('thead',this.gDiv).length<1) //handle if grid has no headers
-							{
-
-									for (idx=0;idx<cell.length;idx++)
-										{
-										var td = document.createElement('td');
-										td.innerHTML = row.cell[idx];
-										$(tr).append(td);
-										td = null;
-										}
-							}							
-							
-							$(tbody).append(tr);
-							tr = null;
-						}
-					);				
-					
-				} else if (p.dataType=='xml') {
-
-				i = 1;
-
-				$("rows row",data).each
-				(
-				 
-				 	function ()
-						{
-							
-							i++;
-							
-							var tr = document.createElement('tr');
-							if (i % 2 && p.striped) tr.className = 'erow';
-
-							var nid =$(this).attr('id');
-							if (nid) tr.id = 'row' + nid;
-							
-							nid = null;
-							
-							var robj = this;
-
-							
-							
-							$('thead tr:first th',g.hDiv).each
-							(
-							 	function ()
-									{
-										
-										var td = document.createElement('td');
-										var idx = $(this).attr('axis').substr(3);
-										td.align = this.align;
-										td.innerHTML = $("cell:eq("+ idx +")",robj).text();
-										$(tr).append(td);
-										td = null;
-									}
-							);
-							
-							
-							if ($('thead',this.gDiv).length<1) //handle if grid has no headers
-							{
-								$('cell',this).each
-								(
-								 	function ()
-										{
-										var td = document.createElement('td');
-										td.innerHTML = $(this).text();
-										$(tr).append(td);
-										td = null;
-										}
-								);
-							}
-							
-							$(tbody).append(tr);
-							tr = null;
-							robj = null;
-						}
-				);
-				
-				}
-
-				$('tr',t).unbind();
-				$(t).empty();
-				
-				$(t).append(tbody);
-				this.addCellProp();
-				this.addRowProp();
-				
-				//this.fixHeight($(this.bDiv).height());
-				
-				this.rePosDrag();
-				
-				tbody = null; data = null; i = null; 
-				
-				if (p.onSuccess) p.onSuccess();
-				if (p.hideOnSubmit) $(g.block).remove();//$(t).show();
-				
-				this.hDiv.scrollLeft = this.bDiv.scrollLeft;
-				if ($.browser.opera) $(t).css('visibility','visible');
-				
-			},
-			changeSort: function(th) { //change sortorder
-			
-				if (this.loading) return true;
-				
-				$(g.nDiv).hide();$(g.nBtn).hide();
-				
-				if (p.sortname == $(th).attr('abbr'))
-					{
-						if (p.sortorder=='asc') p.sortorder = 'desc'; 
-						else p.sortorder = 'asc';						
-					}
-				
-				$(th).addClass('sorted').siblings().removeClass('sorted');
-				$('.sdesc',this.hDiv).removeClass('sdesc');
-				$('.sasc',this.hDiv).removeClass('sasc');
-				$('div',th).addClass('s'+p.sortorder);
-				p.sortname= $(th).attr('abbr');
-				
-				if (p.onChangeSort)
-					p.onChangeSort(p.sortname,p.sortorder);
-				else
-					this.populate();				
-			
-			},
-			buildpager: function(){ //rebuild pager based on new properties
-			
-			$('.pcontrol input',this.pDiv).val(p.page);
-			$('.pcontrol span',this.pDiv).html(p.pages);
-			
-			var r1 = (p.page-1) * p.rp + 1; 
-			var r2 = r1 + p.rp - 1; 
-			
-			if (p.total<r2) r2 = p.total;
-			
-			var stat = p.pagestat;
-			
-			stat = stat.replace(/{from}/,r1);
-			stat = stat.replace(/{to}/,r2);
-			stat = stat.replace(/{total}/,p.total);
-			
-			$('.pPageStat',this.pDiv).html(stat);
-			
-			},
-			populate: function () { //get latest data
-
-				if (this.loading) return true;
-
-				if (p.onSubmit)
-					{
-						var gh = p.onSubmit();
-						if (!gh) return false;
-					}
-
-				this.loading = true;
-				if (!p.url) return false;
-				
-				$('.pPageStat',this.pDiv).html(p.procmsg);
-				
-				$('.pReload',this.pDiv).addClass('loading');
-				
-				$(g.block).css({top:g.bDiv.offsetTop});
-				
-				if (p.hideOnSubmit) $(this.gDiv).prepend(g.block); //$(t).hide();
-				
-				if ($.browser.opera) $(t).css('visibility','hidden');
-				
-				if (!p.newp) p.newp = 1;
-				
-				if (p.page>p.pages) p.page = p.pages;
-				//var param = {page:p.newp, rp: p.rp, sortname: p.sortname, sortorder: p.sortorder, query: p.query, qtype: p.qtype};
-				var param = [
-					 { name : 'page', value : p.newp }
-					,{ name : 'rp', value : p.rp }
-					,{ name : 'sortname', value : p.sortname}
-					,{ name : 'sortorder', value : p.sortorder }
-					,{ name : 'query', value : p.query}
-					,{ name : 'qtype', value : p.qtype}
-				];							 
-							 
-				if (p.params)
-					{
-						for (var pi = 0; pi < p.params.length; pi++) param[param.length] = p.params[pi];
-					}
-				
-					$.ajax({
-					   type: p.method,
-					   url: p.url,
-					   data: param,
-					   dataType: p.dataType,
-					   success: function(data){g.addData(data);},
-					   error: function(data) { try { if (p.onError) p.onError(data); } catch (e) {} }
-					 });
-			},
-			doSearch: function () {
-				p.query = $('input[name=q]',g.sDiv).val();
-				p.qtype = $('select[name=qtype]',g.sDiv).val();
-				p.newp = 1;
-
-				this.populate();				
-			},
-			changePage: function (ctype){ //change page
-			
-				if (this.loading) return true;
-			
-				switch(ctype)
-				{
-					case 'first': p.newp = 1; break;
-					case 'prev': if (p.page>1) p.newp = parseInt(p.page) - 1; break;
-					case 'next': if (p.page<p.pages) p.newp = parseInt(p.page) + 1; break;
-					case 'last': p.newp = p.pages; break;
-					case 'input': 
-							var nv = parseInt($('.pcontrol input',this.pDiv).val());
-							if (isNaN(nv)) nv = 1;
-							if (nv<1) nv = 1;
-							else if (nv > p.pages) nv = p.pages;
-							$('.pcontrol input',this.pDiv).val(nv);
-							p.newp =nv;
-							break;
-				}
-			
-				if (p.newp==p.page) return false;
-				
-				if (p.onChangePage) 
-					p.onChangePage(p.newp);
-				else				
-					this.populate();
-			
-			},
-			addCellProp: function ()
-			{
-				
-					$('tbody tr td',g.bDiv).each
-					(
-						function ()
-							{
-									var tdDiv = document.createElement('div');
-									var n = $('td',$(this).parent()).index(this);
-									var pth = $('th:eq('+n+')',g.hDiv).get(0);
-			
-									if (pth!=null)
-									{
-									if (p.sortname==$(pth).attr('abbr')&&p.sortname) 
-										{
-										this.className = 'sorted';
-										}
-									 $(tdDiv).css({textAlign:pth.align,width: $('div:first',pth)[0].style.width});
-									 
-									 if (pth.hide) $(this).css('display','none');
-									 
-									 }
-									 
-									 if (p.nowrap==false) $(tdDiv).css('white-space','normal');
-									 
-									 if (this.innerHTML=='') this.innerHTML = '&nbsp;';
-									 
-									 //tdDiv.value = this.innerHTML; //store preprocess value
-									 tdDiv.innerHTML = this.innerHTML;
-									 
-									 var prnt = $(this).parent()[0];
-									 var pid = false;
-									 if (prnt.id) pid = prnt.id.substr(3);
-									 
-									 if (pth!=null)
-									 {
-									 if (pth.process) pth.process(tdDiv,pid);
-									 }
-									 
-									$(this).empty().append(tdDiv).removeAttr('width'); //wrap content
-
-									//add editable event here 'dblclick'
-
-							}
-					);
-					
-			},
-			getCellDim: function (obj) // get cell prop for editable event
-			{
-				var ht = parseInt($(obj).height());
-				var pht = parseInt($(obj).parent().height());
-				var wt = parseInt(obj.style.width);
-				var pwt = parseInt($(obj).parent().width());
-				var top = obj.offsetParent.offsetTop;
-				var left = obj.offsetParent.offsetLeft;
-				var pdl = parseInt($(obj).css('paddingLeft'));
-				var pdt = parseInt($(obj).css('paddingTop'));
-				return {ht:ht,wt:wt,top:top,left:left,pdl:pdl, pdt:pdt, pht:pht, pwt: pwt};
-			},
-			addRowProp: function()
-			{
-					$('tbody tr',g.bDiv).each
-					(
-						function ()
-							{
-							$(this)
-							.click(
-								function (e) 
-									{ 
-										var obj = (e.target || e.srcElement); if (obj.href || obj.type) return true;
-										$(this).toggleClass('trSelected');
-										if (p.singleSelect) $(this).siblings().removeClass('trSelected');
-									}
-							)
-							.mousedown(
-								function (e)
-									{
-										if (e.shiftKey)
-										{
-										$(this).toggleClass('trSelected'); 
-										g.multisel = true; 
-										this.focus();
-										$(g.gDiv).noSelect();
-										}
-									}
-							)
-							.mouseup(
-								function ()
-									{
-										if (g.multisel)
-										{
-										g.multisel = false;
-										$(g.gDiv).noSelect(false);
-										}
-									}
-							)
-							.hover(
-								function (e) 
-									{ 
-									if (g.multisel) 
-										{
-										$(this).toggleClass('trSelected'); 
-										}
-									},
-								function () {}						
-							)
-							;
-							
-							if ($.browser.msie&&$.browser.version<7.0)
-								{
-									$(this)
-									.hover(
-										function () { $(this).addClass('trOver'); },
-										function () { $(this).removeClass('trOver'); }
-									)
-									;
-								}
-							}
-					);
-					
-					
-			},
-			pager: 0
-			};		
-		
-		//create model if any
-		if (p.colModel)
-		{
-			thead = document.createElement('thead');
-			tr = document.createElement('tr');
-			
-			for (i=0;i<p.colModel.length;i++)
-				{
-					var cm = p.colModel[i];
-					var th = document.createElement('th');
-
-					th.innerHTML = cm.display;
-					
-					if (cm.name&&cm.sortable)
-						$(th).attr('abbr',cm.name);
-					
-					//th.idx = i;
-					$(th).attr('axis','col'+i);
-					
-					if (cm.align)
-						th.align = cm.align;
-						
-					if (cm.width) 
-						$(th).attr('width',cm.width);
-
-					if (cm.hide)
-						{
-						th.hide = true;
-						}
-						
-					if (cm.process)
-						{
-							th.process = cm.process;
-						}
-
-					$(tr).append(th);
-				}
-			$(thead).append(tr);
-			$(t).prepend(thead);
-		} // end if p.colmodel	
-
-		//init divs
-		g.gDiv = document.createElement('div'); //create global container
-		g.mDiv = document.createElement('div'); //create title container
-		g.hDiv = document.createElement('div'); //create header container
-		g.bDiv = document.createElement('div'); //create body container
-		g.vDiv = document.createElement('div'); //create grip
-		g.rDiv = document.createElement('div'); //create horizontal resizer
-		g.cDrag = document.createElement('div'); //create column drag
-		g.block = document.createElement('div'); //creat blocker
-		g.nDiv = document.createElement('div'); //create column show/hide popup
-		g.nBtn = document.createElement('div'); //create column show/hide button
-		g.iDiv = document.createElement('div'); //create editable layer
-		g.tDiv = document.createElement('div'); //create toolbar
-		g.sDiv = document.createElement('div');
-		
-		if (p.usepager) g.pDiv = document.createElement('div'); //create pager container
-		g.hTable = document.createElement('table');
-
-		//set gDiv
-		g.gDiv.className = 'flexigrid';
-		if (p.width!='auto') g.gDiv.style.width = p.width + 'px';
-
-		//add conditional classes
-		if ($.browser.msie)
-			$(g.gDiv).addClass('ie');
-		
-		if (p.novstripe)
-			$(g.gDiv).addClass('novstripe');
-
-		$(t).before(g.gDiv);
-		$(g.gDiv)
-		.append(t)
-		;
-
-		//set toolbar
-		if (p.buttons) 
-		{
-			g.tDiv.className = 'tDiv';
-			var tDiv2 = document.createElement('div');
-			tDiv2.className = 'tDiv2';
-			
-			for (i=0;i<p.buttons.length;i++)
-				{
-					var btn = p.buttons[i];
-					if (!btn.separator)
-					{
-						var btnDiv = document.createElement('div');
-						btnDiv.className = 'fbutton';
-						btnDiv.innerHTML = "<div><span>"+btn.name+"</span></div>";
-						if (btn.bclass) 
-							$('span',btnDiv)
-							.addClass(btn.bclass)
-							.css({paddingLeft:20})
-							;
-						btnDiv.onpress = btn.onpress;
-						btnDiv.name = btn.name;
-						if (btn.onpress)
-						{
-							$(btnDiv).click
-							(	
-								function () 
-								{
-								this.onpress(this.name,g.gDiv);
-								}
-							);
-						}
-						$(tDiv2).append(btnDiv);
-						if ($.browser.msie&&$.browser.version<7.0)
-						{
-							$(btnDiv).hover(function(){$(this).addClass('fbOver');},function(){$(this).removeClass('fbOver');});
-						}
-						
-					} else {
-						$(tDiv2).append("<div class='btnseparator'></div>");
-					}
-				}
-				$(g.tDiv).append(tDiv2);
-				$(g.tDiv).append("<div style='clear:both'></div>");
-				$(g.gDiv).prepend(g.tDiv);
-		}
-		
-		//set hDiv
-		g.hDiv.className = 'hDiv';
-
-		$(t).before(g.hDiv);
-
-		//set hTable
-			g.hTable.cellPadding = 0;
-			g.hTable.cellSpacing = 0;
-			$(g.hDiv).append('<div class="hDivBox"></div>');
-			$('div',g.hDiv).append(g.hTable);
-			var thead = $("thead:first",t).get(0);
-			if (thead) $(g.hTable).append(thead);
-			thead = null;
-		
-		if (!p.colmodel) var ci = 0;
-
-		//setup thead			
-			$('thead tr:first th',g.hDiv).each
-			(
-			 	function ()
-					{
-						var thdiv = document.createElement('div');
-						
-						
-					
-						if ($(this).attr('abbr'))
-							{
-							$(this).click(
-								function (e) 
-									{
-										
-										if (!$(this).hasClass('thOver')) return false;
-										var obj = (e.target || e.srcElement);
-										if (obj.href || obj.type) return true; 
-										g.changeSort(this);
-									}
-							)
-							;
-							
-							if ($(this).attr('abbr')==p.sortname)
-								{
-								this.className = 'sorted';
-								thdiv.className = 's'+p.sortorder;
-								}
-							}
-							
-							if (this.hide) $(this).hide();
-							
-							if (!p.colmodel)
-							{
-								$(this).attr('axis','col' + ci++);
-							}
-							
-							
-						 $(thdiv).css({textAlign:this.align, width: this.width + 'px'});
-						 thdiv.innerHTML = this.innerHTML;
-						 
-						$(this).empty().append(thdiv).removeAttr('width')
-						.mousedown(function (e) 
-							{
-								g.dragStart('colMove',e,this);
-							})
-						.hover(
-							function(){
-								if (!g.colresize&&!$(this).hasClass('thMove')&&!g.colCopy) $(this).addClass('thOver');
-								
-								if ($(this).attr('abbr')!=p.sortname&&!g.colCopy&&!g.colresize&&$(this).attr('abbr')) $('div',this).addClass('s'+p.sortorder);
-								else if ($(this).attr('abbr')==p.sortname&&!g.colCopy&&!g.colresize&&$(this).attr('abbr'))
-									{
-										var no = '';
-										if (p.sortorder=='asc') no = 'desc';
-										else no = 'asc';
-										$('div',this).removeClass('s'+p.sortorder).addClass('s'+no);
-									}
-								
-								if (g.colCopy) 
-									{
-									var n = $('th',g.hDiv).index(this);
-									
-									if (n==g.dcoln) return false;
-									
-									
-									
-									if (n<g.dcoln) $(this).append(g.cdropleft);
-									else $(this).append(g.cdropright);
-									
-									g.dcolt = n;
-									
-									} else if (!g.colresize) {
-										
-									var nv = $('th:visible',g.hDiv).index(this);
-									var onl = parseInt($('div:eq('+nv+')',g.cDrag).css('left'));
-									var nw = parseInt($(g.nBtn).width()) + parseInt($(g.nBtn).css('borderLeftWidth'));
-									nl = onl - nw + Math.floor(p.cgwidth/2);
-									
-									$(g.nDiv).hide();$(g.nBtn).hide();
-									
-									$(g.nBtn).css({'left':nl,top:g.hDiv.offsetTop}).show();
-									
-									var ndw = parseInt($(g.nDiv).width());
-									
-									$(g.nDiv).css({top:g.bDiv.offsetTop});
-									
-									if ((nl+ndw)>$(g.gDiv).width())
-										$(g.nDiv).css('left',onl-ndw+1);
-									else
-										$(g.nDiv).css('left',nl);
-										
-									if ($(this).hasClass('sorted')) 
-										$(g.nBtn).addClass('srtd');
-									else
-										$(g.nBtn).removeClass('srtd');
-										
-									}
-									
-							},
-							function(){
-								$(this).removeClass('thOver');
-								if ($(this).attr('abbr')!=p.sortname) $('div',this).removeClass('s'+p.sortorder);
-								else if ($(this).attr('abbr')==p.sortname)
-									{
-										var no = '';
-										if (p.sortorder=='asc') no = 'desc';
-										else no = 'asc';
-										
-										$('div',this).addClass('s'+p.sortorder).removeClass('s'+no);
-									}
-								if (g.colCopy) 
-									{								
-									$(g.cdropleft).remove();
-									$(g.cdropright).remove();
-									g.dcolt = null;
-									}
-							})
-						; //wrap content
-					}
-			);
-
-		//set bDiv
-		g.bDiv.className = 'bDiv';
-		$(t).before(g.bDiv);
-		$(g.bDiv)
-		.css({ height: (p.height=='auto') ? 'auto' : p.height+"px"})
-		.scroll(function (e) {g.scroll()})
-		.append(t)
-		;
-		
-		if (p.height == 'auto') 
-			{
-			$('table',g.bDiv).addClass('autoht');
-			}
-
-
-		//add td properties
-		g.addCellProp();
-		
-		//add row properties
-		g.addRowProp();
-		
-		//set cDrag
-		
-		var cdcol = $('thead tr:first th:first',g.hDiv).get(0);
-		
-		if (cdcol != null)
-		{		
-		g.cDrag.className = 'cDrag';
-		g.cdpad = 0;
-		
-		g.cdpad += (isNaN(parseInt($('div',cdcol).css('borderLeftWidth'))) ? 0 : parseInt($('div',cdcol).css('borderLeftWidth'))); 
-		g.cdpad += (isNaN(parseInt($('div',cdcol).css('borderRightWidth'))) ? 0 : parseInt($('div',cdcol).css('borderRightWidth'))); 
-		g.cdpad += (isNaN(parseInt($('div',cdcol).css('paddingLeft'))) ? 0 : parseInt($('div',cdcol).css('paddingLeft'))); 
-		g.cdpad += (isNaN(parseInt($('div',cdcol).css('paddingRight'))) ? 0 : parseInt($('div',cdcol).css('paddingRight'))); 
-		g.cdpad += (isNaN(parseInt($(cdcol).css('borderLeftWidth'))) ? 0 : parseInt($(cdcol).css('borderLeftWidth'))); 
-		g.cdpad += (isNaN(parseInt($(cdcol).css('borderRightWidth'))) ? 0 : parseInt($(cdcol).css('borderRightWidth'))); 
-		g.cdpad += (isNaN(parseInt($(cdcol).css('paddingLeft'))) ? 0 : parseInt($(cdcol).css('paddingLeft'))); 
-		g.cdpad += (isNaN(parseInt($(cdcol).css('paddingRight'))) ? 0 : parseInt($(cdcol).css('paddingRight'))); 
-
-		$(g.bDiv).before(g.cDrag);
-		
-		var cdheight = $(g.bDiv).height();
-		var hdheight = $(g.hDiv).height();
-		
-		$(g.cDrag).css({top: -hdheight + 'px'});
-		
-		$('thead tr:first th',g.hDiv).each
-			(
-			 	function ()
-					{
-						var cgDiv = document.createElement('div');
-						$(g.cDrag).append(cgDiv);
-						if (!p.cgwidth) p.cgwidth = $(cgDiv).width();
-						$(cgDiv).css({height: cdheight + hdheight})
-						.mousedown(function(e){g.dragStart('colresize',e,this);})
-						;
-						if ($.browser.msie&&$.browser.version<7.0)
-						{
-							g.fixHeight($(g.gDiv).height());
-							$(cgDiv).hover(
-								function () 
-								{
-								g.fixHeight();
-								$(this).addClass('dragging') 
-								},
-								function () { if (!g.colresize) $(this).removeClass('dragging') }
-							);
-						}
-					}
-			);
-		
-		//g.rePosDrag();
-							
-		}
-		
-
-		//add strip		
-		if (p.striped) 
-			$('tbody tr:odd',g.bDiv).addClass('erow');
-			
-			
-		if (p.resizable && p.height !='auto') 
-		{
-		g.vDiv.className = 'vGrip';
-		$(g.vDiv)
-		.mousedown(function (e) { g.dragStart('vresize',e)})
-		.html('<span></span>');
-		$(g.bDiv).after(g.vDiv);
-		}
-		
-		if (p.resizable && p.width !='auto' && !p.nohresize) 
-		{
-		g.rDiv.className = 'hGrip';
-		$(g.rDiv)
-		.mousedown(function (e) {g.dragStart('vresize',e,true);})
-		.html('<span></span>')
-		.css('height',$(g.gDiv).height())
-		;
-		if ($.browser.msie&&$.browser.version<7.0)
-		{
-			$(g.rDiv).hover(function(){$(this).addClass('hgOver');},function(){$(this).removeClass('hgOver');});
-		}
-		$(g.gDiv).append(g.rDiv);
-		}
-		
-		// add pager
-		if (p.usepager)
-		{
-		g.pDiv.className = 'pDiv';
-		g.pDiv.innerHTML = '<div class="pDiv2"></div>';
-		$(g.bDiv).after(g.pDiv);
-		var html = ' <div class="pGroup"> <div class="pFirst pButton"><span></span></div><div class="pPrev pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"><span class="pcontrol">Page <input type="text" size="4" value="1" /> of <span> 1 </span></span></div> <div class="btnseparator"></div> <div class="pGroup"> <div class="pNext pButton"><span></span></div><div class="pLast pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"> <div class="pReload pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"><span class="pPageStat"></span></div>';
-		$('div',g.pDiv).html(html);
-		
-		$('.pReload',g.pDiv).click(function(){g.populate()});
-		$('.pFirst',g.pDiv).click(function(){g.changePage('first')});
-		$('.pPrev',g.pDiv).click(function(){g.changePage('prev')});
-		$('.pNext',g.pDiv).click(function(){g.changePage('next')});
-		$('.pLast',g.pDiv).click(function(){g.changePage('last')});
-		$('.pcontrol input',g.pDiv).keydown(function(e){if(e.keyCode==13) g.changePage('input')});
-		if ($.browser.msie&&$.browser.version<7) $('.pButton',g.pDiv).hover(function(){$(this).addClass('pBtnOver');},function(){$(this).removeClass('pBtnOver');});
-			
-			if (p.useRp)
-			{
-			var opt = "";
-			for (var nx=0;nx<p.rpOptions.length;nx++)
-			{
-				if (p.rp == p.rpOptions[nx]) sel = 'selected="selected"'; else sel = '';
-				 opt += "<option value='" + p.rpOptions[nx] + "' " + sel + " >" + p.rpOptions[nx] + "&nbsp;&nbsp;</option>";
-			};
-			$('.pDiv2',g.pDiv).prepend("<div class='pGroup'><select name='rp'>"+opt+"</select></div> <div class='btnseparator'></div>");
-			$('select',g.pDiv).change(
-					function ()
-					{
-						if (p.onRpChange) 
-							p.onRpChange(+this.value);
-						else
-							{
-							p.newp = 1;
-							p.rp = +this.value;
-							g.populate();
-							}
-					}
-				);
-			}
-		
-		//add search button
-		if (p.searchitems)
-			{
-				$('.pDiv2',g.pDiv).prepend("<div class='pGroup'> <div class='pSearch pButton'><span></span></div> </div>  <div class='btnseparator'></div>");
-				$('.pSearch',g.pDiv).click(function(){$(g.sDiv).slideToggle('fast',function(){$('.sDiv:visible input:first',g.gDiv).trigger('focus');});});				
-				//add search box
-				g.sDiv.className = 'sDiv';
-				
-				sitems = p.searchitems;
-				
-				var sopt = "";
-				for (var s = 0; s < sitems.length; s++)
-				{
-					if (p.qtype=='' && sitems[s].isdefault==true)
-					{
-					p.qtype = sitems[s].name;
-					sel = 'selected="selected"';
-					} else sel = '';
-					sopt += "<option value='" + sitems[s].name + "' " + sel + " >" + sitems[s].display + "&nbsp;&nbsp;</option>";						
-				}
-				
-				if (p.qtype=='') p.qtype = sitems[0].name;
-				
-				$(g.sDiv).append("<div class='sDiv2'>Quick Search <input type='text' size='30' name='q' class='qsbox' /> <select name='qtype'>"+sopt+"</select> <input type='button' value='Clear' /></div>");
-
-				$('input[name=q],select[name=qtype]',g.sDiv).keydown(function(e){if(e.keyCode==13) g.doSearch()});
-				$('input[value=Clear]',g.sDiv).click(function(){$('input[name=q]',g.sDiv).val(''); p.query = ''; g.doSearch(); });
-				$(g.bDiv).after(g.sDiv);				
-				
-			}
-		
-		}
-		$(g.pDiv,g.sDiv).append("<div style='clear:both'></div>");
-	
-		// add title
-		if (p.title)
-		{
-			g.mDiv.className = 'mDiv';
-			g.mDiv.innerHTML = '<div class="ftitle">'+p.title+'</div>';
-			$(g.gDiv).prepend(g.mDiv);
-			if (p.showTableToggleBtn)
-				{
-					$(g.mDiv).append('<div class="ptogtitle" title="Minimize/Maximize Table"><span></span></div>');
-					$('div.ptogtitle',g.mDiv).click
-					(
-					 	function ()
-							{
-								$(g.gDiv).toggleClass('hideBody');
-								$(this).toggleClass('vsble');
-							}
-					);
-				}
-			//g.rePosDrag();
-		}
-
-		//setup cdrops
-		g.cdropleft = document.createElement('span');
-		g.cdropleft.className = 'cdropleft';
-		g.cdropright = document.createElement('span');
-		g.cdropright.className = 'cdropright';
-
-		//add block
-		g.block.className = 'gBlock';
-		var gh = $(g.bDiv).height();
-		var gtop = g.bDiv.offsetTop;
-		$(g.block).css(
-		{
-			width: g.bDiv.style.width,
-			height: gh,
-			background: 'white',
-			position: 'relative',
-			marginBottom: (gh * -1),
-			zIndex: 1,
-			top: gtop,
-			left: '0px'
-		}
-		);
-		$(g.block).fadeTo(0,p.blockOpacity);				
-		
-		// add column control
-		if ($('th',g.hDiv).length)
-		{
-			
-			g.nDiv.className = 'nDiv';
-			g.nDiv.innerHTML = "<table cellpadding='0' cellspacing='0'><tbody></tbody></table>";
-			$(g.nDiv).css(
-			{
-				marginBottom: (gh * -1),
-				display: 'none',
-				top: gtop
-			}
-			).noSelect()
-			;
-			
-			var cn = 0;
-			
-			
-			$('th div',g.hDiv).each
-			(
-			 	function ()
-					{
-						var kcol = $("th[axis='col" + cn + "']",g.hDiv)[0];
-						var chk = 'checked="checked"';
-						if (kcol.style.display=='none') chk = '';
-						
-						$('tbody',g.nDiv).append('<tr><td class="ndcol1"><input type="checkbox" '+ chk +' class="togCol" value="'+ cn +'" /></td><td class="ndcol2">'+this.innerHTML+'</td></tr>');
-						cn++;
-					}
-			);
-			
-			if ($.browser.msie&&$.browser.version<7.0)
-				$('tr',g.nDiv).hover
-				(
-				 	function () {$(this).addClass('ndcolover');},
-					function () {$(this).removeClass('ndcolover');}
-				);
-			
-			$('td.ndcol2',g.nDiv).click
-			(
-			 	function ()
-					{
-						if ($('input:checked',g.nDiv).length<=p.minColToggle&&$(this).prev().find('input')[0].checked) return false;
-						return g.toggleCol($(this).prev().find('input').val());
-					}
-			);
-			
-			$('input.togCol',g.nDiv).click
-			(
-			 	function ()
-					{
-						
-						if ($('input:checked',g.nDiv).length<p.minColToggle&&this.checked==false) return false;
-						$(this).parent().next().trigger('click');
-						//return false;
-					}
-			);
-
-
-			$(g.gDiv).prepend(g.nDiv);
-			
-			$(g.nBtn).addClass('nBtn')
-			.html('<div></div>')
-			.attr('title','Hide/Show Columns')
-			.click
-			(
-			 	function ()
-				{
-			 	$(g.nDiv).toggle(); return true;
-				}
-			);
-			
-			if (p.showToggleBtn) $(g.gDiv).prepend(g.nBtn);
-			
-		}
-		
-		// add date edit layer
-		$(g.iDiv)
-		.addClass('iDiv')
-		.css({display:'none'})
-		;
-		$(g.bDiv).append(g.iDiv);
-		
-		// add flexigrid events
-		$(g.bDiv)
-		.hover(function(){$(g.nDiv).hide();$(g.nBtn).hide();},function(){if (g.multisel) g.multisel = false;})
-		;
-		$(g.gDiv)
-		.hover(function(){},function(){$(g.nDiv).hide();$(g.nBtn).hide();})
-		;
-		
-		//add document events
-		$(document)
-		.mousemove(function(e){g.dragMove(e)})
-		.mouseup(function(e){g.dragEnd()})
-		.hover(function(){},function (){g.dragEnd()})
-		;
-		
-		//browser adjustments
-		if ($.browser.msie&&$.browser.version<7.0)
-		{
-			$('.hDiv,.bDiv,.mDiv,.pDiv,.vGrip,.tDiv, .sDiv',g.gDiv)
-			.css({width: '100%'});
-			$(g.gDiv).addClass('ie6');
-			if (p.width!='auto') $(g.gDiv).addClass('ie6fullwidthbug');			
-		} 
-		
-		g.rePosDrag();
-		g.fixHeight();
-		
-		//make grid functions accessible
-		t.p = p;
-		t.grid = g;
-		
-		// load data
-		if (p.url&&p.autoload) 
-			{
-			g.populate();
-			}
-		
-		return t;		
-			
-	};
-
-	var docloaded = false;
-
-	$(document).ready(function () {docloaded = true} );
-
-	$.fn.flexigrid = function(p) {
-
-		return this.each( function() {
-				if (!docloaded)
-				{
-					$(this).hide();
-					var t = this;
-					$(document).ready
-					(
-						function ()
-						{
-						$.addFlex(t,p);
-						}
-					);
-				} else {
-					$.addFlex(this,p);
-				}
-			});
-
-	}; //end flexigrid
-
-	$.fn.flexReload = function(p) { // function to reload grid
-
-		return this.each( function() {
-				if (this.grid&&this.p.url) this.grid.populate();
-			});
-
-	}; //end flexReload
-
-	$.fn.flexOptions = function(p) { //function to update general options
-
-		return this.each( function() {
-				if (this.grid) $.extend(this.p,p);
-			});
-
-	}; //end flexOptions
-
-	$.fn.flexToggleCol = function(cid,visible) { // function to reload grid
-
-		return this.each( function() {
-				if (this.grid) this.grid.toggleCol(cid,visible);
-			});
-
-	}; //end flexToggleCol
-
-	$.fn.flexAddData = function(data) { // function to add data to grid
-
-		return this.each( function() {
-				if (this.grid) this.grid.addData(data);
-			});
-
-	};
-
-	$.fn.noSelect = function(p) { //no select plugin by me :-)
-
-		if (p == null) 
-			prevent = true;
-		else
-			prevent = p;
-
-		if (prevent) {
-		
-		return this.each(function ()
-			{
-				if ($.browser.msie||$.browser.safari) $(this).bind('selectstart',function(){return false;});
-				else if ($.browser.mozilla) 
-					{
-						$(this).css('MozUserSelect','none');
-						$('body').trigger('focus');
-					}
-				else if ($.browser.opera) $(this).bind('mousedown',function(){return false;});
-				else $(this).attr('unselectable','on');
-			});
-			
-		} else {
-
-		
-		return this.each(function ()
-			{
-				if ($.browser.msie||$.browser.safari) $(this).unbind('selectstart');
-				else if ($.browser.mozilla) $(this).css('MozUserSelect','inherit');
-				else if ($.browser.opera) $(this).unbind('mousedown');
-				else $(this).removeAttr('unselectable','on');
-			});
-		
-		}
-
-	}; //end noSelect
-		
-})(jQuery);
\ No newline at end of file
diff --git a/gracedb/static/js/grid.locale-en.js b/gracedb/static/js/grid.locale-en.js
deleted file mode 100644
index 3dc92a143..000000000
--- a/gracedb/static/js/grid.locale-en.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){a.jgrid={defaults:{recordtext:"View {0} - {1} of {2}",emptyrecords:"No records to view",loadtext:"Loading...",pgtext:"Page {0} of {1}"},search:{caption:"Search...",Find:"Find",Reset:"Reset",odata:["equal","not equal","less","less or equal","greater","greater or equal","begins with","does not begin with","is in","is not in","ends with","does not end with","contains","does not contain"],groupOps:[{op:"AND",text:"all"},{op:"OR",text:"any"}],matchText:" match",rulesText:" rules"},edit:{addCaption:"Add Record",editCaption:"Edit Record",bSubmit:"Submit",bCancel:"Cancel",bClose:"Close",saveData:"Data has been changed! Save changes?",bYes:"Yes",bNo:"No",bExit:"Cancel",msg:{required:"Field is required",number:"Please, enter valid number",minValue:"value must be greater than or equal to ",maxValue:"value must be less than or equal to",email:"is not a valid e-mail",integer:"Please, enter valid integer value",date:"Please, enter valid date value",url:"is not a valid URL. Prefix required ('http://' or 'https://')",nodefined:" is not defined!",novalue:" return value is required!",customarray:"Custom function should return array!",customfcheck:"Custom function should be present in case of custom checking!"}},view:{caption:"View Record",bClose:"Close"},del:{caption:"Delete",msg:"Delete selected record(s)?",bSubmit:"Delete",bCancel:"Cancel"},nav:{edittext:"",edittitle:"Edit selected row",addtext:"",addtitle:"Add new row",deltext:"",deltitle:"Delete selected row",searchtext:"",searchtitle:"Find records",refreshtext:"",refreshtitle:"Reload Grid",alertcap:"Warning",alerttext:"Please, select row",viewtext:"",viewtitle:"View selected row"},col:{caption:"Select columns",bSubmit:"Ok",bCancel:"Cancel"},errors:{errcap:"Error",nourl:"No url is set",norecords:"No records to process",model:"Length of colNames <> colModel!"},formatter:{integer:{thousandsSeparator:" ",defaultValue:"0"},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaultValue:"0.00"},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaultValue:"0.00"},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(b){return b<11||b>13?["st","nd","rd","th"][Math.min((b-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"",target:"",checkbox:{disabled:true},idName:"id"}}})(jQuery);
\ No newline at end of file
diff --git a/gracedb/static/js/jquery-1.3.2.min.js b/gracedb/static/js/jquery-1.3.2.min.js
deleted file mode 100644
index b1ae21d8b..000000000
--- a/gracedb/static/js/jquery-1.3.2.min.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * jQuery JavaScript Library v1.3.2
- * http://jquery.com/
- *
- * Copyright (c) 2009 John Resig
- * Dual licensed under the MIT and GPL licenses.
- * http://docs.jquery.com/License
- *
- * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
- * Revision: 6246
- */
-(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * Sizzle CSS Selector Engine - v0.9.3
- *  Copyright 2009, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/gracedb/static/js/jquery-ui-1.7.2.custom.min.js b/gracedb/static/js/jquery-ui-1.7.2.custom.min.js
deleted file mode 100644
index cf19f30a9..000000000
--- a/gracedb/static/js/jquery-ui-1.7.2.custom.min.js
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * jQuery UI 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI
- */
-jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
- * jQuery UI Draggable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Draggables
- *
- * Depends:
- *	ui.core.js
- */
-(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
- * jQuery UI Droppable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Droppables
- *
- * Depends:
- *	ui.core.js
- *	ui.draggable.js
- */
-(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
- * jQuery UI Resizable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Resizables
- *
- * Depends:
- *	ui.core.js
- */
-(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
- * jQuery UI Selectable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Selectables
- *
- * Depends:
- *	ui.core.js
- */
-(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
- * jQuery UI Sortable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Sortables
- *
- * Depends:
- *	ui.core.js
- */
-(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/*
- * jQuery UI Accordion 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Accordion
- *
- * Depends:
- *	ui.core.js
- */
-(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
- * jQuery UI Dialog 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Dialog
- *
- * Depends:
- *	ui.core.js
- *	ui.draggable.js
- *	ui.resizable.js
- */
-(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*
- * jQuery UI Slider 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Slider
- *
- * Depends:
- *	ui.core.js
- */
-(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d<b))){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/*
- * jQuery UI Tabs 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Tabs
- *
- * Depends:
- *	ui.core.js
- */
-(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);;/*
- * jQuery UI Datepicker 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Datepicker
- *
- * Depends:
- *	ui.core.js
- */
-(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/*
- * jQuery UI Progressbar 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Progressbar
- *
- * Depends:
- *   ui.core.js
- */
-(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/*
- * jQuery UI Effects 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/
- */
-jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;/*
- * jQuery UI Effects Blind 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Blind
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide()}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);;/*
- * jQuery UI Effects Bounce 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Bounce
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
- * jQuery UI Effects Clip 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Clip
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments)}f.dequeue()}})})}})(jQuery);;/*
- * jQuery UI Effects Drop 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Drop
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var i=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
- * jQuery UI Effects Explode 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Explode
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"),10)||0;l.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*
- * jQuery UI Effects Fold 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Fold
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/*
- * jQuery UI Effects Highlight 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Highlight
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
- * jQuery UI Effects Pulsate 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Pulsate
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing)}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);;/*
- * jQuery UI Effects Scale 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Scale
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x}var l={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments)}c.dequeue()}})})}})(jQuery);;/*
- * jQuery UI Effects Shake 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Shake
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
- * jQuery UI Effects Slide 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Slide
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
- * jQuery UI Effects Transfer 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Transfer
- *
- * Depends:
- *	effects.core.js
- */
-(function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);;
\ No newline at end of file
diff --git a/gracedb/static/js/jquery.jqGrid.min.js b/gracedb/static/js/jquery.jqGrid.min.js
deleted file mode 100644
index 19165a40d..000000000
--- a/gracedb/static/js/jquery.jqGrid.min.js
+++ /dev/null
@@ -1,404 +0,0 @@
-/* 
-* jqGrid  3.6.3 - jQuery Grid 
-* Copyright (c) 2008, Tony Tomov, tony@trirand.com 
-* Dual licensed under the MIT and GPL licenses 
-* http://www.opensource.org/licenses/mit-license.php 
-* http://www.gnu.org/licenses/gpl.html 
-* Date:2010-02-07 
-* Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js; grid.jqueryui.js; 
-*/
-(function(b){b.jgrid=b.jgrid||{};b.extend(b.jgrid,{htmlDecode:function(f){if(f=="&nbsp;"||f=="&#160;"||f.length==1&&f.charCodeAt(0)==160)return"";return!f?f:String(f).replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"')},htmlEncode:function(f){return!f?f:String(f).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\"/g,"&quot;")},format:function(f){var k=b.makeArray(arguments).slice(1);if(f===undefined)f="";return f.replace(/\{(\d+)\}/g,function(i,
-h){return k[h]})},getCellIndex:function(f){f=b(f);f=(!f.is("td")&&!f.is("th")?f.closest("td,th"):f)[0];if(b.browser.msie)return b.inArray(f,f.parentNode.cells);return f.cellIndex},stripHtml:function(f){f+="";var k=/<("[^"]*"|'[^']*'|[^'">])*>/gi;if(f)return(f=f.replace(k,""))&&f!=="&nbsp;"&&f!=="&#160;"?f:"";else return f},stringToDoc:function(f){var k;if(typeof f!=="string")return f;try{k=(new DOMParser).parseFromString(f,"text/xml")}catch(i){k=new ActiveXObject("Microsoft.XMLDOM");k.async=false;
-k.loadXML(f)}return k&&k.documentElement&&k.documentElement.tagName!="parsererror"?k:null},parse:function(f){f=f;if(f.substr(0,9)=="while(1);")f=f.substr(9);if(f.substr(0,2)=="/*")f=f.substr(2,f.length-4);f||(f="{}");f=b.jgrid.useJSON===true&&typeof JSON==="object"&&typeof JSON.parse==="function"?JSON.parse(f):eval("("+f+")");return f.hasOwnProperty("d")?f.d:f},empty:function(){for(;this.firstChild;)this.removeChild(this.firstChild)},jqID:function(f){f+="";return f.replace(/([\.\:\[\]])/g,"\\$1")},
-ajaxOptions:{},extend:function(f){b.extend(b.fn.jqGrid,f);this.no_legacy_api||b.fn.extend(f)}});b.fn.jqGrid=function(f){if(typeof f=="string"){var k=b.fn.jqGrid[f];if(!k)throw"jqGrid - No such method: "+f;var i=b.makeArray(arguments).slice(1);return k.apply(this,i)}return this.each(function(){if(!this.grid){var h=b.extend(true,{url:"",height:150,page:1,rowNum:20,records:0,pager:"",pgbuttons:true,pginput:true,colModel:[],rowList:[],colNames:[],sortorder:"asc",sortname:"",datatype:"xml",mtype:"GET",
-altRows:false,selarrrow:[],savedRow:[],shrinkToFit:true,xmlReader:{},jsonReader:{},subGrid:false,subGridModel:[],reccount:0,lastpage:0,lastsort:0,selrow:null,beforeSelectRow:null,onSelectRow:null,onSortCol:null,ondblClickRow:null,onRightClickRow:null,onPaging:null,onSelectAll:null,loadComplete:null,gridComplete:null,loadError:null,loadBeforeSend:null,afterInsertRow:null,beforeRequest:null,onHeaderClick:null,viewrecords:false,loadonce:false,multiselect:false,multikey:false,editurl:null,search:false,
-caption:"",hidegrid:true,hiddengrid:false,postData:{},userData:{},treeGrid:false,treeGridModel:"nested",treeReader:{},treeANode:-1,ExpandColumn:null,tree_root_level:0,prmNames:{page:"page",rows:"rows",sort:"sidx",order:"sord",search:"_search",nd:"nd",id:"id",oper:"oper",editoper:"edit",addoper:"add",deloper:"del"},forceFit:false,gridstate:"visible",cellEdit:false,cellsubmit:"remote",nv:0,loadui:"enable",toolbar:[false,""],scroll:false,multiboxonly:false,deselectAfterSort:true,scrollrows:false,autowidth:false,
-scrollOffset:18,cellLayout:5,subGridWidth:20,multiselectWidth:20,gridview:false,rownumWidth:25,rownumbers:false,pagerpos:"center",recordpos:"right",footerrow:false,userDataOnFooter:false,hoverrows:true,altclass:"ui-priority-secondary",viewsortcols:[false,"vertical",true],resizeclass:"",autoencode:false,remapColumns:[],ajaxGridOptions:{},direction:"ltr",toppager:false},b.jgrid.defaults,f||{}),g={headers:[],cols:[],footers:[],dragStart:function(c,d,e){this.resizing={idx:c,startX:d.clientX,sOL:e[0]};
-this.hDiv.style.cursor="col-resize";this.curGbox=b("#rs_m"+h.id,"#gbox_"+h.id);this.curGbox.css({display:"block",left:e[0],top:e[1],height:e[2]});b.isFunction(h.resizeStart)&&h.resizeStart.call(this,d,c);document.onselectstart=new Function("return false")},dragMove:function(c){if(this.resizing){var d=c.clientX-this.resizing.startX;c=this.headers[this.resizing.idx];var e=h.direction==="ltr"?c.width+d:c.width-d,l;if(e>33){this.curGbox.css({left:this.resizing.sOL+d});if(h.forceFit===true){l=this.headers[this.resizing.idx+
-h.nv];d=h.direction==="ltr"?l.width-d:l.width+d;if(d>33){c.newWidth=e;l.newWidth=d}}else{this.newWidth=h.direction==="ltr"?h.tblwidth+d:h.tblwidth-d;c.newWidth=e}}}},dragEnd:function(){this.hDiv.style.cursor="default";if(this.resizing){var c=this.resizing.idx,d=this.headers[c].newWidth||this.headers[c].width;d=parseInt(d,10);this.resizing=false;b("#rs_m"+h.id).css("display","none");h.colModel[c].width=d;this.headers[c].width=d;this.headers[c].el.style.width=d+"px";if(this.cols.length>0)this.cols[c].style.width=
-d+"px";if(this.footers.length>0)this.footers[c].style.width=d+"px";if(h.forceFit===true){d=this.headers[c+h.nv].newWidth||this.headers[c+h.nv].width;this.headers[c+h.nv].width=d;this.headers[c+h.nv].el.style.width=d+"px";if(this.cols.length>0)this.cols[c+h.nv].style.width=d+"px";if(this.footers.length>0)this.footers[c+h.nv].style.width=d+"px";h.colModel[c+h.nv].width=d}else{h.tblwidth=this.newWidth||h.tblwidth;b("table:first",this.bDiv).css("width",h.tblwidth+"px");b("table:first",this.hDiv).css("width",
-h.tblwidth+"px");this.hDiv.scrollLeft=this.bDiv.scrollLeft;if(h.footerrow){b("table:first",this.sDiv).css("width",h.tblwidth+"px");this.sDiv.scrollLeft=this.bDiv.scrollLeft}}b.isFunction(h.resizeStop)&&h.resizeStop.call(this,d,c)}this.curGbox=null;document.onselectstart=new Function("return true")},populateVisible:function(){g.timer&&clearTimeout(g.timer);g.timer=null;var c=b(g.bDiv).height();if(c){var d=b("table:first",g.bDiv),e=b("> tbody > tr:visible:first",d).outerHeight()||g.prevRowHeight;if(e){g.prevRowHeight=
-e;var l=h.rowNum,n=g.scrollTop=g.bDiv.scrollTop,s=Math.round(d.position().top)-n,p=s+d.height();e=e*l;var w,r,o;if(s<=0&&p<c&&(h.lastpage==null||parseInt((p+n+e-1)/e,10)<h.lastpage)){r=parseInt((c-p+e-1)/e,10);if(p>=0||r<2||h.scroll===true){w=Math.round((p+n)/e)+1;s=-1}else s=1}if(s>0){w=parseInt(n/e,10)+1;r=parseInt((n+c)/e,10)+2-w;o=true}if(r)if(!(h.lastpage&&w>h.lastpage))if(g.hDiv.loading)g.timer=setTimeout(g.populateVisible,200);else{h.page=w;if(o){g.selectionPreserver(d[0]);g.emptyRows(g.bDiv)}g.populate(r)}}}},
-scrollGrid:function(){if(h.scroll){var c=g.bDiv.scrollTop;if(c!=g.scrollTop){g.scrollTop=c;g.timer&&clearTimeout(g.timer);g.timer=setTimeout(g.populateVisible,200)}}g.hDiv.scrollLeft=g.bDiv.scrollLeft;if(h.footerrow)g.sDiv.scrollLeft=g.bDiv.scrollLeft},selectionPreserver:function(c){var d=c.p,e=d.selrow,l=d.selarrrow?b.makeArray(d.selarrrow):null,n=c.grid.bDiv.scrollLeft,s=d.gridComplete;d.gridComplete=function(){d.selrow=null;d.selarrrow=[];if(d.multiselect&&l&&l.length>0)for(var p=0;p<l.length;p++)l[p]!=
-e&&b(c).jqGrid("setSelection",l[p],false);e&&b(c).jqGrid("setSelection",e,false);c.grid.bDiv.scrollLeft=n;if(d.gridComplete=s)s()}}};this.p=h;var j,m,a;if(this.p.colNames.length===0)for(j=0;j<this.p.colModel.length;j++)this.p.colNames[j]=this.p.colModel[j].label||this.p.colModel[j].name;if(this.p.colNames.length!==this.p.colModel.length)alert(b.jgrid.errors.model);else{var q=b("<div class='ui-jqgrid-view'></div>"),u,y=b.browser.msie?true:false,B=b.browser.safari?true:false;a=this;a.p.direction=b.trim(a.p.direction.toLowerCase());
-if(b.inArray(a.p.direction,["ltr","rtl"])==-1)a.p.direction="ltr";m=a.p.direction;b(q).insertBefore(this);b(this).appendTo(q).removeClass("scroll");var K=b("<div class='ui-jqgrid ui-widget ui-widget-content ui-corner-all'></div>");b(K).insertBefore(q).attr({id:"gbox_"+this.id,dir:m});b(q).appendTo(K).attr("id","gview_"+this.id);u=y&&b.browser.version<=6?'<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>':"";b("<div class='ui-widget-overlay jqgrid-overlay' id='lui_"+
-this.id+"'></div>").append(u).insertBefore(q);b("<div class='loading ui-state-default ui-state-active' id='load_"+this.id+"'>"+this.p.loadtext+"</div>").insertBefore(q);b(this).attr({cellSpacing:"0",cellPadding:"0",border:"0",role:"grid","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id});var J=function(c,d){c=parseInt(c,10);return isNaN(c)?d?d:0:c},F=function(c,d){var e=a.p.colModel[c].align,l='style="',n=a.p.colModel[c].classes;if(e)l+="text-align:"+e+";";if(a.p.colModel[c].hidden===
-true)l+="display:none;";if(d===0)l+="width: "+g.headers[c].width+"px;";return l+'"'+(n!==undefined?' class="'+n+'"':"")},S=function(c,d,e,l,n){c=M(c,d,e,n,"add");return'<td role="gridcell" '+F(e,l)+' title="'+b.jgrid.stripHtml(c)+'">'+c+"</td>"},M=function(c,d,e,l,n){e=a.p.colModel[e];if(typeof e.formatter!=="undefined"){c={rowId:c,colModel:e,gid:a.p.id};d=b.isFunction(e.formatter)?e.formatter.call(a,d,c,l,n):b.fmatter?b.fn.fmatter(e.formatter,d,c,l,n):t(d)}else d=t(d);return d},t=function(c){return c===
-undefined||c===null||c===""?"&#160;":a.p.autoencode?b.jgrid.htmlEncode(c):c+""},ia=function(c,d,e){c='<input type="checkbox" id="jqg_'+c+'" class="cbox" name="jqg_'+c+'"/>';return"<td role='gridcell' "+F(d,e)+">"+c+"</td>"},aa=function(c,d,e,l){e=(parseInt(e,10)-1)*parseInt(l,10)+1+d;return'<td role="gridcell" class="ui-state-default jqgrid-rownum" '+F(c,d)+">"+e+"</td>"},ja=function(c){var d,e=[],l=0,n;for(n=0;n<a.p.colModel.length;n++){d=a.p.colModel[n];if(d.name!=="cb"&&d.name!=="subgrid"&&d.name!==
-"rn"){e[l]=c=="xml"?d.xmlmap||d.name:d.jsonmap||d.name;l++}}return e},pa=function(c){var d=a.p.remapColumns;if(!d||!d.length)d=b.map(a.p.colModel,function(e,l){return l});if(c)d=b.map(d,function(e){return e<c?null:e-c});return d},$=function(c,d){var e=b("tbody:first",c);if(!a.p.gridview||a.p.jqgdnd)b("*",e).children().unbind();if(y)b.jgrid.empty.apply(e[0]);else e[0].innerHTML="";if(d&&a.p.scroll){b(">div:first",c).css({height:"auto"}).children("div:first").css({height:0,display:"none"});c.scrollTop=
-0}},T=function(c,d){var e,l;e=c[d];if(e===undefined){if(typeof d==="string")l=d.split(".");if(l.length)for(e=c;e&&l.length;){c=l.shift();e=e[c]}}return e},qa=function(c,d,e,l,n){var s=new Date;a.p.reccount=0;if(b.isXMLDoc(c)){if(a.p.treeANode===-1&&!a.p.scroll){$(d);e=0}else e=e>0?e:0;var p,w=0,r,o,v=0,x=0,z=0,D,N,L=[],P,G={},ba=a.rows.length,E,V,C=[],Q=0,da=a.p.altRows===true?" "+a.p.altclass:"";a.p.xmlReader.repeatitems||(L=ja("xml"));D=a.p.keyIndex===false?a.p.xmlReader.id:a.p.keyIndex;if(L.length>
-0&&!isNaN(D)){if(a.p.remapColumns&&a.p.remapColumns.length)D=b.inArray(D,a.p.remapColumns);D=L[D]}N=(D+"").indexOf("[")===-1?L.length?function(W,U){return b(D,W).text()||U}:function(W,U){return b(a.p.xmlReader.cell,W).eq(D).text()||U}:function(W,U){return W.getAttribute(D.replace(/[\[\]]/g,""))||U};b(a.p.xmlReader.page,c).each(function(){a.p.page=this.textContent||this.text||1});b(a.p.xmlReader.total,c).each(function(){a.p.lastpage=this.textContent||this.text;if(a.p.lastpage===undefined)a.p.lastpage=
-1});b(a.p.xmlReader.records,c).each(function(){a.p.records=this.textContent||this.text||0});b(a.p.xmlReader.userdata,c).each(function(){a.p.userData[this.getAttribute("name")]=this.textContent||this.text});c=b(a.p.xmlReader.root+" "+a.p.xmlReader.row,c);var ea=c.length,O=0;if(c&&ea){var ka=parseInt(a.p.rowNum,10),wa=a.p.scroll?(parseInt(a.p.page,10)-1)*ka+1:1;if(n)ka*=n+1;for(n=b.isFunction(a.p.afterInsertRow);O<ea;){E=c[O];V=N(E,wa+O);p=e==0?0:e+1;p=(p+O)%2==1?da:"";C[Q++]='<tr id="'+V+'" role="row" class ="ui-widget-content jqgrow ui-row-'+
-a.p.direction+""+p+'">';if(a.p.rownumbers===true){C[Q++]=aa(0,O,a.p.page,a.p.rowNum);z=1}if(a.p.multiselect===true){C[Q++]=ia(V,z,O);v=1}if(a.p.subGrid===true){C[Q++]=b(a).jqGrid("addSubGridCell",v+z,O+e);x=1}if(a.p.xmlReader.repeatitems){P||(P=pa(v+x+z));var Aa=b(a.p.xmlReader.cell,E);b.each(P,function(W){var U=Aa[this];if(!U)return false;r=U.textContent||U.text;G[a.p.colModel[W+v+x+z].name]=r;C[Q++]=S(V,r,W+v+x+z,O+e,E)})}else for(p=0;p<L.length;p++){r=b(L[p],E).text();G[a.p.colModel[p+v+x+z].name]=
-r;C[Q++]=S(V,r,p+v+x+z,O+e,E)}C[Q++]="</tr>";if(a.p.gridview===false){if(a.p.treeGrid===true){p=a.p.treeANode>=-1?a.p.treeANode:0;o=b(C.join(""))[0];try{b(a).jqGrid("setTreeNode",G,o)}catch(Ga){}ba===0?b("tbody:first",d).append(o):b(a.rows[O+p+e]).after(o)}else b("tbody:first",d).append(C.join(""));if(a.p.subGrid===true)try{b(a).jqGrid("addSubGrid",a.rows[a.rows.length-1],v+z)}catch(Ha){}n&&a.p.afterInsertRow.call(a,V,G,E);C=[];Q=0}G={};w++;O++;if(w==ka)break}}a.p.gridview===true&&b("tbody:first",
-d).append(C.join(""));a.p.totaltime=new Date-s;if(w>0){a.grid.cols=a.rows[0].cells;if(a.p.records===0)a.p.records=ea}C=null;if(!a.p.treeGrid&&!a.p.scroll)a.grid.bDiv.scrollTop=0;a.p.reccount=w;a.p.treeANode=-1;a.p.userDataOnFooter&&b(a).jqGrid("footerData","set",a.p.userData,true);l||la(false,true)}},ra=function(c,d,e,l,n){var s=new Date;a.p.reccount=0;if(c){if(a.p.treeANode===-1&&!a.p.scroll){$(d);e=0}else e=e>0?e:0;var p=0,w,r,o,v=[],x,z=0,D=0,N=0,L,P,G,ba={},E,V=a.rows.length,C;o=[];E=0;var Q=
-a.p.altRows===true?" "+a.p.altclass:"";a.p.page=T(c,a.p.jsonReader.page)||1;G=T(c,a.p.jsonReader.total);a.p.lastpage=G===undefined?1:G;a.p.records=T(c,a.p.jsonReader.records)||0;a.p.userData=T(c,a.p.jsonReader.userdata)||{};a.p.jsonReader.repeatitems||(x=v=ja("json"));G=a.p.keyIndex===false?a.p.jsonReader.id:a.p.keyIndex;if(v.length>0&&!isNaN(G)){if(a.p.remapColumns&&a.p.remapColumns.length)G=b.inArray(G,a.p.remapColumns);G=v[G]}if(P=T(c,a.p.jsonReader.root)){L=P.length;c=0;var da=parseInt(a.p.rowNum,
-10),ea=a.p.scroll?(parseInt(a.p.page,10)-1)*da+1:1;if(n)da*=n+1;for(var O=b.isFunction(a.p.afterInsertRow);c<L;){n=P[c];C=n[G];if(C===undefined){C=ea+c;if(v.length===0)if(a.p.jsonReader.cell)C=n[a.p.jsonReader.cell][G]||C}w=e==0?0:e+1;w=(w+c)%2==1?Q:"";o[E++]='<tr id="'+C+'" role="row" class= "ui-widget-content jqgrow ui-row-'+a.p.direction+""+w+'">';if(a.p.rownumbers===true){o[E++]=aa(0,c,a.p.page,a.p.rowNum);N=1}if(a.p.multiselect){o[E++]=ia(C,N,c);z=1}if(a.p.subGrid){o[E++]=b(a).jqGrid("addSubGridCell",
-z+N,c+e);D=1}if(a.p.jsonReader.repeatitems){if(a.p.jsonReader.cell)n=T(n,a.p.jsonReader.cell);x||(x=pa(z+D+N))}for(r=0;r<x.length;r++){w=T(n,x[r]);o[E++]=S(C,w,r+z+D+N,c+e,n);ba[a.p.colModel[r+z+D+N].name]=w}o[E++]="</tr>";if(a.p.gridview===false){if(a.p.treeGrid===true){E=a.p.treeANode>=-1?a.p.treeANode:0;o=b(o.join(""))[0];try{b(a).jqGrid("setTreeNode",ba,o)}catch(ka){}V===0?b("tbody:first",d).append(o):b(a.rows[c+E+e]).after(o)}else b("tbody:first",d).append(o.join(""));if(a.p.subGrid===true)try{b(a).jqGrid("addSubGrid",
-a.rows[a.rows.length-1],z+N)}catch(wa){}O&&a.p.afterInsertRow.call(a,C,ba,n);o=[];E=0}ba={};p++;c++;if(p==da)break}a.p.gridview===true&&b("tbody:first",d).append(o.join(""));a.p.totaltime=new Date-s;if(p>0){a.grid.cols=a.rows[0].cells;if(a.p.records===0)a.p.records=L}}if(!a.p.treeGrid&&!a.p.scroll)a.grid.bDiv.scrollTop=0;a.p.reccount=p;a.p.treeANode=-1;a.p.userDataOnFooter&&b(a).jqGrid("footerData","set",a.p.userData,true);l||la(false,true)}},la=function(c,d){var e,l,n,s,p,w,r,o="";n=(parseInt(a.p.page,
-10)-1)*parseInt(a.p.rowNum,10);p=n+a.p.reccount;if(a.p.scroll){e=b("tbody:first > tr",a.grid.bDiv);n=p-e.length;if(l=e.outerHeight()){e=n*l;l=parseInt(a.p.records,10)*l;b(">div:first",a.grid.bDiv).css({height:l}).children("div:first").css({height:e,display:e?"":"none"})}}o=a.p.pager?a.p.pager:"";o+=a.p.toppager?o?","+a.p.toppager:a.p.toppager:"";if(o){r=b.jgrid.formatter.integer||{};if(a.p.loadonce){e=l=1;a.p.lastpage=a.page=1;b(".selbox",o).attr("disabled",true)}else{e=J(a.p.page,1);l=J(a.p.lastpage,
-1);b(".selbox",o).attr("disabled",false)}if(a.p.pginput===true){b(".ui-pg-input",o).val(a.p.page);b("#sp_1",o).html(b.fmatter?b.fmatter.util.NumberFormat(a.p.lastpage,r):a.p.lastpage)}if(a.p.viewrecords)if(a.p.reccount===0)b(".ui-paging-info",o).html(a.p.emptyrecords);else{s=n+1;w=a.p.records;if(b.fmatter){s=b.fmatter.util.NumberFormat(s,r);p=b.fmatter.util.NumberFormat(p,r);w=b.fmatter.util.NumberFormat(w,r)}b(".ui-paging-info",o).html(b.jgrid.format(a.p.recordtext,s,p,w))}if(a.p.pgbuttons===true){if(e<=
-0)e=l=1;if(e==1){b("#first, #prev",a.p.pager).addClass("ui-state-disabled").removeClass("ui-state-hover");a.p.toppager&&b("#first_t, #prev_t",a.p.toppager).addClass("ui-state-disabled").removeClass("ui-state-hover")}else{b("#first, #prev",a.p.pager).removeClass("ui-state-disabled");a.p.toppager&&b("#first_t, #prev_t",a.p.toppager).removeClass("ui-state-disabled")}if(e==l){b("#next, #last",a.p.pager).addClass("ui-state-disabled").removeClass("ui-state-hover");a.p.toppager&&b("#next_t, #last_t",a.p.toppager).addClass("ui-state-disabled").removeClass("ui-state-hover")}else{b("#next, #last",
-a.p.pager).removeClass("ui-state-disabled");a.p.toppager&&b("#next_t, #last_t",a.p.toppager).removeClass("ui-state-disabled")}}}c===true&&a.p.rownumbers===true&&b("td.jqgrid-rownum",a.rows).each(function(v){b(this).html(n+1+v)});d&&a.p.jqgdnd&&b(a).jqGrid("gridDnD","updateDnD");b.isFunction(a.p.gridComplete)&&a.p.gridComplete.call(a)},X=function(c){if(!a.grid.hDiv.loading){var d=a.p.scroll&&c==false,e={},l,n=a.p.prmNames;if(n.search!==null)e[n.search]=a.p.search;if(n.nd!=null)e[n.nd]=(new Date).getTime();
-if(n.rows!==null)e[n.rows]=a.p.rowNum;if(n.page!==null)e[n.page]=a.p.page;if(n.sort!==null)e[n.sort]=a.p.sortname;if(n.order!==null)e[n.order]=a.p.sortorder;var s=a.p.loadComplete,p=b.isFunction(s);p||(s=null);var w=0;c=c||1;if(c>1)if(n.npage!=null){e[n.npage]=c;w=c-1;c=1}else s=function(o){p&&a.p.loadComplete.call(a,o);a.grid.hDiv.loading=false;a.p.page++;X(c-1)};else n.npage!=null&&delete a.p.postData[n.npage];b.extend(a.p.postData,e);var r=!a.p.scroll?0:a.rows.length-1;if(b.isFunction(a.p.datatype))a.p.datatype.call(a,
-a.p.postData,"load_"+a.p.id);else{b.isFunction(a.p.beforeRequest)&&a.p.beforeRequest.call(a);l=a.p.datatype.toLowerCase();switch(l){case "json":case "jsonp":case "xml":case "script":b.ajax(b.extend({url:a.p.url,type:a.p.mtype,dataType:l,data:b.isFunction(a.p.serializeGridData)?a.p.serializeGridData.call(a,a.p.postData):a.p.postData,complete:function(o,v){if(v=="success"||o.statusText=="OK"&&o.status=="200"){l==="xml"?qa(o.responseXML,a.grid.bDiv,r,c>1,w):ra(b.jgrid.parse(o.responseText),a.grid.bDiv,
-r,c>1,w);s&&s.call(a,o);d&&a.grid.populateVisible()}fa()},error:function(o,v,x){b.isFunction(a.p.loadError)&&a.p.loadError.call(a,o,v,x);fa()},beforeSend:function(o){ma();b.isFunction(a.p.loadBeforeSend)&&a.p.loadBeforeSend.call(a,o)}},b.jgrid.ajaxOptions,a.p.ajaxGridOptions));if(a.p.loadonce||a.p.treeGrid)a.p.datatype="local";break;case "xmlstring":ma();e=b.jgrid.stringToDoc(a.p.datastr);p&&a.p.loadComplete.call(a,e);qa(e,a.grid.bDiv);a.p.datatype="local";a.p.datastr=null;fa();break;case "jsonstring":ma();
-e=typeof a.p.datastr=="string"?b.jgrid.parse(a.p.datastr):a.p.datastr;p&&a.p.loadComplete.call(a,e);ra(e,a.grid.bDiv);a.p.datatype="local";a.p.datastr=null;fa();break;case "local":case "clientside":ma();a.p.datatype="local";p&&a.p.loadComplete.call(a,"");Ba();la(true,true);fa();break}}}},ma=function(){a.grid.hDiv.loading=true;if(!a.p.hiddengrid)switch(a.p.loadui){case "disable":break;case "enable":b("#load_"+a.p.id).show();break;case "block":b("#lui_"+a.p.id).show();b("#load_"+a.p.id).show();break}},
-fa=function(){a.grid.hDiv.loading=false;switch(a.p.loadui){case "disable":break;case "enable":b("#load_"+a.p.id).hide();break;case "block":b("#lui_"+a.p.id).hide();b("#load_"+a.p.id).hide();break}},Ba=function(){var c=/[\$,%]/g,d=[],e=0,l,n,s,p=a.p.sortorder=="asc"?1:-1;b.each(a.p.colModel,function(r){if(this.index==a.p.sortname||this.name==a.p.sortname){e=a.p.lastsort=r;l=this.sorttype;return false}});s=l=="float"||l=="number"||l=="currency"?function(r){r=parseFloat(r.replace(c,""));return isNaN(r)?
-0:r}:l=="int"||l=="integer"?function(r){return J(r.replace(c,""),0)}:l=="date"||l=="datetime"?function(r){return Ca(a.p.colModel[e].datefmt||"Y-m-d",r).getTime()}:function(r){return b.trim(r.toUpperCase())};b.each(a.rows,function(r,o){try{n=b.unformat(b(o).children("td").eq(e),{rowId:o.id,colModel:a.p.colModel[e]},e,true)}catch(v){n=b(o).children("td").eq(e).text()}o.sortKey=s(n);d[r]=this});if(a.p.treeGrid)b(a).jqGrid("SortTree",p);else{d.sort(function(r,o){if(r.sortKey<o.sortKey)return-p;if(r.sortKey>
-o.sortKey)return p;return 0});if(d[0]){b("td",d[0]).each(function(r){b(this).css("width",g.headers[r].width+"px")});a.grid.cols=d[0].cells}var w="";if(a.p.altRows)w=a.p.altclass;b.each(d,function(r,o){if(w)r%2==1?b(o).addClass(w):b(o).removeClass(w);b("tbody",a.grid.bDiv).append(o);o.sortKey=null})}a.grid.bDiv.scrollTop=0},Ca=function(c,d){var e={m:1,d:1,y:1970,h:0,i:0,s:0},l,n,s;d=d.split(/[\\\/:_;.\t\T\s-]/);c=c.split(/[\\\/:_;.\t\T\s-]/);var p=b.jgrid.formatter.date.monthNames;l=0;for(n=c.length;l<
-n;l++){if(c[l]=="M"){s=b.inArray(d[l],p);if(s!==-1&&s<12)d[l]=s+1}if(c[l]=="F"){s=b.inArray(d[l],p);if(s!==-1&&s>11)d[l]=s+1-12}e[c[l].toLowerCase()]=parseInt(d[l],10)}e.m=parseInt(e.m,10)-1;c=e.y;if(c>=70&&c<=99)e.y=1900+e.y;else if(c>=0&&c<=69)e.y=2E3+e.y;return new Date(e.y,e.m,e.d,e.h,e.i,e.s,0)};u=function(c,d){var e="",l="<table cellspacing='0' cellpadding='0' border='0' style='table-layout:auto;' class='ui-pg-table'><tbody><tr>",n="",s,p,w,r,o=function(v){a.p.selrow=null;if(a.p.multiselect){a.p.selarrrow=
-[];b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false)}a.p.savedRow=[];if(b.isFunction(a.p.onPaging))if(a.p.onPaging.call(a,v)=="stop")return false;return true};c=c.substr(1);s="pg_"+c;p=c+"_left";w=c+"_center";r=c+"_right";b("#"+c).append("<div id='"+s+"' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;table-layout:fixed;' role='row'><tbody><tr><td id='"+p+"' align='left'></td><td id='"+w+"' align='center' style='white-space:pre;'></td><td id='"+
-r+"' align='right'></td></tr></tbody></table></div>").attr("dir","ltr");if(a.p.rowList.length>0){n="<td dir='"+m+"'>";n+="<select class='ui-pg-selbox' role='listbox'>";for(p=0;p<a.p.rowList.length;p++)n+="<option role='option' value='"+a.p.rowList[p]+"'"+(a.p.rowNum==a.p.rowList[p]?" selected":"")+">"+a.p.rowList[p]+"</option>";n+="</select></td>"}if(m=="rtl")l+=n;if(a.p.pginput===true)e="<td dir='"+m+"'>"+b.jgrid.format(a.p.pgtext||"","<input class='ui-pg-input' type='text' size='2' maxlength='7' value='0' role='textbox'/>",
-"<span id='sp_1'></span>")+"</td>";if(a.p.pgbuttons===true){p=["first"+d,"prev"+d,"next"+d,"last"+d];m=="rtl"&&p.reverse();l+="<td id='"+p[0]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-first'></span></td>";l+="<td id='"+p[1]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-prev'></span></td>";l+=e!=""?"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>"+e+"<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>":
-"";l+="<td id='"+p[2]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-next'></span></td>";l+="<td id='"+p[3]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-end'></span></td>"}else if(e!="")l+=e;if(m=="ltr")l+=n;l+="</tr></tbody></table>";a.p.viewrecords===true&&b("td#"+c+"_"+a.p.recordpos,"#"+s).append("<div dir='"+m+"' style='text-align:"+a.p.recordpos+"' class='ui-paging-info'></div>");b("td#"+c+"_"+a.p.pagerpos,"#"+s).append(l);n=b(".ui-jqgrid").css("font-size")||
-"11px";b("body").append("<div id='testpg' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+n+";visibility:hidden;' ></div>");l=b(l).clone().appendTo("#testpg").width();b("#testpg").remove();if(l>0){if(e!="")l+=50;b("td#"+c+"_"+a.p.pagerpos,"#"+s).width(l)}a.p._nvtd=[];a.p._nvtd[0]=l?Math.floor((a.p.width-l)/2):Math.floor(a.p.width/3);a.p._nvtd[1]=0;l=null;b(".ui-pg-selbox","#"+s).bind("change",function(){a.p.page=Math.round(a.p.rowNum*(a.p.page-1)/this.value-0.5)+1;a.p.rowNum=this.value;
-if(d)b(".ui-pg-selbox",a.p.pager).val(this.value);else a.p.toppager&&b(".ui-pg-selbox",a.p.toppager).val(this.value);if(!o("records"))return false;X();return false});if(a.p.pgbuttons===true){b(".ui-pg-button","#"+s).hover(function(){if(b(this).hasClass("ui-state-disabled"))this.style.cursor="default";else{b(this).addClass("ui-state-hover");this.style.cursor="pointer"}},function(){if(!b(this).hasClass("ui-state-disabled")){b(this).removeClass("ui-state-hover");this.style.cursor="default"}});b("#first"+
-d+", #prev"+d+", #next"+d+", #last"+d,"#"+c).click(function(){var v=J(a.p.page,1),x=J(a.p.lastpage,1),z=false,D=true,N=true,L=true,P=true;if(x===0||x===1)P=L=N=D=false;else if(x>1&&v>=1)if(v===1)N=D=false;else{if(!(v>1&&v<x))if(v===x)P=L=false}else if(x>1&&v===0){P=L=false;v=x-1}if(this.id==="first"+d&&D){a.p.page=1;z=true}if(this.id==="prev"+d&&N){a.p.page=v-1;z=true}if(this.id==="next"+d&&L){a.p.page=v+1;z=true}if(this.id==="last"+d&&P){a.p.page=x;z=true}if(z){if(!o(this.id))return false;X()}return false})}a.p.pginput===
-true&&b("input.ui-pg-input","#"+s).keypress(function(v){if((v.charCode?v.charCode:v.keyCode?v.keyCode:0)==13){a.p.page=b(this).val()>0?b(this).val():a.p.page;if(!o("user"))return false;X();return false}return this})};var xa=function(c,d,e,l){if(a.p.colModel[d].sortable)if(!(a.p.savedRow.length>0)){if(!e){if(a.p.lastsort==d)if(a.p.sortorder=="asc")a.p.sortorder="desc";else{if(a.p.sortorder=="desc")a.p.sortorder="asc"}else a.p.sortorder="asc";a.p.page=1}if(l)if(a.p.lastsort==d&&a.p.sortorder==l)return;
-else a.p.sortorder=l;e=b("thead:first",a.grid.hDiv).get(0);b("tr th:eq("+a.p.lastsort+") span.ui-grid-ico-sort",e).addClass("ui-state-disabled");b("tr th:eq("+a.p.lastsort+")",e).attr("aria-selected","false");b("tr th:eq("+d+") span.ui-icon-"+a.p.sortorder,e).removeClass("ui-state-disabled");b("tr th:eq("+d+")",e).attr("aria-selected","true");if(!a.p.viewsortcols[0])if(a.p.lastsort!=d){b("tr th:eq("+a.p.lastsort+") span.s-ico",e).hide();b("tr th:eq("+d+") span.s-ico",e).show()}a.p.lastsort=d;c=c.substring(5);
-a.p.sortname=a.p.colModel[d].index||c;e=a.p.sortorder;if(b.isFunction(a.p.onSortCol))if(a.p.onSortCol.call(a,c,d,e)=="stop")return;if(a.p.datatype=="local")a.p.deselectAfterSort&&b(a).jqGrid("resetSelection");else{a.p.selrow=null;a.p.multiselect&&b("#cb_"+b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false);a.p.selarrrow=[];a.p.savedRow=[];a.p.scroll&&$(a.grid.bDiv,true)}a.p.subGrid&&a.p.datatype=="local"&&b("td.sgexpanded","#"+a.p.id).each(function(){b(this).trigger("click")});X();if(a.p.sortname!=
-c&&d)a.p.lastsort=d}},Da=function(c){var d=c,e;for(e=c+1;e<a.p.colModel.length;e++)if(a.p.colModel[e].hidden!==true){d=e;break}return d-c},Ea=function(c){var d,e={},l=B?0:a.p.cellLayout;for(d=e[0]=e[1]=e[2]=0;d<=c;d++)if(a.p.colModel[d].hidden===false)e[0]+=a.p.colModel[d].width+l;if(a.p.direction=="rtl")e[0]=a.p.width-e[0];e[0]-=a.grid.bDiv.scrollLeft;if(b(a.grid.cDiv).is(":visible"))e[1]+=b(a.grid.cDiv).height()+parseInt(b(a.grid.cDiv).css("padding-top"),10)+parseInt(b(a.grid.cDiv).css("padding-bottom"),
-10);if(a.p.toolbar[0]==true&&(a.p.toolbar[1]=="top"||a.p.toolbar[1]=="both"))e[1]+=b(a.grid.uDiv).height()+parseInt(b(a.grid.uDiv).css("border-top-width"),10)+parseInt(b(a.grid.uDiv).css("border-bottom-width"),10);if(a.p.toppager)e[1]+=b(a.grid.topDiv).height()+parseInt(b(a.grid.topDiv).css("border-bottom-width"),10);e[2]+=b(a.grid.bDiv).height()+b(a.grid.hDiv).height();return e};this.p.id=this.id;if(b.inArray(a.p.multikey,["shiftKey","altKey","ctrlKey"])==-1)a.p.multikey=false;a.p.keyIndex=false;
-for(j=0;j<a.p.colModel.length;j++)if(a.p.colModel[j].key===true){a.p.keyIndex=j;break}a.p.sortorder=a.p.sortorder.toLowerCase();if(this.p.treeGrid===true)try{b(this).jqGrid("setTreeGrid")}catch(Ia){}if(this.p.subGrid)try{b(a).jqGrid("setSubGrid")}catch(Ja){}if(this.p.multiselect){this.p.colNames.unshift("<input id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");this.p.colModel.unshift({name:"cb",width:B?a.p.multiselectWidth+a.p.cellLayout:a.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,
-search:false,align:"center",fixed:true})}if(this.p.rownumbers){this.p.colNames.unshift("");this.p.colModel.unshift({name:"rn",width:a.p.rownumWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:"center",fixed:true})}a.p.xmlReader=b.extend(true,{root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:true,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:true,cell:"cell"}},a.p.xmlReader);a.p.jsonReader=b.extend(true,
-{root:"rows",page:"page",total:"total",records:"records",repeatitems:true,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}},a.p.jsonReader);if(a.p.scroll){a.p.pgbuttons=false;a.p.pginput=false;a.p.rowList=[]}var H="<thead><tr class='ui-jqgrid-labels' role='rowheader'>",ya,ga,sa,ha,na,I,A,ca;ga=ca="";if(a.p.shrinkToFit===true&&a.p.forceFit===true)for(j=a.p.colModel.length-1;j>=0;j--)if(!a.p.colModel[j].hidden){a.p.colModel[j].resizable=false;break}if(a.p.viewsortcols[1]==
-"horizontal"){ca=" ui-i-asc";ga=" ui-i-desc"}ya=y?"class='ui-th-div-ie'":"";ca="<span class='s-ico' style='display:none'><span sort='asc' class='ui-grid-ico-sort ui-icon-asc"+ca+" ui-state-disabled ui-icon ui-icon-triangle-1-n ui-sort-"+m+"'></span>";ca+="<span sort='desc' class='ui-grid-ico-sort ui-icon-desc"+ga+" ui-state-disabled ui-icon ui-icon-triangle-1-s ui-sort-"+m+"'></span></span>";for(j=0;j<this.p.colNames.length;j++){H+="<th role='columnheader' class='ui-state-default ui-th-column ui-th-"+
-m+"'>";ga=a.p.colModel[j].index||a.p.colModel[j].name;H+="<div id='jqgh_"+a.p.colModel[j].name+"' "+ya+">"+a.p.colNames[j];if(ga==a.p.sortname)a.p.lastsort=j;H+=ca+"</div></th>"}H+="</tr></thead>";b(this).append(H);b("thead tr:first th",this).hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});if(this.p.multiselect){var za=true,ta=[],oa;if(typeof a.p.onSelectAll!=="function")za=false;b("#cb_"+b.jgrid.jqID(a.p.id),this).bind("click",function(){if(this.checked){b("[id^=jqg_]",
-a.rows).attr("checked",true);b(a.rows).each(function(c){if(!b(this).hasClass("subgrid")){b(this).addClass("ui-state-highlight").attr("aria-selected","true");a.p.selarrrow[c]=a.p.selrow=this.id}});oa=true;ta=[]}else{b("[id^=jqg_]",a.rows).attr("checked",false);b(a.rows).each(function(c){if(!b(this).hasClass("subgrid")){b(this).removeClass("ui-state-highlight").attr("aria-selected","false");ta[c]=this.id}});a.p.selarrrow=[];a.p.selrow=null;oa=false}if(za)a.p.onSelectAll.call(a,oa?a.p.selarrrow:ta,oa)})}b.each(a.p.colModel,
-function(){if(!this.width)this.width=150;this.width=parseInt(this.width,10)});if(a.p.autowidth===true){H=b(K).innerWidth();a.p.width=H>0?H:"nw"}(function(){var c=0,d=a.p.cellLayout,e=0,l,n=a.p.scrollOffset,s,p=false,w,r=0,o=0,v=0,x;if(B)d=0;b.each(a.p.colModel,function(){if(typeof this.hidden==="undefined")this.hidden=false;if(this.hidden===false){c+=J(this.width,0);if(this.fixed){r+=this.width;o+=this.width+d}else e++;v++}});if(isNaN(a.p.width))a.p.width=g.width=c;else g.width=a.p.width;a.p.tblwidth=
-c;if(a.p.shrinkToFit===false&&a.p.forceFit===true)a.p.forceFit=false;if(a.p.shrinkToFit===true&&e>0){w=g.width-d*e-o;if(!isNaN(a.p.height)){w-=n;p=true}c=0;b.each(a.p.colModel,function(z){if(this.hidden===false&&!this.fixed){this.width=s=Math.floor(w/(a.p.tblwidth-r)*this.width);c+=s;l=z}});x=0;if(p){if(g.width-o-(c+d*e)!==n)x=g.width-o-(c+d*e)-n}else if(!p&&Math.abs(g.width-o-(c+d*e))!==1)x=g.width-o-(c+d*e);a.p.colModel[l].width+=x;a.p.tblwidth=c+x+r+v*d}})();b(K).css("width",g.width+"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+
-a.p.id+"'>&#160;</div>");b(q).css("width",g.width+"px");H=b("thead:first",a).get(0);var ua="<table role='grid' style='width:"+a.p.tblwidth+"px' class='ui-jqgrid-ftable' cellspacing='0' cellpadding='0' border='0'><tbody><tr role='row' class='ui-widget-content footrow footrow-"+m+"'>";q=b("tr:first",H);a.p.disableClick=false;b("th",q).each(function(c){b("div",this);sa=a.p.colModel[c].width;if(typeof a.p.colModel[c].resizable==="undefined")a.p.colModel[c].resizable=true;if(a.p.colModel[c].resizable){ha=
-document.createElement("span");b(ha).html("&#160;").addClass("ui-jqgrid-resize ui-jqgrid-resize-"+m);!b.browser.opera&&b(ha).css("cursor","col-resize");b(this).addClass(a.p.resizeclass)}else ha="";b(this).css("width",sa+"px").prepend(ha);a.p.colModel[c].hidden&&b(this).css("display","none");g.headers[c]={width:sa,el:this};na=a.p.colModel[c].sortable;if(typeof na!=="boolean")na=a.p.colModel[c].sortable=true;var d=a.p.colModel[c].name;d=="cb"||d=="subgrid"||d=="rn"||a.p.viewsortcols[2]&&b("div",this).addClass("ui-jqgrid-sortable");
-if(na)if(a.p.viewsortcols[0]){b("div span.s-ico",this).show();c==a.p.lastsort&&b("div span.ui-icon-"+a.p.sortorder,this).removeClass("ui-state-disabled")}else if(c==a.p.lastsort){b("div span.s-ico",this).show();b("div span.ui-icon-"+a.p.sortorder,this).removeClass("ui-state-disabled")}ua+="<td role='gridcell' "+F(c,0)+">&#160;</td>"}).mousedown(function(c){if(b(c.target).closest("th>span.ui-jqgrid-resize").length==1){var d=b.jgrid.getCellIndex(this);if(a.p.forceFit===true)a.p.nv=Da(d);g.dragStart(d,
-c,Ea(d));return false}}).click(function(c){if(a.p.disableClick)return a.p.disableClick=false;var d="th>div.ui-jqgrid-sortable",e,l;a.p.viewsortcols[2]||(d="th>div>span>span.ui-grid-ico-sort");c=b(c.target).closest(d);if(c.length==1){d=b.jgrid.getCellIndex(this);if(!a.p.viewsortcols[2]){e=true;l=c.attr("sort")}xa(b("div",this)[0].id,d,e,l);return false}});if(a.p.sortable&&b.fn.sortable)try{b(a).jqGrid("sortableColumns",q)}catch(Ka){}ua+="</tr></tbody></table>";this.appendChild(document.createElement("tbody"));
-b(this).addClass("ui-jqgrid-btable");q=b("<table class='ui-jqgrid-htable' style='width:"+a.p.tblwidth+"px' role='grid' aria-labelledby='gbox_"+this.id+"' cellspacing='0' cellpadding='0' border='0'></table>").append(H);var R=a.p.caption&&a.p.hiddengrid===true?true:false;H=b("<div class='ui-jqgrid-hbox"+(m=="rtl"?"-rtl":"")+"'></div>");g.hDiv=document.createElement("div");b(g.hDiv).css({width:g.width+"px"}).addClass("ui-state-default ui-jqgrid-hdiv").append(H);b(H).append(q);R&&b(g.hDiv).hide();if(a.p.pager){if(typeof a.p.pager==
-"string"){if(a.p.pager.substr(0,1)!="#")a.p.pager="#"+a.p.pager}else a.p.pager="#"+b(a.p.pager).attr("id");b(a.p.pager).css({width:g.width+"px"}).appendTo(K).addClass("ui-state-default ui-jqgrid-pager ui-corner-bottom");R&&b(a.p.pager).hide();u(a.p.pager,"")}a.p.cellEdit===false&&a.p.hoverrows===true&&b(a).bind("mouseover",function(c){A=b(c.target).closest("tr.jqgrow");b(A).attr("class")!=="subgrid"&&b(A).addClass("ui-state-hover");return false}).bind("mouseout",function(c){A=b(c.target).closest("tr.jqgrow");
-b(A).removeClass("ui-state-hover");return false});var Y,Z;b(a).before(g.hDiv).click(function(c){I=c.target;var d=b(I).hasClass("cbox");A=b(I,a.rows).closest("tr.jqgrow");if(b(A).length===0)return this;var e=true;if(b.isFunction(a.p.beforeSelectRow))e=a.p.beforeSelectRow.call(a,A[0].id,c);if(I.tagName=="A"||(I.tagName=="INPUT"||I.tagName=="TEXTAREA"||I.tagName=="OPTION"||I.tagName=="SELECT")&&!d)return true;if(e===true){if(a.p.cellEdit===true)if(a.p.multiselect&&d)b(a).jqGrid("setSelection",A[0].id,
-true);else{Y=A[0].rowIndex;Z=b.jgrid.getCellIndex(I);try{b(a).jqGrid("editCell",Y,Z,true)}catch(l){}}else if(a.p.multikey)if(c[a.p.multikey])b(a).jqGrid("setSelection",A[0].id,true);else{if(a.p.multiselect&&d){d=b("[id^=jqg_]",A).attr("checked");b("[id^=jqg_]",A).attr("checked",!d)}}else{if(a.p.multiselect&&a.p.multiboxonly)if(!d){b(a.p.selarrrow).each(function(n,s){n=a.rows.namedItem(s);b(n).removeClass("ui-state-highlight");b("#jqg_"+b.jgrid.jqID(s),n).attr("checked",false)});a.p.selarrrow=[];b("#cb_"+
-b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false)}b(a).jqGrid("setSelection",A[0].id,true)}if(b.isFunction(a.p.onCellSelect)){Y=A[0].id;Z=b.jgrid.getCellIndex(I);a.p.onCellSelect.call(a,Y,Z,b(I).html(),c)}}c.stopPropagation()}).bind("reloadGrid",function(c,d){if(a.p.treeGrid===true)a.p.datatype=a.p.treedatatype;d&&d.current&&a.grid.selectionPreserver(a);if(a.p.datatype=="local")b(a).jqGrid("resetSelection");else if(!a.p.treeGrid){a.p.selrow=null;if(a.p.multiselect){a.p.selarrrow=[];b("#cb_"+
-b.jgrid.jqID(a.p.id),a.grid.hDiv).attr("checked",false)}a.p.savedRow=[];a.p.scroll&&$(a.grid.bDiv)}if(d&&d.page){c=d.page;if(c>a.p.lastpage)c=a.p.lastpage;if(c<1)c=1;a.p.page=c;a.grid.bDiv.scrollTop=a.grid.prevRowHeight?(c-1)*a.grid.prevRowHeight*a.p.rowNum:0}if(a.grid.prevRowHeight&&a.p.scroll){delete a.p.lastpage;a.grid.populateVisible()}else a.grid.populate();return false});b.isFunction(this.p.ondblClickRow)&&b(this).dblclick(function(c){I=c.target;A=b(I,a.rows).closest("tr.jqgrow");if(b(A).length===
-0)return false;Y=A[0].rowIndex;Z=b.jgrid.getCellIndex(I);a.p.ondblClickRow.call(a,b(A).attr("id"),Y,Z,c);return false});b.isFunction(this.p.onRightClickRow)&&b(this).bind("contextmenu",function(c){I=c.target;A=b(I,a.rows).closest("tr.jqgrow");if(b(A).length===0)return false;a.p.multiselect||b(a).jqGrid("setSelection",A[0].id,true);Y=A[0].rowIndex;Z=b.jgrid.getCellIndex(I);a.p.onRightClickRow.call(a,b(A).attr("id"),Y,Z,c);return false});g.bDiv=document.createElement("div");b(g.bDiv).append(b('<div style="position:relative;'+
-(y&&b.browser.version<8?"height:0.01%;":"")+'"></div>').append("<div></div>").append(this)).addClass("ui-jqgrid-bdiv").css({height:a.p.height+(isNaN(a.p.height)?"":"px"),width:g.width+"px"}).scroll(g.scrollGrid);b("table:first",g.bDiv).css({width:a.p.tblwidth+"px"});if(y){b("tbody",this).size()==2&&b("tbody:first",this).remove();a.p.multikey&&b(g.bDiv).bind("selectstart",function(){return false})}else a.p.multikey&&b(g.bDiv).bind("mousedown",function(){return false});R&&b(g.bDiv).hide();g.cDiv=document.createElement("div");
-var va=a.p.hidegrid===true?b("<a role='link' href='javascript:void(0)'/>").addClass("ui-jqgrid-titlebar-close HeaderButton").hover(function(){va.addClass("ui-state-hover")},function(){va.removeClass("ui-state-hover")}).append("<span class='ui-icon ui-icon-circle-triangle-n'></span>").css(m=="rtl"?"left":"right","0px"):"";b(g.cDiv).append(va).append("<span class='ui-jqgrid-title"+(m=="rtl"?"-rtl":"")+"'>"+a.p.caption+"</span>").addClass("ui-jqgrid-titlebar ui-widget-header ui-corner-top ui-helper-clearfix");
-b(g.cDiv).insertBefore(g.hDiv);if(a.p.toolbar[0]){g.uDiv=document.createElement("div");if(a.p.toolbar[1]=="top")b(g.uDiv).insertBefore(g.hDiv);else a.p.toolbar[1]=="bottom"&&b(g.uDiv).insertAfter(g.hDiv);if(a.p.toolbar[1]=="both"){g.ubDiv=document.createElement("div");b(g.uDiv).insertBefore(g.hDiv).addClass("ui-userdata ui-state-default").attr("id","t_"+this.id);b(g.ubDiv).insertAfter(g.hDiv).addClass("ui-userdata ui-state-default").attr("id","tb_"+this.id);R&&b(g.ubDiv).hide()}else b(g.uDiv).width(g.width).addClass("ui-userdata ui-state-default").attr("id",
-"t_"+this.id);R&&b(g.uDiv).hide()}if(a.p.toppager){a.p.toppager=a.p.id+"_toppager";g.topDiv=b("<div id='"+a.p.toppager+"'></div>")[0];a.p.toppager="#"+a.p.toppager;b(g.topDiv).insertBefore(g.hDiv).addClass("ui-state-default ui-jqgrid-toppager").width(g.width);u(a.p.toppager,"_t")}if(a.p.footerrow){g.sDiv=b("<div class='ui-jqgrid-sdiv'></div>")[0];H=b("<div class='ui-jqgrid-hbox"+(m=="rtl"?"-rtl":"")+"'></div>");b(g.sDiv).append(H).insertAfter(g.hDiv).width(g.width);b(H).append(ua);g.footers=b(".ui-jqgrid-ftable",
-g.sDiv)[0].rows[0].cells;if(a.p.rownumbers)g.footers[0].className="ui-state-default jqgrid-rownum";R&&b(g.sDiv).hide()}if(a.p.caption){var Fa=a.p.datatype;if(a.p.hidegrid===true){b(".ui-jqgrid-titlebar-close",g.cDiv).click(function(c){var d=b.isFunction(a.p.onHeaderClick);if(a.p.gridstate=="visible"){b(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv","#gview_"+a.p.id).slideUp("fast");a.p.pager&&b(a.p.pager).slideUp("fast");a.p.toppager&&b(a.p.toppager).slideUp("fast");if(a.p.toolbar[0]===true){a.p.toolbar[1]==
-"both"&&b(g.ubDiv).slideUp("fast");b(g.uDiv).slideUp("fast")}a.p.footerrow&&b(".ui-jqgrid-sdiv","#gbox_"+a.p.id).slideUp("fast");b("span",this).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");a.p.gridstate="hidden";if(d)R||a.p.onHeaderClick.call(a,a.p.gridstate,c)}else if(a.p.gridstate=="hidden"){b(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv","#gview_"+a.p.id).slideDown("fast");a.p.pager&&b(a.p.pager).slideDown("fast");a.p.toppager&&b(a.p.toppager).slideDown("fast");if(a.p.toolbar[0]===
-true){a.p.toolbar[1]=="both"&&b(g.ubDiv).slideDown("fast");b(g.uDiv).slideDown("fast")}a.p.footerrow&&b(".ui-jqgrid-sdiv","#gbox_"+a.p.id).slideDown("fast");b("span",this).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");if(R){a.p.datatype=Fa;X();R=false}a.p.gridstate="visible";d&&a.p.onHeaderClick.call(a,a.p.gridstate,c)}return false});if(R){a.p.datatype="local";b(".ui-jqgrid-titlebar-close",g.cDiv).trigger("click")}}}else b(g.cDiv).hide();b(g.hDiv).after(g.bDiv).mousemove(function(c){if(g.resizing){g.dragMove(c);
-return false}});b(".ui-jqgrid-labels",g.hDiv).bind("selectstart",function(){return false});b(document).mouseup(function(){if(g.resizing){g.dragEnd();return false}return true});this.updateColumns=function(){var c=this.rows[0],d=this;if(c){b("td",c).each(function(e){b(this).css("width",d.grid.headers[e].width+"px")});this.grid.cols=c.cells}return this};a.formatCol=F;a.sortData=xa;a.updatepager=la;a.formatter=function(c,d,e,l,n){return M(c,d,e,l,n)};b.extend(g,{populate:X,emptyRows:$});this.grid=g;a.addXmlData=
-function(c){qa(c,a.grid.bDiv)};a.addJSONData=function(c){ra(c,a.grid.bDiv)};X();a.p.hiddengrid=false;b(window).unload(function(){b(this).empty();this.p=this.grid=null})}}})};b.jgrid.extend({getGridParam:function(f){var k=this[0];if(k.grid)return f?typeof k.p[f]!="undefined"?k.p[f]:null:k.p},setGridParam:function(f){return this.each(function(){this.grid&&typeof f==="object"&&b.extend(true,this.p,f)})},getDataIDs:function(){var f=[],k=0,i;this.each(function(){if((i=this.rows.length)&&i>0)for(;k<i;){f[k]=
-this.rows[k].id;k++}});return f},setSelection:function(f,k){return this.each(function(){function i(a,q){var u=b(h.grid.bDiv)[0].clientHeight,y=b(h.grid.bDiv)[0].scrollTop,B=h.rows[a].offsetTop+h.rows[a].clientHeight;a=h.rows[a].offsetTop;if(q=="d")if(B>=u)b(h.grid.bDiv)[0].scrollTop=y+B-a;if(q=="u")if(a<y)b(h.grid.bDiv)[0].scrollTop=y-B+a}var h=this,g,j,m;if(f!==undefined){k=k===false?false:true;j=h.rows.namedItem(f+"");if(j!==null){if(h.p.selrow&&h.p.scrollrows===true){g=h.rows.namedItem(h.p.selrow).rowIndex;
-m=h.rows.namedItem(f).rowIndex;if(m>=0)m>g?i(m,"d"):i(m,"u")}if(h.p.multiselect){h.p.selrow=j.id;m=b.inArray(h.p.selrow,h.p.selarrrow);if(m===-1){j.className!=="ui-subgrid"&&b(j).addClass("ui-state-highlight").attr("aria-selected","true");g=true;b("#jqg_"+b.jgrid.jqID(h.p.selrow),h.rows[j.rowIndex]).attr("checked",g);h.p.selarrrow.push(h.p.selrow);h.p.onSelectRow&&k&&h.p.onSelectRow.call(h,h.p.selrow,g)}else{j.className!=="ui-subgrid"&&b(j).removeClass("ui-state-highlight").attr("aria-selected","false");
-g=false;b("#jqg_"+b.jgrid.jqID(h.p.selrow),h.rows[j.rowIndex]).attr("checked",g);h.p.selarrrow.splice(m,1);h.p.onSelectRow&&k&&h.p.onSelectRow.call(h,h.p.selrow,g);j=h.p.selarrrow[0];h.p.selrow=j===undefined?null:j}}else if(j.className!=="ui-subgrid"){h.p.selrow&&b("tr#"+b.jgrid.jqID(h.p.selrow),h.grid.bDiv).removeClass("ui-state-highlight").attr("aria-selected","false");h.p.selrow=j.id;b(j).addClass("ui-state-highlight").attr("aria-selected","true");h.p.onSelectRow&&k&&h.p.onSelectRow.call(h,h.p.selrow,
-true)}}}})},resetSelection:function(){return this.each(function(){var f=this,k;if(f.p.multiselect){b(f.p.selarrrow).each(function(i,h){k=f.rows.namedItem(h);b(k).removeClass("ui-state-highlight").attr("aria-selected","false");b("#jqg_"+b.jgrid.jqID(h),k).attr("checked",false)});b("#cb_"+b.jgrid.jqID(f.p.id),f.grid.hDiv).attr("checked",false);f.p.selarrrow=[]}else if(f.p.selrow){b("tr#"+b.jgrid.jqID(f.p.selrow),f.grid.bDiv).removeClass("ui-state-highlight").attr("aria-selected","false");f.p.selrow=
-null}f.p.savedRow=[]})},getRowData:function(f){var k={},i,h=false,g,j=0;this.each(function(){var m=this,a,q;if(typeof f=="undefined"){h=true;i=[];g=m.rows.length}else{q=m.rows.namedItem(f);if(!q)return k;g=1}for(;j<g;){if(h)q=m.rows[j];b("td",q).each(function(u){a=m.p.colModel[u].name;if(a!=="cb"&&a!=="subgrid")if(m.p.treeGrid===true&&a==m.p.ExpandColumn)k[a]=b.jgrid.htmlDecode(b("span:first",this).html());else try{k[a]=b.unformat(this,{rowId:q.id,colModel:m.p.colModel[u]},u)}catch(y){k[a]=b.jgrid.htmlDecode(b(this).html())}});
-j++;if(h){i.push(k);k={}}}});return i?i:k},delRowData:function(f){var k=false,i,h,g;this.each(function(){var j=this;if(i=j.rows.namedItem(f)){g=i.rowIndex;b(i).remove();j.p.records--;j.p.reccount--;j.updatepager(true,false);k=true;if(j.p.multiselect){h=b.inArray(f,j.p.selarrrow);h!=-1&&j.p.selarrrow.splice(h,1)}if(f==j.p.selrow)j.p.selrow=null}else return false;g==0&&k&&j.updateColumns();if(j.p.altRows===true&&k){var m=j.p.altclass;b(j.rows).each(function(a){a%2==1?b(this).addClass(m):b(this).removeClass(m)})}});
-return k},setRowData:function(f,k,i){var h,g=false;this.each(function(){var j=this,m,a,q=typeof i;if(!j.grid)return false;a=j.rows.namedItem(f);if(!a)return false;k&&b(this.p.colModel).each(function(u){h=this.name;if(k[h]!=undefined){m=j.formatter(f,k[h],u,k,"edit");j.p.treeGrid===true&&h==j.p.ExpandColumn?b("td:eq("+u+") > span:first",a).html(m).attr("title",b.jgrid.stripHtml(m)):b("td:eq("+u+")",a).html(m).attr("title",b.jgrid.stripHtml(m));g=true}});if(q==="string")b(a).addClass(i);else q==="object"&&
-b(a).css(i)});return g},addRowData:function(f,k,i,h){i||(i="last");var g=false,j,m,a,q,u,y,B,K,J="",F,S,M;if(k){if(b.isArray(k)){F=true;i="last";S=f}else{k=[k];F=false}this.each(function(){var t=this,ia=k.length;u=t.p.rownumbers===true?1:0;a=t.p.multiselect===true?1:0;q=t.p.subGrid===true?1:0;if(!F)if(typeof f!="undefined")f+="";else{f=t.p.records+1+"";if(t.p.keyIndex!==false){cmn=t.p.colModel[t.p.keyIndex+a+q+u].name;if(typeof k[0][cmn]!="undefined")f=k[0][cmn]}}M=t.p.altclass;for(var aa=0,ja=b.isFunction(t.p.afterInsertRow)?
-true:false;aa<ia;){data=k[aa];m="";if(F){try{f=data[S]}catch(pa){f=t.p.records+1}var $=t.p.altRows===true?(t.rows.length-1)%2==0?M:"":""}if(u){J=t.formatCol(u,1);m+='<td role="gridcell" class="ui-state-default jqgrid-rownum" '+J+">0</td>"}if(a){K='<input type="checkbox" id="jqg_'+f+'" class="cbox"/>';J=t.formatCol(u,1);m+='<td role="gridcell" '+J+">"+K+"</td>"}if(q)m+=b(t).jqGrid("addSubGridCell",a+u,1);for(B=a+q+u;B<this.p.colModel.length;B++){j=this.p.colModel[B].name;K=t.formatter(f,data[j],B,
-data,"add");J=t.formatCol(B,1);m+='<td role="gridcell" '+J+' title="'+b.jgrid.stripHtml(K)+'">'+K+"</td>"}m='<tr id="'+f+'" role="row" class="ui-widget-content jqgrow ui-row-'+t.p.direction+" "+$+'">'+m+"</tr>";if(t.p.subGrid===true){m=b(m)[0];b(t).jqGrid("addSubGrid",m,a+u)}if(t.rows.length===0)b("table:first",t.grid.bDiv).append(m);else switch(i){case "last":b(t.rows[t.rows.length-1]).after(m);break;case "first":b(t.rows[0]).before(m);break;case "after":if(y=t.rows.namedItem(h))b(t.rows[y.rowIndex+
-1]).hasClass("ui-subgrid")?b(t.rows[y.rowIndex+1]).after(m):b(y).after(m);break;case "before":if(y=t.rows.namedItem(h)){b(y).before(m);y=y.rowIndex}break}t.p.records++;t.p.reccount++;if(!t.grid.cols||!t.grid.cols.length)t.grid.cols=t.rows[0].cells;if(i==="first"||i==="before"&&y<=1||t.rows.length===1)t.updateColumns();ja&&t.p.afterInsertRow(t,f,data);aa++}if(t.p.altRows===true&&!F)if(i=="last")(t.rows.length-1)%2==1&&b(t.rows[t.rows.length-1]).addClass(M);else b(t.rows).each(function(T){T%2==1?b(this).addClass(M):
-b(this).removeClass(M)});t.updatepager(true,true);g=true})}return g},footerData:function(f,k,i){function h(a){for(var q in a)return false;return true}var g,j=false,m={};if(typeof f=="undefined")f="get";if(typeof i!="boolean")i=true;f=f.toLowerCase();this.each(function(){var a=this,q;if(!a.grid||!a.p.footerrow)return false;if(f=="set")if(h(k))return false;j=true;b(this.p.colModel).each(function(u){g=this.name;if(f=="set"){if(k[g]!=undefined){q=i?a.formatter("",k[g],u,k,"edit"):k[g];b("tr.footrow td:eq("+
-u+")",a.grid.sDiv).html(q).attr("title",b.jgrid.stripHtml(q));j=true}}else if(f=="get")m[g]=b("tr.footrow td:eq("+u+")",a.grid.sDiv).html()})});return f=="get"?m:j},ShowHideCol:function(f,k){return this.each(function(){var i=this,h=false;if(i.grid){if(typeof f==="string")f=[f];k=k!="none"?"":"none";var g=k==""?true:false;b(this.p.colModel).each(function(j){if(b.inArray(this.name,f)!==-1&&this.hidden===g){b("tr",i.grid.hDiv).each(function(){b("th:eq("+j+")",this).css("display",k)});b(i.rows).each(function(m){b("td:eq("+
-j+")",i.rows[m]).css("display",k)});i.p.footerrow&&b("td:eq("+j+")",i.grid.sDiv).css("display",k);if(k=="none")i.p.tblwidth-=this.width;else i.p.tblwidth+=this.width;this.hidden=!g;h=true}});if(h===true){b("table:first",i.grid.hDiv).width(i.p.tblwidth);b("table:first",i.grid.bDiv).width(i.p.tblwidth);i.grid.hDiv.scrollLeft=i.grid.bDiv.scrollLeft;if(i.p.footerrow){b("table:first",i.grid.sDiv).width(i.p.tblwidth);i.grid.sDiv.scrollLeft=i.grid.bDiv.scrollLeft}}}})},hideCol:function(f){return this.each(function(){b(this).jqGrid("ShowHideCol",
-f,"none")})},showCol:function(f){return this.each(function(){b(this).jqGrid("ShowHideCol",f,"")})},remapColumns:function(f,k,i){function h(m){var a;a=m.length?b.makeArray(m):b.extend({},m);b.each(f,function(q){m[q]=a[this]})}function g(m,a){b(">tr"+(a||""),m).each(function(){var q=this,u=b.makeArray(q.cells);b.each(f,function(){var y=u[this];y&&q.appendChild(y)})})}var j=this.get(0);h(j.p.colModel);h(j.p.colNames);h(j.grid.headers);g(b("thead:first",j.grid.hDiv),i&&":not(.ui-jqgrid-labels)");k&&g(b("tbody:first",
-j.grid.bDiv),".jqgrow");j.p.footerrow&&g(b("tbody:first",j.grid.sDiv));if(j.p.remapColumns)if(j.p.remapColumns.length)h(j.p.remapColumns);else j.p.remapColumns=b.makeArray(f);j.p.lastsort=b.inArray(j.p.lastsort,f);if(j.p.treeGrid)j.p.expColInd=b.inArray(j.p.expColInd,f)},setGridWidth:function(f,k){return this.each(function(){var i=this,h,g=0,j=i.p.cellLayout,m,a=0,q=false,u=i.p.scrollOffset,y,B=0,K=0,J=0,F;if(i.grid){if(typeof k!="boolean")k=i.p.shrinkToFit;if(!isNaN(f)){f=parseInt(f,10);i.grid.width=
-i.p.width=f;b("#gbox_"+i.p.id).css("width",f+"px");b("#gview_"+i.p.id).css("width",f+"px");b(i.grid.bDiv).css("width",f+"px");b(i.grid.hDiv).css("width",f+"px");i.p.pager&&b(i.p.pager).css("width",f+"px");if(i.p.toolbar[0]===true){b(i.grid.uDiv).css("width",f+"px");i.p.toolbar[1]=="both"&&b(i.grid.ubDiv).css("width",f+"px")}i.p.footerrow&&b(i.grid.sDiv).css("width",f+"px");if(k===false&&i.p.forceFit==true)i.p.forceFit=false;if(k===true){if(b.browser.safari)j=0;b.each(i.p.colModel,function(){if(this.hidden===
-false){g+=parseInt(this.width,10);if(this.fixed){K+=this.width;B+=this.width+j}else a++;J++}});if(a!=0){i.p.tblwidth=g;y=f-j*a-B;if(!isNaN(i.p.height))if(b(i.grid.bDiv)[0].clientHeight<b(i.grid.bDiv)[0].scrollHeight){q=true;y-=u}g=0;var S=i.grid.cols.length>0;b.each(i.p.colModel,function(M){if(this.hidden===false&&!this.fixed){this.width=h=Math.floor(y/(i.p.tblwidth-K)*this.width);g+=h;i.grid.headers[M].width=h;i.grid.headers[M].el.style.width=h+"px";if(i.p.footerrow)i.grid.footers[M].style.width=
-h+"px";if(S)i.grid.cols[M].style.width=h+"px";m=M}});F=0;if(q){if(f-B-(g+j*a)!==u)F=f-B-(g+j*a)-u}else if(Math.abs(f-B-(g+j*a))!==1)F=f-B-(g+j*a);i.p.colModel[m].width+=F;h=i.p.colModel[m].width;i.grid.headers[m].width=h;i.grid.headers[m].el.style.width=h+"px";if(S)i.grid.cols[m].style.width=h+"px";i.p.tblwidth=g+F+K+j*J;b("table:first",i.grid.bDiv).css("width",i.p.tblwidth+"px");b("table:first",i.grid.hDiv).css("width",i.p.tblwidth+"px");i.grid.hDiv.scrollLeft=i.grid.bDiv.scrollLeft;if(i.p.footerrow){i.grid.footers[m].style.width=
-h+"px";b("table:first",i.grid.sDiv).css("width",i.p.tblwidth+"px")}}}}}})},setGridHeight:function(f){return this.each(function(){var k=this;if(k.grid){b(k.grid.bDiv).css({height:f+(isNaN(f)?"":"px")});k.p.height=f;k.p.scroll&&k.grid.populateVisible()}})},setCaption:function(f){return this.each(function(){this.p.caption=f;b("span.ui-jqgrid-title",this.grid.cDiv).html(f);b(this.grid.cDiv).show()})},setLabel:function(f,k,i,h){return this.each(function(){var g=this,j=-1;if(g.grid){if(isNaN(f))b(g.p.colModel).each(function(q){if(this.name==
-f){j=q;return false}});else j=parseInt(f,10);if(j>=0){var m=b("tr.ui-jqgrid-labels th:eq("+j+")",g.grid.hDiv);if(k){var a=b(".s-ico",m);b("[id^=jqgh_]",m).empty().html(k).append(a);g.p.colNames[j]=k}if(i)typeof i==="string"?b(m).addClass(i):b(m).css(i);typeof h==="object"&&b(m).attr(h)}}})},setCell:function(f,k,i,h,g){return this.each(function(){var j=this,m=-1,a;if(j.grid){if(isNaN(k))b(j.p.colModel).each(function(u){if(this.name==k){m=u;return false}});else m=parseInt(k,10);if(m>=0)if(a=j.rows.namedItem(f)){var q=
-b("td:eq("+m+")",a);if(i!==""){a=j.formatter(f,i,m,a,"edit");j.p.treeGrid&&b(".tree-wrap",b(q)).length>0?b("span",b(q)).html(a).attr("title",b.jgrid.stripHtml(a)):b(q).html(a).attr("title",b.jgrid.stripHtml(a))}if(typeof h==="string")h?b(q).addClass(h):b(q).removeClass();else h&&b(q).css(h);typeof g==="object"&&b(q).attr(g)}}})},getCell:function(f,k){var i=false;this.each(function(){var h=this,g=-1;if(h.grid){if(isNaN(k))b(h.p.colModel).each(function(a){if(this.name===k){g=a;return false}});else g=
-parseInt(k,10);if(g>=0){var j=h.rows.namedItem(f);if(j)try{i=b.unformat(b("td:eq("+g+")",j),{rowId:j.id,colModel:h.p.colModel[g]},g)}catch(m){i=b.jgrid.htmlDecode(b("td:eq("+g+")",j).html())}}}});return i},getCol:function(f,k,i){var h=[],g,j=0;k=typeof k!="boolean"?false:k;if(typeof i=="undefined")i=false;this.each(function(){var m=this,a=-1;if(m.grid){if(isNaN(f))b(m.p.colModel).each(function(B){if(this.name===f){a=B;return false}});else a=parseInt(f,10);if(a>=0){var q=m.rows.length,u=0;if(q&&q>
-0){for(;u<q;){try{g=b.unformat(b(m.rows[u].cells[a]),{rowId:m.rows[u].id,colModel:m.p.colModel[a]},a)}catch(y){g=b.jgrid.htmlDecode(m.rows[u].cells[a].innerHTML)}i?(j+=parseFloat(g)):k?h.push({id:m.rows[u].id,value:g}):(h[u]=g);u++}if(i)switch(i.toLowerCase()){case "sum":h=j;break;case "avg":h=j/q;break;case "count":h=q;break}}}}});return h},clearGridData:function(f){return this.each(function(){var k=this;if(k.grid){if(typeof f!="boolean")f=false;b("tbody:first tr",k.grid.bDiv).remove();k.p.footerrow&&
-f&&b(".ui-jqgrid-ftable td",k.grid.sDiv).html("&#160;");k.p.selrow=null;k.p.selarrrow=[];k.p.savedRow=[];k.p.records=0;k.p.page="0";k.p.lastpage="0";k.p.reccount=0;k.updatepager(true,false)}})},getInd:function(f,k){var i=false,h;this.each(function(){if(h=this.rows.namedItem(f))i=k===true?h:h.rowIndex});return i}})})(jQuery);
-(function(c){function u(a,b,d,e,h){var g=b;if(c.fn.fmatter[a])g=c.fn.fmatter[a](b,d,e,h);return g}c.fmatter={};c.fn.fmatter=function(a,b,d,e,h){d=c.extend({},c.jgrid.formatter,d);return u(a,b,d,e,h)};c.fmatter.util={NumberFormat:function(a,b){isNumber(a)||(a*=1);if(isNumber(a)){var d=a<0,e=a+"",h=b.decimalSeparator?b.decimalSeparator:".";if(isNumber(b.decimalPlaces)){var g=b.decimalPlaces;e=Math.pow(10,g);e=Math.round(a*e)/e+"";a=e.lastIndexOf(".");if(g>0){if(a<0){e+=h;a=e.length-1}else if(h!==".")e=
-e.replace(".",h);for(;e.length-1-a<g;)e+="0"}}if(b.thousandsSeparator){g=b.thousandsSeparator;a=e.lastIndexOf(h);a=a>-1?a:e.length;h=e.substring(a);for(var f=-1,i=a;i>0;i--){f++;if(f%3===0&&i!==a&&(!d||i>1))h=g+h;h=e.charAt(i-1)+h}e=h}e=b.prefix?b.prefix+e:e;return e=b.suffix?e+b.suffix:e}else return a},DateFormat:function(a,b,d,e){var h=function(m,r){m=String(m);for(r=parseInt(r)||2;m.length<r;)m="0"+m;return m},g={m:1,d:1,y:1970,h:0,i:0,s:0},f=0,i,k,j=["i18n"];j.i18n={dayNames:e.dayNames,monthNames:e.monthNames};
-if(a in e.masks)a=e.masks[a];b=b.split(/[\\\/:_;.\t\T\s-]/);a=a.split(/[\\\/:_;.\t\T\s-]/);i=0;for(k=a.length;i<k;i++){if(a[i]=="M"){f=c.inArray(b[i],j.i18n.monthNames);if(f!==-1&&f<12)b[i]=f+1}if(a[i]=="F"){f=c.inArray(b[i],j.i18n.monthNames);if(f!==-1&&f>11)b[i]=f+1-12}g[a[i].toLowerCase()]=parseInt(b[i],10)}g.m=parseInt(g.m)-1;f=g.y;if(f>=70&&f<=99)g.y=1900+g.y;else if(f>=0&&f<=69)g.y=2E3+g.y;f=new Date(g.y,g.m,g.d,g.h,g.i,g.s,0);if(d in e.masks)d=e.masks[d];else d||(d="Y-m-d");g=f.getHours();
-a=f.getMinutes();b=f.getDate();i=f.getMonth()+1;k=f.getTimezoneOffset();var l=f.getSeconds(),o=f.getMilliseconds(),n=f.getDay(),p=f.getFullYear(),q=(n+6)%7+1,s=(new Date(p,i-1,b)-new Date(p,0,1))/864E5,t={d:h(b),D:j.i18n.dayNames[n],j:b,l:j.i18n.dayNames[n+7],N:q,S:e.S(b),w:n,z:s,W:q<5?Math.floor((s+q-1)/7)+1:Math.floor((s+q-1)/7)||(((new Date(p-1,0,1)).getDay()+6)%7<4?53:52),F:j.i18n.monthNames[i-1+12],m:h(i),M:j.i18n.monthNames[i-1],n:i,t:"?",L:"?",o:"?",Y:p,y:String(p).substring(2),a:g<12?e.AmPm[0]:
-e.AmPm[1],A:g<12?e.AmPm[2]:e.AmPm[3],B:"?",g:g%12||12,G:g,h:h(g%12||12),H:h(g),i:h(a),s:h(l),u:o,e:"?",I:"?",O:(k>0?"-":"+")+h(Math.floor(Math.abs(k)/60)*100+Math.abs(k)%60,4),P:"?",T:(String(f).match(/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g)||[""]).pop().replace(/[^-+\dA-Z]/g,""),Z:"?",c:"?",r:"?",U:Math.floor(f/1E3)};return d.replace(/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,function(m){return m in
-t?t[m]:m.substring(1)})}};c.fn.fmatter.defaultFormat=function(a,b){return isValue(a)&&a!==""?a:b.defaultValue?b.defaultValue:"&#160;"};c.fn.fmatter.email=function(a,b){return isEmpty(a)?c.fn.fmatter.defaultFormat(a,b):'<a href="mailto:'+a+'">'+a+"</a>"};c.fn.fmatter.checkbox=function(a,b){var d=c.extend({},b.checkbox);isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));b=d.disabled===true?"disabled":"";if(isEmpty(a)||isUndefined(a))a=c.fn.fmatter.defaultFormat(a,d);
-a+="";a=a.toLowerCase();return'<input type="checkbox" '+(a.search(/(false|0|no|off)/i)<0?" checked='checked' ":"")+' value="'+a+'" offval="no" '+b+"/>"};c.fn.fmatter.link=function(a,b){var d={target:b.target},e="";isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));if(d.target)e="target="+d.target;return isEmpty(a)?c.fn.fmatter.defaultFormat(a,b):"<a "+e+' href="'+a+'">'+a+"</a>"};c.fn.fmatter.showlink=function(a,b){var d={baseLinkUrl:b.baseLinkUrl,showAction:b.showAction,
-addParam:b.addParam||"",target:b.target,idName:b.idName},e="";isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));if(d.target)e="target="+d.target;idUrl=d.baseLinkUrl+d.showAction+"?"+d.idName+"="+b.rowId+d.addParam;return isString(a)?"<a "+e+' href="'+idUrl+'">'+a+"</a>":c.fn.fmatter.defaultFormat(a,b)};c.fn.fmatter.integer=function(a,b){var d=c.extend({},b.integer);isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));if(isEmpty(a))return d.defaultValue;
-return c.fmatter.util.NumberFormat(a,d)};c.fn.fmatter.number=function(a,b){var d=c.extend({},b.number);isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));if(isEmpty(a))return d.defaultValue;return c.fmatter.util.NumberFormat(a,d)};c.fn.fmatter.currency=function(a,b){var d=c.extend({},b.currency);isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));if(isEmpty(a))return d.defaultValue;return c.fmatter.util.NumberFormat(a,d)};c.fn.fmatter.date=
-function(a,b,d,e){d=c.extend({},b.date);isUndefined(b.colModel.formatoptions)||(d=c.extend({},d,b.colModel.formatoptions));return!d.reformatAfterEdit&&e=="edit"?c.fn.fmatter.defaultFormat(a,b):isEmpty(a)?c.fn.fmatter.defaultFormat(a,b):c.fmatter.util.DateFormat(d.srcformat,a,d.newformat,d)};c.fn.fmatter.select=function(a,b){a+="";var d=false,e=[];if(!isUndefined(b.colModel.editoptions))d=b.colModel.editoptions.value;if(d){var h=b.colModel.editoptions.multiple===true?true:false,g=[],f;if(h){g=a.split(",");
-g=c.map(g,function(l){return c.trim(l)})}if(isString(d))for(var i=d.split(";"),k=0,j=0;j<i.length;j++){f=i[j].split(":");if(f.length>2)f[1]=jQuery.map(f,function(l,o){if(o>0)return l}).join(":");if(h){if(jQuery.inArray(f[0],g)>-1){e[k]=f[1];k++}}else if(c.trim(f[0])==c.trim(a)){e[0]=f[1];break}}else if(isObject(d))if(h)e=jQuery.map(g,function(l){return d[l]});else e[0]=d[a]||""}a=e.join(", ");return a==""?c.fn.fmatter.defaultFormat(a,b):a};c.fn.fmatter.rowactions=function(a,b,d,e){switch(d){case "edit":d=
-function(){c(".ui-inline-edit, .ui-inline-del","#"+a).show();c(".ui-inline-save, .ui-inline-cancel","#"+a).hide()};c("#"+b).jqGrid("editRow",a,e,null,null,null,{oper:"edit"},d,null,d);c(".ui-inline-edit, .ui-inline-del","#"+a).hide();c(".ui-inline-save, .ui-inline-cancel","#"+a).show();break;case "save":c("#"+b).jqGrid("saveRow",a,null,null,{oper:"edit"});c(".ui-inline-edit, .ui-inline-del","#"+a).show();c(".ui-inline-save, .ui-inline-cancel","#"+a).hide();break;case "cancel":c("#"+b).jqGrid("restoreRow",
-a);c(".ui-inline-edit, .ui-inline-del","#"+a).show();c(".ui-inline-save, .ui-inline-cancel","#"+a).hide();break}};c.fn.fmatter.actions=function(a,b){var d={keys:false};isUndefined(b.colModel.formatoptions)||(d=c.extend(d,b.colModel.formatoptions));a=b.rowId;if(typeof a=="undefined"||isEmpty(a))return"";d="onclick=$.fn.fmatter.rowactions('"+a+"','"+b.gid+"','edit',"+d.keys+");";var e="<div style='margin-left:8px;'><div title='"+c.jgrid.nav.edittitle+"' style='float:left;cursor:pointer;' class='ui-pg-div ui-inline-edit' "+
-d+"><span class='ui-icon ui-icon-pencil'></span></div>";d="onclick=jQuery('#"+b.gid+"').jqGrid('delGridRow','"+a+"');";e=e+"<div title='"+c.jgrid.nav.deltitle+"' style='float:left;margin-left:5px;' class='ui-pg-div ui-inline-del' "+d+"><span class='ui-icon ui-icon-trash'></span></div>";d="onclick=$.fn.fmatter.rowactions('"+a+"','"+b.gid+"','save',false);";e=e+"<div title='"+c.jgrid.edit.bSubmit+"' style='float:left;display:none' class='ui-pg-div ui-inline-save'><span class='ui-icon ui-icon-disk' "+
-d+"></span></div>";d="onclick=$.fn.fmatter.rowactions('"+a+"','"+b.gid+"','cancel',false);";return e=e+"<div title='"+c.jgrid.edit.bCancel+"' style='float:left;display:none;margin-left:5px;' class='ui-pg-div ui-inline-cancel'><span class='ui-icon ui-icon-cancel' "+d+"></span></div></div>"};c.unformat=function(a,b,d,e){var h,g=b.colModel.formatter,f=b.colModel.formatoptions||{},i=/([\.\*\_\'\(\)\{\}\+\?\\])/g;unformatFunc=b.colModel.unformat||c.fn.fmatter[g]&&c.fn.fmatter[g].unformat;if(typeof unformatFunc!==
-"undefined"&&isFunction(unformatFunc))h=unformatFunc(c(a).text(),b,a);else if(typeof g!=="undefined"&&isString(g)){h=c.jgrid.formatter||{};switch(g){case "integer":f=c.extend({},h.integer,f);b=f.thousandsSeparator.replace(i,"\\$1");b=new RegExp(b,"g");h=c(a).text().replace(b,"");break;case "number":f=c.extend({},h.number,f);b=f.thousandsSeparator.replace(i,"\\$1");b=new RegExp(b,"g");h=c(a).text().replace(b,"").replace(f.decimalSeparator,".");break;case "currency":f=c.extend({},h.currency,f);b=f.thousandsSeparator.replace(i,
-"\\$1");b=new RegExp(b,"g");h=c(a).text().replace(b,"").replace(f.decimalSeparator,".").replace(f.prefix,"").replace(f.suffix,"");break;case "checkbox":f=b.colModel.editoptions?b.colModel.editoptions.value.split(":"):["Yes","No"];h=c("input",a).attr("checked")?f[0]:f[1];break;case "select":h=c.unformat.select(a,b,d,e);break;case "actions":return"";default:h=c(a).text()}}return h?h:e===true?c(a).text():c.jgrid.htmlDecode(c(a).html())};c.unformat.select=function(a,b,d,e){d=[];a=c(a).text();if(e==true)return a;
-b=c.extend({},b.colModel.editoptions);if(b.value){var h=b.value;b=b.multiple===true?true:false;e=[];var g;if(b){e=a.split(",");e=c.map(e,function(j){return c.trim(j)})}if(isString(h))for(var f=h.split(";"),i=0,k=0;k<f.length;k++){g=f[k].split(":");if(b){if(jQuery.inArray(g[1],e)>-1){d[i]=g[0];i++}}else if(c.trim(g[1])==c.trim(a)){d[0]=g[0];break}}else if(isObject(h)){b||(e[0]=a);d=jQuery.map(e,function(j){var l;c.each(h,function(o,n){if(n==j){l=o;return false}});if(l)return l})}return d.join(", ")}else return a||
-""};isValue=function(a){return isObject(a)||isString(a)||isNumber(a)||isBoolean(a)};isBoolean=function(a){return typeof a==="boolean"};isNull=function(a){return a===null};isNumber=function(a){return typeof a==="number"&&isFinite(a)};isString=function(a){return typeof a==="string"};isEmpty=function(a){if(!isString(a)&&isValue(a))return false;else if(!isValue(a))return true;a=c.trim(a).replace(/\&nbsp\;/ig,"").replace(/\&#160\;/ig,"");return a===""};isUndefined=function(a){return typeof a==="undefined"};
-isObject=function(a){return a&&(typeof a==="object"||isFunction(a))||false};isFunction=function(a){return typeof a==="function"}})(jQuery);
-(function(a){a.jgrid.extend({getColProp:function(e){var p={},b=this[0];if(b.grid){b=b.p.colModel;for(var k=0;k<b.length;k++)if(b[k].name==e){p=b[k];break}return p}},setColProp:function(e,p){return this.each(function(){if(this.grid)if(p)for(var b=this.p.colModel,k=0;k<b.length;k++)if(b[k].name==e){a.extend(this.p.colModel[k],p);break}})},sortGrid:function(e,p,b){return this.each(function(){var k=this,v=-1;if(k.grid){if(!e)e=k.p.sortname;for(var o=0;o<k.p.colModel.length;o++)if(k.p.colModel[o].index==
-e||k.p.colModel[o].name==e){v=o;break}if(v!=-1){o=k.p.colModel[v].sortable;if(typeof o!=="boolean")o=true;if(typeof p!=="boolean")p=false;o&&k.sortData("jqgh_"+e,v,p,b)}}})},GridDestroy:function(){return this.each(function(){if(this.grid){this.p.pager&&a(this.p.pager).remove();var e=this.id;try{a("#gbox_"+e).remove()}catch(p){}}})},GridUnload:function(){return this.each(function(){if(this.grid){var e={id:a(this).attr("id"),cl:a(this).attr("class")};this.p.pager&&a(this.p.pager).empty().removeClass("ui-state-default ui-jqgrid-pager corner-bottom");
-var p=document.createElement("table");a(p).attr({id:e.id});p.className=e.cl;e=this.id;a(p).removeClass("ui-jqgrid-btable");if(a(this.p.pager).parents("#gbox_"+e).length===1){a(p).insertBefore("#gbox_"+e).show();a(this.p.pager).insertBefore("#gbox_"+e)}else a(p).insertBefore("#gbox_"+e).show();a("#gbox_"+e).remove()}})},setGridState:function(e){return this.each(function(){if(this.grid){$t=this;if(e=="hidden"){a(".ui-jqgrid-bdiv, .ui-jqgrid-hdiv","#gview_"+$t.p.id).slideUp("fast");$t.p.pager&&a($t.p.pager).slideUp("fast");
-if($t.p.toolbar[0]===true){$t.p.toolbar[1]=="both"&&a($t.grid.ubDiv).slideUp("fast");a($t.grid.uDiv).slideUp("fast")}$t.p.footerrow&&a(".ui-jqgrid-sdiv","#gbox_"+$s.p.id).slideUp("fast");a(".ui-jqgrid-titlebar-close span",$t.grid.cDiv).removeClass("ui-icon-circle-triangle-n").addClass("ui-icon-circle-triangle-s");$t.p.gridstate="hidden"}else if(e=="visible"){a(".ui-jqgrid-hdiv, .ui-jqgrid-bdiv","#gview_"+$t.p.id).slideDown("fast");$t.p.pager&&a($t.p.pager).slideDown("fast");if($t.p.toolbar[0]===true){$t.p.toolbar[1]==
-"both"&&a($t.grid.ubDiv).slideDown("fast");a($t.grid.uDiv).slideDown("fast")}$t.p.footerrow&&a(".ui-jqgrid-sdiv","#gbox_"+$t.p.id).slideDown("fast");a(".ui-jqgrid-titlebar-close span",$t.grid.cDiv).removeClass("ui-icon-circle-triangle-s").addClass("ui-icon-circle-triangle-n");$t.p.gridstate="visible"}}})},updateGridRows:function(e,p,b){var k,v=false;this.each(function(){var o=this,l,j,s,g;if(!o.grid)return false;p||(p="id");e&&e.length>0&&a(e).each(function(){s=this;if(j=o.rows.namedItem(s[p])){g=
-s[p];if(b===true)if(o.p.jsonReader.repeatitems===true){if(o.p.jsonReader.cell)s=s[o.p.jsonReader.cell];for(var d=0;d<s.length;d++){l=o.formatter(g,s[d],d,s,"edit");o.p.treeGrid===true&&k==o.p.ExpandColumn?a("td:eq("+d+") > span:first",j).html(l).attr("title",a.jgrid.stripHtml(l)):a("td:eq("+d+")",j).html(l).attr("title",a.jgrid.stripHtml(l))}return v=true}a(o.p.colModel).each(function(c){k=b===true?this.jsonmap||this.name:this.name;if(s[k]!=undefined){l=o.formatter(g,s[k],c,s,"edit");o.p.treeGrid===
-true&&k==o.p.ExpandColumn?a("td:eq("+c+") > span:first",j).html(l).attr("title",a.jgrid.stripHtml(l)):a("td:eq("+c+")",j).html(l).attr("title",a.jgrid.stripHtml(l));v=true}})}})});return v},filterGrid:function(e,p){p=a.extend({gridModel:false,gridNames:false,gridToolbar:false,filterModel:[],formtype:"horizontal",autosearch:true,formclass:"filterform",tableclass:"filtertable",buttonclass:"filterbutton",searchButton:"Search",clearButton:"Clear",enableSearch:false,enableClear:false,beforeSearch:null,
-afterSearch:null,beforeClear:null,afterClear:null,url:"",marksearched:true},p||{});return this.each(function(){var b=this;this.p=p;if(this.p.filterModel.length==0&&this.p.gridModel===false)alert("No filter is set");else if(e){this.p.gridid=e.indexOf("#")!=-1?e:"#"+e;var k=a(this.p.gridid).jqGrid("getGridParam","colModel");if(k){if(this.p.gridModel===true){var v=a(this.p.gridid)[0],o;a.each(k,function(d){var c=[];this.search=this.search===false?false:true;o=this.editrules&&this.editrules.searchhidden===
-true?true:this.hidden===true?false:true;if(this.search===true&&o===true){c.label=b.p.gridNames===true?v.p.colNames[d]:"";c.name=this.name;c.index=this.index||this.name;c.stype=this.edittype||"text";if(c.stype!="select")c.stype="text";c.defval=this.defval||"";c.surl=this.surl||"";c.sopt=this.editoptions||{};c.width=this.width;b.p.filterModel.push(c)}})}else a.each(b.p.filterModel,function(){for(var d=0;d<k.length;d++)if(this.name==k[d].name){this.index=k[d].index||this.name;break}if(!this.index)this.index=
-this.name});var l=function(){var d={},c=0,m,f=a(b.p.gridid)[0],h;f.p.searchdata={};a.isFunction(b.p.beforeSearch)&&b.p.beforeSearch();a.each(b.p.filterModel,function(){h=this.index;switch(this.stype){case "select":if(m=a("select[name="+h+"]",b).val()){d[h]=m;b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).addClass("dirty-cell");c++}else{b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).removeClass("dirty-cell");try{delete f.p.postData[this.index]}catch(q){}}break;default:if(m=a("input[name="+
-h+"]",b).val()){d[h]=m;b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).addClass("dirty-cell");c++}else{b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).removeClass("dirty-cell");try{delete f.p.postData[this.index]}catch(t){}}}});var n=c>0?true:false;a.extend(f.p.postData,d);var i;if(b.p.url){i=a(f).jqGrid("getGridParam","url");a(f).jqGrid("setGridParam",{url:b.p.url})}a(f).jqGrid("setGridParam",{search:n}).trigger("reloadGrid",[{page:1}]);i&&a(f).jqGrid("setGridParam",{url:i});a.isFunction(b.p.afterSearch)&&
-b.p.afterSearch()},j=function(){var d={},c,m=0,f=a(b.p.gridid)[0],h;a.isFunction(b.p.beforeClear)&&b.p.beforeClear();a.each(b.p.filterModel,function(){h=this.index;c=this.defval?this.defval:"";if(!this.stype)this.stype="text";switch(this.stype){case "select":var q;a("select[name="+h+"] option",b).each(function(u){if(u==0)this.selected=true;if(a(this).text()==c){this.selected=true;q=a(this).val();return false}});if(q){d[h]=q;b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).addClass("dirty-cell");
-m++}else{b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).removeClass("dirty-cell");try{delete f.p.postData[this.index]}catch(t){}}break;case "text":a("input[name="+h+"]",b).val(c);if(c){d[h]=c;b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).addClass("dirty-cell");m++}else{b.p.marksearched&&a("#jqgh_"+this.name,f.grid.hDiv).removeClass("dirty-cell");try{delete f.p.postData[this.index]}catch(r){}}break}});var n=m>0?true:false;a.extend(f.p.postData,d);var i;if(b.p.url){i=a(f).jqGrid("getGridParam",
-"url");a(f).jqGrid("setGridParam",{url:b.p.url})}a(f).jqGrid("setGridParam",{search:n}).trigger("reloadGrid",[{page:1}]);i&&a(f).jqGrid("setGridParam",{url:i});a.isFunction(b.p.afterClear)&&b.p.afterClear()},s=a("<form name='SearchForm' style=display:inline;' class='"+this.p.formclass+"'></form>"),g=a("<table class='"+this.p.tableclass+"' cellspacing='0' cellpading='0' border='0'><tbody></tbody></table>");a(s).append(g);(function(){var d=document.createElement("tr"),c,m,f,h;b.p.formtype=="horizontal"&&
-a(g).append(d);a.each(b.p.filterModel,function(n){f=document.createElement("td");a(f).append("<label for='"+this.name+"'>"+this.label+"</label>");h=document.createElement("td");var i=this;if(!this.stype)this.stype="text";switch(this.stype){case "select":if(this.surl)a(h).load(this.surl,function(){i.defval&&a("select",this).val(i.defval);a("select",this).attr({name:i.index||i.name,id:"sg_"+i.name});i.sopt&&a("select",this).attr(i.sopt);b.p.gridToolbar===true&&i.width&&a("select",this).width(i.width);
-b.p.autosearch===true&&a("select",this).change(function(){l();return false})});else if(i.sopt.value){var q=i.sopt.value,t=document.createElement("select");a(t).attr({name:i.index||i.name,id:"sg_"+i.name}).attr(i.sopt);if(typeof q==="string"){n=q.split(";");for(var r,u=0;u<n.length;u++){q=n[u].split(":");r=document.createElement("option");r.value=q[0];r.innerHTML=q[1];if(q[1]==i.defval)r.selected="selected";t.appendChild(r)}}else if(typeof q==="object")for(u in q){n++;r=document.createElement("option");
-r.value=u;r.innerHTML=q[u];if(q[u]==i.defval)r.selected="selected";t.appendChild(r)}b.p.gridToolbar===true&&i.width&&a(t).width(i.width);a(h).append(t);b.p.autosearch===true&&a(t).change(function(){l();return false})}break;case "text":t=this.defval?this.defval:"";a(h).append("<input type='text' name='"+(this.index||this.name)+"' id='sg_"+this.name+"' value='"+t+"'/>");i.sopt&&a("input",h).attr(i.sopt);if(b.p.gridToolbar===true&&i.width)a.browser.msie?a("input",h).width(i.width-4):a("input",h).width(i.width-
-2);b.p.autosearch===true&&a("input",h).keypress(function(w){if((w.charCode?w.charCode:w.keyCode?w.keyCode:0)==13){l();return false}return this});break}if(b.p.formtype=="horizontal"){b.p.gridToolbar===true&&b.p.gridNames===false?a(d).append(h):a(d).append(f).append(h);a(d).append(h)}else{c=document.createElement("tr");a(c).append(f).append(h);a(g).append(c)}});h=document.createElement("td");if(b.p.enableSearch===true){m="<input type='button' id='sButton' class='"+b.p.buttonclass+"' value='"+b.p.searchButton+
-"'/>";a(h).append(m);a("input#sButton",h).click(function(){l();return false})}if(b.p.enableClear===true){m="<input type='button' id='cButton' class='"+b.p.buttonclass+"' value='"+b.p.clearButton+"'/>";a(h).append(m);a("input#cButton",h).click(function(){j();return false})}if(b.p.enableClear===true||b.p.enableSearch===true)if(b.p.formtype=="horizontal")a(d).append(h);else{c=document.createElement("tr");a(c).append("<td>&#160;</td>").append(h);a(g).append(c)}})();a(this).append(s);this.triggerSearch=
-l;this.clearSearch=j}else alert("Could not get grid colModel")}else alert("No target grid is set!")})},filterToolbar:function(e){e=a.extend({autosearch:true,searchOnEnter:true,beforeSearch:null,afterSearch:null,beforeClear:null,afterClear:null,searchurl:"",stringResult:false,groupOp:"AND"},e||{});return this.each(function(){function p(g,d){var c=a(g);c[0]!=null&&jQuery.each(d,function(){this.data!=null?c.bind(this.type,this.data,this.fn):c.bind(this.type,this.fn)})}var b=this,k=function(){var g={},
-d=0,c,m,f={};a.each(b.p.colModel,function(){m=this.index||this.name;var r=this.searchoptions&&this.searchoptions.sopt?this.searchoptions.sopt[0]:"bw";switch(this.stype){case "select":if(c=a("select[name="+m+"]",b.grid.hDiv).val()){g[m]=c;f[m]=r;d++}else try{delete b.p.postData[m]}catch(u){}break;case "text":if(c=a("input[name="+m+"]",b.grid.hDiv).val()){g[m]=c;f[m]=r;d++}else try{delete b.p.postData[m]}catch(w){}break}});var h=d>0?true:false;if(e.stringResult){var n='{"groupOp":"'+e.groupOp+'","rules":[',
-i=0;a.each(g,function(r,u){if(i>0)n+=",";n+='{"field":"'+r+'",';n+='"op":"'+f[r]+'",';n+='"data":"'+u+'"}';i++});n+="]}";a.extend(b.p.postData,{filters:n})}else a.extend(b.p.postData,g);var q;if(b.p.searchurl){q=b.p.url;a(b).jqGrid("setGridParam",{url:b.p.searchurl})}var t=false;if(a.isFunction(e.beforeSearch))t=e.beforeSearch.call(b);t||a(b).jqGrid("setGridParam",{search:h}).trigger("reloadGrid",[{page:1}]);q&&a(b).jqGrid("setGridParam",{url:q});a.isFunction(e.afterSearch)&&e.afterSearch()},v=a("<tr class='ui-search-toolbar' role='rowheader'></tr>"),
-o,l,j,s;a.each(b.p.colModel,function(){var g=this;o=a("<th role='columnheader' class='ui-state-default ui-th-column ui-th-"+b.p.direction+"'></th>");l=a("<div style='width:100%;position:relative;height:100%;padding-right:0.3em;'></div>");this.hidden===true&&a(o).css("display","none");this.search=this.search===false?false:true;if(typeof this.stype=="undefined")this.stype="text";j=a.extend({},this.searchoptions||{});if(this.search)switch(this.stype){case "select":var d=this.surl||j.dataUrl;if(d)a.ajax(a.extend({url:d,
-dataType:"html",complete:function(n){if(j.buildSelect!=null)(n=j.buildSelect(n))&&a(l).append(n);else a(l).append(n.responseText);j.defaultValue&&a("select",l).val(j.defaultValue);a("select",l).attr({name:g.index||g.name,id:"gs_"+g.name});j.attr&&a("select",l).attr(j.attr);a("select",l).css({width:"100%"});j.dataInit!=null&&j.dataInit(a("select",l)[0]);j.dataEvents!=null&&p(a("select",l)[0],j.dataEvents);e.autosearch===true&&a("select",l).change(function(){k();return false})}},a.jgrid.ajaxOptions,
-b.p.ajaxSelectOptions||{}));else{var c;if(g.searchoptions&&g.searchoptions.value)c=g.searchoptions.value;else if(g.editoptions&&g.editoptions.value)c=g.editoptions.value;if(c){d=document.createElement("select");d.style.width="100%";a(d).attr({name:g.index||g.name,id:"gs_"+g.name});if(typeof c==="string"){c=c.split(";");for(var m,f,h=0;h<c.length;h++){m=c[h].split(":");f=document.createElement("option");f.value=m[0];f.innerHTML=m[1];d.appendChild(f)}}else if(typeof c==="object")for(m in c){f=document.createElement("option");
-f.value=m;f.innerHTML=c[m];d.appendChild(f)}j.defaultValue&&a(d).val(j.defaultValue);j.attr&&a(d).attr(j.attr);j.dataInit!=null&&j.dataInit(d);j.dataEvents!=null&&p(d,j.dataEvents);a(l).append(d);e.autosearch===true&&a(d).change(function(){k();return false})}}break;case "text":d=j.defaultValue?j.defaultValue:"";a(l).append("<input type='text' style='width:95%;padding:0px;' name='"+(g.index||g.name)+"' id='gs_"+g.name+"' value='"+d+"'/>");j.attr&&a("input",l).attr(j.attr);j.dataInit!=null&&j.dataInit(a("input",
-l)[0]);j.dataEvents!=null&&p(a("input",l)[0],j.dataEvents);if(e.autosearch===true)e.searchOnEnter?a("input",l).keypress(function(n){if((n.charCode?n.charCode:n.keyCode?n.keyCode:0)==13){k();return false}return this}):a("input",l).keydown(function(n){switch(n.which){case 9:case 16:case 37:case 38:case 39:case 40:case 27:break;default:s&&clearTimeout(s);s=setTimeout(function(){k()},500)}});break}a(o).append(l);a(v).append(o)});a("table thead",b.grid.hDiv).append(v);this.triggerToolbar=k;this.clearToolbar=
-function(g){var d={},c,m=0,f;g=typeof g!="boolean"?true:g;a.each(b.p.colModel,function(){c=this.searchoptions&&this.searchoptions.defaultValue?this.searchoptions.defaultValue:"";f=this.index||this.name;switch(this.stype){case "select":var r;a("select[name="+f+"] option",b.grid.hDiv).each(function(x){if(x==0)this.selected=true;if(a(this).text()==c){this.selected=true;r=a(this).val();return false}});if(r){d[f]=r;m++}else try{delete b.p.postData[f]}catch(u){}break;case "text":a("input[name="+f+"]",b.grid.hDiv).val(c);
-if(c){d[f]=c;m++}else try{delete b.p.postData[f]}catch(w){}break}});var h=m>0?true:false;if(e.stringResult){var n='{"groupOp":"'+e.groupOp+'","rules":[',i=0;a.each(d,function(r,u){if(i>0)n+=",";n+='{"field":"'+r+'",';n+='"op":"eq",';n+='"data":"'+u+'"}';i++});n+="]}";a.extend(b.p.postData,{filters:n})}else a.extend(b.p.postData,d);var q;if(b.p.searchurl){q=b.p.url;a(b).jqGrid("setGridParam",{url:b.p.searchurl})}var t=false;if(a.isFunction(e.beforeClear))t=e.beforeClear.call(b);t||g&&a(b).jqGrid("setGridParam",
-{search:h}).trigger("reloadGrid",[{page:1}]);q&&a(b).jqGrid("setGridParam",{url:q});a.isFunction(e.afterClear)&&e.afterClear()};this.toggleToolbar=function(){var g=a("tr.ui-search-toolbar",b.grid.hDiv);g.css("display")=="none"?g.show():g.hide()}})}})})(jQuery);
-var showModal=function(a){a.w.show()},closeModal=function(a){a.w.hide().attr("aria-hidden","true");a.o&&a.o.remove()},createModal=function(a,b,c,e,f,h){var d=document.createElement("div"),g;g=jQuery(c.gbox).attr("dir")=="rtl"?true:false;d.className="ui-widget ui-widget-content ui-corner-all ui-jqdialog";d.id=a.themodal;var i=document.createElement("div");i.className="ui-jqdialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix";i.id=a.modalhead;jQuery(i).append("<span class='ui-jqdialog-title'>"+
-c.caption+"</span>");var j=jQuery("<a href='javascript:void(0)' class='ui-jqdialog-titlebar-close ui-corner-all'></a>").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).append("<span class='ui-icon ui-icon-closethick'></span>");jQuery(i).append(j);if(g){d.dir="rtl";jQuery(".ui-jqdialog-title",i).css("float","right");jQuery(".ui-jqdialog-titlebar-close",i).css("left","0.3em")}else{d.dir="ltr";jQuery(".ui-jqdialog-title",i).css("float","left");jQuery(".ui-jqdialog-titlebar-close",
-i).css("right","0.3em")}var l=document.createElement("div");jQuery(l).addClass("ui-jqdialog-content ui-widget-content").attr("id",a.modalcontent);jQuery(l).append(b);d.appendChild(l);jQuery(d).prepend(i);h===true?jQuery("body").append(d):jQuery(d).insertBefore(e);if(typeof c.jqModal==="undefined")c.jqModal=true;b={};if(jQuery.fn.jqm&&c.jqModal===true){if(c.left==0&&c.top==0){e=[];e=findPos(f);c.left=e[0]+4;c.top=e[1]+4}b.top=c.top+"px";b.left=c.left}else if(c.left!=0||c.top!=0){b.left=c.left;b.top=
-c.top+"px"}jQuery("a.ui-jqdialog-titlebar-close",i).click(function(){var n=jQuery("#"+a.themodal).data("onClose")||c.onClose,k=jQuery("#"+a.themodal).data("gbox")||c.gbox;hideModal("#"+a.themodal,{gb:k,jqm:c.jqModal,onClose:n});return false});if(c.width==0||!c.width)c.width=300;if(c.height==0||!c.height)c.height=200;if(!c.zIndex)c.zIndex=950;f=0;if(g&&b.left&&!h){f=jQuery(c.gbox).width()-(!isNaN(c.width)?parseInt(c.width):0)-8;b.left=parseInt(b.left)+parseInt(f)}if(b.left)b.left+="px";jQuery(d).css(jQuery.extend({width:isNaN(c.width)?
-"auto":c.width+"px",height:isNaN(c.height)?"auto":c.height+"px",zIndex:c.zIndex,overflow:"hidden"},b)).attr({tabIndex:"-1",role:"dialog","aria-labelledby":a.modalhead,"aria-hidden":"true"});if(typeof c.drag=="undefined")c.drag=true;if(typeof c.resize=="undefined")c.resize=true;if(c.drag){jQuery(i).css("cursor","move");if(jQuery.fn.jqDrag)jQuery(d).jqDrag(i);else try{jQuery(d).draggable({handle:jQuery("#"+i.id)})}catch(q){}}if(c.resize)if(jQuery.fn.jqResize){jQuery(d).append("<div class='jqResize ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-icon-grip-diagonal-se'></div>");
-jQuery("#"+a.themodal).jqResize(".jqResize",a.scrollelm?"#"+a.scrollelm:false)}else try{jQuery(d).resizable({handles:"se, sw",alsoResize:a.scrollelm?"#"+a.scrollelm:false})}catch(o){}c.closeOnEscape===true&&jQuery(d).keydown(function(n){if(n.which==27){n=jQuery("#"+a.themodal).data("onClose")||c.onClose;hideModal(this,{gb:c.gbox,jqm:c.jqModal,onClose:n})}})},viewModal=function(a,b){b=jQuery.extend({toTop:true,overlay:10,modal:false,onShow:showModal,onHide:closeModal,gbox:"",jqm:true,jqM:true},b||
-{});if(jQuery.fn.jqm&&b.jqm==true)b.jqM?jQuery(a).attr("aria-hidden","false").jqm(b).jqmShow():jQuery(a).attr("aria-hidden","false").jqmShow();else{if(b.gbox!=""){jQuery(".jqgrid-overlay:first",b.gbox).show();jQuery(a).data("gbox",b.gbox)}jQuery(a).show().attr("aria-hidden","false");try{jQuery(":input:visible",a)[0].focus()}catch(c){}}},hideModal=function(a,b){b=jQuery.extend({jqm:true,gb:""},b||{});if(b.onClose){var c=b.onClose(a);if(typeof c=="boolean"&&!c)return}if(jQuery.fn.jqm&&b.jqm===true)jQuery(a).attr("aria-hidden",
-"true").jqmHide();else{if(b.gb!="")try{jQuery(".jqgrid-overlay:first",b.gb).hide()}catch(e){}jQuery(a).hide().attr("aria-hidden","true")}};
-function info_dialog(a,b,c,e){var f={width:290,height:"auto",dataheight:"auto",drag:true,resize:false,caption:"<b>"+a+"</b>",left:250,top:170,zIndex:1E3,jqModal:true,modal:false,closeOnEscape:true,align:"center",buttonalign:"center",buttons:[]};jQuery.extend(f,e||{});var h=f.jqModal;if(jQuery.fn.jqm&&!h)h=false;a="";if(f.buttons.length>0)for(e=0;e<f.buttons.length;e++){if(typeof f.buttons[e].id=="undefined")f.buttons[e].id="info_button_"+e;a+="<a href='javascript:void(0)' id='"+f.buttons[e].id+"' class='fm-button ui-state-default ui-corner-all'>"+
-f.buttons[e].text+"</a>"}e=isNaN(f.dataheight)?f.dataheight:f.dataheight+"px";var d="<div id='info_id'>";d+="<div id='infocnt' style='margin:0px;padding-bottom:1em;width:100%;overflow:auto;position:relative;height:"+e+";"+("text-align:"+f.align+";")+"'>"+b+"</div>";d+=c?"<div class='ui-widget-content ui-helper-clearfix' style='text-align:"+f.buttonalign+";padding-bottom:0.8em;padding-top:0.5em;background-image: none;border-width: 1px 0 0 0;'><a href='javascript:void(0)' id='closedialog' class='fm-button ui-state-default ui-corner-all'>"+
-c+"</a>"+a+"</div>":"";d+="</div>";try{jQuery("#info_dialog").attr("aria-hidden")=="false"&&hideModal("#info_dialog",{jqm:h});jQuery("#info_dialog").remove()}catch(g){}createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content",scrollelm:"infocnt"},d,f,"","",true);a&&jQuery.each(f.buttons,function(j){jQuery("#"+this.id,"#info_id").bind("click",function(){f.buttons[j].onClick.call(jQuery("#info_dialog"));return false})});jQuery("#closedialog","#info_id").click(function(j){hideModal("#info_dialog",
-{jqm:h});return false});jQuery(".fm-button","#info_dialog").hover(function(){jQuery(this).addClass("ui-state-hover")},function(){jQuery(this).removeClass("ui-state-hover")});viewModal("#info_dialog",{onHide:function(j){j.w.hide().remove();j.o&&j.o.remove()},modal:f.modal,jqm:h});try{$("#info_dialog").focus()}catch(i){}}function findPos(a){var b=curtop=0;if(a.offsetParent){do{b+=a.offsetLeft;curtop+=a.offsetTop}while(a=a.offsetParent)}return[b,curtop]}
-function isArray(a){return a.constructor.toString().indexOf("Array")==-1?false:true}
-function createEl(a,b,c,e,f){function h(k,m){if(jQuery.isFunction(m.dataInit)){k.id=m.id;m.dataInit(k);delete m.id;delete m.dataInit}if(m.dataEvents){jQuery.each(m.dataEvents,function(){this.data!=null?jQuery(k).bind(this.type,this.data,this.fn):jQuery(k).bind(this.type,this.fn)});delete m.dataEvents}return m}var d="";b.defaultValue&&delete b.defaultValue;switch(a){case "textarea":d=document.createElement("textarea");if(e)b.cols||jQuery(d).css({width:"98%"});else if(!b.cols)b.cols=20;if(!b.rows)b.rows=
-2;if(c=="&nbsp;"||c=="&#160;"||c.length==1&&c.charCodeAt(0)==160)c="";d.value=c;b=h(d,b);jQuery(d).attr(b);break;case "checkbox":d=document.createElement("input");d.type="checkbox";if(b.value){var g=b.value.split(":");if(c===g[0]){d.checked=true;d.defaultChecked=true}d.value=g[0];jQuery(d).attr("offval",g[1]);try{delete b.value}catch(i){}}else{g=c.toLowerCase();if(g.search(/(false|0|no|off|undefined)/i)<0&&g!==""){d.checked=true;d.defaultChecked=true;d.value=c}else d.value="on";jQuery(d).attr("offval",
-"off")}b=h(d,b);jQuery(d).attr(b);break;case "select":d=document.createElement("select");var j,l=[];if(b.multiple===true){j=true;d.multiple="multiple"}else j=false;if(b.dataUrl!=null)jQuery.ajax(jQuery.extend({url:b.dataUrl,type:"GET",complete:function(k,m){try{delete b.dataUrl;delete b.value}catch(r){}if(b.buildSelect!=null){k=b.buildSelect(k);k=jQuery(k).html();delete b.buildSelect}else k=jQuery(k.responseText).html();if(k){jQuery(d).append(k);b=h(d,b);if(typeof b.size==="undefined")b.size=j?3:
-1;if(j){l=c.split(",");l=jQuery.map(l,function(p){return jQuery.trim(p)})}else l[0]=c;jQuery(d).attr(b);setTimeout(function(){jQuery("option",d).each(function(p){if(p==0)this.selected="";if(jQuery.inArray(jQuery(this).text(),l)>-1||jQuery.inArray(jQuery(this).val(),l)>-1){this.selected="selected";if(!j)return false}})},0)}}},f||{}));else if(b.value){if(j){l=c.split(",");l=jQuery.map(l,function(k){return jQuery.trim(k)});if(typeof b.size==="undefined")b.size=3}else b.size=1;if(typeof b.value==="function")b.value=
-b.value();if(typeof b.value==="string"){e=b.value.split(";");for(g=0;g<e.length;g++){f=e[g].split(":");if(f.length>2)f[1]=jQuery.map(f,function(k,m){if(m>0)return k}).join(":");a=document.createElement("option");a.value=f[0];a.innerHTML=f[1];if(!j&&(f[0]==c||f[1]==c))a.selected="selected";if(j&&(jQuery.inArray(f[1],l)>-1||jQuery.inArray(f[0],l)>-1))a.selected="selected";d.appendChild(a)}}else if(typeof b.value==="object"){e=b.value;for(g in e){a=document.createElement("option");a.value=g;a.innerHTML=
-e[g];if(!j&&(g==c||e[g]==c))a.selected="selected";if(j&&(jQuery.inArray(e[g],l)>-1||jQuery.inArray(g,l)>-1))a.selected="selected";d.appendChild(a)}}b=h(d,b);try{delete b.value}catch(q){}jQuery(d).attr(b)}break;case "text":case "password":case "button":d=document.createElement("input");d.type=a;d.value=c;b=h(d,b);if(a!="button")if(e)b.size||jQuery(d).css({width:"98%"});else if(!b.size)b.size=20;jQuery(d).attr(b);break;case "image":case "file":d=document.createElement("input");d.type=a;b=h(d,b);jQuery(d).attr(b);
-break;case "custom":d=document.createElement("span");try{if(jQuery.isFunction(b.custom_element)){var o=b.custom_element.call(this,c,b);if(o){o=jQuery(o).addClass("customelement").attr({id:b.id,name:b.name});jQuery(d).empty().append(o)}else throw"e2";}else throw"e1";}catch(n){n=="e1"&&info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_element' "+jQuery.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose);n=="e2"?info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_element' "+jQuery.jgrid.edit.msg.novalue,
-jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap,n.message,jQuery.jgrid.edit.bClose)}break}return d}
-function checkValues(a,b,c){var e,f,h;if(typeof b=="string"){f=0;for(len=c.p.colModel.length;f<len;f++)if(c.p.colModel[f].name==b){e=c.p.colModel[f].editrules;b=f;try{h=c.p.colModel[f].formoptions.label}catch(d){}break}}else if(b>=0)e=c.p.colModel[b].editrules;if(e){h||(h=c.p.colNames[b]);if(e.required===true)if(a.match(/^s+$/)||a=="")return[false,h+": "+jQuery.jgrid.edit.msg.required,""];f=e.required===false?false:true;if(e.number===true)if(!(f===false&&isEmpty(a)))if(isNaN(a))return[false,h+": "+
-jQuery.jgrid.edit.msg.number,""];if(typeof e.minValue!="undefined"&&!isNaN(e.minValue))if(parseFloat(a)<parseFloat(e.minValue))return[false,h+": "+jQuery.jgrid.edit.msg.minValue+" "+e.minValue,""];if(typeof e.maxValue!="undefined"&&!isNaN(e.maxValue))if(parseFloat(a)>parseFloat(e.maxValue))return[false,h+": "+jQuery.jgrid.edit.msg.maxValue+" "+e.maxValue,""];var g;if(e.email===true)if(!(f===false&&isEmpty(a))){g=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
-if(!g.test(a))return[false,h+": "+jQuery.jgrid.edit.msg.email,""]}if(e.integer===true)if(!(f===false&&isEmpty(a))){if(isNaN(a))return[false,h+": "+jQuery.jgrid.edit.msg.integer,""];if(a%1!=0||a.indexOf(".")!=-1)return[false,h+": "+jQuery.jgrid.edit.msg.integer,""]}if(e.date===true)if(!(f===false&&isEmpty(a))){b=c.p.colModel[b].datefmt||"Y-m-d";if(!checkDate(b,a))return[false,h+": "+jQuery.jgrid.edit.msg.date+" - "+b,""]}if(e.time===true)if(!(f===false&&isEmpty(a)))if(!checkTime(a))return[false,h+
-": "+jQuery.jgrid.edit.msg.date+" - hh:mm (am/pm)",""];if(e.url===true)if(!(f===false&&isEmpty(a))){g=/^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;if(!g.test(a))return[false,h+": "+jQuery.jgrid.edit.msg.url,""]}if(e.custom===true)if(!(f===false&&isEmpty(a)))if(jQuery.isFunction(e.custom_func)){a=e.custom_func.call(c,a,h);return jQuery.isArray(a)?a:[false,jQuery.jgrid.edit.msg.customarray,""]}else return[false,jQuery.jgrid.edit.msg.customfcheck,
-""]}return[true,"",""]}
-function checkDate(a,b){var c={},e;a=a.toLowerCase();e=a.indexOf("/")!=-1?"/":a.indexOf("-")!=-1?"-":a.indexOf(".")!=-1?".":"/";a=a.split(e);b=b.split(e);if(b.length!=3)return false;e=-1;for(var f,h=-1,d=-1,g=0;g<a.length;g++){f=isNaN(b[g])?0:parseInt(b[g],10);c[a[g]]=f;f=a[g];if(f.indexOf("y")!=-1)e=g;if(f.indexOf("m")!=-1)d=g;if(f.indexOf("d")!=-1)h=g}f=a[e]=="y"||a[e]=="yyyy"?4:a[e]=="yy"?2:-1;g=DaysArray(12);var i;if(e===-1)return false;else{i=c[a[e]].toString();if(f==2&&i.length==1)f=1;if(i.length!=
-f||c[a[e]]==0&&b[e]!="00")return false}if(d===-1)return false;else{i=c[a[d]].toString();if(i.length<1||c[a[d]]<1||c[a[d]]>12)return false}if(h===-1)return false;else{i=c[a[h]].toString();if(i.length<1||c[a[h]]<1||c[a[h]]>31||c[a[d]]==2&&c[a[h]]>daysInFebruary(c[a[e]])||c[a[h]]>g[c[a[d]]])return false}return true}function daysInFebruary(a){return a%4==0&&(a%100!=0||a%400==0)?29:28}
-function DaysArray(a){for(var b=1;b<=a;b++){this[b]=31;if(b==4||b==6||b==9||b==11)this[b]=30;if(b==2)this[b]=29}return this}function isEmpty(a){return a.match(/^s+$/)||a==""?true:false}function checkTime(a){var b=/^(\d{1,2}):(\d{2})([ap]m)?$/;if(!isEmpty(a))if(a=a.match(b)){if(a[3]){if(a[1]<1||a[1]>12)return false}else if(a[1]>23)return false;if(a[2]>59)return false}else return false;return true};
-(function(a){var d=null;a.jgrid.extend({searchGrid:function(h){h=a.extend({recreateFilter:false,drag:true,sField:"searchField",sValue:"searchString",sOper:"searchOper",sFilter:"filters",beforeShowSearch:null,afterShowSearch:null,onInitializeSearch:null,closeAfterSearch:false,closeOnEscape:false,multipleSearch:false,sopt:null,onClose:null},a.jgrid.search,h||{});return this.each(function(){function b(r){var v=r!==undefined,B=a("#"+w.p.id),I={};if(h.multipleSearch===false){I[h.sField]=r.rules[0].field;
-I[h.sValue]=r.rules[0].data;I[h.sOper]=r.rules[0].op}else I[h.sFilter]=r;B[0].p.search=v;a.extend(B[0].p.postData,I);B.trigger("reloadGrid",[{page:1}]);h.closeAfterSearch&&x(a("#"+q))}function o(r){r=r!==undefined;var v=a("#"+w.p.id),B=[];v[0].p.search=r;if(h.multipleSearch===false)B[h.sField]=B[h.sValue]=B[h.sOper]="";else B[h.sFilter]="";a.extend(v[0].p.postData,B);v.trigger("reloadGrid",[{page:1}])}function x(r){if(h.onClose){var v=h.onClose(r);if(typeof v=="boolean"&&!v)return}r.hide();a(".jqgrid-overlay:first",
-"#gbox_"+w.p.id).hide()}function s(){var r=a(".ui-searchFilter").length;if(r>1){var v=a("#"+q).css("zIndex");a("#"+q).css({zIndex:parseInt(v)+r})}a("#"+q).show();a(".jqgrid-overlay:first","#gbox_"+w.p.id).show();try{a(":input:visible","#"+q)[0].focus()}catch(B){}}var w=this;if(w.grid)if(a.fn.searchFilter){var q="fbox_"+w.p.id;h.recreateFilter===true&&a("#"+q).remove();if(a("#"+q).html()!=null){a.isFunction(h.beforeShowSearch)&&h.beforeShowSearch(a("#"+q));s();a.isFunction(h.afterShowSearch)&&h.afterShowSearch(a("#"+
-q))}else{var n=[],m=a("#"+w.p.id).jqGrid("getGridParam","colNames"),F=a("#"+w.p.id).jqGrid("getGridParam","colModel"),f=["eq","ne","lt","le","gt","ge","bw","bn","in","ni","ew","en","cn","nc"],e,j,i,k;k=jQuery.fn.searchFilter.defaults.operators;if(h.sopt!=null){k=[];for(e=i=0;e<h.sopt.length;e++)if((j=a.inArray(h.sopt[e],f))!=-1){k[i]={op:h.sopt[e],text:h.odata[j]};i++}}var u;a.each(F,function(r,v){u=typeof v.search==="undefined"?true:v.search;hidden=v.hidden===true;soptions=a.extend({},{text:m[r],
-itemval:v.index||v.name},this.searchoptions);ignoreHiding=soptions.searchhidden===true;if(typeof soptions.sopt=="undefined")soptions.sopt=h.sopt||f;i=0;soptions.ops=[];if(soptions.sopt.length>0)for(e=0;e<soptions.sopt.length;e++)if((j=a.inArray(soptions.sopt[e],f))!=-1){soptions.ops[i]={op:soptions.sopt[e],text:h.odata[j]};i++}if(typeof this.stype==="undefined")this.stype="text";if(this.stype=="select")if(soptions.dataUrl==null){var B;if(soptions.value)B=soptions.value;else if(this.editoptions)B=
-this.editoptions.value;if(B){soptions.dataValues=[];if(typeof B==="string"){r=B.split(";");for(e=0;e<r.length;e++){v=r[e].split(":");soptions.dataValues[e]={value:v[0],text:v[1]}}}else if(typeof B==="object"){e=0;for(var I in B){soptions.dataValues[e]={value:I,text:B[I]};e++}}}}if(ignoreHiding&&u||u&&!hidden)n.push(soptions)});if(n.length>0){a("<div id='"+q+"' role='dialog' tabindex='-1'></div>").insertBefore("#gview_"+w.p.id);a("#"+q).searchFilter(n,{groupOps:h.groupOps,operators:k,onClose:x,resetText:h.Reset,
-searchText:h.Find,windowTitle:h.caption,rulesText:h.rulesText,matchText:h.matchText,onSearch:b,onReset:o,stringResult:h.multipleSearch,ajaxSelectOptions:a.extend({},a.jgrid.ajaxOptions,w.p.ajaxSelectOptions||{})});a(".ui-widget-overlay","#"+q).remove();w.p.direction=="rtl"&&a(".ui-closer","#"+q).css("float","left");if(h.drag===true){a("#"+q+" table thead tr:first td:first").css("cursor","move");if(jQuery.fn.jqDrag)a("#"+q).jqDrag(a("#"+q+" table thead tr:first td:first"));else try{a("#"+q).draggable({handle:a("#"+
-q+" table thead tr:first td:first")})}catch(P){}}if(h.multipleSearch===false){a(".ui-del, .ui-add, .ui-del, .ui-add-last, .matchText, .rulesText","#"+q).hide();a("select[name='groupOp']","#"+q).hide()}a.isFunction(h.onInitializeSearch)&&h.onInitializeSearch(a("#"+q));a.isFunction(h.beforeShowSearch)&&h.beforeShowSearch(a("#"+q));s();a.isFunction(h.afterShowSearch)&&h.afterShowSearch(a("#"+q));h.closeOnEscape===true&&a("#"+q).keydown(function(r){r.which==27&&x(a("#"+q))})}}}})},editGridRow:function(h,
-b){d=b=a.extend({top:0,left:0,width:300,height:"auto",dataheight:"auto",modal:false,drag:true,resize:true,url:null,mtype:"POST",clearAfterAdd:true,closeAfterEdit:false,reloadAfterSubmit:true,onInitializeForm:null,beforeInitData:null,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,afterSubmit:null,onclickSubmit:null,afterComplete:null,onclickPgButtons:null,afterclickPgButtons:null,editData:{},recreateForm:false,jqModal:true,closeOnEscape:false,addedrow:"first",topinfo:"",bottominfo:"",saveicon:[],
-closeicon:[],savekey:[false,13],navkeys:[false,38,40],checkOnSubmit:false,checkOnUpdate:false,_savedData:{},processing:false,onClose:null,ajaxEditOptions:{},serializeEditData:null,viewPagerButtons:true},a.jgrid.edit,b||{});return this.each(function(){function o(g,l){g==0?a("#pData","#"+i+"_2").addClass("ui-state-disabled"):a("#pData","#"+i+"_2").removeClass("ui-state-disabled");g==l?a("#nData","#"+i+"_2").addClass("ui-state-disabled"):a("#nData","#"+i+"_2").removeClass("ui-state-disabled")}function x(){var g=
-a(f).jqGrid("getDataIDs"),l=a("#id_g","#"+i).val();return[a.inArray(l,g),g]}function s(){var g=true;a("#FormError","#"+i).hide();if(d.checkOnUpdate){c={};t={};w();J=a.extend({},c,t);if(S=F(J,d._savedData)){a("#"+j).data("disabled",true);a(".confirm","#"+k.themodal).show();g=false}}return g}function w(){a(".FormElement","#"+i).each(function(){var g=a(".customelement",this);if(g.length){var l=g[0].name;a.each(f.p.colModel,function(){if(this.name==l&&this.editoptions&&a.isFunction(this.editoptions.custom_value)){try{c[l]=
-this.editoptions.custom_value(a("#"+l,"#"+i),"get");if(c[l]===undefined)throw"e1";}catch(p){p=="e1"?info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap,p.message,jQuery.jgrid.edit.bClose)}return true}})}else{switch(a(this).get(0).type){case "checkbox":if(a(this).attr("checked"))c[this.name]=a(this).val();else{g=a(this).attr("offval");c[this.name]=g}break;case "select-one":c[this.name]=a("option:selected",
-this).val();t[this.name]=a("option:selected",this).text();break;case "select-multiple":c[this.name]=a(this).val();c[this.name]=c[this.name]?c[this.name].join(","):"";var C=[];a("option:selected",this).each(function(p,E){C[p]=a(E).text()});t[this.name]=C.join(",");break;case "password":case "text":case "textarea":case "button":c[this.name]=a(this).val();break}if(f.p.autoencode)c[this.name]=a.jgrid.htmlEncode(c[this.name])}});return true}function q(g,l,C,p){for(var E,z,A,K=0,y,L,G,Q=[],H=false,X,R,
-ba="",W=1;W<=p;W++)ba+="<td class='CaptionTD ui-widget-content'>&#160;</td><td class='DataTD ui-widget-content' style='white-space:pre'>&#160;</td>";if(g!="_empty")H=a(l).jqGrid("getInd",g);a(l.p.colModel).each(function(Y){E=this.name;L=(z=this.editrules&&this.editrules.edithidden==true?false:this.hidden===true?true:false)?"style='display:none'":"";if(E!=="cb"&&E!=="subgrid"&&this.editable===true&&E!=="rn"){if(H===false)y="";else if(E==l.p.ExpandColumn&&l.p.treeGrid===true)y=a("td:eq("+Y+")",l.rows[H]).text();
-else try{y=a.unformat(a("td:eq("+Y+")",l.rows[H]),{rowId:g,colModel:this},Y)}catch(da){y=a("td:eq("+Y+")",l.rows[H]).html()}var U=a.extend({},this.editoptions||{},{id:E,name:E});frmopt=a.extend({},{elmprefix:"",elmsuffix:"",rowabove:false,rowcontent:""},this.formoptions||{});X=parseInt(frmopt.rowpos)||K+1;R=parseInt((parseInt(frmopt.colpos)||1)*2);if(g=="_empty"&&U.defaultValue)y=a.isFunction(U.defaultValue)?U.defaultValue():U.defaultValue;if(!this.edittype)this.edittype="text";if(f.p.autoencode)y=
-a.jgrid.htmlDecode(y);G=createEl(this.edittype,U,y,false,a.extend({},a.jgrid.ajaxOptions,l.p.ajaxSelectOptions||{}));if(y==""&&this.edittype=="checkbox")y=a(G).attr("offval");if(d.checkOnSubmit||d.checkOnUpdate)d._savedData[E]=y;a(G).addClass("FormElement");A=a(C).find("tr[rowpos="+X+"]");if(frmopt.rowabove){U=a("<tr><td class='contentinfo' colspan='"+p*2+"'>"+frmopt.rowcontent+"</td></tr>");a(C).append(U);U[0].rp=X}if(A.length==0){A=a("<tr "+L+" rowpos='"+X+"'></tr>").addClass("FormData").attr("id",
-"tr_"+E);a(A).append(ba);a(C).append(A);A[0].rp=X}a("td:eq("+(R-2)+")",A[0]).html(typeof frmopt.label==="undefined"?l.p.colNames[Y]:frmopt.label);a("td:eq("+(R-1)+")",A[0]).append(frmopt.elmprefix).append(G).append(frmopt.elmsuffix);Q[K]=Y;K++}});if(K>0){W=a("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(p*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='"+l.p.id+"_id' value='"+g+"'/></td></tr>");W[0].rp=K+999;a(C).append(W);if(d.checkOnSubmit||
-d.checkOnUpdate)d._savedData.id=g}return Q}function n(g,l,C){var p,E=0,z,A,K,y,L;if(d.checkOnSubmit||d.checkOnUpdate){d._savedData={};d._savedData.id=g}var G=l.p.colModel;if(g=="_empty"){a(G).each(function(){p=this.name;K=a.extend({},this.editoptions||{});A=a("#"+a.jgrid.jqID(p),"#"+C);if(A[0]!=null){y="";if(K.defaultValue){y=a.isFunction(K.defaultValue)?K.defaultValue():K.defaultValue;if(A[0].type=="checkbox"){L=y.toLowerCase();if(L.search(/(false|0|no|off|undefined)/i)<0&&L!==""){A[0].checked=true;
-A[0].defaultChecked=true;A[0].value=y}else A.attr({checked:"",defaultChecked:""})}else A.val(y)}else if(A[0].type=="checkbox"){A[0].checked=false;A[0].defaultChecked=false;y=a(A).attr("offval")}else if(A[0].type.substr(0,6)=="select")A[0].selectedIndex=0;else A.val(y);if(d.checkOnSubmit===true||d.checkOnUpdate)d._savedData[p]=y}});a("#id_g","#"+C).val(g)}else{var Q=a(l).jqGrid("getInd",g,true);if(Q){a("td",Q).each(function(H){p=G[H].name;if(p!=="cb"&&p!=="subgrid"&&p!=="rn"&&G[H].editable===true){if(p==
-l.p.ExpandColumn&&l.p.treeGrid===true)z=a(this).text();else try{z=a.unformat(this,{rowId:g,colModel:G[H]},H)}catch(X){z=a(this).html()}if(f.p.autoencode)z=a.jgrid.htmlDecode(z);if(d.checkOnSubmit===true||d.checkOnUpdate)d._savedData[p]=z;p=a.jgrid.jqID(p);switch(G[H].edittype){case "password":case "text":case "button":case "image":a("#"+p,"#"+C).val(z);break;case "textarea":if(z=="&nbsp;"||z=="&#160;"||z.length==1&&z.charCodeAt(0)==160)z="";a("#"+p,"#"+C).val(z);break;case "select":var R=z.split(",");
-R=a.map(R,function(W){return a.trim(W)});a("#"+p+" option","#"+C).each(function(){this.selected=!G[H].editoptions.multiple&&(R[0]==a(this).text()||R[0]==a(this).val())?true:G[H].editoptions.multiple?a.inArray(a(this).text(),R)>-1||a.inArray(a(this).val(),R)>-1?true:false:false});break;case "checkbox":z+="";z=z.toLowerCase();if(z.search(/(false|0|no|off|undefined)/i)<0&&z!==""){a("#"+p,"#"+C).attr("checked",true);a("#"+p,"#"+C).attr("defaultChecked",true)}else{a("#"+p,"#"+C).attr("checked",false);
-a("#"+p,"#"+C).attr("defaultChecked","")}break;case "custom":try{if(G[H].editoptions&&a.isFunction(G[H].editoptions.custom_value))G[H].editoptions.custom_value(a("#"+p,"#"+C),"set",z);else throw"e1";}catch(ba){ba=="e1"?info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap,ba.message,jQuery.jgrid.edit.bClose)}break}E++}});E>0&&a("#id_g","#"+i).val(g)}}}function m(){var g,l=[true,"",""],C={},p=f.p.prmNames,
-E,z;if(a.isFunction(d.beforeCheckValues)){var A=d.beforeCheckValues(c,a("#"+j),c[f.p.id+"_id"]=="_empty"?p.addoper:p.editoper);if(A&&typeof A==="object")c=A}for(var K in c){l=checkValues(c[K],K,f);if(l[0]==false)break}if(l[0]){if(a.isFunction(d.onclickSubmit))C=d.onclickSubmit(d,c)||{};if(a.isFunction(d.beforeSubmit))l=d.beforeSubmit(c,a("#"+j))}Z=d.url?d.url:a(f).jqGrid("getGridParam","editurl");if(l[0])if(!Z){l[0]=false;l[1]+=" "+a.jgrid.errors.nourl}if(l[0]===false){a("#FormError>td","#"+i).html(l[1]);
-a("#FormError","#"+i).show()}else if(!d.processing){d.processing=true;a("#sData","#"+i+"_2").addClass("ui-state-active");z=p.oper;E=p.id;c[z]=a.trim(c[f.p.id+"_id"])=="_empty"?p.addoper:p.editoper;if(c[z]!=p.addoper)c[E]=c[f.p.id+"_id"];else if(c[E]===undefined)c[E]=c[f.p.id+"_id"];delete c[f.p.id+"_id"];c=a.extend(c,d.editData,C);a.ajax(a.extend({url:Z,type:d.mtype,data:a.isFunction(d.serializeEditData)?d.serializeEditData(c):c,complete:function(y,L){if(L!="success"){l[0]=false;l[1]=a.isFunction(d.errorTextFormat)?
-d.errorTextFormat(y):L+" Status: '"+y.statusText+"'. Error code: "+y.status}else if(a.isFunction(d.afterSubmit))l=d.afterSubmit(y,c);if(l[0]===false){a("#FormError>td","#"+i).html(l[1]);a("#FormError","#"+i).show()}else{a.each(f.p.colModel,function(){if(t[this.name]&&this.formatter&&this.formatter=="select")try{delete t[this.name]}catch(Q){}});c=a.extend(c,t);f.p.autoencode&&a.each(c,function(Q,H){c[Q]=a.jgrid.htmlDecode(H)});if(c[z]==p.addoper){l[2]||(l[2]=parseInt(f.p.records)+1);c[E]=l[2];if(d.closeAfterAdd){if(d.reloadAfterSubmit)a(f).trigger("reloadGrid");
-else{a(f).jqGrid("addRowData",l[2],c,b.addedrow);a(f).jqGrid("setSelection",l[2])}hideModal("#"+k.themodal,{gb:"#gbox_"+e,jqm:b.jqModal,onClose:d.onClose})}else if(d.clearAfterAdd){d.reloadAfterSubmit?a(f).trigger("reloadGrid"):a(f).jqGrid("addRowData",l[2],c,b.addedrow);n("_empty",f,j)}else d.reloadAfterSubmit?a(f).trigger("reloadGrid"):a(f).jqGrid("addRowData",l[2],c,b.addedrow)}else{if(d.reloadAfterSubmit){a(f).trigger("reloadGrid");d.closeAfterEdit||setTimeout(function(){a(f).jqGrid("setSelection",
-c[E])},1E3)}else f.p.treeGrid===true?a(f).jqGrid("setTreeRow",c[E],c):a(f).jqGrid("setRowData",c[E],c);d.closeAfterEdit&&hideModal("#"+k.themodal,{gb:"#gbox_"+e,jqm:b.jqModal,onClose:d.onClose})}if(a.isFunction(d.afterComplete)){g=y;setTimeout(function(){d.afterComplete(g,c,a("#"+j));g=null},500)}}d.processing=false;if(d.checkOnSubmit||d.checkOnUpdate){a("#"+j).data("disabled",false);if(d._savedData.id!="_empty")d._savedData=c}a("#sData","#"+i+"_2").removeClass("ui-state-active");try{a(":input:visible",
-"#"+j)[0].focus()}catch(G){}},error:function(y,L,G){a("#FormError>td","#"+i).html(L+" : "+G);a("#FormError","#"+i).show();d.processing=false;a("#"+j).data("disabled",false);a("#sData","#"+i+"_2").removeClass("ui-state-active")}},a.jgrid.ajaxOptions,d.ajaxEditOptions))}}function F(g,l){var C=false,p;for(p in g)if(g[p]!=l[p]){C=true;break}return C}var f=this;if(f.grid&&h){var e=f.p.id,j="FrmGrid_"+e,i="TblGrid_"+e,k={themodal:"editmod"+e,modalhead:"edithd"+e,modalcontent:"editcnt"+e,scrollelm:j},u=
-a.isFunction(d.beforeShowForm)?d.beforeShowForm:false,P=a.isFunction(d.afterShowForm)?d.afterShowForm:false,r=a.isFunction(d.beforeInitData)?d.beforeInitData:false,v=a.isFunction(d.onInitializeForm)?d.onInitializeForm:false,B=1,I=0,Z,c,t,J,S;if(h=="new"){h="_empty";b.caption=b.addCaption}else b.caption=b.editCaption;b.recreateForm===true&&a("#"+k.themodal).html()!=null&&a("#"+k.themodal).remove();var M=true;if(b.checkOnUpdate&&b.jqModal&&!b.modal)M=false;if(a("#"+k.themodal).html()!=null){a(".ui-jqdialog-title",
-"#"+k.modalhead).html(b.caption);a("#FormError","#"+i).hide();if(d.topinfo){a(".topinfo","#"+i+"_2").html(d.topinfo);a(".tinfo","#"+i+"_2").show()}else a(".tinfo","#"+i+"_2").hide();if(d.bottominfo){a(".bottominfo","#"+i+"_2").html(d.bottominfo);a(".binfo","#"+i+"_2").show()}else a(".binfo","#"+i+"_2").hide();r&&r(a("#"+j));n(h,f,j);h=="_empty"||!d.viewPagerButtons?a("#pData, #nData","#"+i+"_2").hide():a("#pData, #nData","#"+i+"_2").show();if(d.processing===true){d.processing=false;a("#sData","#"+
-i+"_2").removeClass("ui-state-active")}if(a("#"+j).data("disabled")===true){a(".confirm","#"+k.themodal).hide();a("#"+j).data("disabled",false)}u&&u(a("#"+j));a("#"+k.themodal).data("onClose",d.onClose);viewModal("#"+k.themodal,{gbox:"#gbox_"+e,jqm:b.jqModal,jqM:false,closeoverlay:M,modal:b.modal});M||a(".jqmOverlay").click(function(){if(!s())return false;hideModal("#"+k.themodal,{gb:"#gbox_"+e,jqm:b.jqModal,onClose:d.onClose});return false});P&&P(a("#"+j))}else{a(f.p.colModel).each(function(){var g=
-this.formoptions;B=Math.max(B,g?g.colpos||0:0);I=Math.max(I,g?g.rowpos||0:0)});var N=isNaN(b.dataheight)?b.dataheight:b.dataheight+"px",D;N=a("<form name='FormPost' id='"+j+"' class='FormGrid' style='width:100%;overflow:auto;position:relative;height:"+N+";'></form>").data("disabled",false);var O=a("<table id='"+i+"' class='EditTable' cellspacing='0' cellpading='0' border='0'><tbody></tbody></table>");a(N).append(O);D=a("<tr id='FormError' style='display:none'><td class='ui-state-error' colspan='"+
-B*2+"'></td></tr>");D[0].rp=0;a(O).append(D);D=a("<tr style='display:none' class='tinfo'><td class='topinfo' colspan='"+B*2+"'>"+d.topinfo+"</td></tr>");D[0].rp=0;a(O).append(D);r&&r(a("#"+j));D=(r=f.p.direction=="rtl"?true:false)?"nData":"pData";var T=r?"pData":"nData";q(h,f,O,B);D="<a href='javascript:void(0)' id='"+D+"' class='fm-button ui-state-default ui-corner-left'><span class='ui-icon ui-icon-triangle-1-w'></span></div>";T="<a href='javascript:void(0)' id='"+T+"' class='fm-button ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-e'></span></div>";
-var $="<a href='javascript:void(0)' id='sData' class='fm-button ui-state-default ui-corner-all'>"+b.bSubmit+"</a>",aa="<a href='javascript:void(0)' id='cData' class='fm-button ui-state-default ui-corner-all'>"+b.bCancel+"</a>";D="<table border='0' class='EditTable' id='"+i+"_2'><tbody><tr id='Act_Buttons'><td class='navButton ui-widget-content'>"+(r?T+D:D+T)+"</td><td class='EditButton ui-widget-content'>"+$+aa+"</td></tr>";D+="<tr style='display:none' class='binfo'><td class='bottominfo' colspan='2'>"+
-d.bottominfo+"</td></tr>";D+="</tbody></table>";if(I>0){var V=[];a.each(a(O)[0].rows,function(g,l){V[g]=l});V.sort(function(g,l){if(g.rp>l.rp)return 1;if(g.rp<l.rp)return-1;return 0});a.each(V,function(g,l){a("tbody",O).append(l)})}b.gbox="#gbox_"+e;var ca=false;if(b.closeOnEscape===true){b.closeOnEscape=false;ca=true}N=a("<span></span>").append(N).append(D);createModal(k,N,b,"#gview_"+f.p.id,a("#gview_"+f.p.id)[0]);if(r){a("#pData, #nData","#"+i+"_2").css("float","right");a(".EditButton","#"+i+"_2").css("text-align",
-"left")}d.topinfo&&a(".tinfo","#"+i+"_2").show();d.bottominfo&&a(".binfo","#"+i+"_2").show();D=N=null;a("#"+k.themodal).keydown(function(g){var l=g.target;if(a("#"+j).data("disabled")===true)return false;if(d.savekey[0]===true&&g.which==d.savekey[1])if(l.tagName!="TEXTAREA"){a("#sData","#"+i+"_2").trigger("click");return false}if(g.which===27){if(!s())return false;ca&&hideModal(this,{gb:b.gbox,jqm:b.jqModal,onClose:d.onClose});return false}if(d.navkeys[0]===true){if(a("#id_g","#"+i).val()=="_empty")return true;
-if(g.which==d.navkeys[1]){a("#pData","#"+i+"_2").trigger("click");return false}if(g.which==d.navkeys[2]){a("#nData","#"+i+"_2").trigger("click");return false}}});if(b.checkOnUpdate){a("a.ui-jqdialog-titlebar-close span","#"+k.themodal).removeClass("jqmClose");a("a.ui-jqdialog-titlebar-close","#"+k.themodal).unbind("click").click(function(){if(!s())return false;hideModal("#"+k.themodal,{gb:"#gbox_"+e,jqm:b.jqModal,onClose:d.onClose});return false})}b.saveicon=a.extend([true,"left","ui-icon-disk"],
-b.saveicon);b.closeicon=a.extend([true,"left","ui-icon-close"],b.closeicon);if(b.saveicon[0]==true)a("#sData","#"+i+"_2").addClass(b.saveicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.saveicon[2]+"'></span>");if(b.closeicon[0]==true)a("#cData","#"+i+"_2").addClass(b.closeicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.closeicon[2]+"'></span>");if(d.checkOnSubmit||d.checkOnUpdate){$="<a href='javascript:void(0)' id='sNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+
-b.bYes+"</a>";T="<a href='javascript:void(0)' id='nNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+b.bNo+"</a>";aa="<a href='javascript:void(0)' id='cNew' class='fm-button ui-state-default ui-corner-all' style='z-index:1002'>"+b.bExit+"</a>";N=b.zIndex||999;N++;a("<div class='ui-widget-overlay jqgrid-overlay confirm' style='z-index:"+N+";display:none;'>&#160;"+(a.browser.msie&&a.browser.version==6?'<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>':
-"")+"</div><div class='confirm ui-widget-content ui-jqconfirm' style='z-index:"+(N+1)+"'>"+b.saveData+"<br/><br/>"+$+T+aa+"</div>").insertAfter("#"+j);a("#sNew","#"+k.themodal).click(function(){m();a("#"+j).data("disabled",false);a(".confirm","#"+k.themodal).hide();return false});a("#nNew","#"+k.themodal).click(function(){a(".confirm","#"+k.themodal).hide();a("#"+j).data("disabled",false);setTimeout(function(){a(":input","#"+j)[0].focus()},0);return false});a("#cNew","#"+k.themodal).click(function(){a(".confirm",
-"#"+k.themodal).hide();a("#"+j).data("disabled",false);hideModal("#"+k.themodal,{gb:"#gbox_"+e,jqm:b.jqModal,onClose:d.onClose});return false})}v&&v(a("#"+j));h=="_empty"||!d.viewPagerButtons?a("#pData,#nData","#"+i+"_2").hide():a("#pData,#nData","#"+i+"_2").show();u&&u(a("#"+j));a("#"+k.themodal).data("onClose",d.onClose);viewModal("#"+k.themodal,{gbox:"#gbox_"+e,jqm:b.jqModal,closeoverlay:M,modal:b.modal});M||a(".jqmOverlay").click(function(){if(!s())return false;hideModal("#"+k.themodal,{gb:"#gbox_"+
-e,jqm:b.jqModal,onClose:d.onClose});return false});P&&P(a("#"+j));a(".fm-button","#"+k.themodal).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});a("#sData","#"+i+"_2").click(function(){c={};t={};a("#FormError","#"+i).hide();w();if(c[f.p.id+"_id"]=="_empty")m();else if(b.checkOnSubmit===true){J=a.extend({},c,t);if(S=F(J,d._savedData)){a("#"+j).data("disabled",true);a(".confirm","#"+k.themodal).show()}else m()}else m();return false});a("#cData",
-"#"+i+"_2").click(function(){if(!s())return false;hideModal("#"+k.themodal,{gb:"#gbox_"+e,jqm:b.jqModal,onClose:d.onClose});return false});a("#nData","#"+i+"_2").click(function(){if(!s())return false;a("#FormError","#"+i).hide();var g=x();g[0]=parseInt(g[0]);if(g[0]!=-1&&g[1][g[0]+1]){a.isFunction(b.onclickPgButtons)&&b.onclickPgButtons("next",a("#"+j),g[1][g[0]]);n(g[1][g[0]+1],f,j);a(f).jqGrid("setSelection",g[1][g[0]+1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("next",a("#"+j),
-g[1][g[0]+1]);o(g[0]+1,g[1].length-1)}return false});a("#pData","#"+i+"_2").click(function(){if(!s())return false;a("#FormError","#"+i).hide();var g=x();if(g[0]!=-1&&g[1][g[0]-1]){a.isFunction(b.onclickPgButtons)&&b.onclickPgButtons("prev",a("#"+j),g[1][g[0]]);n(g[1][g[0]-1],f,j);a(f).jqGrid("setSelection",g[1][g[0]-1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("prev",a("#"+j),g[1][g[0]-1]);o(g[0]-1,g[1].length-1)}return false})}u=x();o(u[0],u[1].length-1)}})},viewGridRow:function(h,
-b){b=a.extend({top:0,left:0,width:0,height:"auto",dataheight:"auto",modal:false,drag:true,resize:true,jqModal:true,closeOnEscape:false,labelswidth:"30%",closeicon:[],navkeys:[false,38,40],onClose:null,beforeShowForm:null,viewPagerButtons:true},a.jgrid.view,b||{});return this.each(function(){function o(){if(b.closeOnEscape===true||b.navkeys[0]===true)setTimeout(function(){a(".ui-jqdialog-titlebar-close","#"+e.modalhead).focus()},0)}function x(c,t){c==0?a("#pData","#"+f+"_2").addClass("ui-state-disabled"):
-a("#pData","#"+f+"_2").removeClass("ui-state-disabled");c==t?a("#nData","#"+f+"_2").addClass("ui-state-disabled"):a("#nData","#"+f+"_2").removeClass("ui-state-disabled")}function s(){var c=a(n).jqGrid("getDataIDs"),t=a("#id_g","#"+f).val();return[a.inArray(t,c),c]}function w(c,t,J,S){for(var M,N,D,O=0,T,$,aa=[],V=false,ca="<td class='CaptionTD form-view-label ui-widget-content' width='"+b.labelswidth+"'>&#160;</td><td class='DataTD form-view-data ui-helper-reset ui-widget-content'>&#160;</td>",g=
-"",l=["integer","number","currency"],C=0,p=0,E,z,A,K=1;K<=S;K++)g+=K==1?ca:"<td class='CaptionTD form-view-label ui-widget-content'>&#160;</td><td class='DataTD form-view-data ui-widget-content'>&#160;</td>";a(t.p.colModel).each(function(){N=this.editrules&&this.editrules.edithidden===true?false:this.hidden===true?true:false;if(!N&&this.align==="right")if(this.formatter&&a.inArray(this.formatter,l)!==-1)C=Math.max(C,parseInt(this.width,10));else p=Math.max(p,parseInt(this.width,10))});E=C!==0?C:p!==
-0?p:0;V=a(t).jqGrid("getInd",c);a(t.p.colModel).each(function(y){M=this.name;z=false;$=(N=this.editrules&&this.editrules.edithidden===true?false:this.hidden===true?true:false)?"style='display:none'":"";A=typeof this.viewable!="boolean"?true:this.viewable;if(M!=="cb"&&M!=="subgrid"&&M!=="rn"&&A){T=V===false?"":M==t.p.ExpandColumn&&t.p.treeGrid===true?a("td:eq("+y+")",t.rows[V]).text():a("td:eq("+y+")",t.rows[V]).html();z=this.align==="right"&&E!==0?true:false;a.extend({},this.editoptions||{},{id:M,
-name:M});var L=a.extend({},{rowabove:false,rowcontent:""},this.formoptions||{}),G=parseInt(L.rowpos)||O+1,Q=parseInt((parseInt(L.colpos)||1)*2);if(L.rowabove){var H=a("<tr><td class='contentinfo' colspan='"+S*2+"'>"+L.rowcontent+"</td></tr>");a(J).append(H);H[0].rp=G}D=a(J).find("tr[rowpos="+G+"]");if(D.length==0){D=a("<tr "+$+" rowpos='"+G+"'></tr>").addClass("FormData").attr("id","trv_"+M);a(D).append(g);a(J).append(D);D[0].rp=G}a("td:eq("+(Q-2)+")",D[0]).html("<b>"+(typeof L.label==="undefined"?
-t.p.colNames[y]:L.label)+"</b>");a("td:eq("+(Q-1)+")",D[0]).append("<span>"+T+"</span>").attr("id","v_"+M);z&&a("td:eq("+(Q-1)+") span",D[0]).css({"text-align":"right",width:E+"px"});aa[O]=y;O++}});if(O>0){c=a("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(S*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='id' value='"+c+"'/></td></tr>");c[0].rp=O+99;a(J).append(c)}return aa}function q(c,t){var J,S,M=0,N,D;if(D=a(t).jqGrid("getInd",
-c,true)){a("td",D).each(function(O){J=t.p.colModel[O].name;S=t.p.colModel[O].editrules&&t.p.colModel[O].editrules.edithidden===true?false:t.p.colModel[O].hidden===true?true:false;if(J!=="cb"&&J!=="subgrid"&&J!=="rn"){N=J==t.p.ExpandColumn&&t.p.treeGrid===true?a(this).text():a(this).html();a.extend({},t.p.colModel[O].editoptions||{});J=a.jgrid.jqID("v_"+J);a("#"+J+" span","#"+f).html(N);S&&a("#"+J,"#"+f).parents("tr:first").hide();M++}});M>0&&a("#id_g","#"+f).val(c)}}var n=this;if(n.grid&&h){if(!b.imgpath)b.imgpath=
-n.p.imgpath;var m=n.p.id,F="ViewGrid_"+m,f="ViewTbl_"+m,e={themodal:"viewmod"+m,modalhead:"viewhd"+m,modalcontent:"viewcnt"+m,scrollelm:F},j=1,i=0;if(a("#"+e.themodal).html()!=null){a(".ui-jqdialog-title","#"+e.modalhead).html(b.caption);a("#FormError","#"+f).hide();q(h,n);a.isFunction(b.beforeShowForm)&&b.beforeShowForm(a("#"+F));viewModal("#"+e.themodal,{gbox:"#gbox_"+m,jqm:b.jqModal,jqM:false,modal:b.modal});o()}else{a(n.p.colModel).each(function(){var c=this.formoptions;j=Math.max(j,c?c.colpos||
-0:0);i=Math.max(i,c?c.rowpos||0:0)});var k=isNaN(b.dataheight)?b.dataheight:b.dataheight+"px",u=a("<form name='FormPost' id='"+F+"' class='FormGrid' style='width:100%;overflow:auto;position:relative;height:"+k+";'></form>"),P=a("<table id='"+f+"' class='EditTable' cellspacing='1' cellpading='2' border='0' style='table-layout:fixed'><tbody></tbody></table>");a(u).append(P);w(h,n,P,j);k=n.p.direction=="rtl"?true:false;var r="<a href='javascript:void(0)' id='"+(k?"nData":"pData")+"' class='fm-button ui-state-default ui-corner-left'><span class='ui-icon ui-icon-triangle-1-w'></span></div>",
-v="<a href='javascript:void(0)' id='"+(k?"pData":"nData")+"' class='fm-button ui-state-default ui-corner-right'><span class='ui-icon ui-icon-triangle-1-e'></span></div>",B="<a href='javascript:void(0)' id='cData' class='fm-button ui-state-default ui-corner-all'>"+b.bClose+"</a>";if(i>0){var I=[];a.each(a(P)[0].rows,function(c,t){I[c]=t});I.sort(function(c,t){if(c.rp>t.rp)return 1;if(c.rp<t.rp)return-1;return 0});a.each(I,function(c,t){a("tbody",P).append(t)})}b.gbox="#gbox_"+m;var Z=false;if(b.closeOnEscape===
-true){b.closeOnEscape=false;Z=true}u=a("<span></span>").append(u).append("<table border='0' class='EditTable' id='"+f+"_2'><tbody><tr id='Act_Buttons'><td class='navButton ui-widget-content' width='"+b.labelswidth+"'>"+(k?v+r:r+v)+"</td><td class='EditButton ui-widget-content'>"+B+"</td></tr></tbody></table>");createModal(e,u,b,"#gview_"+n.p.id,a("#gview_"+n.p.id)[0]);if(k){a("#pData, #nData","#"+f+"_2").css("float","right");a(".EditButton","#"+f+"_2").css("text-align","left")}b.viewPagerButtons||
-a("#pData, #nData","#"+f+"_2").hide();u=null;a("#"+e.themodal).keydown(function(c){if(c.which===27){Z&&hideModal(this,{gb:b.gbox,jqm:b.jqModal,onClose:b.onClose});return false}if(b.navkeys[0]===true){if(c.which===b.navkeys[1]){a("#pData","#"+f+"_2").trigger("click");return false}if(c.which===b.navkeys[2]){a("#nData","#"+f+"_2").trigger("click");return false}}});b.closeicon=a.extend([true,"left","ui-icon-close"],b.closeicon);if(b.closeicon[0]==true)a("#cData","#"+f+"_2").addClass(b.closeicon[1]=="right"?
-"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.closeicon[2]+"'></span>");a.isFunction(b.beforeShowForm)&&b.beforeShowForm(a("#"+F));viewModal("#"+e.themodal,{gbox:"#gbox_"+m,jqm:b.jqModal,modal:b.modal});a(".fm-button:not(.ui-state-disabled)","#"+f+"_2").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});o();a("#cData","#"+f+"_2").click(function(){hideModal("#"+e.themodal,{gb:"#gbox_"+m,jqm:b.jqModal,onClose:b.onClose});
-return false});a("#nData","#"+f+"_2").click(function(){a("#FormError","#"+f).hide();var c=s();c[0]=parseInt(c[0]);if(c[0]!=-1&&c[1][c[0]+1]){a.isFunction(b.onclickPgButtons)&&b.onclickPgButtons("next",a("#"+F),c[1][c[0]]);q(c[1][c[0]+1],n);a(n).jqGrid("setSelection",c[1][c[0]+1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("next",a("#"+F),c[1][c[0]+1]);x(c[0]+1,c[1].length-1)}o();return false});a("#pData","#"+f+"_2").click(function(){a("#FormError","#"+f).hide();var c=s();if(c[0]!=
--1&&c[1][c[0]-1]){a.isFunction(b.onclickPgButtons)&&b.onclickPgButtons("prev",a("#"+F),c[1][c[0]]);q(c[1][c[0]-1],n);a(n).jqGrid("setSelection",c[1][c[0]-1]);a.isFunction(b.afterclickPgButtons)&&b.afterclickPgButtons("prev",a("#"+F),c[1][c[0]-1]);x(c[0]-1,c[1].length-1)}o();return false})}k=s();x(k[0],k[1].length-1)}})},delGridRow:function(h,b){d=b=a.extend({top:0,left:0,width:240,height:"auto",dataheight:"auto",modal:false,drag:true,resize:true,url:"",mtype:"POST",reloadAfterSubmit:true,beforeShowForm:null,
-afterShowForm:null,beforeSubmit:null,onclickSubmit:null,afterSubmit:null,jqModal:true,closeOnEscape:false,delData:{},delicon:[],cancelicon:[],onClose:null,ajaxDelOptions:{},processing:false,serializeDelData:null},a.jgrid.del,b||{});return this.each(function(){var o=this;if(o.grid)if(h){var x=typeof b.beforeShowForm==="function"?true:false,s=typeof b.afterShowForm==="function"?true:false,w=o.p.id,q={},n="DelTbl_"+w,m,F,f,e,j={themodal:"delmod"+w,modalhead:"delhd"+w,modalcontent:"delcnt"+w,scrollelm:n};
-if(isArray(h))h=h.join();if(a("#"+j.themodal).html()!=null){a("#DelData>td","#"+n).text(h);a("#DelError","#"+n).hide();if(d.processing===true){d.processing=false;a("#dData","#"+n).removeClass("ui-state-active")}x&&b.beforeShowForm(a("#"+n));viewModal("#"+j.themodal,{gbox:"#gbox_"+w,jqm:b.jqModal,jqM:false,modal:b.modal})}else{var i=isNaN(b.dataheight)?b.dataheight:b.dataheight+"px";i="<div id='"+n+"' class='formdata' style='width:100%;overflow:auto;position:relative;height:"+i+";'>";i+="<table class='DelTable'><tbody>";
-i+="<tr id='DelError' style='display:none'><td class='ui-state-error'></td></tr>";i+="<tr id='DelData' style='display:none'><td >"+h+"</td></tr>";i+='<tr><td class="delmsg" style="white-space:pre;">'+b.msg+"</td></tr><tr><td >&#160;</td></tr>";i+="</tbody></table></div>";i+="<table cellspacing='0' cellpadding='0' border='0' class='EditTable' id='"+n+"_2'><tbody><tr><td class='DataTD ui-widget-content'></td></tr><tr style='display:block;height:3px;'><td></td></tr><tr><td class='DelButton EditButton'>"+
-("<a href='javascript:void(0)' id='dData' class='fm-button ui-state-default ui-corner-all'>"+b.bSubmit+"</a>")+"&#160;"+("<a href='javascript:void(0)' id='eData' class='fm-button ui-state-default ui-corner-all'>"+b.bCancel+"</a>")+"</td></tr></tbody></table>";b.gbox="#gbox_"+w;createModal(j,i,b,"#gview_"+o.p.id,a("#gview_"+o.p.id)[0]);a(".fm-button","#"+n+"_2").hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});b.delicon=a.extend([true,"left","ui-icon-scissors"],
-b.delicon);b.cancelicon=a.extend([true,"left","ui-icon-cancel"],b.cancelicon);if(b.delicon[0]==true)a("#dData","#"+n+"_2").addClass(b.delicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.delicon[2]+"'></span>");if(b.cancelicon[0]==true)a("#eData","#"+n+"_2").addClass(b.cancelicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+b.cancelicon[2]+"'></span>");a("#dData","#"+n+"_2").click(function(){var k=[true,""];
-q={};var u=a("#DelData>td","#"+n).text();if(typeof b.onclickSubmit==="function")q=b.onclickSubmit(d)||{};if(typeof b.beforeSubmit==="function")k=b.beforeSubmit(u);if(k[0]){var P=d.url?d.url:a(o).jqGrid("getGridParam","editurl");if(!P){k[0]=false;k[1]+=" "+a.jgrid.errors.nourl}}if(k[0]===false){a("#DelError>td","#"+n).html(k[1]);a("#DelError","#"+n).show()}else if(!d.processing){d.processing=true;a(this).addClass("ui-state-active");f=o.p.prmNames;m=a.extend({},d.delData,q);e=f.oper;m[e]=f.deloper;
-F=f.id;m[F]=u;a.ajax(a.extend({url:P,type:b.mtype,data:a.isFunction(b.serializeDelData)?b.serializeDelData(m):m,complete:function(r,v){if(v!="success"){k[0]=false;k[1]=a.isFunction(d.errorTextFormat)?d.errorTextFormat(r):v+" Status: '"+r.statusText+"'. Error code: "+r.status}else if(typeof d.afterSubmit==="function")k=d.afterSubmit(r,m);if(k[0]===false){a("#DelError>td","#"+n).html(k[1]);a("#DelError","#"+n).show()}else{if(d.reloadAfterSubmit)a(o).trigger("reloadGrid");else{v=[];v=u.split(",");if(o.p.treeGrid===
-true)try{a(o).jqGrid("delTreeNode",v[0])}catch(B){}else for(var I=0;I<v.length;I++)a(o).jqGrid("delRowData",v[I]);o.p.selrow=null;o.p.selarrrow=[]}a.isFunction(d.afterComplete)&&setTimeout(function(){d.afterComplete(r,u)},500)}d.processing=false;a("#dData","#"+n+"_2").removeClass("ui-state-active");k[0]&&hideModal("#"+j.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:d.onClose})},error:function(r,v,B){a("#DelError>td","#"+n).html(v+" : "+B);a("#DelError","#"+n).show();d.processing=false;a("#dData",
-"#"+n+"_2").removeClass("ui-state-active")}},a.jgrid.ajaxOptions,b.ajaxDelOptions))}return false});a("#eData","#"+n+"_2").click(function(){hideModal("#"+j.themodal,{gb:"#gbox_"+w,jqm:b.jqModal,onClose:d.onClose});return false});x&&b.beforeShowForm(a("#"+n));viewModal("#"+j.themodal,{gbox:"#gbox_"+w,jqm:b.jqModal,modal:b.modal})}s&&b.afterShowForm(a("#"+n));b.closeOnEscape===true&&setTimeout(function(){a(".ui-jqdialog-titlebar-close","#"+j.modalhead).focus()},0)}})},navGrid:function(h,b,o,x,s,w,q){b=
-a.extend({edit:true,editicon:"ui-icon-pencil",add:true,addicon:"ui-icon-plus",del:true,delicon:"ui-icon-trash",search:true,searchicon:"ui-icon-search",refresh:true,refreshicon:"ui-icon-refresh",refreshstate:"firstpage",view:false,viewicon:"ui-icon-document",position:"left",closeOnEscape:true,beforeRefresh:null,afterRefresh:null,cloneToTop:false},a.jgrid.nav,b||{});return this.each(function(){var n={themodal:"alertmod",modalhead:"alerthd",modalcontent:"alertcnt"},m=this,F,f,e;if(!(!m.grid||typeof h!=
-"string")){if(a("#"+n.themodal).html()==null){if(typeof window.innerWidth!="undefined"){F=window.innerWidth;f=window.innerHeight}else if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){F=document.documentElement.clientWidth;f=document.documentElement.clientHeight}else{F=1024;f=768}createModal(n,"<div>"+b.alerttext+"</div><span tabindex='0'><span tabindex='-1' id='jqg_alrt'></span></span>",{gbox:"#gbox_"+
-m.p.id,jqModal:true,drag:true,resize:true,caption:b.alertcap,top:f/2-25,left:F/2-100,width:200,height:"auto",closeOnEscape:b.closeOnEscape},"","",true)}F=1;if(b.cloneToTop&&m.p.toppager)F=2;for(f=0;f<F;f++){var j=a("<table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table navtable' style='float:left;table-layout:auto;'><tbody><tr></tr></tbody></table>"),i,k;if(f==0){i=h;k=m.p.id;if(i==m.p.toppager){k+="_top";F=1}}else{i=m.p.toppager;k=m.p.id+"_top"}m.p.direction=="rtl"&&a(j).attr("dir",
-"rtl").css("float","right");if(b.add){x=x||{};e=a("<td class='ui-pg-button ui-corner-all'></td>");a(e).append("<div class='ui-pg-div'><span class='ui-icon "+b.addicon+"'></span>"+b.addtext+"</div>");a("tr",j).append(e);a(e,j).attr({title:b.addtitle||"",id:x.id||"add_"+k}).click(function(){typeof b.addfunc=="function"?b.addfunc():a(m).jqGrid("editGridRow","new",x);return false}).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});e=null}if(b.edit){e=
-a("<td class='ui-pg-button ui-corner-all'></td>");o=o||{};a(e).append("<div class='ui-pg-div'><span class='ui-icon "+b.editicon+"'></span>"+b.edittext+"</div>");a("tr",j).append(e);a(e,j).attr({title:b.edittitle||"",id:o.id||"edit_"+k}).click(function(){var u=m.p.selrow;if(u)typeof b.editfunc=="function"?b.editfunc(u):a(m).jqGrid("editGridRow",u,o);else{viewModal("#"+n.themodal,{gbox:"#gbox_"+m.p.id,jqm:true});a("#jqg_alrt").focus()}return false}).hover(function(){a(this).addClass("ui-state-hover")},
-function(){a(this).removeClass("ui-state-hover")});e=null}if(b.view){e=a("<td class='ui-pg-button ui-corner-all'></td>");q=q||{};a(e).append("<div class='ui-pg-div'><span class='ui-icon "+b.viewicon+"'></span>"+b.viewtext+"</div>");a("tr",j).append(e);a(e,j).attr({title:b.viewtitle||"",id:q.id||"view_"+k}).click(function(){var u=m.p.selrow;if(u)a(m).jqGrid("viewGridRow",u,q);else{viewModal("#"+n.themodal,{gbox:"#gbox_"+m.p.id,jqm:true});a("#jqg_alrt").focus()}return false}).hover(function(){a(this).addClass("ui-state-hover")},
-function(){a(this).removeClass("ui-state-hover")});e=null}if(b.del){e=a("<td class='ui-pg-button ui-corner-all'></td>");s=s||{};a(e).append("<div class='ui-pg-div'><span class='ui-icon "+b.delicon+"'></span>"+b.deltext+"</div>");a("tr",j).append(e);a(e,j).attr({title:b.deltitle||"",id:s.id||"del_"+k}).click(function(){var u;if(m.p.multiselect){u=m.p.selarrrow;if(u.length==0)u=null}else u=m.p.selrow;if(u)a(m).jqGrid("delGridRow",u,s);else{viewModal("#"+n.themodal,{gbox:"#gbox_"+m.p.id,jqm:true});a("#jqg_alrt").focus()}return false}).hover(function(){a(this).addClass("ui-state-hover")},
-function(){a(this).removeClass("ui-state-hover")});e=null}if(b.add||b.edit||b.del||b.view)a("tr",j).append("<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>");if(b.search){e=a("<td class='ui-pg-button ui-corner-all'></td>");w=w||{};a(e).append("<div class='ui-pg-div'><span class='ui-icon "+b.searchicon+"'></span>"+b.searchtext+"</div>");a("tr",j).append(e);a(e,j).attr({title:b.searchtitle||"",id:w.id||"search_"+k}).click(function(){a(m).jqGrid("searchGrid",
-w);return false}).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});e=null}if(b.refresh){e=a("<td class='ui-pg-button ui-corner-all'></td>");a(e).append("<div class='ui-pg-div'><span class='ui-icon "+b.refreshicon+"'></span>"+b.refreshtext+"</div>");a("tr",j).append(e);a(e,j).attr({title:b.refreshtitle||"",id:"refresh_"+k}).click(function(){a.isFunction(b.beforeRefresh)&&b.beforeRefresh();m.p.search=false;try{a("#fbox_"+m.p.id).searchFilter().reset();
-m.clearToolbar(false)}catch(u){}switch(b.refreshstate){case "firstpage":a(m).trigger("reloadGrid",[{page:1}]);break;case "current":a(m).trigger("reloadGrid",[{current:true}]);break}a.isFunction(b.afterRefresh)&&b.afterRefresh();return false}).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")});e=null}e=a(".ui-jqgrid").css("font-size")||"11px";a("body").append("<div id='testpg2' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+e+";visibility:hidden;' ></div>");
-e=a(j).clone().appendTo("#testpg2").width();a("#testpg2").remove();a(i+"_"+b.position,i).append(j);if(m.p._nvtd){if(e>m.p._nvtd[0]){a(i+"_"+b.position,i).width(e);m.p._nvtd[0]=e}m.p._nvtd[1]=e}j=e=e=null}}})},navButtonAdd:function(h,b){b=a.extend({caption:"newButton",title:"",buttonicon:"ui-icon-newwin",onClickButton:null,position:"last",cursor:"pointer"},b||{});return this.each(function(){if(this.grid){if(h.indexOf("#")!=0)h="#"+h;var o=a(".navtable",h)[0],x=this;if(o){var s=a("<td></td>");a(s).addClass("ui-pg-button ui-corner-all").append("<div class='ui-pg-div'><span class='ui-icon "+
-b.buttonicon+"'></span>"+b.caption+"</div>");b.id&&a(s).attr("id",b.id);if(b.position=="first")o.rows[0].cells.length===0?a("tr",o).append(s):a("tr td:eq(0)",o).before(s);else a("tr",o).append(s);a(s,o).attr("title",b.title||"").click(function(w){a.isFunction(b.onClickButton)&&b.onClickButton.call(x,w);return false}).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).css("cursor",b.cursor?b.cursor:"normal")}}})},navSeparatorAdd:function(h,b){b=
-a.extend({sepclass:"ui-separator",sepcontent:""},b||{});return this.each(function(){if(this.grid){if(h.indexOf("#")!=0)h="#"+h;var o=a(".navtable",h)[0];if(o){var x="<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='"+b.sepclass+"'></span>"+b.sepcontent+"</td>";a("tr",o).append(x)}}})},GridToForm:function(h,b){return this.each(function(){var o=this;if(o.grid){var x=a(o).jqGrid("getRowData",h);if(x)for(var s in x)a("[name="+s+"]",b).is("input:radio")||a("[name="+s+"]",b).is("input:checkbox")?
-a("[name="+s+"]",b).each(function(){a(this).val()==x[s]?a(this).attr("checked","checked"):a(this).attr("checked","")}):a("[name="+s+"]",b).val(x[s])}})},FormToGrid:function(h,b,o,x){return this.each(function(){var s=this;if(s.grid){o||(o="set");x||(x="first");var w=a(b).serializeArray(),q={};a.each(w,function(n,m){q[m.name]=m.value});if(o=="add")a(s).jqGrid("addRowData",h,q,x);else o=="set"&&a(s).jqGrid("setRowData",h,q)}})}})})(jQuery);
-jQuery.fn.searchFilter=function(h,B){function C(c,i,k){this.$=c;this.add=function(a){a==null?c.find(".ui-add-last").click():c.find(".sf:eq("+a+") .ui-add").click();return this};this.del=function(a){a==null?c.find(".sf:last .ui-del").click():c.find(".sf:eq("+a+") .ui-del").click();return this};this.search=function(){c.find(".ui-search").click();return this};this.reset=function(){c.find(".ui-reset").click();return this};this.close=function(){c.find(".ui-closer").click();return this};if(i!=null){function w(){jQuery(this).toggleClass("ui-state-hover");
-return false}function x(a){jQuery(this).toggleClass("ui-state-active",a.type=="mousedown");return false}function l(a,b){return"<option value='"+a+"'>"+b+"</option>"}function t(a,b,e){return"<select class='"+a+"'"+(e?" style='display:none;'":"")+">"+b+"</select>"}function y(a,b){a=c.find("tr.sf td.data "+a);a[0]!=null&&b(a)}function z(a,b){var e=c.find("tr.sf td.data "+a);e[0]!=null&&jQuery.each(b,function(){this.data!=null?e.bind(this.type,this.data,this.fn):e.bind(this.type,this.fn)})}var d=jQuery.extend({},
-jQuery.fn.searchFilter.defaults,k),m=-1,q="";jQuery.each(d.groupOps,function(){q+=l(this.op,this.text)});q="<select name='groupOp'>"+q+"</select>";c.html("").addClass("ui-searchFilter").append("<div class='ui-widget-overlay' style='z-index: -1'>&#160;</div><table class='ui-widget-content ui-corner-all'><thead><tr><td colspan='5' class='ui-widget-header ui-corner-all' style='line-height: 18px;'><div class='ui-closer ui-state-default ui-corner-all ui-helper-clearfix' style='float: right;'><span class='ui-icon ui-icon-close'></span></div>"+
-d.windowTitle+"</td></tr></thead><tbody><tr class='sf'><td class='fields'></td><td class='ops'></td><td class='data'></td><td><div class='ui-del ui-state-default ui-corner-all'><span class='ui-icon ui-icon-minus'></span></div></td><td><div class='ui-add ui-state-default ui-corner-all'><span class='ui-icon ui-icon-plus'></span></div></td></tr><tr><td colspan='5' class='divider'><div>&#160;</div></td></tr></tbody><tfoot><tr><td colspan='3'><span class='ui-reset ui-state-default ui-corner-all' style='display: inline-block; float: left;'><span class='ui-icon ui-icon-arrowreturnthick-1-w' style='float: left;'></span><span style='line-height: 18px; padding: 0 7px 0 3px;'>"+
-d.resetText+"</span></span><span class='ui-search ui-state-default ui-corner-all' style='display: inline-block; float: right;'><span class='ui-icon ui-icon-search' style='float: left;'></span><span style='line-height: 18px; padding: 0 7px 0 3px;'>"+d.searchText+"</span></span><span class='matchText'>"+d.matchText+"</span> "+q+" <span class='rulesText'>"+d.rulesText+"</span></td><td>&#160;</td><td><div class='ui-add-last ui-state-default ui-corner-all'><span class='ui-icon ui-icon-plusthick'></span></div></td></tr></tfoot></table>");
-k=c.find("tr.sf");var A=k.find("td.fields"),u=k.find("td.ops"),n=k.find("td.data"),r="";jQuery.each(d.operators,function(){r+=l(this.op,this.text)});r=t("default",r,true);u.append(r);n.append("<input type='text' class='default' style='display:none;' />");var s="",v=false,o=false;jQuery.each(i,function(a){s+=l(this.itemval,this.text);if(this.ops!=null){v=true;var b="";jQuery.each(this.ops,function(){b+=l(this.op,this.text)});b=t("field"+a,b,true);u.append(b)}if(this.dataUrl!=null){if(a>m)m=a;o=true;
-var e=this.dataEvents,j=this.dataInit,p=this.buildSelect;jQuery.ajax(jQuery.extend({url:this.dataUrl,complete:function(f){f=p!=null?jQuery("<div />").append(p(f)):jQuery("<div />").append(f.responseText);f.find("select").addClass("field"+a).hide();n.append(f.html());j&&y(".field"+a,j);e&&z(".field"+a,e);a==m&&c.find("tr.sf td.fields select[name='field']").change()}},d.ajaxSelectOptions))}else if(this.dataValues!=null){o=true;var g="";jQuery.each(this.dataValues,function(){g+=l(this.value,this.text)});
-g=t("field"+a,g,true);n.append(g)}else if(this.dataEvents!=null||this.dataInit!=null){o=true;g="<input type='text' class='field"+a+"' />";n.append(g)}this.dataInit!=null&&a!=m&&y(".field"+a,this.dataInit);this.dataEvents!=null&&a!=m&&z(".field"+a,this.dataEvents)});s="<select name='field'>"+s+"</select>";A.append(s);i=A.find("select[name='field']");v?i.change(function(a){var b=a.target.selectedIndex;a=jQuery(a.target).parents("tr.sf").find("td.ops");a.find("select").removeAttr("name").hide();b=a.find(".field"+
-b);if(b[0]==null)b=a.find(".default");b.attr("name","op").show()}):u.find(".default").attr("name","op").show();o?i.change(function(a){var b=a.target.selectedIndex;a=jQuery(a.target).parents("tr.sf").find("td.data");a.find("select,input").removeClass("vdata").hide();b=a.find(".field"+b);if(b[0]==null)b=a.find(".default");b.show().addClass("vdata")}):n.find(".default").show().addClass("vdata");if(v||o)i.change();c.find(".ui-state-default").hover(w,w).mousedown(x).mouseup(x);c.find(".ui-closer").click(function(){d.onClose(jQuery(c.selector));
-return false});c.find(".ui-del").click(function(a){a=jQuery(a.target).parents(".sf");if(a.siblings(".sf").length>0){d.datepickerFix===true&&jQuery.fn.datepicker!==undefined&&a.find(".hasDatepicker").datepicker("destroy");a.remove()}else{a.find("select[name='field']")[0].selectedIndex=0;a.find("select[name='op']")[0].selectedIndex=0;a.find(".data input").val("");a.find(".data select").each(function(){this.selectedIndex=0});a.find("select[name='field']").change()}return false});c.find(".ui-add").click(function(a){a=
-jQuery(a.target).parents(".sf");var b=a.clone(true).insertAfter(a);b.find(".ui-state-default").removeClass("ui-state-hover ui-state-active");if(d.clone){b.find("select[name='field']")[0].selectedIndex=a.find("select[name='field']")[0].selectedIndex;if(b.find("select[name='op']")[0]!=null)b.find("select[name='op']").focus()[0].selectedIndex=a.find("select[name='op']")[0].selectedIndex;var e=b.find("select.vdata");if(e[0]!=null)e[0].selectedIndex=a.find("select.vdata")[0].selectedIndex}else{b.find(".data input").val("");
-b.find("select[name='field']").focus()}d.datepickerFix===true&&jQuery.fn.datepicker!==undefined&&a.find(".hasDatepicker").each(function(){var j=jQuery.data(this,"datepicker").settings;b.find("#"+this.id).unbind().removeAttr("id").removeClass("hasDatepicker").datepicker(j)});b.find("select[name='field']").change();return false});c.find(".ui-search").click(function(){var a=jQuery(c.selector),b,e=a.find("select[name='groupOp'] :selected").val();b=d.stringResult?'{"groupOp":"'+e+'","rules":[':{groupOp:e,
-rules:[]};a.find(".sf").each(function(j){var p=jQuery(this).find("select[name='field'] :selected").val(),g=jQuery(this).find("select[name='op'] :selected").val(),f=jQuery(this).find("input.vdata,select.vdata :selected").val();f+="";f=f.replace(/\\/g,"\\\\").replace(/\"/g,'\\"');if(d.stringResult){if(j>0)b+=",";b+='{"field":"'+p+'",';b+='"op":"'+g+'",';b+='"data":"'+f+'"}'}else b.rules.push({field:p,op:g,data:f})});if(d.stringResult)b+="]}";d.onSearch(b);return false});c.find(".ui-reset").click(function(){var a=
-jQuery(c.selector);a.find(".ui-del").click();a.find("select[name='groupOp']")[0].selectedIndex=0;d.onReset();return false});c.find(".ui-add-last").click(function(){var a=jQuery(c.selector+" .sf:last"),b=a.clone(true).insertAfter(a);b.find(".ui-state-default").removeClass("ui-state-hover ui-state-active");b.find(".data input").val("");b.find("select[name='field']").focus();d.datepickerFix===true&&jQuery.fn.datepicker!==undefined&&a.find(".hasDatepicker").each(function(){var e=jQuery.data(this,"datepicker").settings;
-b.find("#"+this.id).unbind().removeAttr("id").removeClass("hasDatepicker").datepicker(e)});b.find("select[name='field']").change();return false})}}return new C(this,h,B)};jQuery.fn.searchFilter.version="1.2.9";
-jQuery.fn.searchFilter.defaults={clone:true,datepickerFix:true,onReset:function(h){alert("Reset Clicked. Data Returned: "+h)},onSearch:function(h){alert("Search Clicked. Data Returned: "+h)},onClose:function(h){h.hide()},groupOps:[{op:"AND",text:"all"},{op:"OR",text:"any"}],operators:[{op:"eq",text:"is equal to"},{op:"ne",text:"is not equal to"},{op:"lt",text:"is less than"},{op:"le",text:"is less or equal to"},{op:"gt",text:"is greater than"},{op:"ge",text:"is greater or equal to"},{op:"in",text:"is in"},
-{op:"ni",text:"is not in"},{op:"bw",text:"begins with"},{op:"bn",text:"does not begin with"},{op:"ew",text:"ends with"},{op:"en",text:"does not end with"},{op:"cn",text:"contains"},{op:"nc",text:"does not contain"}],matchText:"match",rulesText:"rules",resetText:"Reset",searchText:"Search",stringResult:true,windowTitle:"Search Rules",ajaxSelectOptions:{}};
-(function(a){a.jgrid.extend({editRow:function(d,t,i,q,n,u,s,c,f){return this.each(function(){var b=this,k,l,r=0,o=null,p={},h,g;if(b.grid){h=a(b).jqGrid("getInd",d,true);if(h!=false)if((a(h).attr("editable")||"0")=="0"&&!a(h).hasClass("not-editable-row")){g=b.p.colModel;a("td",h).each(function(j){k=g[j].name;var v=b.p.treeGrid===true&&k==b.p.ExpandColumn;if(v)l=a("span:first",this).html();else try{l=a.unformat(this,{rowId:d,colModel:g[j]},j)}catch(m){l=a(this).html()}if(k!="cb"&&k!="subgrid"&&k!=
-"rn"){if(b.p.autoencode)l=a.jgrid.htmlDecode(l);p[k]=l;if(g[j].editable===true){if(o===null)o=j;v?a("span:first",this).html(""):a(this).html("");var e=a.extend({},g[j].editoptions||{},{id:d+"_"+k,name:k});if(!g[j].edittype)g[j].edittype="text";e=createEl(g[j].edittype,e,l,true,a.extend({},a.jgrid.ajaxOptions,b.p.ajaxSelectOptions||{}));a(e).addClass("editable");v?a("span:first",this).append(e):a(this).append(e);g[j].edittype=="select"&&g[j].editoptions.multiple===true&&a.browser.msie&&a(e).width(a(e).width());
-r++}}});if(r>0){p.id=d;b.p.savedRow.push(p);a(h).attr("editable","1");a("td:eq("+o+") input",h).focus();t===true&&a(h).bind("keydown",function(j){j.keyCode===27&&a(b).jqGrid("restoreRow",d,f);if(j.keyCode===13){if(j.target.tagName=="TEXTAREA")return true;a(b).jqGrid("saveRow",d,q,n,u,s,c,f);return false}j.stopPropagation()});a.isFunction(i)&&i(d)}}}})},saveRow:function(d,t,i,q,n,u,s){return this.each(function(){var c=this,f,b={},k={},l,r,o,p;if(c.grid){p=a(c).jqGrid("getInd",d,true);if(p!=false){l=
-a(p).attr("editable");i=i?i:c.p.editurl;if(l==="1"&&i){var h;a("td",p).each(function(m){h=c.p.colModel[m];f=h.name;if(f!="cb"&&f!="subgrid"&&h.editable===true&&f!="rn"){switch(h.edittype){case "checkbox":var e=["Yes","No"];if(h.editoptions)e=h.editoptions.value.split(":");b[f]=a("input",this).attr("checked")?e[0]:e[1];break;case "text":case "password":case "textarea":case "button":b[f]=a("input, textarea",this).val();break;case "select":if(h.editoptions.multiple){e=a("select",this);var x=[];b[f]=
-a(e).val();b[f]=b[f]?b[f].join(","):"";a("select > option:selected",this).each(function(y,z){x[y]=a(z).text()});k[f]=x.join(",")}else{b[f]=a("select>option:selected",this).val();k[f]=a("select>option:selected",this).text()}if(h.formatter&&h.formatter=="select")k={};break;case "custom":try{if(h.editoptions&&a.isFunction(h.editoptions.custom_value)){b[f]=h.editoptions.custom_value(a(".customelement",this),"get");if(b[f]===undefined)throw"e2";}else throw"e1";}catch(w){w=="e1"&&info_dialog(jQuery.jgrid.errors.errcap,
-"function 'custom_value' "+a.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose);w=="e2"?info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+a.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap,w.message,jQuery.jgrid.edit.bClose)}break}o=checkValues(b[f],m,c);if(o[0]===false){o[1]=b[f]+" "+o[1];return false}if(c.p.autoencode)b[f]=a.jgrid.htmlEncode(b[f])}});if(o[0]===false)try{var g=findPos(a("#"+d)[0]);info_dialog(a.jgrid.errors.errcap,o[1],a.jgrid.edit.bClose,
-{left:g[0],top:g[1]})}catch(j){alert(o[1])}else{if(b){var v;g=c.p.prmNames;v=g.oper;l=g.id;b[v]=g.editoper;b[l]=d;if(q)b=a.extend({},b,q)}if(i=="clientArray"){b=a.extend({},b,k);c.p.autoencode&&a.each(b,function(m,e){b[m]=a.jgrid.htmlDecode(e)});l=a(c).jqGrid("setRowData",d,b);a(p).attr("editable","0");for(g=0;g<c.p.savedRow.length;g++)if(c.p.savedRow[g].id==d){r=g;break}r>=0&&c.p.savedRow.splice(r,1);a.isFunction(n)&&n(d,l)}else{a("#lui_"+c.p.id).show();a.ajax(a.extend({url:i,data:a.isFunction(c.p.serializeRowData)?
-c.p.serializeRowData(b):b,type:"POST",complete:function(m,e){a("#lui_"+c.p.id).hide();if(e==="success")if((a.isFunction(t)?t(m):true)===true){c.p.autoencode&&a.each(b,function(x,w){b[x]=a.jgrid.htmlDecode(w)});b=a.extend({},b,k);a(c).jqGrid("setRowData",d,b);a(p).attr("editable","0");for(e=0;e<c.p.savedRow.length;e++)if(c.p.savedRow[e].id==d){r=e;break}r>=0&&c.p.savedRow.splice(r,1);a.isFunction(n)&&n(d,m)}else a(c).jqGrid("restoreRow",d,s)},error:function(m,e){a("#lui_"+c.p.id).hide();a.isFunction(u)?
-u(d,m,e):alert("Error Row: "+d+" Result: "+m.status+":"+m.statusText+" Status: "+e)}},a.jgrid.ajaxOptions,c.p.ajaxRowOptions||{}))}a(p).unbind("keydown")}}}}})},restoreRow:function(d,t){return this.each(function(){var i=this,q,n,u={};if(i.grid){n=a(i).jqGrid("getInd",d,true);if(n!=false){for(var s=0;s<i.p.savedRow.length;s++)if(i.p.savedRow[s].id==d){q=s;break}if(q>=0){if(a.isFunction(a.fn.datepicker))try{a("input.hasDatepicker","#"+n.id).datepicker("hide")}catch(c){}a.each(i.p.colModel,function(){if(this.editable==
-true&&this.name in i.p.savedRow[q])u[this.name]=i.p.savedRow[q][this.name]});a(i).jqGrid("setRowData",d,u);a(n).attr("editable","0").unbind("keydown");i.p.savedRow.splice(q,1)}a.isFunction(t)&&t(d)}}})}})})(jQuery);
-(function(b){b.jgrid.extend({editCell:function(d,e,a){return this.each(function(){var c=this,h,f,g;if(!(!c.grid||c.p.cellEdit!==true)){e=parseInt(e,10);c.p.selrow=c.rows[d].id;c.p.knv||b(c).jqGrid("GridNav");if(c.p.savedRow.length>0){if(a===true)if(d==c.p.iRow&&e==c.p.iCol)return;b(c).jqGrid("saveCell",c.p.savedRow[0].id,c.p.savedRow[0].ic)}else window.setTimeout(function(){b("#"+c.p.knv).attr("tabindex","-1").focus()},0);h=c.p.colModel[e].name;if(!(h=="subgrid"||h=="cb"||h=="rn")){g=b("td:eq("+e+
-")",c.rows[d]);if(c.p.colModel[e].editable===true&&a===true&&!g.hasClass("not-editable-cell")){if(parseInt(c.p.iCol)>=0&&parseInt(c.p.iRow)>=0){b("td:eq("+c.p.iCol+")",c.rows[c.p.iRow]).removeClass("edit-cell ui-state-highlight");b(c.rows[c.p.iRow]).removeClass("selected-row ui-state-hover")}b(g).addClass("edit-cell ui-state-highlight");b(c.rows[d]).addClass("selected-row ui-state-hover");try{f=b.unformat(g,{rowId:c.rows[d].id,colModel:c.p.colModel[e]},e)}catch(k){f=b(g).html()}if(c.p.autoencode)f=
-b.jgrid.htmlDecode(f);if(!c.p.colModel[e].edittype)c.p.colModel[e].edittype="text";c.p.savedRow.push({id:d,ic:e,name:h,v:f});if(b.isFunction(c.p.formatCell)){var j=c.p.formatCell(c.rows[d].id,h,f,d,e);if(j!=undefined)f=j}j=b.extend({},c.p.colModel[e].editoptions||{},{id:d+"_"+h,name:h});var i=createEl(c.p.colModel[e].edittype,j,f,true,b.extend({},b.jgrid.ajaxOptions,c.p.ajaxSelectOptions||{}));b.isFunction(c.p.beforeEditCell)&&c.p.beforeEditCell(c.rows[d].id,h,f,d,e);b(g).html("").append(i).attr("tabindex",
-"0");window.setTimeout(function(){b(i).focus()},0);b("input, select, textarea",g).bind("keydown",function(l){if(l.keyCode===27)if(b("input.hasDatepicker",g).length>0)b(".ui-datepicker").is(":hidden")?b(c).jqGrid("restoreCell",d,e):b("input.hasDatepicker",g).datepicker("hide");else b(c).jqGrid("restoreCell",d,e);l.keyCode===13&&b(c).jqGrid("saveCell",d,e);if(l.keyCode==9)if(c.grid.hDiv.loading)return false;else l.shiftKey?b(c).jqGrid("prevCell",d,e):b(c).jqGrid("nextCell",d,e);l.stopPropagation()});
-b.isFunction(c.p.afterEditCell)&&c.p.afterEditCell(c.rows[d].id,h,f,d,e)}else{if(parseInt(c.p.iCol)>=0&&parseInt(c.p.iRow)>=0){b("td:eq("+c.p.iCol+")",c.rows[c.p.iRow]).removeClass("edit-cell ui-state-highlight");b(c.rows[c.p.iRow]).removeClass("selected-row ui-state-hover")}g.addClass("edit-cell ui-state-highlight");b(c.rows[d]).addClass("selected-row ui-state-hover");if(b.isFunction(c.p.onSelectCell)){f=g.html().replace(/\&#160\;/ig,"");c.p.onSelectCell(c.rows[d].id,h,f,d,e)}}c.p.iCol=e;c.p.iRow=
-d}}})},saveCell:function(d,e){return this.each(function(){var a=this,c;if(!(!a.grid||a.p.cellEdit!==true)){c=a.p.savedRow.length>=1?0:null;if(c!=null){var h=b("td:eq("+e+")",a.rows[d]),f,g,k=a.p.colModel[e],j=k.name,i=b.jgrid.jqID(j);switch(k.edittype){case "select":if(k.editoptions.multiple){i=b("#"+d+"_"+i,a.rows[d]);var l=[];if(f=b(i).val())f.join(",");else f="";b("option:selected",i).each(function(m,p){l[m]=b(p).text()});g=l.join(",")}else{f=b("#"+d+"_"+i+">option:selected",a.rows[d]).val();g=
-b("#"+d+"_"+i+">option:selected",a.rows[d]).text()}if(k.formatter)g=f;break;case "checkbox":var n=["Yes","No"];if(k.editoptions)n=k.editoptions.value.split(":");g=f=b("#"+d+"_"+i,a.rows[d]).attr("checked")?n[0]:n[1];break;case "password":case "text":case "textarea":case "button":g=f=b("#"+d+"_"+i,a.rows[d]).val();break;case "custom":try{if(k.editoptions&&b.isFunction(k.editoptions.custom_value)){f=k.editoptions.custom_value(b(".customelement",h),"get");if(f===undefined)throw"e2";else g=f}else throw"e1";
-}catch(q){q=="e1"&&info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+b.jgrid.edit.msg.nodefined,jQuery.jgrid.edit.bClose);q=="e2"?info_dialog(jQuery.jgrid.errors.errcap,"function 'custom_value' "+b.jgrid.edit.msg.novalue,jQuery.jgrid.edit.bClose):info_dialog(jQuery.jgrid.errors.errcap,q.message,jQuery.jgrid.edit.bClose)}break}if(g!=a.p.savedRow[c].v){if(b.isFunction(a.p.beforeSaveCell))if(c=a.p.beforeSaveCell(a.rows[d].id,j,f,d,e))f=c;var r=checkValues(f,e,a);if(r[0]===true){c={};
-if(b.isFunction(a.p.beforeSubmitCell))(c=a.p.beforeSubmitCell(a.rows[d].id,j,f,d,e))||(c={});if(g=="")g=" ";b("input.hasDatepicker",h).length>0&&b("input.hasDatepicker",h).datepicker("hide");if(a.p.cellsubmit=="remote")if(a.p.cellurl){var o={};if(a.p.autoencode)f=b.jgrid.htmlEncode(f);o[j]=f;n=a.p.prmNames;k=n.id;i=n.oper;o[k]=a.rows[d].id;o[i]=n.editoper;o=b.extend(c,o);b("#lui_"+a.p.id).show();a.grid.hDiv.loading=true;b.ajax(b.extend({url:a.p.cellurl,data:b.isFunction(a.p.serializeCellData)?a.p.serializeCellData(o):
-o,type:"POST",complete:function(m,p){b("#lui_"+a.p.id).hide();a.grid.hDiv.loading=false;if(p=="success")if(b.isFunction(a.p.afterSubmitCell)){m=a.p.afterSubmitCell(m,o.id,j,f,d,e);if(m[0]===true){b(h).empty();b(a).jqGrid("setCell",a.rows[d].id,e,g);b(h).addClass("dirty-cell");b(a.rows[d]).addClass("edited");b.isFunction(a.p.afterSaveCell)&&a.p.afterSaveCell(a.rows[d].id,j,f,d,e);a.p.savedRow.splice(0,1)}else{info_dialog(b.jgrid.errors.errcap,m[1],b.jgrid.edit.bClose);b(a).jqGrid("restoreCell",d,e)}}else{b(h).empty();
-b(a).jqGrid("setCell",a.rows[d].id,e,g);b(h).addClass("dirty-cell");b(a.rows[d]).addClass("edited");b.isFunction(a.p.afterSaveCell)&&a.p.afterSaveCell(a.rows[d].id,j,f,d,e);a.p.savedRow.splice(0,1)}},error:function(m,p){b("#lui_"+a.p.id).hide();a.grid.hDiv.loading=false;b.isFunction(a.p.errorCell)?a.p.errorCell(m,p):info_dialog(b.jgrid.errors.errcap,m.status+" : "+m.statusText+"<br/>"+p,b.jgrid.edit.bClose);b(a).jqGrid("restoreCell",d,e)}},b.jgrid.ajaxOptions,a.p.ajaxCellOptions||{}))}else try{info_dialog(b.jgrid.errors.errcap,
-b.jgrid.errors.nourl,b.jgrid.edit.bClose);b(a).jqGrid("restoreCell",d,e)}catch(s){}if(a.p.cellsubmit=="clientArray"){b(h).empty();b(a).jqGrid("setCell",a.rows[d].id,e,g);b(h).addClass("dirty-cell");b(a.rows[d]).addClass("edited");b.isFunction(a.p.afterSaveCell)&&a.p.afterSaveCell(a.rows[d].id,j,f,d,e);a.p.savedRow.splice(0,1)}}else try{window.setTimeout(function(){info_dialog(b.jgrid.errors.errcap,f+" "+r[1],b.jgrid.edit.bClose)},100);b(a).jqGrid("restoreCell",d,e)}catch(t){}}else b(a).jqGrid("restoreCell",
-d,e)}b.browser.opera?b("#"+a.p.knv).attr("tabindex","-1").focus():window.setTimeout(function(){b("#"+a.p.knv).attr("tabindex","-1").focus()},0)}})},restoreCell:function(d,e){return this.each(function(){var a=this,c;if(!(!a.grid||a.p.cellEdit!==true)){c=a.p.savedRow.length>=1?0:null;if(c!=null){var h=b("td:eq("+e+")",a.rows[d]);if(b.isFunction(b.fn.datepicker))try{b("input.hasDatepicker",h).datepicker("hide")}catch(f){}b(h).empty().attr("tabindex","-1");b(a).jqGrid("setCell",a.rows[d].id,e,a.p.savedRow[c].v);
-a.p.savedRow.splice(0,1)}window.setTimeout(function(){b("#"+a.p.knv).attr("tabindex","-1").focus()},0)}})},nextCell:function(d,e){return this.each(function(){var a=this,c=false;if(!(!a.grid||a.p.cellEdit!==true)){for(var h=e+1;h<a.p.colModel.length;h++)if(a.p.colModel[h].editable===true){c=h;break}if(c!==false)b(a).jqGrid("editCell",d,c,true);else a.p.savedRow.length>0&&b(a).jqGrid("saveCell",d,e)}})},prevCell:function(d,e){return this.each(function(){var a=this,c=false;if(!(!a.grid||a.p.cellEdit!==
-true)){for(var h=e-1;h>=0;h--)if(a.p.colModel[h].editable===true){c=h;break}if(c!==false)b(a).jqGrid("editCell",d,c,true);else a.p.savedRow.length>0&&b(a).jqGrid("saveCell",d,e)}})},GridNav:function(){return this.each(function(){function d(g,k,j){if(j.substr(0,1)=="v"){var i=b(a.grid.bDiv)[0].clientHeight,l=b(a.grid.bDiv)[0].scrollTop,n=a.rows[g].offsetTop+a.rows[g].clientHeight,q=a.rows[g].offsetTop;if(j=="vd")if(n>=i)b(a.grid.bDiv)[0].scrollTop=b(a.grid.bDiv)[0].scrollTop+a.rows[g].clientHeight;
-if(j=="vu")if(q<l)b(a.grid.bDiv)[0].scrollTop=b(a.grid.bDiv)[0].scrollTop-a.rows[g].clientHeight}if(j=="h"){j=b(a.grid.bDiv)[0].clientWidth;i=b(a.grid.bDiv)[0].scrollLeft;l=a.rows[g].cells[k].offsetLeft;if(a.rows[g].cells[k].offsetLeft+a.rows[g].cells[k].clientWidth>=j+parseInt(i))b(a.grid.bDiv)[0].scrollLeft=b(a.grid.bDiv)[0].scrollLeft+a.rows[g].cells[k].clientWidth;else if(l<i)b(a.grid.bDiv)[0].scrollLeft=b(a.grid.bDiv)[0].scrollLeft-a.rows[g].cells[k].clientWidth}}function e(g,k){var j,i;if(k==
-"lft"){j=g+1;for(i=g;i>=0;i--)if(a.p.colModel[i].hidden!==true){j=i;break}}if(k=="rgt"){j=g-1;for(i=g;i<a.p.colModel.length;i++)if(a.p.colModel[i].hidden!==true){j=i;break}}return j}var a=this;if(!(!a.grid||a.p.cellEdit!==true)){a.p.knv=a.p.id+"_kn";var c=b("<span style='width:0px;height:0px;background-color:black;' tabindex='0'><span tabindex='-1' style='width:0px;height:0px;background-color:grey' id='"+a.p.knv+"'></span></span>"),h,f;b(c).insertBefore(a.grid.cDiv);b("#"+a.p.knv).focus().keydown(function(g){f=
-g.keyCode;if(a.p.direction=="rtl")if(f==37)f=39;else if(f==39)f=37;switch(f){case 38:if(a.p.iRow-1>=0){d(a.p.iRow-1,a.p.iCol,"vu");b(a).jqGrid("editCell",a.p.iRow-1,a.p.iCol,false)}break;case 40:if(a.p.iRow+1<=a.rows.length-1){d(a.p.iRow+1,a.p.iCol,"vd");b(a).jqGrid("editCell",a.p.iRow+1,a.p.iCol,false)}break;case 37:if(a.p.iCol-1>=0){h=e(a.p.iCol-1,"lft");d(a.p.iRow,h,"h");b(a).jqGrid("editCell",a.p.iRow,h,false)}break;case 39:if(a.p.iCol+1<=a.p.colModel.length-1){h=e(a.p.iCol+1,"rgt");d(a.p.iRow,
-h,"h");b(a).jqGrid("editCell",a.p.iRow,h,false)}break;case 13:parseInt(a.p.iCol,10)>=0&&parseInt(a.p.iRow,10)>=0&&b(a).jqGrid("editCell",a.p.iRow,a.p.iCol,true);break}return false})}})},getChangedCells:function(d){var e=[];d||(d="all");this.each(function(){var a=this,c;!a.grid||a.p.cellEdit!==true||b(a.rows).each(function(h){var f={};if(b(this).hasClass("edited")){b("td",this).each(function(g){c=a.p.colModel[g].name;if(c!=="cb"&&c!=="subgrid")if(d=="dirty"){if(b(this).hasClass("dirty-cell"))try{f[c]=
-b.unformat(this,{rowId:a.rows[h].id,colModel:a.p.colModel[g]},g)}catch(k){f[c]=b.jgrid.htmlDecode(b(this).html())}}else try{f[c]=b.unformat(this,{rowId:a.rows[h].id,colModel:a.p.colModel[g]},g)}catch(j){f[c]=b.jgrid.htmlDecode(b(this).html())}});f.id=this.id;e.push(f)}})});return e}})})(jQuery);
-(function(b){b.fn.jqm=function(a){var f={overlay:50,closeoverlay:true,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:e,ajaxText:"",target:e,modal:e,toTop:e,onShow:e,onHide:e,onLoad:e};return this.each(function(){if(this._jqm)return i[this._jqm].c=b.extend({},i[this._jqm].c,a);l++;this._jqm=l;i[l]={c:b.extend(f,b.jqm.params,a),a:e,w:b(this).addClass("jqmID"+l),s:l};f.trigger&&b(this).jqmAddTrigger(f.trigger)})};b.fn.jqmAddClose=function(a){return o(this,a,"jqmHide")};b.fn.jqmAddTrigger=
-function(a){return o(this,a,"jqmShow")};b.fn.jqmShow=function(a){return this.each(function(){b.jqm.open(this._jqm,a)})};b.fn.jqmHide=function(a){return this.each(function(){b.jqm.close(this._jqm,a)})};b.jqm={hash:{},open:function(a,f){var c=i[a],d=c.c,h="."+d.closeClass,g=parseInt(c.w.css("z-index"));g=g>0?g:3E3;var j=b("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":g-1,opacity:d.overlay/100});if(c.a)return e;c.t=f;c.a=true;c.w.css("z-index",g);if(d.modal){k[0]||
-setTimeout(function(){p("bind")},1);k.push(a)}else if(d.overlay>0)d.closeoverlay&&c.w.jqmAddClose(j);else j=e;c.o=j?j.addClass(d.overlayClass).prependTo("body"):e;if(q){b("html,body").css({height:"100%",width:"100%"});if(j){j=j.css({position:"absolute"})[0];for(var m in{Top:1,Left:1})j.style.setExpression(m.toLowerCase(),"(_=(document.documentElement.scroll"+m+" || document.body.scroll"+m+"))+'px'")}}if(d.ajax){a=d.target||c.w;g=d.ajax;a=typeof a=="string"?b(a,c.w):b(a);g=g.substr(0,1)=="@"?b(f).attr(g.substring(1)):
-g;a.html(d.ajaxText).load(g,function(){d.onLoad&&d.onLoad.call(this,c);h&&c.w.jqmAddClose(b(h,c.w));r(c)})}else h&&c.w.jqmAddClose(b(h,c.w));d.toTop&&c.o&&c.w.before('<span id="jqmP'+c.w[0]._jqm+'"></span>').insertAfter(c.o);d.onShow?d.onShow(c):c.w.show();r(c);return e},close:function(a){a=i[a];if(!a.a)return e;a.a=e;if(k[0]){k.pop();k[0]||p("unbind")}a.c.toTop&&a.o&&b("#jqmP"+a.w[0]._jqm).after(a.w).remove();if(a.c.onHide)a.c.onHide(a);else{a.w.hide();a.o&&a.o.remove()}return e},params:{}};var l=
-0,i=b.jqm.hash,k=[],q=b.browser.msie&&b.browser.version=="6.0",e=false,r=function(a){var f=b('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0});if(q)if(a.o)a.o.html('<p style="width:100%;height:100%"/>').prepend(f);else b("iframe.jqm",a.w)[0]||a.w.prepend(f);s(a)},s=function(a){try{b(":input:visible",a.w)[0].focus()}catch(f){}},p=function(a){b()[a]("keypress",n)[a]("keydown",n)[a]("mousedown",n)},n=function(a){var f=i[k[k.length-1]];(a=!b(a.target).parents(".jqmID"+
-f.s)[0])&&s(f);return!a},o=function(a,f,c){return a.each(function(){var d=this._jqm;b(f).each(function(){if(!this[c]){this[c]=[];b(this).click(function(){for(var h in{jqmShow:1,jqmHide:1})for(var g in this[h])i[this[h][g]]&&i[this[h][g]].w[h](this);return e})}this[c].push(d)})})}})(jQuery);
-(function(b){b.fn.jqDrag=function(a){return l(this,a,"d")};b.fn.jqResize=function(a,e){return l(this,a,"r",e)};b.jqDnR={dnr:{},e:0,drag:function(a){if(c.k=="d")d.css({left:c.X+a.pageX-c.pX,top:c.Y+a.pageY-c.pY});else{d.css({width:Math.max(a.pageX-c.pX+c.W,0),height:Math.max(a.pageY-c.pY+c.H,0)});M1&&f.css({width:Math.max(a.pageX-M1.pX+M1.W,0),height:Math.max(a.pageY-M1.pY+M1.H,0)})}return false},stop:function(){b().unbind("mousemove",i.drag).unbind("mouseup",i.stop)}};var i=b.jqDnR,c=i.dnr,d=i.e,
-f,l=function(a,e,n,m){return a.each(function(){e=e?b(e,a):a;e.bind("mousedown",{e:a,k:n},function(g){var j=g.data,h={};d=j.e;f=m?b(m):false;if(d.css("position")!="relative")try{d.position(h)}catch(o){}c={X:h.left||k("left")||0,Y:h.top||k("top")||0,W:k("width")||d[0].scrollWidth||0,H:k("height")||d[0].scrollHeight||0,pX:g.pageX,pY:g.pageY,k:j.k};M1=f&&j.k!="d"?{X:h.left||f1("left")||0,Y:h.top||f1("top")||0,W:f[0].offsetWidth||f1("width")||0,H:f[0].offsetHeight||f1("height")||0,pX:g.pageX,pY:g.pageY,
-k:j.k}:false;b().mousemove(b.jqDnR.drag).mouseup(b.jqDnR.stop);return false})})},k=function(a){return parseInt(d.css(a))||false};f1=function(a){return parseInt(f.css(a))||false}})(jQuery);
-(function(a){a.jgrid.extend({setSubGrid:function(){return this.each(function(){var d=this;d.p.colNames.unshift("");d.p.colModel.unshift({name:"subgrid",width:a.browser.safari?d.p.subGridWidth+d.p.cellLayout:d.p.subGridWidth,sortable:false,resizable:false,hidedlg:true,search:false,fixed:true});d=d.p.subGridModel;if(d[0]){d[0].align=a.extend([],d[0].align||[]);for(i=0;i<d[0].name.length;i++)d[0].align[i]=d[0].align[i]||"left"}})},addSubGridCell:function(d,e){var b="",o;this.each(function(){b=this.formatCol(d,
-e);o=this.p.gridview});return o===false?"<td role='grid' class='ui-sgcollapsed sgcollapsed' "+b+"><a href='javascript:void(0);'><span class='ui-icon ui-icon-plus'></span></a></td>":"<td role='grid' "+b+"></td>"},addSubGrid:function(d,e){return this.each(function(){var b=this;if(b.grid){var o,n,q,u,t,v,p;a("td:eq("+e+")",d).click(function(){if(a(this).hasClass("sgcollapsed")){q=b.p.id;o=a(this).parent();u=e>=1?"<td colspan='"+e+"'>&#160;</td>":"";n=a(o).attr("id");p=true;if(a.isFunction(b.p.subGridBeforeExpand))p=
-b.p.subGridBeforeExpand(q+"_"+n,n);if(p===false)return false;t=0;a.each(b.p.colModel,function(){if(this.hidden===true||this.name=="rn"||this.name=="cb")t++});v="<tr role='row' class='ui-subgrid'>"+u+"<td class='ui-widget-content subgrid-cell'><span class='ui-icon ui-icon-carat-1-sw'/></td><td colspan='"+parseInt(b.p.colNames.length-1-t)+"' class='ui-widget-content subgrid-data'><div id="+q+"_"+n+" class='tablediv'>";a(this).parent().after(v+"</div></td></tr>");a.isFunction(b.p.subGridRowExpanded)?
-b.p.subGridRowExpanded(q+"_"+n,n):y(o);a(this).html("<a href='javascript:void(0);'><span class='ui-icon ui-icon-minus'></span></a>").removeClass("sgcollapsed").addClass("sgexpanded")}else if(a(this).hasClass("sgexpanded")){p=true;if(a.isFunction(b.p.subGridRowColapsed)){o=a(this).parent();n=a(o).attr("id");p=b.p.subGridRowColapsed(q+"_"+n,n)}if(p===false)return false;a(this).parent().next().remove(".ui-subgrid");a(this).html("<a href='javascript:void(0);'><span class='ui-icon ui-icon-plus'></span></a>").removeClass("sgexpanded").addClass("sgcollapsed")}return false});
-var y=function(g){var j,f,c,h;j=a(g).attr("id");f={nd_:(new Date).getTime()};f[b.p.idName]=j;if(!b.p.subGridModel[0])return false;if(b.p.subGridModel[0].params)for(h=0;h<b.p.subGridModel[0].params.length;h++)for(c=0;c<b.p.colModel.length;c++)if(b.p.colModel[c].name==b.p.subGridModel[0].params[h])f[b.p.colModel[c].name]=a("td:eq("+c+")",g).text().replace(/\&#160\;/ig,"");if(!b.grid.hDiv.loading){b.grid.hDiv.loading=true;a("#load_"+b.p.id).show();if(!b.p.subgridtype)b.p.subgridtype=b.p.datatype;if(a.isFunction(b.p.subgridtype))b.p.subgridtype(f);
-else b.p.subgridtype=b.p.subgridtype.toLowerCase();switch(b.p.subgridtype){case "xml":case "json":a.ajax(a.extend({type:b.p.mtype,url:b.p.subGridUrl,dataType:b.p.subgridtype,data:a.isFunction(b.p.serializeSubGridData)?b.p.serializeSubGridData(f):f,complete:function(m){b.p.subgridtype=="xml"?w(m.responseXML,j):x(a.jgrid.parse(m.responseText),j)}},a.jgrid.ajaxOptions,b.p.ajaxSubgridOptions||{}));break}}return false},s=function(g,j,f){j=a("<td align='"+b.p.subGridModel[0].align[f]+"'></td>").html(j);
-a(g).append(j)},w=function(g,j){var f,c,h,m=a("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),k=a("<tr></tr>");for(c=0;c<b.p.subGridModel[0].name.length;c++){f=a("<th class='ui-state-default ui-th-subgrid ui-th-column ui-th-"+b.p.direction+"'></th>");a(f).html(b.p.subGridModel[0].name[c]);a(f).width(b.p.subGridModel[0].width[c]);a(k).append(f)}a(m).append(k);if(g){h=b.p.xmlReader.subgrid;a(h.root+" "+h.row,g).each(function(){k=a("<tr class='ui-widget-content ui-subtblcell'></tr>");
-if(h.repeatitems===true)a(h.cell,this).each(function(r){s(k,a(this).text()||"&#160;",r)});else{var l=b.p.subGridModel[0].mapping||b.p.subGridModel[0].name;if(l)for(c=0;c<l.length;c++)s(k,a(l[c],this).text()||"&#160;",c)}a(m).append(k)})}g=a("table:first",b.grid.bDiv).attr("id")+"_";a("#"+g+j).append(m);b.grid.hDiv.loading=false;a("#load_"+b.p.id).hide();return false},x=function(g,j){var f,c,h,m=a("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),k=a("<tr></tr>");for(c=0;c<
-b.p.subGridModel[0].name.length;c++){f=a("<th class='ui-state-default ui-th-subgrid ui-th-column ui-th-"+b.p.direction+"'></th>");a(f).html(b.p.subGridModel[0].name[c]);a(f).width(b.p.subGridModel[0].width[c]);a(k).append(f)}a(m).append(k);if(g){f=b.p.jsonReader.subgrid;g=g[f.root];if(typeof g!=="undefined")for(c=0;c<g.length;c++){h=g[c];k=a("<tr class='ui-widget-content ui-subtblcell'></tr>");if(f.repeatitems===true){if(f.cell)h=h[f.cell];for(var l=0;l<h.length;l++)s(k,h[l]||"&#160;",l)}else{var r=
-b.p.subGridModel[0].mapping||b.p.subGridModel[0].name;if(r.length)for(l=0;l<r.length;l++)s(k,h[r[l]]||"&#160;",l)}a(m).append(k)}}c=a("table:first",b.grid.bDiv).attr("id")+"_";a("#"+c+j).append(m);b.grid.hDiv.loading=false;a("#load_"+b.p.id).hide();return false};b.subGridXml=function(g,j){w(g,j)};b.subGridJson=function(g,j){x(g,j)}}})},expandSubGridRow:function(d){return this.each(function(){var e=this;if(e.grid||d)if(e.p.subGrid===true)if(e=a(this).jqGrid("getInd",d,true))(e=a("td.sgcollapsed",e)[0])&&
-a(e).trigger("click")})},collapseSubGridRow:function(d){return this.each(function(){var e=this;if(e.grid||d)if(e.p.subGrid===true)if(e=a(this).jqGrid("getInd",d,true))(e=a("td.sgexpanded",e)[0])&&a(e).trigger("click")})},toggleSubGridRow:function(d){return this.each(function(){var e=this;if(e.grid||d)if(e.p.subGrid===true)if(e=a(this).jqGrid("getInd",d,true)){var b=a("td.sgcollapsed",e)[0];if(b)a(b).trigger("click");else(b=a("td.sgexpanded",e)[0])&&a(b).trigger("click")}})}})})(jQuery);
-(function(d){d.jgrid.extend({setTreeNode:function(a,c){return this.each(function(){var b=this;if(b.grid&&b.p.treeGrid){var e=b.p.expColInd,f=b.p.treeReader.expanded_field,i=b.p.treeReader.leaf_field,j=b.p.treeReader.level_field;c.level=a[j];if(b.p.treeGridModel=="nested"){c.lft=a[b.p.treeReader.left_field];c.rgt=a[b.p.treeReader.right_field];a[i]||(a[i]=parseInt(c.rgt,10)===parseInt(c.lft,10)+1?"true":"false")}else c.parent_id=a[b.p.treeReader.parent_id_field];var k=parseInt(c.level,10),h;if(b.p.tree_root_level===
-0){h=k+1;k=k}else{h=k;k=k-1}h="<div class='tree-wrap tree-wrap-"+b.p.direction+"' style='width:"+h*18+"px;'>";h+="<div style='"+(b.p.direction=="rtl"?"right:":"left:")+k*18+"px;' class='ui-icon ";if(a[i]=="true"||a[i]==true){h+=b.p.treeIcons.leaf+" tree-leaf'";c.isLeaf=true}else{if(a[f]=="true"||a[f]==true){h+=b.p.treeIcons.minus+" tree-minus treeclick'";c.expanded=true}else{h+=b.p.treeIcons.plus+" tree-plus treeclick'";c.expanded=false}c.isLeaf=false}h+="</div></div>";if(parseInt(a[j],10)!==parseInt(b.p.tree_root_level,
-10))d(b).jqGrid("isVisibleNode",c)||d(c).css("display","none");d("td:eq("+e+")",c).wrapInner("<span></span>").prepend(h);d(".treeclick",c).bind("click",function(g){g=d(g.target||g.srcElement,b.rows).parents("tr.jqgrow")[0].rowIndex;if(!b.rows[g].isLeaf)if(b.rows[g].expanded){d(b).jqGrid("collapseRow",b.rows[g]);d(b).jqGrid("collapseNode",b.rows[g])}else{d(b).jqGrid("expandRow",b.rows[g]);d(b).jqGrid("expandNode",b.rows[g])}return false});b.p.ExpandColClick===true&&d("span",c).css("cursor","pointer").bind("click",
-function(g){g=d(g.target||g.srcElement,b.rows).parents("tr.jqgrow")[0].rowIndex;if(!b.rows[g].isLeaf)if(b.rows[g].expanded){d(b).jqGrid("collapseRow",b.rows[g]);d(b).jqGrid("collapseNode",b.rows[g])}else{d(b).jqGrid("expandRow",b.rows[g]);d(b).jqGrid("expandNode",b.rows[g])}d(b).jqGrid("setSelection",b.rows[g].id);return false})}})},setTreeGrid:function(){return this.each(function(){var a=this,c=0;if(a.p.treeGrid){a.p.treedatatype||d.extend(a.p,{treedatatype:a.p.datatype});a.p.subGrid=false;a.p.altRows=
-false;a.p.pgbuttons=false;a.p.pginput=false;a.p.multiselect=false;a.p.rowList=[];a.p.treeIcons=d.extend({plus:"ui-icon-triangle-1-"+(a.p.direction=="rtl"?"w":"e"),minus:"ui-icon-triangle-1-s",leaf:"ui-icon-radio-off"},a.p.treeIcons||{});if(a.p.treeGridModel=="nested")a.p.treeReader=d.extend({level_field:"level",left_field:"lft",right_field:"rgt",leaf_field:"isLeaf",expanded_field:"expanded"},a.p.treeReader);else if(a.p.treeGridModel=="adjacency")a.p.treeReader=d.extend({level_field:"level",parent_id_field:"parent",
-leaf_field:"isLeaf",expanded_field:"expanded"},a.p.treeReader);for(var b in a.p.colModel){if(a.p.colModel[b].name==a.p.ExpandColumn){a.p.expColInd=c;break}c++}if(!a.p.expColInd)a.p.expColInd=0;d.each(a.p.treeReader,function(e,f){if(f){a.p.colNames.push(f);a.p.colModel.push({name:f,width:1,hidden:true,sortable:false,resizable:false,hidedlg:true,editable:true,search:false})}})}})},expandRow:function(a){this.each(function(){var c=this;if(c.grid&&c.p.treeGrid){var b=d(c).jqGrid("getNodeChildren",a);d(b).each(function(){d(this).css("display",
-"");this.expanded&&d(c).jqGrid("expandRow",this)})}})},collapseRow:function(a){this.each(function(){var c=this;if(c.grid&&c.p.treeGrid){var b=d(c).jqGrid("getNodeChildren",a);d(b).each(function(){d(this).css("display","none");this.expanded&&d(c).jqGrid("collapseRow",this)})}})},getRootNodes:function(){var a=[];this.each(function(){var c=this;if(c.grid&&c.p.treeGrid)switch(c.p.treeGridModel){case "nested":var b=c.p.treeReader.level_field;d(c.rows).each(function(){parseInt(this[b],10)===parseInt(c.p.tree_root_level,
-10)&&a.push(this)});break;case "adjacency":d(c.rows).each(function(){if(this.parent_id==null||this.parent_id.toLowerCase()=="null")a.push(this)});break}});return a},getNodeDepth:function(a){var c=null;this.each(function(){var b=this;if(this.grid&&this.p.treeGrid)switch(b.p.treeGridModel){case "nested":c=parseInt(a.level,10)-parseInt(this.p.tree_root_level,10);break;case "adjacency":c=d(b).jqGrid("getNodeAncestors",a).length;break}});return c},getNodeParent:function(a){var c=null;this.each(function(){var b=
-this;if(b.grid&&b.p.treeGrid)switch(b.p.treeGridModel){case "nested":var e=parseInt(a.lft,10),f=parseInt(a.rgt,10),i=parseInt(a.level,10);d(this.rows).each(function(){if(parseInt(this.level,10)===i-1&&parseInt(this.lft)<e&&parseInt(this.rgt)>f){c=this;return false}});break;case "adjacency":d(this.rows).each(function(){if(this.id==a.parent_id){c=this;return false}});break}});return c},getNodeChildren:function(a){var c=[];this.each(function(){var b=this;if(b.grid&&b.p.treeGrid)switch(b.p.treeGridModel){case "nested":var e=
-parseInt(a.lft,10),f=parseInt(a.rgt,10),i=parseInt(a.level,10);d(this.rows).each(function(){parseInt(this.level,10)===i+1&&parseInt(this.lft,10)>e&&parseInt(this.rgt,10)<f&&c.push(this)});break;case "adjacency":d(this.rows).each(function(){this.parent_id==a.id&&c.push(this)});break}});return c},getFullTreeNode:function(a){var c=[];this.each(function(){var b=this;if(b.grid&&b.p.treeGrid)switch(b.p.treeGridModel){case "nested":var e=parseInt(a.lft,10),f=parseInt(a.rgt,10),i=parseInt(a.level,10);d(this.rows).each(function(){parseInt(this.level,
-10)>=i&&parseInt(this.lft,10)>=e&&parseInt(this.lft,10)<=f&&c.push(this)});break;case "adjacency":c.push(a);d(this.rows).each(function(j){len=c.length;for(j=0;j<len;j++)if(c[j].id==this.parent_id){c.push(this);break}});break}});return c},getNodeAncestors:function(a){var c=[];this.each(function(){if(this.grid&&this.p.treeGrid)for(var b=d(this).jqGrid("getNodeParent",a);b;){c.push(b);b=d(this).jqGrid("getNodeParent",b)}});return c},isVisibleNode:function(a){var c=true;this.each(function(){var b=this;
-if(b.grid&&b.p.treeGrid){b=d(b).jqGrid("getNodeAncestors",a);d(b).each(function(){c=c&&this.expanded;if(!c)return false})}});return c},isNodeLoaded:function(a){var c;this.each(function(){var b=this;if(b.grid&&b.p.treeGrid)c=a.loaded!==undefined?a.loaded:a.isLeaf||d(b).jqGrid("getNodeChildren",a).length>0?true:false});return c},expandNode:function(a){return this.each(function(){if(this.grid&&this.p.treeGrid)if(!a.expanded)if(d(this).jqGrid("isNodeLoaded",a)){a.expanded=true;d("div.treeclick",a).removeClass(this.p.treeIcons.plus+
-" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus")}else{a.expanded=true;d("div.treeclick",a).removeClass(this.p.treeIcons.plus+" tree-plus").addClass(this.p.treeIcons.minus+" tree-minus");this.p.treeANode=a.rowIndex;this.p.datatype=this.p.treedatatype;this.p.treeGridModel=="nested"?d(this).jqGrid("setGridParam",{postData:{nodeid:a.id,n_left:a.lft,n_right:a.rgt,n_level:a.level}}):d(this).jqGrid("setGridParam",{postData:{nodeid:a.id,parentid:a.parent_id,n_level:a.level}});d(this).trigger("reloadGrid");
-this.p.treeGridModel=="nested"?d(this).jqGrid("setGridParam",{postData:{nodeid:"",n_left:"",n_right:"",n_level:""}}):d(this).jqGrid("setGridParam",{postData:{nodeid:"",parentid:"",n_level:""}})}})},collapseNode:function(a){return this.each(function(){if(this.grid&&this.p.treeGrid)if(a.expanded){a.expanded=false;d("div.treeclick",a).removeClass(this.p.treeIcons.minus+" tree-minus").addClass(this.p.treeIcons.plus+" tree-plus")}})},SortTree:function(a){return this.each(function(){if(this.grid&&this.p.treeGrid){var c,
-b,e,f=[],i=this,j=d(this).jqGrid("getRootNodes");j.sort(function(k,h){if(k.sortKey<h.sortKey)return-a;if(k.sortKey>h.sortKey)return a;return 0});if(j[0]){d("td",j[0]).each(function(k){d(this).css("width",i.grid.headers[k].width+"px")});i.grid.cols=j[0].cells}c=0;for(b=j.length;c<b;c++){e=j[c];f.push(e);d(this).jqGrid("collectChildrenSortTree",f,e,a)}d.each(f,function(k,h){d("tbody",i.grid.bDiv).append(h);h.sortKey=null})}})},collectChildrenSortTree:function(a,c,b){return this.each(function(){if(this.grid&&
-this.p.treeGrid){var e,f,i,j=d(this).jqGrid("getNodeChildren",c);j.sort(function(k,h){if(k.sortKey<h.sortKey)return-b;if(k.sortKey>h.sortKey)return b;return 0});e=0;for(f=j.length;e<f;e++){i=j[e];a.push(i);d(this).jqGrid("collectChildrenSortTree",a,i,b)}}})},setTreeRow:function(a,c){var b=false;this.each(function(){var e=this;if(e.grid&&e.p.treeGrid)b=d(e).jqGrid("setRowData",a,c)});return b},delTreeNode:function(a){return this.each(function(){var c=this;if(c.grid&&c.p.treeGrid){var b=d(c).jqGrid("getInd",
-a,true);if(b){var e=d(c).jqGrid("getNodeChildren",b);if(e.length>0)for(var f=0;f<e.length;f++)d(c).jqGrid("delRowData",e[f].id);d(c).jqGrid("delRowData",b.id)}}})}})})(jQuery);
-(function(b){b.jgrid.extend({jqGridImport:function(a){a=b.extend({imptype:"xml",impstring:"",impurl:"",mtype:"GET",impData:{},xmlGrid:{config:"roots>grid",data:"roots>rows"},jsonGrid:{config:"grid",data:"data"},ajaxOptions:{}},a||{});return this.each(function(){var f=this,c=function(d,g){var e=b(g.xmlGrid.config,d)[0];g=b(g.xmlGrid.data,d)[0];if(xmlJsonClass.xml2json&&b.jgrid.parse){e=xmlJsonClass.xml2json(e," ");e=b.jgrid.parse(e);for(var i in e)var k=e[i];if(g){i=e.grid.datatype;e.grid.datatype=
-"xmlstring";e.grid.datastr=d;b(f).jqGrid(k).jqGrid("setGridParam",{datatype:i})}else b(f).jqGrid(k)}else alert("xml2json or parse are not present")},j=function(d,g){if(d&&typeof d=="string"){var e=b.jgrid.parse(d);d=e[g.jsonGrid.config];if(g=e[g.jsonGrid.data]){e=d.datatype;d.datatype="jsonstring";d.datastr=g;b(f).jqGrid(d).jqGrid("setGridParam",{datatype:e})}else b(f).jqGrid(d)}};switch(a.imptype){case "xml":b.ajax(b.extend({url:a.impurl,type:a.mtype,data:a.impData,dataType:"xml",complete:function(d,
-g){if(g=="success"){c(d.responseXML,a);b.isFunction(a.importComplete)&&a.importComplete(d)}}},a.ajaxOptions));break;case "xmlstring":if(a.impstring&&typeof a.impstring=="string"){var h=b.jgrid.stringToDoc(a.impstring);if(h){c(h,a);b.isFunction(a.importComplete)&&a.importComplete(h);a.impstring=null}h=null}break;case "json":b.ajax(b.extend({url:a.impurl,type:a.mtype,data:a.impData,dataType:"json",complete:function(d,g){if(g=="success"){j(d.responseText,a);b.isFunction(a.importComplete)&&a.importComplete(d)}}},
-a.ajaxOptions));break;case "jsonstring":if(a.impstring&&typeof a.impstring=="string"){j(a.impstring,a);b.isFunction(a.importComplete)&&a.importComplete(a.impstring);a.impstring=null}break}})},jqGridExport:function(a){a=b.extend({exptype:"xmlstring",root:"grid",ident:"\t"},a||{});var f=null;this.each(function(){if(this.grid){var c=b.extend({},b(this).jqGrid("getGridParam"));if(c.rownumbers){c.colNames.splice(0,1);c.colModel.splice(0,1)}if(c.multiselect){c.colNames.splice(0,1);c.colModel.splice(0,1)}if(c.subgrid){c.colNames.splice(0,
-1);c.colModel.splice(0,1)}if(c.treeGrid)for(var j in c.treeReader){c.colNames.splice(c.colNames.length-1);c.colModel.splice(c.colModel.length-1)}switch(a.exptype){case "xmlstring":f="<"+a.root+">"+xmlJsonClass.json2xml(c,a.ident)+"</"+a.root+">";break;case "jsonstring":f="{"+xmlJsonClass.toJson(c,a.root,a.ident)+"}";break}}});return f},excelExport:function(a){a=b.extend({exptype:"remote",url:null,oper:"oper",tag:"excel",exportOptions:{}},a||{});return this.each(function(){$t=this;if(this.grid)if(a.exptype==
-"remote"){var f=b.extend({},this.p.postData);f[a.oper]=a.tag;f=jQuery.param(f);window.location=a.url+"?"+f}})}})})(jQuery);
-var xmlJsonClass={xml2json:function(a,b){if(a.nodeType===9)a=a.documentElement;a=this.toJson(this.toObj(this.removeWhite(a)),a.nodeName,"\t");return"{\n"+b+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"\n}"},json2xml:function(a,b){var g=function(d,c,j){var i="",k,h;if(d instanceof Array)if(d.length===0)i+=j+"<"+c+">__EMPTY_ARRAY_</"+c+">\n";else{k=0;for(h=d.length;k<h;k+=1){var l=j+g(d[k],c,j+"\t")+"\n";i+=l}}else if(typeof d==="object"){k=false;i+=j+"<"+c;for(h in d)if(d.hasOwnProperty(h))if(h.charAt(0)===
-"@")i+=" "+h.substr(1)+'="'+d[h].toString()+'"';else k=true;i+=k?">":"/>";if(k){for(h in d)if(d.hasOwnProperty(h))if(h==="#text")i+=d[h];else if(h==="#cdata")i+="<![CDATA["+d[h]+"]]\>";else if(h.charAt(0)!=="@")i+=g(d[h],h,j+"\t");i+=(i.charAt(i.length-1)==="\n"?j:"")+"</"+c+">"}}else i+=typeof d==="function"?j+"<"+c+"><![CDATA["+d+"]]\></"+c+">":d.toString()==='""'||d.toString().length===0?j+"<"+c+">__EMPTY_STRING_</"+c+">":j+"<"+c+">"+d.toString()+"</"+c+">";return i},e="",f;for(f in a)if(a.hasOwnProperty(f))e+=
-g(a[f],f,"");return b?e.replace(/\t/g,b):e.replace(/\t|\n/g,"")},toObj:function(a){var b={},g=/function/i;if(a.nodeType===1){if(a.attributes.length){var e;for(e=0;e<a.attributes.length;e+=1)b["@"+a.attributes[e].nodeName]=(a.attributes[e].nodeValue||"").toString()}if(a.firstChild){var f=e=0,d=false,c;for(c=a.firstChild;c;c=c.nextSibling)if(c.nodeType===1)d=true;else if(c.nodeType===3&&c.nodeValue.match(/[^ \f\n\r\t\v]/))e+=1;else if(c.nodeType===4)f+=1;if(d)if(e<2&&f<2){this.removeWhite(a);for(c=
-a.firstChild;c;c=c.nextSibling)if(c.nodeType===3)b["#text"]=this.escape(c.nodeValue);else if(c.nodeType===4)if(g.test(c.nodeValue))b[c.nodeName]=[b[c.nodeName],c.nodeValue];else b["#cdata"]=this.escape(c.nodeValue);else if(b[c.nodeName])if(b[c.nodeName]instanceof Array)b[c.nodeName][b[c.nodeName].length]=this.toObj(c);else b[c.nodeName]=[b[c.nodeName],this.toObj(c)];else b[c.nodeName]=this.toObj(c)}else if(a.attributes.length)b["#text"]=this.escape(this.innerXml(a));else b=this.escape(this.innerXml(a));
-else if(e)if(a.attributes.length)b["#text"]=this.escape(this.innerXml(a));else{b=this.escape(this.innerXml(a));if(b==="__EMPTY_ARRAY_")b="[]";else if(b==="__EMPTY_STRING_")b=""}else if(f)if(f>1)b=this.escape(this.innerXml(a));else for(c=a.firstChild;c;c=c.nextSibling)if(g.test(a.firstChild.nodeValue)){b=a.firstChild.nodeValue;break}else b["#cdata"]=this.escape(c.nodeValue)}if(!a.attributes.length&&!a.firstChild)b=null}else if(a.nodeType===9)b=this.toObj(a.documentElement);else alert("unhandled node type: "+
-a.nodeType);return b},toJson:function(a,b,g){var e=b?'"'+b+'"':"";if(a==="[]")e+=b?":[]":"[]";else if(a instanceof Array){var f,d,c=[];d=0;for(f=a.length;d<f;d+=1)c[d]=this.toJson(a[d],"",g+"\t");e+=(b?":[":"[")+(c.length>1?"\n"+g+"\t"+c.join(",\n"+g+"\t")+"\n"+g:c.join(""))+"]"}else if(a===null)e+=(b&&":")+"null";else if(typeof a==="object"){f=[];for(d in a)if(a.hasOwnProperty(d))f[f.length]=this.toJson(a[d],d,g+"\t");e+=(b?":{":"{")+(f.length>1?"\n"+g+"\t"+f.join(",\n"+g+"\t")+"\n"+g:f.join(""))+
-"}"}else if(typeof a==="string"){g=/function/i;f=a.toString();e+=/(^-?\d+\.?\d*$)/.test(f)||g.test(f)||f==="false"||f==="true"?(b&&":")+f:(b&&":")+'"'+a+'"'}else e+=(b&&":")+a.toString();return e},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else{var g=function(e){var f="",d;if(e.nodeType===1){f+="<"+e.nodeName;for(d=0;d<e.attributes.length;d+=1)f+=" "+e.attributes[d].nodeName+'="'+(e.attributes[d].nodeValue||"").toString()+'"';if(e.firstChild){f+=">";for(d=e.firstChild;d;d=d.nextSibling)f+=
-g(d);f+="</"+e.nodeName+">"}else f+="/>"}else if(e.nodeType===3)f+=e.nodeValue;else if(e.nodeType===4)f+="<![CDATA["+e.nodeValue+"]]\>";return f};for(a=a.firstChild;a;a=a.nextSibling)b+=g(a)}return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();var b;for(b=a.firstChild;b;)if(b.nodeType===3)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var g=b.nextSibling;a.removeChild(b);
-b=g}else{b.nodeType===1&&this.removeWhite(b);b=b.nextSibling}return a}};
-(function(b){b.jgrid.extend({setColumns:function(a){a=b.extend({top:0,left:0,width:200,height:"auto",dataheight:"auto",modal:false,drag:true,beforeShowForm:null,afterShowForm:null,afterSubmitForm:null,closeOnEscape:true,ShrinkToFit:false,jqModal:false,saveicon:[true,"left","ui-icon-disk"],closeicon:[true,"left","ui-icon-close"],onClose:null,colnameview:true,closeAfterSubmit:true,updateAfterCheck:false,recreateForm:false},b.jgrid.col,a||{});return this.each(function(){var c=this;if(c.grid){var j=typeof a.beforeShowForm===
-"function"?true:false,k=typeof a.afterShowForm==="function"?true:false,l=typeof a.afterSubmitForm==="function"?true:false,e=c.p.id,d="ColTbl_"+e,f={themodal:"colmod"+e,modalhead:"colhd"+e,modalcontent:"colcnt"+e,scrollelm:d};a.recreateForm===true&&b("#"+f.themodal).html()!=null&&b("#"+f.themodal).remove();if(b("#"+f.themodal).html()!=null){j&&a.beforeShowForm(b("#"+d));viewModal("#"+f.themodal,{gbox:"#gbox_"+e,jqm:a.jqModal,jqM:false,modal:a.modal})}else{var g=isNaN(a.dataheight)?a.dataheight:a.dataheight+
-"px";g="<div id='"+d+"' class='formdata' style='width:100%;overflow:auto;position:relative;height:"+g+";'>";g+="<table class='ColTable' cellspacing='1' cellpading='2' border='0'><tbody>";for(i=0;i<this.p.colNames.length;i++)c.p.colModel[i].hidedlg||(g+="<tr><td style='white-space: pre;'><input type='checkbox' style='margin-right:5px;' id='col_"+this.p.colModel[i].name+"' class='cbox' value='T' "+(this.p.colModel[i].hidden===false?"checked":"")+"/><label for='col_"+this.p.colModel[i].name+"'>"+this.p.colNames[i]+
-(a.colnameview?" ("+this.p.colModel[i].name+")":"")+"</label></td></tr>");g+="</tbody></table></div>";g+="<table border='0' class='EditTable' id='"+d+"_2'><tbody><tr style='display:block;height:3px;'><td></td></tr><tr><td class='DataTD ui-widget-content'></td></tr><tr><td class='ColButton EditButton'>"+(!a.updateAfterCheck?"<a href='javascript:void(0)' id='dData' class='fm-button ui-state-default ui-corner-all'>"+a.bSubmit+"</a>":"")+"&#160;"+("<a href='javascript:void(0)' id='eData' class='fm-button ui-state-default ui-corner-all'>"+
-a.bCancel+"</a>")+"</td></tr></tbody></table>";a.gbox="#gbox_"+e;createModal(f,g,a,"#gview_"+c.p.id,b("#gview_"+c.p.id)[0]);if(a.saveicon[0]==true)b("#dData","#"+d+"_2").addClass(a.saveicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+a.saveicon[2]+"'></span>");if(a.closeicon[0]==true)b("#eData","#"+d+"_2").addClass(a.closeicon[1]=="right"?"fm-button-icon-right":"fm-button-icon-left").append("<span class='ui-icon "+a.closeicon[2]+"'></span>");a.updateAfterCheck?
-b(":input","#"+d).click(function(){var h=this.id.substr(4);if(h){this.checked?b(c).jqGrid("showCol",h):b(c).jqGrid("hideCol",h);a.ShrinkToFit===true&&b(c).jqGrid("setGridWidth",c.grid.width-0.0010,true)}return this}):b("#dData","#"+d+"_2").click(function(){for(i=0;i<c.p.colModel.length;i++)if(!c.p.colModel[i].hidedlg){var h=c.p.colModel[i].name.replace(".","\\.");if(b("#col_"+h,"#"+d).attr("checked")){b(c).jqGrid("showCol",c.p.colModel[i].name);b("#col_"+h,"#"+d).attr("defaultChecked",true)}else{b(c).jqGrid("hideCol",
-c.p.colModel[i].name);b("#col_"+h,"#"+d).attr("defaultChecked","")}}a.ShrinkToFit===true&&b(c).jqGrid("setGridWidth",c.grid.width-0.0010,true);a.closeAfterSubmit&&hideModal("#"+f.themodal,{gb:"#gbox_"+e,jqm:a.jqModal,onClose:a.onClose});l&&a.afterSubmitForm(b("#"+d));return false});b("#eData","#"+d+"_2").click(function(){hideModal("#"+f.themodal,{gb:"#gbox_"+e,jqm:a.jqModal,onClose:a.onClose});return false});b("#dData, #eData","#"+d+"_2").hover(function(){b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")});
-j&&a.beforeShowForm(b("#"+d));viewModal("#"+f.themodal,{gbox:"#gbox_"+e,jqm:a.jqModal,jqM:true,modal:a.modal})}k&&a.afterShowForm(b("#"+d))}})}})})(jQuery);
-(function(c){c.jgrid.extend({getPostData:function(){var a=this[0];if(a.grid)return a.p.postData},setPostData:function(a){var b=this[0];if(b.grid)if(typeof a==="object")b.p.postData=a;else alert("Error: cannot add a non-object postData value. postData unchanged.")},appendPostData:function(a){var b=this[0];if(b.grid)typeof a==="object"?c.extend(b.p.postData,a):alert("Error: cannot append a non-object postData value. postData unchanged.")},setPostDataItem:function(a,b){var d=this[0];if(d.grid)d.p.postData[a]=
-b},getPostDataItem:function(a){var b=this[0];if(b.grid)return b.p.postData[a]},removePostDataItem:function(a){var b=this[0];b.grid&&delete b.p.postData[a]},getUserData:function(){var a=this[0];if(a.grid)return a.p.userData},getUserDataItem:function(a){var b=this[0];if(b.grid)return b.p.userData[a]}})})(jQuery);
-function tableToGrid(o,p){jQuery(o).each(function(){if(!this.grid){jQuery(this).width("99%");var a=jQuery(this).width(),f=jQuery("input[type=checkbox]:first",jQuery(this)),l=jQuery("input[type=radio]:first",jQuery(this)),b=f.length>0,q=!b&&l.length>0,m=b||q;f=f.attr("name")||l.attr("name");var c=[],g=[];jQuery("th",jQuery(this)).each(function(){if(c.length==0&&m){c.push({name:"__selection__",index:"__selection__",width:0,hidden:true});g.push("__selection__")}else{c.push({name:jQuery(this).attr("id")||
-jQuery.trim(jQuery.jgrid.stripHtml(jQuery(this).html())).split(" ").join("_"),index:jQuery(this).attr("id")||jQuery.trim(jQuery.jgrid.stripHtml(jQuery(this).html())).split(" ").join("_"),width:jQuery(this).width()||150});g.push(jQuery(this).html())}});var e=[],h=[],i=[];jQuery("tbody > tr",jQuery(this)).each(function(){var j={},d=0;jQuery("td",jQuery(this)).each(function(){if(d==0&&m){var k=jQuery("input",jQuery(this)),n=k.attr("value");h.push(n||e.length);k.attr("checked")&&i.push(n);j[c[d].name]=
-k.attr("value")}else j[c[d].name]=jQuery(this).html();d++});d>0&&e.push(j)});jQuery(this).empty();jQuery(this).addClass("scroll");jQuery(this).jqGrid($.extend({datatype:"local",width:a,colNames:g,colModel:c,multiselect:b},p||{}));for(a=0;a<e.length;a++){b=null;if(h.length>0)if((b=h[a])&&b.replace)b=encodeURIComponent(b).replace(/[.\-%]/g,"_");if(b==null)b=a+1;jQuery(this).jqGrid("addRowData",b,e[a])}for(a=0;a<i.length;a++)jQuery(this).jqGrid("setSelection",i[a])}})};
-(function(a){if(a.browser.msie&&a.browser.version==8)a.expr[":"].hidden=function(b){return b.offsetWidth===0||b.offsetHeight===0||b.style.display=="none"};if(a.ui&&a.ui.multiselect&&a.ui.multiselect.prototype._setSelected){var q=a.ui.multiselect.prototype._setSelected;a.ui.multiselect.prototype._setSelected=function(b,i){b=q.call(this,b,i);if(i&&this.selectedList){var c=this.element;this.selectedList.find("li").each(function(){a(this).data("optionLink")&&a(this).data("optionLink").remove().appendTo(c)})}return b}}a.jgrid.extend({sortableColumns:function(b){return this.each(function(){function i(){c.p.disableClick=
-true}var c=this,g={tolerance:"pointer",axis:"x",items:">th:not(:has(#jqgh_cb,#jqgh_rn,#jqgh_subgrid),:hidden)",placeholder:{element:function(e){return a(document.createElement(e[0].nodeName)).addClass(e[0].className+" ui-sortable-placeholder ui-state-highlight").removeClass("ui-sortable-helper")[0]},update:function(e,h){h.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10));h.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||
-0,10)-parseInt(e.currentItem.css("paddingRight")||0,10))}},update:function(e,h){e=a(h.item).parent();e=a(">th",e);var j={};a.each(c.p.colModel,function(m){j[this.name]=m});var l=[];e.each(function(){var m=a(">div",this).get(0).id.replace(/^jqgh_/,"");m in j&&l.push(j[m])});a(c).jqGrid("remapColumns",l,true,true);a.isFunction(c.p.sortable.update)&&c.p.sortable.update(l);setTimeout(function(){c.p.disableClick=false},50)}};if(c.p.sortable.options)a.extend(g,c.p.sortable.options);else if(a.isFunction(c.p.sortable))c.p.sortable=
-{update:c.p.sortable};if(g.start){var d=g.start;g.start=function(e,h){i();d.call(this,e,h)}}else g.start=i;if(c.p.sortable.exclude)g.items+=":not("+c.p.sortable.exclude+")";b.sortable(g).data("sortable").floating=true})},columnChooser:function(b){function i(f,k,o){if(k>=0){var p=f.slice(),r=p.splice(k);if(k>f.length)k=f.length;p[k]=o;return p.concat(r)}}function c(f,k){if(f)if(typeof f=="string")a.fn[f]&&a.fn[f].apply(k,a.makeArray(arguments).slice(2));else a.isFunction(f)&&f.apply(k,a.makeArray(arguments).slice(2))}
-var g=this;if(!a("#colchooser_"+g[0].p.id).length){var d=a('<div id="colchooser_'+g[0].p.id+'" style="position:relative;overflow:hidden"><div><select multiple="multiple"></select></div></div>'),e=a("select",d);b=a.extend({width:420,height:240,classname:null,done:function(f){f&&g.jqGrid("remapColumns",f,true)},msel:"multiselect",dlog:"dialog",dlog_opts:function(f){var k={};k[f.bSubmit]=function(){f.apply_perm();f.cleanup(false)};k[f.bCancel]=function(){f.cleanup(true)};return{buttons:k,close:function(){f.cleanup(true)},
-modal:false,resizable:false,width:f.width+20}},apply_perm:function(){a("option",e).each(function(){this.selected?g.jqGrid("showCol",h[this.value].name):g.jqGrid("hideCol",h[this.value].name)});var f=[];a("option[selected]",e).each(function(){f.push(parseInt(this.value))});a.each(f,function(){delete l[h[parseInt(this)].name]});a.each(l,function(){var k=parseInt(this);f=i(f,k,k)});b.done&&b.done.call(g,f)},cleanup:function(f){c(b.dlog,d,"destroy");c(b.msel,e,"destroy");d.remove();f&&b.done&&b.done.call(g)},
-msel_opts:{}},a.jgrid.col,b||{});b.caption&&d.attr("title",b.caption);if(b.classname){d.addClass(classname);e.addClass(classname)}if(b.width){a(">div",d).css({width:b.width,margin:"0 auto"});e.css("width",b.width)}if(b.height){a(">div",d).css("height",b.height);e.css("height",b.height-10)}var h=g.jqGrid("getGridParam","colModel"),j=g.jqGrid("getGridParam","colNames"),l={},m=[];e.empty();a.each(h,function(f){l[this.name]=f;if(this.hidedlg)this.hidden||m.push(f);else e.append("<option value='"+f+"' "+
-(this.hidden?"":"selected='selected'")+">"+j[f]+"</option>")});var n=a.isFunction(b.dlog_opts)?b.dlog_opts.call(g,b):b.dlog_opts;c(b.dlog,d,n);a.isFunction(b.msel_opts)&&b.msel_opts.call(g,b);c(b.msel,e,b.msel_opts)}},sortableRows:function(b){return this.each(function(){var i=this;if(i.grid)if(!i.p.treeGrid)if(a.fn.sortable){b=a.extend({cursor:"move",axis:"y",items:".jqgrow"},b||{});if(b.start&&a.isFunction(b.start)){b._start_=b.start;delete b.start}else b._start_=false;if(b.update&&a.isFunction(b.update)){b._update_=
-b.update;delete b.update}else b._update_=false;b.start=function(c,g){a(g.item).css("border-width","0px");a("td",g.item).each(function(h){this.style.width=i.grid.cols[h].style.width});if(i.p.subGrid){var d=a(g.item).attr("id");try{a(i).jqGrid("collapseSubGridRow",d)}catch(e){}}b._start_&&b._start_.apply(this,[c,g])};b.update=function(c,g){a(g.item).css("border-width","");i.updateColumns();i.p.rownumbers===true&&a("td.jqgrid-rownum",i.rows).each(function(d){a(this).html(d+1)});b._update_&&b._update_.apply(this,
-[c,g])};a("tbody:first",i).sortable(b)}})},gridDnD:function(b){return this.each(function(){function i(){var d=a.data(c,"dnd");a("tr.jqgrow:not(.ui-draggable)",c).draggable(a.isFunction(d.drag)?d.drag.call(a(c),d):d.drag)}var c=this;if(c.grid)if(!c.p.treeGrid)if(a.fn.draggable&&a.fn.droppable){a("#jqgrid_dnd").html()==null&&a("body").append("<table id='jqgrid_dnd' class='ui-jqgrid-dnd'></table>");if(typeof b=="string"&&b=="updateDnD"&&c.p.jqgdnd==true)i();else{b=a.extend({drag:function(d){return a.extend({start:function(e,
-h){if(c.p.subGrid){var j=a(h.helper).attr("id");try{a(c).jqGrid("collapseSubGridRow",j)}catch(l){}}for(j=0;j<a.data(c,"dnd").connectWith.length;j++)a(a.data(c,"dnd").connectWith[j]).jqGrid("getGridParam","reccount")=="0"&&a(a.data(c,"dnd").connectWith[j]).jqGrid("addRowData","jqg_empty_row",{});h.helper.addClass("ui-state-highlight");a("td",h.helper).each(function(m){this.style.width=c.grid.headers[m].width+"px"});d.onstart&&a.isFunction(d.onstart)&&d.onstart.call(a(c),e,h)},stop:function(e,h){if(h.helper.dropped){var j=
-a(h.helper).attr("id");a(c).jqGrid("delRowData",j)}for(j=0;j<a.data(c,"dnd").connectWith.length;j++)a(a.data(c,"dnd").connectWith[j]).jqGrid("delRowData","jqg_empty_row");d.onstop&&a.isFunction(d.onstop)&&d.onstop.call(a(c),e,h)}},d.drag_opts||{})},drop:function(d){return a.extend({accept:function(e){var h=a(e).closest("table.ui-jqgrid-btable");if(a.data(h[0],"dnd")!=undefined){e=a.data(h[0],"dnd").connectWith;return a.inArray("#"+this.id,e)!=-1?true:false}return e},drop:function(e,h){var j=a(h.draggable).attr("id");
-j=a("#"+c.id).jqGrid("getRowData",j);if(!d.dropbyname){var l=0,m={},n,f=a("#"+this.id).jqGrid("getGridParam","colModel");try{for(key in j){if(f[l]){n=f[l].name;m[n]=j[key]}l++}j=m}catch(k){}}h.helper.dropped=true;if(d.beforedrop&&a.isFunction(d.beforedrop)){n=d.beforedrop.call(this,e,h,j,a("#"+c.id),a(this));if(typeof n!="undefined"&&n!==null&&typeof n=="object")j=n}if(h.helper.dropped){var o;if(d.autoid)if(a.isFunction(d.autoid))o=d.autoid.call(this,j);else{o=Math.ceil(Math.random()*1E3);o=d.autoidprefix+
-o}a("#"+this.id).jqGrid("addRowData",o,j,d.droppos)}d.ondrop&&a.isFunction(d.ondrop)&&d.ondrop.call(this,e,h,j)}},d.drop_opts||{})},onstart:null,onstop:null,beforedrop:null,ondrop:null,drop_opts:{activeClass:"ui-state-active",hoverClass:"ui-state-hover"},drag_opts:{revert:"invalid",helper:"clone",cursor:"move",appendTo:"#jqgrid_dnd",zIndex:5E3},dropbyname:false,droppos:"first",autoid:true,autoidprefix:"dnd_"},b||{});if(b.connectWith){b.connectWith=b.connectWith.split(",");b.connectWith=a.map(b.connectWith,
-function(d){return a.trim(d)});a.data(c,"dnd",b);c.p.reccount!="0"&&!c.p.jqgdnd&&i();c.p.jqgdnd=true;for(var g=0;g<b.connectWith.length;g++)a(b.connectWith[g]).droppable(a.isFunction(b.drop)?b.drop.call(a(c),b):b.drop)}}}})},gridResize:function(b){return this.each(function(){var i=this;if(i.grid&&a.fn.resizable){b=a.extend({},b||{});if(b.alsoResize){b._alsoResize_=b.alsoResize;delete b.alsoResize}else b._alsoResize_=false;if(b.stop&&a.isFunction(b.stop)){b._stop_=b.stop;delete b.stop}else b._stop_=
-false;b.stop=function(c,g){a(i).jqGrid("setGridParam",{height:a("#gview_"+i.p.id+" .ui-jqgrid-bdiv").height()});a(i).jqGrid("setGridWidth",g.size.width,b.shrinkToFit);b._stop_&&b._stop_.call(i,c,g)};b.alsoResize=b._alsoResize_?eval("("+("{'#gview_"+i.p.id+" .ui-jqgrid-bdiv':true,'"+b._alsoResize_+"':true}")+")"):a(".ui-jqgrid-bdiv","#gview_"+i.p.id);delete b._alsoResize_;a("#gbox_"+i.p.id).resizable(b)}})}})})(jQuery);
diff --git a/gracedb/static/js/materialize.js b/gracedb/static/js/materialize.js
deleted file mode 100644
index 1e1838230..000000000
--- a/gracedb/static/js/materialize.js
+++ /dev/null
@@ -1,12374 +0,0 @@
-/*!
- * Materialize v1.0.0 (http://materializecss.com)
- * Copyright 2014-2017 Materialize
- * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
- */
-var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/*! cash-dom 1.3.5, https://github.com/kenwheeler/cash @license MIT */
-(function (factory) {
-  window.cash = factory();
-})(function () {
-  var doc = document,
-      win = window,
-      ArrayProto = Array.prototype,
-      slice = ArrayProto.slice,
-      filter = ArrayProto.filter,
-      push = ArrayProto.push;
-
-  var noop = function () {},
-      isFunction = function (item) {
-    // @see https://crbug.com/568448
-    return typeof item === typeof noop && item.call;
-  },
-      isString = function (item) {
-    return typeof item === typeof "";
-  };
-
-  var idMatch = /^#[\w-]*$/,
-      classMatch = /^\.[\w-]*$/,
-      htmlMatch = /<.+>/,
-      singlet = /^\w+$/;
-
-  function find(selector, context) {
-    context = context || doc;
-    var elems = classMatch.test(selector) ? context.getElementsByClassName(selector.slice(1)) : singlet.test(selector) ? context.getElementsByTagName(selector) : context.querySelectorAll(selector);
-    return elems;
-  }
-
-  var frag;
-  function parseHTML(str) {
-    if (!frag) {
-      frag = doc.implementation.createHTMLDocument(null);
-      var base = frag.createElement("base");
-      base.href = doc.location.href;
-      frag.head.appendChild(base);
-    }
-
-    frag.body.innerHTML = str;
-
-    return frag.body.childNodes;
-  }
-
-  function onReady(fn) {
-    if (doc.readyState !== "loading") {
-      fn();
-    } else {
-      doc.addEventListener("DOMContentLoaded", fn);
-    }
-  }
-
-  function Init(selector, context) {
-    if (!selector) {
-      return this;
-    }
-
-    // If already a cash collection, don't do any further processing
-    if (selector.cash && selector !== win) {
-      return selector;
-    }
-
-    var elems = selector,
-        i = 0,
-        length;
-
-    if (isString(selector)) {
-      elems = idMatch.test(selector) ?
-      // If an ID use the faster getElementById check
-      doc.getElementById(selector.slice(1)) : htmlMatch.test(selector) ?
-      // If HTML, parse it into real elements
-      parseHTML(selector) :
-      // else use `find`
-      find(selector, context);
-
-      // If function, use as shortcut for DOM ready
-    } else if (isFunction(selector)) {
-      onReady(selector);return this;
-    }
-
-    if (!elems) {
-      return this;
-    }
-
-    // If a single DOM element is passed in or received via ID, return the single element
-    if (elems.nodeType || elems === win) {
-      this[0] = elems;
-      this.length = 1;
-    } else {
-      // Treat like an array and loop through each item.
-      length = this.length = elems.length;
-      for (; i < length; i++) {
-        this[i] = elems[i];
-      }
-    }
-
-    return this;
-  }
-
-  function cash(selector, context) {
-    return new Init(selector, context);
-  }
-
-  var fn = cash.fn = cash.prototype = Init.prototype = { // jshint ignore:line
-    cash: true,
-    length: 0,
-    push: push,
-    splice: ArrayProto.splice,
-    map: ArrayProto.map,
-    init: Init
-  };
-
-  Object.defineProperty(fn, "constructor", { value: cash });
-
-  cash.parseHTML = parseHTML;
-  cash.noop = noop;
-  cash.isFunction = isFunction;
-  cash.isString = isString;
-
-  cash.extend = fn.extend = function (target) {
-    target = target || {};
-
-    var args = slice.call(arguments),
-        length = args.length,
-        i = 1;
-
-    if (args.length === 1) {
-      target = this;
-      i = 0;
-    }
-
-    for (; i < length; i++) {
-      if (!args[i]) {
-        continue;
-      }
-      for (var key in args[i]) {
-        if (args[i].hasOwnProperty(key)) {
-          target[key] = args[i][key];
-        }
-      }
-    }
-
-    return target;
-  };
-
-  function each(collection, callback) {
-    var l = collection.length,
-        i = 0;
-
-    for (; i < l; i++) {
-      if (callback.call(collection[i], collection[i], i, collection) === false) {
-        break;
-      }
-    }
-  }
-
-  function matches(el, selector) {
-    var m = el && (el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector || el.oMatchesSelector);
-    return !!m && m.call(el, selector);
-  }
-
-  function getCompareFunction(selector) {
-    return (
-      /* Use browser's `matches` function if string */
-      isString(selector) ? matches :
-      /* Match a cash element */
-      selector.cash ? function (el) {
-        return selector.is(el);
-      } :
-      /* Direct comparison */
-      function (el, selector) {
-        return el === selector;
-      }
-    );
-  }
-
-  function unique(collection) {
-    return cash(slice.call(collection).filter(function (item, index, self) {
-      return self.indexOf(item) === index;
-    }));
-  }
-
-  cash.extend({
-    merge: function (first, second) {
-      var len = +second.length,
-          i = first.length,
-          j = 0;
-
-      for (; j < len; i++, j++) {
-        first[i] = second[j];
-      }
-
-      first.length = i;
-      return first;
-    },
-
-    each: each,
-    matches: matches,
-    unique: unique,
-    isArray: Array.isArray,
-    isNumeric: function (n) {
-      return !isNaN(parseFloat(n)) && isFinite(n);
-    }
-
-  });
-
-  var uid = cash.uid = "_cash" + Date.now();
-
-  function getDataCache(node) {
-    return node[uid] = node[uid] || {};
-  }
-
-  function setData(node, key, value) {
-    return getDataCache(node)[key] = value;
-  }
-
-  function getData(node, key) {
-    var c = getDataCache(node);
-    if (c[key] === undefined) {
-      c[key] = node.dataset ? node.dataset[key] : cash(node).attr("data-" + key);
-    }
-    return c[key];
-  }
-
-  function removeData(node, key) {
-    var c = getDataCache(node);
-    if (c) {
-      delete c[key];
-    } else if (node.dataset) {
-      delete node.dataset[key];
-    } else {
-      cash(node).removeAttr("data-" + name);
-    }
-  }
-
-  fn.extend({
-    data: function (name, value) {
-      if (isString(name)) {
-        return value === undefined ? getData(this[0], name) : this.each(function (v) {
-          return setData(v, name, value);
-        });
-      }
-
-      for (var key in name) {
-        this.data(key, name[key]);
-      }
-
-      return this;
-    },
-
-    removeData: function (key) {
-      return this.each(function (v) {
-        return removeData(v, key);
-      });
-    }
-
-  });
-
-  var notWhiteMatch = /\S+/g;
-
-  function getClasses(c) {
-    return isString(c) && c.match(notWhiteMatch);
-  }
-
-  function hasClass(v, c) {
-    return v.classList ? v.classList.contains(c) : new RegExp("(^| )" + c + "( |$)", "gi").test(v.className);
-  }
-
-  function addClass(v, c, spacedName) {
-    if (v.classList) {
-      v.classList.add(c);
-    } else if (spacedName.indexOf(" " + c + " ")) {
-      v.className += " " + c;
-    }
-  }
-
-  function removeClass(v, c) {
-    if (v.classList) {
-      v.classList.remove(c);
-    } else {
-      v.className = v.className.replace(c, "");
-    }
-  }
-
-  fn.extend({
-    addClass: function (c) {
-      var classes = getClasses(c);
-
-      return classes ? this.each(function (v) {
-        var spacedName = " " + v.className + " ";
-        each(classes, function (c) {
-          addClass(v, c, spacedName);
-        });
-      }) : this;
-    },
-
-    attr: function (name, value) {
-      if (!name) {
-        return undefined;
-      }
-
-      if (isString(name)) {
-        if (value === undefined) {
-          return this[0] ? this[0].getAttribute ? this[0].getAttribute(name) : this[0][name] : undefined;
-        }
-
-        return this.each(function (v) {
-          if (v.setAttribute) {
-            v.setAttribute(name, value);
-          } else {
-            v[name] = value;
-          }
-        });
-      }
-
-      for (var key in name) {
-        this.attr(key, name[key]);
-      }
-
-      return this;
-    },
-
-    hasClass: function (c) {
-      var check = false,
-          classes = getClasses(c);
-      if (classes && classes.length) {
-        this.each(function (v) {
-          check = hasClass(v, classes[0]);
-          return !check;
-        });
-      }
-      return check;
-    },
-
-    prop: function (name, value) {
-      if (isString(name)) {
-        return value === undefined ? this[0][name] : this.each(function (v) {
-          v[name] = value;
-        });
-      }
-
-      for (var key in name) {
-        this.prop(key, name[key]);
-      }
-
-      return this;
-    },
-
-    removeAttr: function (name) {
-      return this.each(function (v) {
-        if (v.removeAttribute) {
-          v.removeAttribute(name);
-        } else {
-          delete v[name];
-        }
-      });
-    },
-
-    removeClass: function (c) {
-      if (!arguments.length) {
-        return this.attr("class", "");
-      }
-      var classes = getClasses(c);
-      return classes ? this.each(function (v) {
-        each(classes, function (c) {
-          removeClass(v, c);
-        });
-      }) : this;
-    },
-
-    removeProp: function (name) {
-      return this.each(function (v) {
-        delete v[name];
-      });
-    },
-
-    toggleClass: function (c, state) {
-      if (state !== undefined) {
-        return this[state ? "addClass" : "removeClass"](c);
-      }
-      var classes = getClasses(c);
-      return classes ? this.each(function (v) {
-        var spacedName = " " + v.className + " ";
-        each(classes, function (c) {
-          if (hasClass(v, c)) {
-            removeClass(v, c);
-          } else {
-            addClass(v, c, spacedName);
-          }
-        });
-      }) : this;
-    } });
-
-  fn.extend({
-    add: function (selector, context) {
-      return unique(cash.merge(this, cash(selector, context)));
-    },
-
-    each: function (callback) {
-      each(this, callback);
-      return this;
-    },
-
-    eq: function (index) {
-      return cash(this.get(index));
-    },
-
-    filter: function (selector) {
-      if (!selector) {
-        return this;
-      }
-
-      var comparator = isFunction(selector) ? selector : getCompareFunction(selector);
-
-      return cash(filter.call(this, function (e) {
-        return comparator(e, selector);
-      }));
-    },
-
-    first: function () {
-      return this.eq(0);
-    },
-
-    get: function (index) {
-      if (index === undefined) {
-        return slice.call(this);
-      }
-      return index < 0 ? this[index + this.length] : this[index];
-    },
-
-    index: function (elem) {
-      var child = elem ? cash(elem)[0] : this[0],
-          collection = elem ? this : cash(child).parent().children();
-      return slice.call(collection).indexOf(child);
-    },
-
-    last: function () {
-      return this.eq(-1);
-    }
-
-  });
-
-  var camelCase = function () {
-    var camelRegex = /(?:^\w|[A-Z]|\b\w)/g,
-        whiteSpace = /[\s-_]+/g;
-    return function (str) {
-      return str.replace(camelRegex, function (letter, index) {
-        return letter[index === 0 ? "toLowerCase" : "toUpperCase"]();
-      }).replace(whiteSpace, "");
-    };
-  }();
-
-  var getPrefixedProp = function () {
-    var cache = {},
-        doc = document,
-        div = doc.createElement("div"),
-        style = div.style;
-
-    return function (prop) {
-      prop = camelCase(prop);
-      if (cache[prop]) {
-        return cache[prop];
-      }
-
-      var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
-          prefixes = ["webkit", "moz", "ms", "o"],
-          props = (prop + " " + prefixes.join(ucProp + " ") + ucProp).split(" ");
-
-      each(props, function (p) {
-        if (p in style) {
-          cache[p] = prop = cache[prop] = p;
-          return false;
-        }
-      });
-
-      return cache[prop];
-    };
-  }();
-
-  cash.prefixedProp = getPrefixedProp;
-  cash.camelCase = camelCase;
-
-  fn.extend({
-    css: function (prop, value) {
-      if (isString(prop)) {
-        prop = getPrefixedProp(prop);
-        return arguments.length > 1 ? this.each(function (v) {
-          return v.style[prop] = value;
-        }) : win.getComputedStyle(this[0])[prop];
-      }
-
-      for (var key in prop) {
-        this.css(key, prop[key]);
-      }
-
-      return this;
-    }
-
-  });
-
-  function compute(el, prop) {
-    return parseInt(win.getComputedStyle(el[0], null)[prop], 10) || 0;
-  }
-
-  each(["Width", "Height"], function (v) {
-    var lower = v.toLowerCase();
-
-    fn[lower] = function () {
-      return this[0].getBoundingClientRect()[lower];
-    };
-
-    fn["inner" + v] = function () {
-      return this[0]["client" + v];
-    };
-
-    fn["outer" + v] = function (margins) {
-      return this[0]["offset" + v] + (margins ? compute(this, "margin" + (v === "Width" ? "Left" : "Top")) + compute(this, "margin" + (v === "Width" ? "Right" : "Bottom")) : 0);
-    };
-  });
-
-  function registerEvent(node, eventName, callback) {
-    var eventCache = getData(node, "_cashEvents") || setData(node, "_cashEvents", {});
-    eventCache[eventName] = eventCache[eventName] || [];
-    eventCache[eventName].push(callback);
-    node.addEventListener(eventName, callback);
-  }
-
-  function removeEvent(node, eventName, callback) {
-    var events = getData(node, "_cashEvents"),
-        eventCache = events && events[eventName],
-        index;
-
-    if (!eventCache) {
-      return;
-    }
-
-    if (callback) {
-      node.removeEventListener(eventName, callback);
-      index = eventCache.indexOf(callback);
-      if (index >= 0) {
-        eventCache.splice(index, 1);
-      }
-    } else {
-      each(eventCache, function (event) {
-        node.removeEventListener(eventName, event);
-      });
-      eventCache = [];
-    }
-  }
-
-  fn.extend({
-    off: function (eventName, callback) {
-      return this.each(function (v) {
-        return removeEvent(v, eventName, callback);
-      });
-    },
-
-    on: function (eventName, delegate, callback, runOnce) {
-      // jshint ignore:line
-      var originalCallback;
-      if (!isString(eventName)) {
-        for (var key in eventName) {
-          this.on(key, delegate, eventName[key]);
-        }
-        return this;
-      }
-
-      if (isFunction(delegate)) {
-        callback = delegate;
-        delegate = null;
-      }
-
-      if (eventName === "ready") {
-        onReady(callback);
-        return this;
-      }
-
-      if (delegate) {
-        originalCallback = callback;
-        callback = function (e) {
-          var t = e.target;
-          while (!matches(t, delegate)) {
-            if (t === this || t === null) {
-              return t = false;
-            }
-
-            t = t.parentNode;
-          }
-
-          if (t) {
-            originalCallback.call(t, e);
-          }
-        };
-      }
-
-      return this.each(function (v) {
-        var finalCallback = callback;
-        if (runOnce) {
-          finalCallback = function () {
-            callback.apply(this, arguments);
-            removeEvent(v, eventName, finalCallback);
-          };
-        }
-        registerEvent(v, eventName, finalCallback);
-      });
-    },
-
-    one: function (eventName, delegate, callback) {
-      return this.on(eventName, delegate, callback, true);
-    },
-
-    ready: onReady,
-
-    /**
-     * Modified
-     * Triggers browser event
-     * @param String eventName
-     * @param Object data - Add properties to event object
-     */
-    trigger: function (eventName, data) {
-      if (document.createEvent) {
-        var evt = document.createEvent('HTMLEvents');
-        evt.initEvent(eventName, true, false);
-        evt = this.extend(evt, data);
-        return this.each(function (v) {
-          return v.dispatchEvent(evt);
-        });
-      }
-    }
-
-  });
-
-  function encode(name, value) {
-    return "&" + encodeURIComponent(name) + "=" + encodeURIComponent(value).replace(/%20/g, "+");
-  }
-
-  function getSelectMultiple_(el) {
-    var values = [];
-    each(el.options, function (o) {
-      if (o.selected) {
-        values.push(o.value);
-      }
-    });
-    return values.length ? values : null;
-  }
-
-  function getSelectSingle_(el) {
-    var selectedIndex = el.selectedIndex;
-    return selectedIndex >= 0 ? el.options[selectedIndex].value : null;
-  }
-
-  function getValue(el) {
-    var type = el.type;
-    if (!type) {
-      return null;
-    }
-    switch (type.toLowerCase()) {
-      case "select-one":
-        return getSelectSingle_(el);
-      case "select-multiple":
-        return getSelectMultiple_(el);
-      case "radio":
-        return el.checked ? el.value : null;
-      case "checkbox":
-        return el.checked ? el.value : null;
-      default:
-        return el.value ? el.value : null;
-    }
-  }
-
-  fn.extend({
-    serialize: function () {
-      var query = "";
-
-      each(this[0].elements || this, function (el) {
-        if (el.disabled || el.tagName === "FIELDSET") {
-          return;
-        }
-        var name = el.name;
-        switch (el.type.toLowerCase()) {
-          case "file":
-          case "reset":
-          case "submit":
-          case "button":
-            break;
-          case "select-multiple":
-            var values = getValue(el);
-            if (values !== null) {
-              each(values, function (value) {
-                query += encode(name, value);
-              });
-            }
-            break;
-          default:
-            var value = getValue(el);
-            if (value !== null) {
-              query += encode(name, value);
-            }
-        }
-      });
-
-      return query.substr(1);
-    },
-
-    val: function (value) {
-      if (value === undefined) {
-        return getValue(this[0]);
-      }
-
-      return this.each(function (v) {
-        return v.value = value;
-      });
-    }
-
-  });
-
-  function insertElement(el, child, prepend) {
-    if (prepend) {
-      var first = el.childNodes[0];
-      el.insertBefore(child, first);
-    } else {
-      el.appendChild(child);
-    }
-  }
-
-  function insertContent(parent, child, prepend) {
-    var str = isString(child);
-
-    if (!str && child.length) {
-      each(child, function (v) {
-        return insertContent(parent, v, prepend);
-      });
-      return;
-    }
-
-    each(parent, str ? function (v) {
-      return v.insertAdjacentHTML(prepend ? "afterbegin" : "beforeend", child);
-    } : function (v, i) {
-      return insertElement(v, i === 0 ? child : child.cloneNode(true), prepend);
-    });
-  }
-
-  fn.extend({
-    after: function (selector) {
-      cash(selector).insertAfter(this);
-      return this;
-    },
-
-    append: function (content) {
-      insertContent(this, content);
-      return this;
-    },
-
-    appendTo: function (parent) {
-      insertContent(cash(parent), this);
-      return this;
-    },
-
-    before: function (selector) {
-      cash(selector).insertBefore(this);
-      return this;
-    },
-
-    clone: function () {
-      return cash(this.map(function (v) {
-        return v.cloneNode(true);
-      }));
-    },
-
-    empty: function () {
-      this.html("");
-      return this;
-    },
-
-    html: function (content) {
-      if (content === undefined) {
-        return this[0].innerHTML;
-      }
-      var source = content.nodeType ? content[0].outerHTML : content;
-      return this.each(function (v) {
-        return v.innerHTML = source;
-      });
-    },
-
-    insertAfter: function (selector) {
-      var _this = this;
-
-      cash(selector).each(function (el, i) {
-        var parent = el.parentNode,
-            sibling = el.nextSibling;
-        _this.each(function (v) {
-          parent.insertBefore(i === 0 ? v : v.cloneNode(true), sibling);
-        });
-      });
-
-      return this;
-    },
-
-    insertBefore: function (selector) {
-      var _this2 = this;
-      cash(selector).each(function (el, i) {
-        var parent = el.parentNode;
-        _this2.each(function (v) {
-          parent.insertBefore(i === 0 ? v : v.cloneNode(true), el);
-        });
-      });
-      return this;
-    },
-
-    prepend: function (content) {
-      insertContent(this, content, true);
-      return this;
-    },
-
-    prependTo: function (parent) {
-      insertContent(cash(parent), this, true);
-      return this;
-    },
-
-    remove: function () {
-      return this.each(function (v) {
-        if (!!v.parentNode) {
-          return v.parentNode.removeChild(v);
-        }
-      });
-    },
-
-    text: function (content) {
-      if (content === undefined) {
-        return this[0].textContent;
-      }
-      return this.each(function (v) {
-        return v.textContent = content;
-      });
-    }
-
-  });
-
-  var docEl = doc.documentElement;
-
-  fn.extend({
-    position: function () {
-      var el = this[0];
-      return {
-        left: el.offsetLeft,
-        top: el.offsetTop
-      };
-    },
-
-    offset: function () {
-      var rect = this[0].getBoundingClientRect();
-      return {
-        top: rect.top + win.pageYOffset - docEl.clientTop,
-        left: rect.left + win.pageXOffset - docEl.clientLeft
-      };
-    },
-
-    offsetParent: function () {
-      return cash(this[0].offsetParent);
-    }
-
-  });
-
-  fn.extend({
-    children: function (selector) {
-      var elems = [];
-      this.each(function (el) {
-        push.apply(elems, el.children);
-      });
-      elems = unique(elems);
-
-      return !selector ? elems : elems.filter(function (v) {
-        return matches(v, selector);
-      });
-    },
-
-    closest: function (selector) {
-      if (!selector || this.length < 1) {
-        return cash();
-      }
-      if (this.is(selector)) {
-        return this.filter(selector);
-      }
-      return this.parent().closest(selector);
-    },
-
-    is: function (selector) {
-      if (!selector) {
-        return false;
-      }
-
-      var match = false,
-          comparator = getCompareFunction(selector);
-
-      this.each(function (el) {
-        match = comparator(el, selector);
-        return !match;
-      });
-
-      return match;
-    },
-
-    find: function (selector) {
-      if (!selector || selector.nodeType) {
-        return cash(selector && this.has(selector).length ? selector : null);
-      }
-
-      var elems = [];
-      this.each(function (el) {
-        push.apply(elems, find(selector, el));
-      });
-
-      return unique(elems);
-    },
-
-    has: function (selector) {
-      var comparator = isString(selector) ? function (el) {
-        return find(selector, el).length !== 0;
-      } : function (el) {
-        return el.contains(selector);
-      };
-
-      return this.filter(comparator);
-    },
-
-    next: function () {
-      return cash(this[0].nextElementSibling);
-    },
-
-    not: function (selector) {
-      if (!selector) {
-        return this;
-      }
-
-      var comparator = getCompareFunction(selector);
-
-      return this.filter(function (el) {
-        return !comparator(el, selector);
-      });
-    },
-
-    parent: function () {
-      var result = [];
-
-      this.each(function (item) {
-        if (item && item.parentNode) {
-          result.push(item.parentNode);
-        }
-      });
-
-      return unique(result);
-    },
-
-    parents: function (selector) {
-      var last,
-          result = [];
-
-      this.each(function (item) {
-        last = item;
-
-        while (last && last.parentNode && last !== doc.body.parentNode) {
-          last = last.parentNode;
-
-          if (!selector || selector && matches(last, selector)) {
-            result.push(last);
-          }
-        }
-      });
-
-      return unique(result);
-    },
-
-    prev: function () {
-      return cash(this[0].previousElementSibling);
-    },
-
-    siblings: function (selector) {
-      var collection = this.parent().children(selector),
-          el = this[0];
-
-      return collection.filter(function (i) {
-        return i !== el;
-      });
-    }
-
-  });
-
-  return cash;
-});
-;
-var Component = function () {
-  /**
-   * Generic constructor for all components
-   * @constructor
-   * @param {Element} el
-   * @param {Object} options
-   */
-  function Component(classDef, el, options) {
-    _classCallCheck(this, Component);
-
-    // Display error if el is valid HTML Element
-    if (!(el instanceof Element)) {
-      console.error(Error(el + ' is not an HTML Element'));
-    }
-
-    // If exists, destroy and reinitialize in child
-    var ins = classDef.getInstance(el);
-    if (!!ins) {
-      ins.destroy();
-    }
-
-    this.el = el;
-    this.$el = cash(el);
-  }
-
-  /**
-   * Initializes components
-   * @param {class} classDef
-   * @param {Element | NodeList | jQuery} els
-   * @param {Object} options
-   */
-
-
-  _createClass(Component, null, [{
-    key: "init",
-    value: function init(classDef, els, options) {
-      var instances = null;
-      if (els instanceof Element) {
-        instances = new classDef(els, options);
-      } else if (!!els && (els.jquery || els.cash || els instanceof NodeList)) {
-        var instancesArr = [];
-        for (var i = 0; i < els.length; i++) {
-          instancesArr.push(new classDef(els[i], options));
-        }
-        instances = instancesArr;
-      }
-
-      return instances;
-    }
-  }]);
-
-  return Component;
-}();
-
-; // Required for Meteor package, the use of window prevents export by Meteor
-(function (window) {
-  if (window.Package) {
-    M = {};
-  } else {
-    window.M = {};
-  }
-
-  // Check for jQuery
-  M.jQueryLoaded = !!window.jQuery;
-})(window);
-
-// AMD
-if (typeof define === 'function' && define.amd) {
-  define('M', [], function () {
-    return M;
-  });
-
-  // Common JS
-} else if (typeof exports !== 'undefined' && !exports.nodeType) {
-  if (typeof module !== 'undefined' && !module.nodeType && module.exports) {
-    exports = module.exports = M;
-  }
-  exports.default = M;
-}
-
-M.version = '1.0.0';
-
-M.keys = {
-  TAB: 9,
-  ENTER: 13,
-  ESC: 27,
-  ARROW_UP: 38,
-  ARROW_DOWN: 40
-};
-
-/**
- * TabPress Keydown handler
- */
-M.tabPressed = false;
-M.keyDown = false;
-var docHandleKeydown = function (e) {
-  M.keyDown = true;
-  if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) {
-    M.tabPressed = true;
-  }
-};
-var docHandleKeyup = function (e) {
-  M.keyDown = false;
-  if (e.which === M.keys.TAB || e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) {
-    M.tabPressed = false;
-  }
-};
-var docHandleFocus = function (e) {
-  if (M.keyDown) {
-    document.body.classList.add('keyboard-focused');
-  }
-};
-var docHandleBlur = function (e) {
-  document.body.classList.remove('keyboard-focused');
-};
-document.addEventListener('keydown', docHandleKeydown, true);
-document.addEventListener('keyup', docHandleKeyup, true);
-document.addEventListener('focus', docHandleFocus, true);
-document.addEventListener('blur', docHandleBlur, true);
-
-/**
- * Initialize jQuery wrapper for plugin
- * @param {Class} plugin  javascript class
- * @param {string} pluginName  jQuery plugin name
- * @param {string} classRef  Class reference name
- */
-M.initializeJqueryWrapper = function (plugin, pluginName, classRef) {
-  jQuery.fn[pluginName] = function (methodOrOptions) {
-    // Call plugin method if valid method name is passed in
-    if (plugin.prototype[methodOrOptions]) {
-      var params = Array.prototype.slice.call(arguments, 1);
-
-      // Getter methods
-      if (methodOrOptions.slice(0, 3) === 'get') {
-        var instance = this.first()[0][classRef];
-        return instance[methodOrOptions].apply(instance, params);
-      }
-
-      // Void methods
-      return this.each(function () {
-        var instance = this[classRef];
-        instance[methodOrOptions].apply(instance, params);
-      });
-
-      // Initialize plugin if options or no argument is passed in
-    } else if (typeof methodOrOptions === 'object' || !methodOrOptions) {
-      plugin.init(this, arguments[0]);
-      return this;
-    }
-
-    // Return error if an unrecognized  method name is passed in
-    jQuery.error("Method " + methodOrOptions + " does not exist on jQuery." + pluginName);
-  };
-};
-
-/**
- * Automatically initialize components
- * @param {Element} context  DOM Element to search within for components
- */
-M.AutoInit = function (context) {
-  // Use document.body if no context is given
-  var root = !!context ? context : document.body;
-
-  var registry = {
-    Autocomplete: root.querySelectorAll('.autocomplete:not(.no-autoinit)'),
-    Carousel: root.querySelectorAll('.carousel:not(.no-autoinit)'),
-    Chips: root.querySelectorAll('.chips:not(.no-autoinit)'),
-    Collapsible: root.querySelectorAll('.collapsible:not(.no-autoinit)'),
-    Datepicker: root.querySelectorAll('.datepicker:not(.no-autoinit)'),
-    Dropdown: root.querySelectorAll('.dropdown-trigger:not(.no-autoinit)'),
-    Materialbox: root.querySelectorAll('.materialboxed:not(.no-autoinit)'),
-    Modal: root.querySelectorAll('.modal:not(.no-autoinit)'),
-    Parallax: root.querySelectorAll('.parallax:not(.no-autoinit)'),
-    Pushpin: root.querySelectorAll('.pushpin:not(.no-autoinit)'),
-    ScrollSpy: root.querySelectorAll('.scrollspy:not(.no-autoinit)'),
-    FormSelect: root.querySelectorAll('select:not(.no-autoinit)'),
-    Sidenav: root.querySelectorAll('.sidenav:not(.no-autoinit)'),
-    Tabs: root.querySelectorAll('.tabs:not(.no-autoinit)'),
-    TapTarget: root.querySelectorAll('.tap-target:not(.no-autoinit)'),
-    Timepicker: root.querySelectorAll('.timepicker:not(.no-autoinit)'),
-    Tooltip: root.querySelectorAll('.tooltipped:not(.no-autoinit)'),
-    FloatingActionButton: root.querySelectorAll('.fixed-action-btn:not(.no-autoinit)')
-  };
-
-  for (var pluginName in registry) {
-    var plugin = M[pluginName];
-    plugin.init(registry[pluginName]);
-  }
-};
-
-/**
- * Generate approximated selector string for a jQuery object
- * @param {jQuery} obj  jQuery object to be parsed
- * @returns {string}
- */
-M.objectSelectorString = function (obj) {
-  var tagStr = obj.prop('tagName') || '';
-  var idStr = obj.attr('id') || '';
-  var classStr = obj.attr('class') || '';
-  return (tagStr + idStr + classStr).replace(/\s/g, '');
-};
-
-// Unique Random ID
-M.guid = function () {
-  function s4() {
-    return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
-  }
-  return function () {
-    return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
-  };
-}();
-
-/**
- * Escapes hash from special characters
- * @param {string} hash  String returned from this.hash
- * @returns {string}
- */
-M.escapeHash = function (hash) {
-  return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, '\\$1');
-};
-
-M.elementOrParentIsFixed = function (element) {
-  var $element = $(element);
-  var $checkElements = $element.add($element.parents());
-  var isFixed = false;
-  $checkElements.each(function () {
-    if ($(this).css('position') === 'fixed') {
-      isFixed = true;
-      return false;
-    }
-  });
-  return isFixed;
-};
-
-/**
- * @typedef {Object} Edges
- * @property {Boolean} top  If the top edge was exceeded
- * @property {Boolean} right  If the right edge was exceeded
- * @property {Boolean} bottom  If the bottom edge was exceeded
- * @property {Boolean} left  If the left edge was exceeded
- */
-
-/**
- * @typedef {Object} Bounding
- * @property {Number} left  left offset coordinate
- * @property {Number} top  top offset coordinate
- * @property {Number} width
- * @property {Number} height
- */
-
-/**
- * Escapes hash from special characters
- * @param {Element} container  Container element that acts as the boundary
- * @param {Bounding} bounding  element bounding that is being checked
- * @param {Number} offset  offset from edge that counts as exceeding
- * @returns {Edges}
- */
-M.checkWithinContainer = function (container, bounding, offset) {
-  var edges = {
-    top: false,
-    right: false,
-    bottom: false,
-    left: false
-  };
-
-  var containerRect = container.getBoundingClientRect();
-  // If body element is smaller than viewport, use viewport height instead.
-  var containerBottom = container === document.body ? Math.max(containerRect.bottom, window.innerHeight) : containerRect.bottom;
-
-  var scrollLeft = container.scrollLeft;
-  var scrollTop = container.scrollTop;
-
-  var scrolledX = bounding.left - scrollLeft;
-  var scrolledY = bounding.top - scrollTop;
-
-  // Check for container and viewport for each edge
-  if (scrolledX < containerRect.left + offset || scrolledX < offset) {
-    edges.left = true;
-  }
-
-  if (scrolledX + bounding.width > containerRect.right - offset || scrolledX + bounding.width > window.innerWidth - offset) {
-    edges.right = true;
-  }
-
-  if (scrolledY < containerRect.top + offset || scrolledY < offset) {
-    edges.top = true;
-  }
-
-  if (scrolledY + bounding.height > containerBottom - offset || scrolledY + bounding.height > window.innerHeight - offset) {
-    edges.bottom = true;
-  }
-
-  return edges;
-};
-
-M.checkPossibleAlignments = function (el, container, bounding, offset) {
-  var canAlign = {
-    top: true,
-    right: true,
-    bottom: true,
-    left: true,
-    spaceOnTop: null,
-    spaceOnRight: null,
-    spaceOnBottom: null,
-    spaceOnLeft: null
-  };
-
-  var containerAllowsOverflow = getComputedStyle(container).overflow === 'visible';
-  var containerRect = container.getBoundingClientRect();
-  var containerHeight = Math.min(containerRect.height, window.innerHeight);
-  var containerWidth = Math.min(containerRect.width, window.innerWidth);
-  var elOffsetRect = el.getBoundingClientRect();
-
-  var scrollLeft = container.scrollLeft;
-  var scrollTop = container.scrollTop;
-
-  var scrolledX = bounding.left - scrollLeft;
-  var scrolledYTopEdge = bounding.top - scrollTop;
-  var scrolledYBottomEdge = bounding.top + elOffsetRect.height - scrollTop;
-
-  // Check for container and viewport for left
-  canAlign.spaceOnRight = !containerAllowsOverflow ? containerWidth - (scrolledX + bounding.width) : window.innerWidth - (elOffsetRect.left + bounding.width);
-  if (canAlign.spaceOnRight < 0) {
-    canAlign.left = false;
-  }
-
-  // Check for container and viewport for Right
-  canAlign.spaceOnLeft = !containerAllowsOverflow ? scrolledX - bounding.width + elOffsetRect.width : elOffsetRect.right - bounding.width;
-  if (canAlign.spaceOnLeft < 0) {
-    canAlign.right = false;
-  }
-
-  // Check for container and viewport for Top
-  canAlign.spaceOnBottom = !containerAllowsOverflow ? containerHeight - (scrolledYTopEdge + bounding.height + offset) : window.innerHeight - (elOffsetRect.top + bounding.height + offset);
-  if (canAlign.spaceOnBottom < 0) {
-    canAlign.top = false;
-  }
-
-  // Check for container and viewport for Bottom
-  canAlign.spaceOnTop = !containerAllowsOverflow ? scrolledYBottomEdge - (bounding.height - offset) : elOffsetRect.bottom - (bounding.height + offset);
-  if (canAlign.spaceOnTop < 0) {
-    canAlign.bottom = false;
-  }
-
-  return canAlign;
-};
-
-M.getOverflowParent = function (element) {
-  if (element == null) {
-    return null;
-  }
-
-  if (element === document.body || getComputedStyle(element).overflow !== 'visible') {
-    return element;
-  }
-
-  return M.getOverflowParent(element.parentElement);
-};
-
-/**
- * Gets id of component from a trigger
- * @param {Element} trigger  trigger
- * @returns {string}
- */
-M.getIdFromTrigger = function (trigger) {
-  var id = trigger.getAttribute('data-target');
-  if (!id) {
-    id = trigger.getAttribute('href');
-    if (id) {
-      id = id.slice(1);
-    } else {
-      id = '';
-    }
-  }
-  return id;
-};
-
-/**
- * Multi browser support for document scroll top
- * @returns {Number}
- */
-M.getDocumentScrollTop = function () {
-  return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
-};
-
-/**
- * Multi browser support for document scroll left
- * @returns {Number}
- */
-M.getDocumentScrollLeft = function () {
-  return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
-};
-
-/**
- * @typedef {Object} Edges
- * @property {Boolean} top  If the top edge was exceeded
- * @property {Boolean} right  If the right edge was exceeded
- * @property {Boolean} bottom  If the bottom edge was exceeded
- * @property {Boolean} left  If the left edge was exceeded
- */
-
-/**
- * @typedef {Object} Bounding
- * @property {Number} left  left offset coordinate
- * @property {Number} top  top offset coordinate
- * @property {Number} width
- * @property {Number} height
- */
-
-/**
- * Get time in ms
- * @license https://raw.github.com/jashkenas/underscore/master/LICENSE
- * @type {function}
- * @return {number}
- */
-var getTime = Date.now || function () {
-  return new Date().getTime();
-};
-
-/**
- * Returns a function, that, when invoked, will only be triggered at most once
- * during a given window of time. Normally, the throttled function will run
- * as much as it can, without ever going more than once per `wait` duration;
- * but if you'd like to disable the execution on the leading edge, pass
- * `{leading: false}`. To disable execution on the trailing edge, ditto.
- * @license https://raw.github.com/jashkenas/underscore/master/LICENSE
- * @param {function} func
- * @param {number} wait
- * @param {Object=} options
- * @returns {Function}
- */
-M.throttle = function (func, wait, options) {
-  var context = void 0,
-      args = void 0,
-      result = void 0;
-  var timeout = null;
-  var previous = 0;
-  options || (options = {});
-  var later = function () {
-    previous = options.leading === false ? 0 : getTime();
-    timeout = null;
-    result = func.apply(context, args);
-    context = args = null;
-  };
-  return function () {
-    var now = getTime();
-    if (!previous && options.leading === false) previous = now;
-    var remaining = wait - (now - previous);
-    context = this;
-    args = arguments;
-    if (remaining <= 0) {
-      clearTimeout(timeout);
-      timeout = null;
-      previous = now;
-      result = func.apply(context, args);
-      context = args = null;
-    } else if (!timeout && options.trailing !== false) {
-      timeout = setTimeout(later, remaining);
-    }
-    return result;
-  };
-};
-; /*
-  v2.2.0
-  2017 Julian Garnier
-  Released under the MIT license
-  */
-var $jscomp = { scope: {} };$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (e, r, p) {
-  if (p.get || p.set) throw new TypeError("ES3 does not support getters and setters.");e != Array.prototype && e != Object.prototype && (e[r] = p.value);
-};$jscomp.getGlobal = function (e) {
-  return "undefined" != typeof window && window === e ? e : "undefined" != typeof global && null != global ? global : e;
-};$jscomp.global = $jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX = "jscomp_symbol_";
-$jscomp.initSymbol = function () {
-  $jscomp.initSymbol = function () {};$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol);
-};$jscomp.symbolCounter_ = 0;$jscomp.Symbol = function (e) {
-  return $jscomp.SYMBOL_PREFIX + (e || "") + $jscomp.symbolCounter_++;
-};
-$jscomp.initSymbolIterator = function () {
-  $jscomp.initSymbol();var e = $jscomp.global.Symbol.iterator;e || (e = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator"));"function" != typeof Array.prototype[e] && $jscomp.defineProperty(Array.prototype, e, { configurable: !0, writable: !0, value: function () {
-      return $jscomp.arrayIterator(this);
-    } });$jscomp.initSymbolIterator = function () {};
-};$jscomp.arrayIterator = function (e) {
-  var r = 0;return $jscomp.iteratorPrototype(function () {
-    return r < e.length ? { done: !1, value: e[r++] } : { done: !0 };
-  });
-};
-$jscomp.iteratorPrototype = function (e) {
-  $jscomp.initSymbolIterator();e = { next: e };e[$jscomp.global.Symbol.iterator] = function () {
-    return this;
-  };return e;
-};$jscomp.array = $jscomp.array || {};$jscomp.iteratorFromArray = function (e, r) {
-  $jscomp.initSymbolIterator();e instanceof String && (e += "");var p = 0,
-      m = { next: function () {
-      if (p < e.length) {
-        var u = p++;return { value: r(u, e[u]), done: !1 };
-      }m.next = function () {
-        return { done: !0, value: void 0 };
-      };return m.next();
-    } };m[Symbol.iterator] = function () {
-    return m;
-  };return m;
-};
-$jscomp.polyfill = function (e, r, p, m) {
-  if (r) {
-    p = $jscomp.global;e = e.split(".");for (m = 0; m < e.length - 1; m++) {
-      var u = e[m];u in p || (p[u] = {});p = p[u];
-    }e = e[e.length - 1];m = p[e];r = r(m);r != m && null != r && $jscomp.defineProperty(p, e, { configurable: !0, writable: !0, value: r });
-  }
-};$jscomp.polyfill("Array.prototype.keys", function (e) {
-  return e ? e : function () {
-    return $jscomp.iteratorFromArray(this, function (e) {
-      return e;
-    });
-  };
-}, "es6-impl", "es3");var $jscomp$this = this;
-(function (r) {
-  M.anime = r();
-})(function () {
-  function e(a) {
-    if (!h.col(a)) try {
-      return document.querySelectorAll(a);
-    } catch (c) {}
-  }function r(a, c) {
-    for (var d = a.length, b = 2 <= arguments.length ? arguments[1] : void 0, f = [], n = 0; n < d; n++) {
-      if (n in a) {
-        var k = a[n];c.call(b, k, n, a) && f.push(k);
-      }
-    }return f;
-  }function p(a) {
-    return a.reduce(function (a, d) {
-      return a.concat(h.arr(d) ? p(d) : d);
-    }, []);
-  }function m(a) {
-    if (h.arr(a)) return a;
-    h.str(a) && (a = e(a) || a);return a instanceof NodeList || a instanceof HTMLCollection ? [].slice.call(a) : [a];
-  }function u(a, c) {
-    return a.some(function (a) {
-      return a === c;
-    });
-  }function C(a) {
-    var c = {},
-        d;for (d in a) {
-      c[d] = a[d];
-    }return c;
-  }function D(a, c) {
-    var d = C(a),
-        b;for (b in a) {
-      d[b] = c.hasOwnProperty(b) ? c[b] : a[b];
-    }return d;
-  }function z(a, c) {
-    var d = C(a),
-        b;for (b in c) {
-      d[b] = h.und(a[b]) ? c[b] : a[b];
-    }return d;
-  }function T(a) {
-    a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, c, d, k) {
-      return c + c + d + d + k + k;
-    });var c = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
-    a = parseInt(c[1], 16);var d = parseInt(c[2], 16),
-        c = parseInt(c[3], 16);return "rgba(" + a + "," + d + "," + c + ",1)";
-  }function U(a) {
-    function c(a, c, b) {
-      0 > b && (b += 1);1 < b && --b;return b < 1 / 6 ? a + 6 * (c - a) * b : .5 > b ? c : b < 2 / 3 ? a + (c - a) * (2 / 3 - b) * 6 : a;
-    }var d = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a = parseInt(d[1]) / 360;var b = parseInt(d[2]) / 100,
-        f = parseInt(d[3]) / 100,
-        d = d[4] || 1;if (0 == b) f = b = a = f;else {
-      var n = .5 > f ? f * (1 + b) : f + b - f * b,
-          k = 2 * f - n,
-          f = c(k, n, a + 1 / 3),
-          b = c(k, n, a);a = c(k, n, a - 1 / 3);
-    }return "rgba(" + 255 * f + "," + 255 * b + "," + 255 * a + "," + d + ")";
-  }function y(a) {
-    if (a = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a)) return a[2];
-  }function V(a) {
-    if (-1 < a.indexOf("translate") || "perspective" === a) return "px";if (-1 < a.indexOf("rotate") || -1 < a.indexOf("skew")) return "deg";
-  }function I(a, c) {
-    return h.fnc(a) ? a(c.target, c.id, c.total) : a;
-  }function E(a, c) {
-    if (c in a.style) return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0";
-  }function J(a, c) {
-    if (h.dom(a) && u(W, c)) return "transform";if (h.dom(a) && (a.getAttribute(c) || h.svg(a) && a[c])) return "attribute";if (h.dom(a) && "transform" !== c && E(a, c)) return "css";if (null != a[c]) return "object";
-  }function X(a, c) {
-    var d = V(c),
-        d = -1 < c.indexOf("scale") ? 1 : 0 + d;a = a.style.transform;if (!a) return d;for (var b = [], f = [], n = [], k = /(\w+)\((.+?)\)/g; b = k.exec(a);) {
-      f.push(b[1]), n.push(b[2]);
-    }a = r(n, function (a, b) {
-      return f[b] === c;
-    });return a.length ? a[0] : d;
-  }function K(a, c) {
-    switch (J(a, c)) {case "transform":
-        return X(a, c);case "css":
-        return E(a, c);case "attribute":
-        return a.getAttribute(c);}return a[c] || 0;
-  }function L(a, c) {
-    var d = /^(\*=|\+=|-=)/.exec(a);if (!d) return a;var b = y(a) || 0;c = parseFloat(c);a = parseFloat(a.replace(d[0], ""));switch (d[0][0]) {case "+":
-        return c + a + b;case "-":
-        return c - a + b;case "*":
-        return c * a + b;}
-  }function F(a, c) {
-    return Math.sqrt(Math.pow(c.x - a.x, 2) + Math.pow(c.y - a.y, 2));
-  }function M(a) {
-    a = a.points;for (var c = 0, d, b = 0; b < a.numberOfItems; b++) {
-      var f = a.getItem(b);0 < b && (c += F(d, f));d = f;
-    }return c;
-  }function N(a) {
-    if (a.getTotalLength) return a.getTotalLength();switch (a.tagName.toLowerCase()) {case "circle":
-        return 2 * Math.PI * a.getAttribute("r");case "rect":
-        return 2 * a.getAttribute("width") + 2 * a.getAttribute("height");case "line":
-        return F({ x: a.getAttribute("x1"), y: a.getAttribute("y1") }, { x: a.getAttribute("x2"), y: a.getAttribute("y2") });case "polyline":
-        return M(a);case "polygon":
-        var c = a.points;return M(a) + F(c.getItem(c.numberOfItems - 1), c.getItem(0));}
-  }function Y(a, c) {
-    function d(b) {
-      b = void 0 === b ? 0 : b;return a.el.getPointAtLength(1 <= c + b ? c + b : 0);
-    }var b = d(),
-        f = d(-1),
-        n = d(1);switch (a.property) {case "x":
-        return b.x;case "y":
-        return b.y;
-      case "angle":
-        return 180 * Math.atan2(n.y - f.y, n.x - f.x) / Math.PI;}
-  }function O(a, c) {
-    var d = /-?\d*\.?\d+/g,
-        b;b = h.pth(a) ? a.totalLength : a;if (h.col(b)) {
-      if (h.rgb(b)) {
-        var f = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b = f ? "rgba(" + f[1] + ",1)" : b;
-      } else b = h.hex(b) ? T(b) : h.hsl(b) ? U(b) : void 0;
-    } else f = (f = y(b)) ? b.substr(0, b.length - f.length) : b, b = c && !/\s/g.test(b) ? f + c : f;b += "";return { original: b, numbers: b.match(d) ? b.match(d).map(Number) : [0], strings: h.str(a) || c ? b.split(d) : [] };
-  }function P(a) {
-    a = a ? p(h.arr(a) ? a.map(m) : m(a)) : [];return r(a, function (a, d, b) {
-      return b.indexOf(a) === d;
-    });
-  }function Z(a) {
-    var c = P(a);return c.map(function (a, b) {
-      return { target: a, id: b, total: c.length };
-    });
-  }function aa(a, c) {
-    var d = C(c);if (h.arr(a)) {
-      var b = a.length;2 !== b || h.obj(a[0]) ? h.fnc(c.duration) || (d.duration = c.duration / b) : a = { value: a };
-    }return m(a).map(function (a, b) {
-      b = b ? 0 : c.delay;a = h.obj(a) && !h.pth(a) ? a : { value: a };h.und(a.delay) && (a.delay = b);return a;
-    }).map(function (a) {
-      return z(a, d);
-    });
-  }function ba(a, c) {
-    var d = {},
-        b;for (b in a) {
-      var f = I(a[b], c);h.arr(f) && (f = f.map(function (a) {
-        return I(a, c);
-      }), 1 === f.length && (f = f[0]));d[b] = f;
-    }d.duration = parseFloat(d.duration);d.delay = parseFloat(d.delay);return d;
-  }function ca(a) {
-    return h.arr(a) ? A.apply(this, a) : Q[a];
-  }function da(a, c) {
-    var d;return a.tweens.map(function (b) {
-      b = ba(b, c);var f = b.value,
-          e = K(c.target, a.name),
-          k = d ? d.to.original : e,
-          k = h.arr(f) ? f[0] : k,
-          w = L(h.arr(f) ? f[1] : f, k),
-          e = y(w) || y(k) || y(e);b.from = O(k, e);b.to = O(w, e);b.start = d ? d.end : a.offset;b.end = b.start + b.delay + b.duration;b.easing = ca(b.easing);b.elasticity = (1E3 - Math.min(Math.max(b.elasticity, 1), 999)) / 1E3;b.isPath = h.pth(f);b.isColor = h.col(b.from.original);b.isColor && (b.round = 1);return d = b;
-    });
-  }function ea(a, c) {
-    return r(p(a.map(function (a) {
-      return c.map(function (b) {
-        var c = J(a.target, b.name);if (c) {
-          var d = da(b, a);b = { type: c, property: b.name, animatable: a, tweens: d, duration: d[d.length - 1].end, delay: d[0].delay };
-        } else b = void 0;return b;
-      });
-    })), function (a) {
-      return !h.und(a);
-    });
-  }function R(a, c, d, b) {
-    var f = "delay" === a;return c.length ? (f ? Math.min : Math.max).apply(Math, c.map(function (b) {
-      return b[a];
-    })) : f ? b.delay : d.offset + b.delay + b.duration;
-  }function fa(a) {
-    var c = D(ga, a),
-        d = D(S, a),
-        b = Z(a.targets),
-        f = [],
-        e = z(c, d),
-        k;for (k in a) {
-      e.hasOwnProperty(k) || "targets" === k || f.push({ name: k, offset: e.offset, tweens: aa(a[k], d) });
-    }a = ea(b, f);return z(c, { children: [], animatables: b, animations: a, duration: R("duration", a, c, d), delay: R("delay", a, c, d) });
-  }function q(a) {
-    function c() {
-      return window.Promise && new Promise(function (a) {
-        return p = a;
-      });
-    }function d(a) {
-      return g.reversed ? g.duration - a : a;
-    }function b(a) {
-      for (var b = 0, c = {}, d = g.animations, f = d.length; b < f;) {
-        var e = d[b],
-            k = e.animatable,
-            h = e.tweens,
-            n = h.length - 1,
-            l = h[n];n && (l = r(h, function (b) {
-          return a < b.end;
-        })[0] || l);for (var h = Math.min(Math.max(a - l.start - l.delay, 0), l.duration) / l.duration, w = isNaN(h) ? 1 : l.easing(h, l.elasticity), h = l.to.strings, p = l.round, n = [], m = void 0, m = l.to.numbers.length, t = 0; t < m; t++) {
-          var x = void 0,
-              x = l.to.numbers[t],
-              q = l.from.numbers[t],
-              x = l.isPath ? Y(l.value, w * x) : q + w * (x - q);p && (l.isColor && 2 < t || (x = Math.round(x * p) / p));n.push(x);
-        }if (l = h.length) for (m = h[0], w = 0; w < l; w++) {
-          p = h[w + 1], t = n[w], isNaN(t) || (m = p ? m + (t + p) : m + (t + " "));
-        } else m = n[0];ha[e.type](k.target, e.property, m, c, k.id);e.currentValue = m;b++;
-      }if (b = Object.keys(c).length) for (d = 0; d < b; d++) {
-        H || (H = E(document.body, "transform") ? "transform" : "-webkit-transform"), g.animatables[d].target.style[H] = c[d].join(" ");
-      }g.currentTime = a;g.progress = a / g.duration * 100;
-    }function f(a) {
-      if (g[a]) g[a](g);
-    }function e() {
-      g.remaining && !0 !== g.remaining && g.remaining--;
-    }function k(a) {
-      var k = g.duration,
-          n = g.offset,
-          w = n + g.delay,
-          r = g.currentTime,
-          x = g.reversed,
-          q = d(a);if (g.children.length) {
-        var u = g.children,
-            v = u.length;
-        if (q >= g.currentTime) for (var G = 0; G < v; G++) {
-          u[G].seek(q);
-        } else for (; v--;) {
-          u[v].seek(q);
-        }
-      }if (q >= w || !k) g.began || (g.began = !0, f("begin")), f("run");if (q > n && q < k) b(q);else if (q <= n && 0 !== r && (b(0), x && e()), q >= k && r !== k || !k) b(k), x || e();f("update");a >= k && (g.remaining ? (t = h, "alternate" === g.direction && (g.reversed = !g.reversed)) : (g.pause(), g.completed || (g.completed = !0, f("complete"), "Promise" in window && (p(), m = c()))), l = 0);
-    }a = void 0 === a ? {} : a;var h,
-        t,
-        l = 0,
-        p = null,
-        m = c(),
-        g = fa(a);g.reset = function () {
-      var a = g.direction,
-          c = g.loop;g.currentTime = 0;g.progress = 0;g.paused = !0;g.began = !1;g.completed = !1;g.reversed = "reverse" === a;g.remaining = "alternate" === a && 1 === c ? 2 : c;b(0);for (a = g.children.length; a--;) {
-        g.children[a].reset();
-      }
-    };g.tick = function (a) {
-      h = a;t || (t = h);k((l + h - t) * q.speed);
-    };g.seek = function (a) {
-      k(d(a));
-    };g.pause = function () {
-      var a = v.indexOf(g);-1 < a && v.splice(a, 1);g.paused = !0;
-    };g.play = function () {
-      g.paused && (g.paused = !1, t = 0, l = d(g.currentTime), v.push(g), B || ia());
-    };g.reverse = function () {
-      g.reversed = !g.reversed;t = 0;l = d(g.currentTime);
-    };g.restart = function () {
-      g.pause();
-      g.reset();g.play();
-    };g.finished = m;g.reset();g.autoplay && g.play();return g;
-  }var ga = { update: void 0, begin: void 0, run: void 0, complete: void 0, loop: 1, direction: "normal", autoplay: !0, offset: 0 },
-      S = { duration: 1E3, delay: 0, easing: "easeOutElastic", elasticity: 500, round: 0 },
-      W = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
-      H,
-      h = { arr: function (a) {
-      return Array.isArray(a);
-    }, obj: function (a) {
-      return -1 < Object.prototype.toString.call(a).indexOf("Object");
-    },
-    pth: function (a) {
-      return h.obj(a) && a.hasOwnProperty("totalLength");
-    }, svg: function (a) {
-      return a instanceof SVGElement;
-    }, dom: function (a) {
-      return a.nodeType || h.svg(a);
-    }, str: function (a) {
-      return "string" === typeof a;
-    }, fnc: function (a) {
-      return "function" === typeof a;
-    }, und: function (a) {
-      return "undefined" === typeof a;
-    }, hex: function (a) {
-      return (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)
-      );
-    }, rgb: function (a) {
-      return (/^rgb/.test(a)
-      );
-    }, hsl: function (a) {
-      return (/^hsl/.test(a)
-      );
-    }, col: function (a) {
-      return h.hex(a) || h.rgb(a) || h.hsl(a);
-    } },
-      A = function () {
-    function a(a, d, b) {
-      return (((1 - 3 * b + 3 * d) * a + (3 * b - 6 * d)) * a + 3 * d) * a;
-    }return function (c, d, b, f) {
-      if (0 <= c && 1 >= c && 0 <= b && 1 >= b) {
-        var e = new Float32Array(11);if (c !== d || b !== f) for (var k = 0; 11 > k; ++k) {
-          e[k] = a(.1 * k, c, b);
-        }return function (k) {
-          if (c === d && b === f) return k;if (0 === k) return 0;if (1 === k) return 1;for (var h = 0, l = 1; 10 !== l && e[l] <= k; ++l) {
-            h += .1;
-          }--l;var l = h + (k - e[l]) / (e[l + 1] - e[l]) * .1,
-              n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (.001 <= n) {
-            for (h = 0; 4 > h; ++h) {
-              n = 3 * (1 - 3 * b + 3 * c) * l * l + 2 * (3 * b - 6 * c) * l + 3 * c;if (0 === n) break;var m = a(l, c, b) - k,
-                  l = l - m / n;
-            }k = l;
-          } else if (0 === n) k = l;else {
-            var l = h,
-                h = h + .1,
-                g = 0;do {
-              m = l + (h - l) / 2, n = a(m, c, b) - k, 0 < n ? h = m : l = m;
-            } while (1e-7 < Math.abs(n) && 10 > ++g);k = m;
-          }return a(k, d, f);
-        };
-      }
-    };
-  }(),
-      Q = function () {
-    function a(a, b) {
-      return 0 === a || 1 === a ? a : -Math.pow(2, 10 * (a - 1)) * Math.sin(2 * (a - 1 - b / (2 * Math.PI) * Math.asin(1)) * Math.PI / b);
-    }var c = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
-        d = { In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], a], Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function (b, c) {
-        return 1 - a(1 - b, c);
-      }], InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function (b, c) {
-        return .5 > b ? a(2 * b, c) / 2 : 1 - a(-2 * b + 2, c) / 2;
-      }] },
-        b = { linear: A(.25, .25, .75, .75) },
-        f = {},
-        e;for (e in d) {
-      f.type = e, d[f.type].forEach(function (a) {
-        return function (d, f) {
-          b["ease" + a.type + c[f]] = h.fnc(d) ? d : A.apply($jscomp$this, d);
-        };
-      }(f)), f = { type: f.type };
-    }return b;
-  }(),
-      ha = { css: function (a, c, d) {
-      return a.style[c] = d;
-    }, attribute: function (a, c, d) {
-      return a.setAttribute(c, d);
-    }, object: function (a, c, d) {
-      return a[c] = d;
-    }, transform: function (a, c, d, b, f) {
-      b[f] || (b[f] = []);b[f].push(c + "(" + d + ")");
-    } },
-      v = [],
-      B = 0,
-      ia = function () {
-    function a() {
-      B = requestAnimationFrame(c);
-    }function c(c) {
-      var b = v.length;if (b) {
-        for (var d = 0; d < b;) {
-          v[d] && v[d].tick(c), d++;
-        }a();
-      } else cancelAnimationFrame(B), B = 0;
-    }return a;
-  }();q.version = "2.2.0";q.speed = 1;q.running = v;q.remove = function (a) {
-    a = P(a);for (var c = v.length; c--;) {
-      for (var d = v[c], b = d.animations, f = b.length; f--;) {
-        u(a, b[f].animatable.target) && (b.splice(f, 1), b.length || d.pause());
-      }
-    }
-  };q.getValue = K;q.path = function (a, c) {
-    var d = h.str(a) ? e(a)[0] : a,
-        b = c || 100;return function (a) {
-      return { el: d, property: a, totalLength: N(d) * (b / 100) };
-    };
-  };q.setDashoffset = function (a) {
-    var c = N(a);a.setAttribute("stroke-dasharray", c);return c;
-  };q.bezier = A;q.easings = Q;q.timeline = function (a) {
-    var c = q(a);c.pause();c.duration = 0;c.add = function (d) {
-      c.children.forEach(function (a) {
-        a.began = !0;a.completed = !0;
-      });m(d).forEach(function (b) {
-        var d = z(b, D(S, a || {}));d.targets = d.targets || a.targets;b = c.duration;var e = d.offset;d.autoplay = !1;d.direction = c.direction;d.offset = h.und(e) ? b : L(e, b);c.began = !0;c.completed = !0;c.seek(d.offset);d = q(d);d.began = !0;d.completed = !0;d.duration > b && (c.duration = d.duration);c.children.push(d);
-      });c.seek(0);c.reset();c.autoplay && c.restart();return c;
-    };return c;
-  };q.random = function (a, c) {
-    return Math.floor(Math.random() * (c - a + 1)) + a;
-  };return q;
-});
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    accordion: true,
-    onOpenStart: undefined,
-    onOpenEnd: undefined,
-    onCloseStart: undefined,
-    onCloseEnd: undefined,
-    inDuration: 300,
-    outDuration: 300
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Collapsible = function (_Component) {
-    _inherits(Collapsible, _Component);
-
-    /**
-     * Construct Collapsible instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Collapsible(el, options) {
-      _classCallCheck(this, Collapsible);
-
-      var _this3 = _possibleConstructorReturn(this, (Collapsible.__proto__ || Object.getPrototypeOf(Collapsible)).call(this, Collapsible, el, options));
-
-      _this3.el.M_Collapsible = _this3;
-
-      /**
-       * Options for the collapsible
-       * @member Collapsible#options
-       * @prop {Boolean} [accordion=false] - Type of the collapsible
-       * @prop {Function} onOpenStart - Callback function called before collapsible is opened
-       * @prop {Function} onOpenEnd - Callback function called after collapsible is opened
-       * @prop {Function} onCloseStart - Callback function called before collapsible is closed
-       * @prop {Function} onCloseEnd - Callback function called after collapsible is closed
-       * @prop {Number} inDuration - Transition in duration in milliseconds.
-       * @prop {Number} outDuration - Transition duration in milliseconds.
-       */
-      _this3.options = $.extend({}, Collapsible.defaults, options);
-
-      // Setup tab indices
-      _this3.$headers = _this3.$el.children('li').children('.collapsible-header');
-      _this3.$headers.attr('tabindex', 0);
-
-      _this3._setupEventHandlers();
-
-      // Open first active
-      var $activeBodies = _this3.$el.children('li.active').children('.collapsible-body');
-      if (_this3.options.accordion) {
-        // Handle Accordion
-        $activeBodies.first().css('display', 'block');
-      } else {
-        // Handle Expandables
-        $activeBodies.css('display', 'block');
-      }
-      return _this3;
-    }
-
-    _createClass(Collapsible, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.el.M_Collapsible = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        var _this4 = this;
-
-        this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this);
-        this._handleCollapsibleKeydownBound = this._handleCollapsibleKeydown.bind(this);
-        this.el.addEventListener('click', this._handleCollapsibleClickBound);
-        this.$headers.each(function (header) {
-          header.addEventListener('keydown', _this4._handleCollapsibleKeydownBound);
-        });
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        var _this5 = this;
-
-        this.el.removeEventListener('click', this._handleCollapsibleClickBound);
-        this.$headers.each(function (header) {
-          header.removeEventListener('keydown', _this5._handleCollapsibleKeydownBound);
-        });
-      }
-
-      /**
-       * Handle Collapsible Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCollapsibleClick",
-      value: function _handleCollapsibleClick(e) {
-        var $header = $(e.target).closest('.collapsible-header');
-        if (e.target && $header.length) {
-          var $collapsible = $header.closest('.collapsible');
-          if ($collapsible[0] === this.el) {
-            var $collapsibleLi = $header.closest('li');
-            var $collapsibleLis = $collapsible.children('li');
-            var isActive = $collapsibleLi[0].classList.contains('active');
-            var index = $collapsibleLis.index($collapsibleLi);
-
-            if (isActive) {
-              this.close(index);
-            } else {
-              this.open(index);
-            }
-          }
-        }
-      }
-
-      /**
-       * Handle Collapsible Keydown
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCollapsibleKeydown",
-      value: function _handleCollapsibleKeydown(e) {
-        if (e.keyCode === 13) {
-          this._handleCollapsibleClickBound(e);
-        }
-      }
-
-      /**
-       * Animate in collapsible slide
-       * @param {Number} index - 0th index of slide
-       */
-
-    }, {
-      key: "_animateIn",
-      value: function _animateIn(index) {
-        var _this6 = this;
-
-        var $collapsibleLi = this.$el.children('li').eq(index);
-        if ($collapsibleLi.length) {
-          var $body = $collapsibleLi.children('.collapsible-body');
-
-          anim.remove($body[0]);
-          $body.css({
-            display: 'block',
-            overflow: 'hidden',
-            height: 0,
-            paddingTop: '',
-            paddingBottom: ''
-          });
-
-          var pTop = $body.css('padding-top');
-          var pBottom = $body.css('padding-bottom');
-          var finalHeight = $body[0].scrollHeight;
-          $body.css({
-            paddingTop: 0,
-            paddingBottom: 0
-          });
-
-          anim({
-            targets: $body[0],
-            height: finalHeight,
-            paddingTop: pTop,
-            paddingBottom: pBottom,
-            duration: this.options.inDuration,
-            easing: 'easeInOutCubic',
-            complete: function (anim) {
-              $body.css({
-                overflow: '',
-                paddingTop: '',
-                paddingBottom: '',
-                height: ''
-              });
-
-              // onOpenEnd callback
-              if (typeof _this6.options.onOpenEnd === 'function') {
-                _this6.options.onOpenEnd.call(_this6, $collapsibleLi[0]);
-              }
-            }
-          });
-        }
-      }
-
-      /**
-       * Animate out collapsible slide
-       * @param {Number} index - 0th index of slide to open
-       */
-
-    }, {
-      key: "_animateOut",
-      value: function _animateOut(index) {
-        var _this7 = this;
-
-        var $collapsibleLi = this.$el.children('li').eq(index);
-        if ($collapsibleLi.length) {
-          var $body = $collapsibleLi.children('.collapsible-body');
-          anim.remove($body[0]);
-          $body.css('overflow', 'hidden');
-          anim({
-            targets: $body[0],
-            height: 0,
-            paddingTop: 0,
-            paddingBottom: 0,
-            duration: this.options.outDuration,
-            easing: 'easeInOutCubic',
-            complete: function () {
-              $body.css({
-                height: '',
-                overflow: '',
-                padding: '',
-                display: ''
-              });
-
-              // onCloseEnd callback
-              if (typeof _this7.options.onCloseEnd === 'function') {
-                _this7.options.onCloseEnd.call(_this7, $collapsibleLi[0]);
-              }
-            }
-          });
-        }
-      }
-
-      /**
-       * Open Collapsible
-       * @param {Number} index - 0th index of slide
-       */
-
-    }, {
-      key: "open",
-      value: function open(index) {
-        var _this8 = this;
-
-        var $collapsibleLi = this.$el.children('li').eq(index);
-        if ($collapsibleLi.length && !$collapsibleLi[0].classList.contains('active')) {
-          // onOpenStart callback
-          if (typeof this.options.onOpenStart === 'function') {
-            this.options.onOpenStart.call(this, $collapsibleLi[0]);
-          }
-
-          // Handle accordion behavior
-          if (this.options.accordion) {
-            var $collapsibleLis = this.$el.children('li');
-            var $activeLis = this.$el.children('li.active');
-            $activeLis.each(function (el) {
-              var index = $collapsibleLis.index($(el));
-              _this8.close(index);
-            });
-          }
-
-          // Animate in
-          $collapsibleLi[0].classList.add('active');
-          this._animateIn(index);
-        }
-      }
-
-      /**
-       * Close Collapsible
-       * @param {Number} index - 0th index of slide
-       */
-
-    }, {
-      key: "close",
-      value: function close(index) {
-        var $collapsibleLi = this.$el.children('li').eq(index);
-        if ($collapsibleLi.length && $collapsibleLi[0].classList.contains('active')) {
-          // onCloseStart callback
-          if (typeof this.options.onCloseStart === 'function') {
-            this.options.onCloseStart.call(this, $collapsibleLi[0]);
-          }
-
-          // Animate out
-          $collapsibleLi[0].classList.remove('active');
-          this._animateOut(index);
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Collapsible.__proto__ || Object.getPrototypeOf(Collapsible), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Collapsible;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Collapsible;
-  }(Component);
-
-  M.Collapsible = Collapsible;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Collapsible, 'collapsible', 'M_Collapsible');
-  }
-})(cash, M.anime);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    alignment: 'left',
-    autoFocus: true,
-    constrainWidth: true,
-    container: null,
-    coverTrigger: true,
-    closeOnClick: true,
-    hover: false,
-    inDuration: 150,
-    outDuration: 250,
-    onOpenStart: null,
-    onOpenEnd: null,
-    onCloseStart: null,
-    onCloseEnd: null,
-    onItemClick: null
-  };
-
-  /**
-   * @class
-   */
-
-  var Dropdown = function (_Component2) {
-    _inherits(Dropdown, _Component2);
-
-    function Dropdown(el, options) {
-      _classCallCheck(this, Dropdown);
-
-      var _this9 = _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call(this, Dropdown, el, options));
-
-      _this9.el.M_Dropdown = _this9;
-      Dropdown._dropdowns.push(_this9);
-
-      _this9.id = M.getIdFromTrigger(el);
-      _this9.dropdownEl = document.getElementById(_this9.id);
-      _this9.$dropdownEl = $(_this9.dropdownEl);
-
-      /**
-       * Options for the dropdown
-       * @member Dropdown#options
-       * @prop {String} [alignment='left'] - Edge which the dropdown is aligned to
-       * @prop {Boolean} [autoFocus=true] - Automatically focus dropdown el for keyboard
-       * @prop {Boolean} [constrainWidth=true] - Constrain width to width of the button
-       * @prop {Element} container - Container element to attach dropdown to (optional)
-       * @prop {Boolean} [coverTrigger=true] - Place dropdown over trigger
-       * @prop {Boolean} [closeOnClick=true] - Close on click of dropdown item
-       * @prop {Boolean} [hover=false] - Open dropdown on hover
-       * @prop {Number} [inDuration=150] - Duration of open animation in ms
-       * @prop {Number} [outDuration=250] - Duration of close animation in ms
-       * @prop {Function} onOpenStart - Function called when dropdown starts opening
-       * @prop {Function} onOpenEnd - Function called when dropdown finishes opening
-       * @prop {Function} onCloseStart - Function called when dropdown starts closing
-       * @prop {Function} onCloseEnd - Function called when dropdown finishes closing
-       */
-      _this9.options = $.extend({}, Dropdown.defaults, options);
-
-      /**
-       * Describes open/close state of dropdown
-       * @type {Boolean}
-       */
-      _this9.isOpen = false;
-
-      /**
-       * Describes if dropdown content is scrollable
-       * @type {Boolean}
-       */
-      _this9.isScrollable = false;
-
-      /**
-       * Describes if touch moving on dropdown content
-       * @type {Boolean}
-       */
-      _this9.isTouchMoving = false;
-
-      _this9.focusedIndex = -1;
-      _this9.filterQuery = [];
-
-      // Move dropdown-content after dropdown-trigger
-      if (!!_this9.options.container) {
-        $(_this9.options.container).append(_this9.dropdownEl);
-      } else {
-        _this9.$el.after(_this9.dropdownEl);
-      }
-
-      _this9._makeDropdownFocusable();
-      _this9._resetFilterQueryBound = _this9._resetFilterQuery.bind(_this9);
-      _this9._handleDocumentClickBound = _this9._handleDocumentClick.bind(_this9);
-      _this9._handleDocumentTouchmoveBound = _this9._handleDocumentTouchmove.bind(_this9);
-      _this9._handleDropdownClickBound = _this9._handleDropdownClick.bind(_this9);
-      _this9._handleDropdownKeydownBound = _this9._handleDropdownKeydown.bind(_this9);
-      _this9._handleTriggerKeydownBound = _this9._handleTriggerKeydown.bind(_this9);
-      _this9._setupEventHandlers();
-      return _this9;
-    }
-
-    _createClass(Dropdown, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._resetDropdownStyles();
-        this._removeEventHandlers();
-        Dropdown._dropdowns.splice(Dropdown._dropdowns.indexOf(this), 1);
-        this.el.M_Dropdown = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        // Trigger keydown handler
-        this.el.addEventListener('keydown', this._handleTriggerKeydownBound);
-
-        // Item click handler
-        this.dropdownEl.addEventListener('click', this._handleDropdownClickBound);
-
-        // Hover event handlers
-        if (this.options.hover) {
-          this._handleMouseEnterBound = this._handleMouseEnter.bind(this);
-          this.el.addEventListener('mouseenter', this._handleMouseEnterBound);
-          this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);
-          this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);
-          this.dropdownEl.addEventListener('mouseleave', this._handleMouseLeaveBound);
-
-          // Click event handlers
-        } else {
-          this._handleClickBound = this._handleClick.bind(this);
-          this.el.addEventListener('click', this._handleClickBound);
-        }
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('keydown', this._handleTriggerKeydownBound);
-        this.dropdownEl.removeEventListener('click', this._handleDropdownClickBound);
-
-        if (this.options.hover) {
-          this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);
-          this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);
-          this.dropdownEl.removeEventListener('mouseleave', this._handleMouseLeaveBound);
-        } else {
-          this.el.removeEventListener('click', this._handleClickBound);
-        }
-      }
-    }, {
-      key: "_setupTemporaryEventHandlers",
-      value: function _setupTemporaryEventHandlers() {
-        // Use capture phase event handler to prevent click
-        document.body.addEventListener('click', this._handleDocumentClickBound, true);
-        document.body.addEventListener('touchend', this._handleDocumentClickBound);
-        document.body.addEventListener('touchmove', this._handleDocumentTouchmoveBound);
-        this.dropdownEl.addEventListener('keydown', this._handleDropdownKeydownBound);
-      }
-    }, {
-      key: "_removeTemporaryEventHandlers",
-      value: function _removeTemporaryEventHandlers() {
-        // Use capture phase event handler to prevent click
-        document.body.removeEventListener('click', this._handleDocumentClickBound, true);
-        document.body.removeEventListener('touchend', this._handleDocumentClickBound);
-        document.body.removeEventListener('touchmove', this._handleDocumentTouchmoveBound);
-        this.dropdownEl.removeEventListener('keydown', this._handleDropdownKeydownBound);
-      }
-    }, {
-      key: "_handleClick",
-      value: function _handleClick(e) {
-        e.preventDefault();
-        this.open();
-      }
-    }, {
-      key: "_handleMouseEnter",
-      value: function _handleMouseEnter() {
-        this.open();
-      }
-    }, {
-      key: "_handleMouseLeave",
-      value: function _handleMouseLeave(e) {
-        var toEl = e.toElement || e.relatedTarget;
-        var leaveToDropdownContent = !!$(toEl).closest('.dropdown-content').length;
-        var leaveToActiveDropdownTrigger = false;
-
-        var $closestTrigger = $(toEl).closest('.dropdown-trigger');
-        if ($closestTrigger.length && !!$closestTrigger[0].M_Dropdown && $closestTrigger[0].M_Dropdown.isOpen) {
-          leaveToActiveDropdownTrigger = true;
-        }
-
-        // Close hover dropdown if mouse did not leave to either active dropdown-trigger or dropdown-content
-        if (!leaveToActiveDropdownTrigger && !leaveToDropdownContent) {
-          this.close();
-        }
-      }
-    }, {
-      key: "_handleDocumentClick",
-      value: function _handleDocumentClick(e) {
-        var _this10 = this;
-
-        var $target = $(e.target);
-        if (this.options.closeOnClick && $target.closest('.dropdown-content').length && !this.isTouchMoving) {
-          // isTouchMoving to check if scrolling on mobile.
-          setTimeout(function () {
-            _this10.close();
-          }, 0);
-        } else if ($target.closest('.dropdown-trigger').length || !$target.closest('.dropdown-content').length) {
-          setTimeout(function () {
-            _this10.close();
-          }, 0);
-        }
-        this.isTouchMoving = false;
-      }
-    }, {
-      key: "_handleTriggerKeydown",
-      value: function _handleTriggerKeydown(e) {
-        // ARROW DOWN OR ENTER WHEN SELECT IS CLOSED - open Dropdown
-        if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ENTER) && !this.isOpen) {
-          e.preventDefault();
-          this.open();
-        }
-      }
-
-      /**
-       * Handle Document Touchmove
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleDocumentTouchmove",
-      value: function _handleDocumentTouchmove(e) {
-        var $target = $(e.target);
-        if ($target.closest('.dropdown-content').length) {
-          this.isTouchMoving = true;
-        }
-      }
-
-      /**
-       * Handle Dropdown Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleDropdownClick",
-      value: function _handleDropdownClick(e) {
-        // onItemClick callback
-        if (typeof this.options.onItemClick === 'function') {
-          var itemEl = $(e.target).closest('li')[0];
-          this.options.onItemClick.call(this, itemEl);
-        }
-      }
-
-      /**
-       * Handle Dropdown Keydown
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleDropdownKeydown",
-      value: function _handleDropdownKeydown(e) {
-        if (e.which === M.keys.TAB) {
-          e.preventDefault();
-          this.close();
-
-          // Navigate down dropdown list
-        } else if ((e.which === M.keys.ARROW_DOWN || e.which === M.keys.ARROW_UP) && this.isOpen) {
-          e.preventDefault();
-          var direction = e.which === M.keys.ARROW_DOWN ? 1 : -1;
-          var newFocusedIndex = this.focusedIndex;
-          var foundNewIndex = false;
-          do {
-            newFocusedIndex = newFocusedIndex + direction;
-
-            if (!!this.dropdownEl.children[newFocusedIndex] && this.dropdownEl.children[newFocusedIndex].tabIndex !== -1) {
-              foundNewIndex = true;
-              break;
-            }
-          } while (newFocusedIndex < this.dropdownEl.children.length && newFocusedIndex >= 0);
-
-          if (foundNewIndex) {
-            this.focusedIndex = newFocusedIndex;
-            this._focusFocusedItem();
-          }
-
-          // ENTER selects choice on focused item
-        } else if (e.which === M.keys.ENTER && this.isOpen) {
-          // Search for <a> and <button>
-          var focusedElement = this.dropdownEl.children[this.focusedIndex];
-          var $activatableElement = $(focusedElement).find('a, button').first();
-
-          // Click a or button tag if exists, otherwise click li tag
-          if (!!$activatableElement.length) {
-            $activatableElement[0].click();
-          } else if (!!focusedElement) {
-            focusedElement.click();
-          }
-
-          // Close dropdown on ESC
-        } else if (e.which === M.keys.ESC && this.isOpen) {
-          e.preventDefault();
-          this.close();
-        }
-
-        // CASE WHEN USER TYPE LETTERS
-        var letter = String.fromCharCode(e.which).toLowerCase(),
-            nonLetters = [9, 13, 27, 38, 40];
-        if (letter && nonLetters.indexOf(e.which) === -1) {
-          this.filterQuery.push(letter);
-
-          var string = this.filterQuery.join(''),
-              newOptionEl = $(this.dropdownEl).find('li').filter(function (el) {
-            return $(el).text().toLowerCase().indexOf(string) === 0;
-          })[0];
-
-          if (newOptionEl) {
-            this.focusedIndex = $(newOptionEl).index();
-            this._focusFocusedItem();
-          }
-        }
-
-        this.filterTimeout = setTimeout(this._resetFilterQueryBound, 1000);
-      }
-
-      /**
-       * Setup dropdown
-       */
-
-    }, {
-      key: "_resetFilterQuery",
-      value: function _resetFilterQuery() {
-        this.filterQuery = [];
-      }
-    }, {
-      key: "_resetDropdownStyles",
-      value: function _resetDropdownStyles() {
-        this.$dropdownEl.css({
-          display: '',
-          width: '',
-          height: '',
-          left: '',
-          top: '',
-          'transform-origin': '',
-          transform: '',
-          opacity: ''
-        });
-      }
-    }, {
-      key: "_makeDropdownFocusable",
-      value: function _makeDropdownFocusable() {
-        // Needed for arrow key navigation
-        this.dropdownEl.tabIndex = 0;
-
-        // Only set tabindex if it hasn't been set by user
-        $(this.dropdownEl).children().each(function (el) {
-          if (!el.getAttribute('tabindex')) {
-            el.setAttribute('tabindex', 0);
-          }
-        });
-      }
-    }, {
-      key: "_focusFocusedItem",
-      value: function _focusFocusedItem() {
-        if (this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length && this.options.autoFocus) {
-          this.dropdownEl.children[this.focusedIndex].focus();
-        }
-      }
-    }, {
-      key: "_getDropdownPosition",
-      value: function _getDropdownPosition() {
-        var offsetParentBRect = this.el.offsetParent.getBoundingClientRect();
-        var triggerBRect = this.el.getBoundingClientRect();
-        var dropdownBRect = this.dropdownEl.getBoundingClientRect();
-
-        var idealHeight = dropdownBRect.height;
-        var idealWidth = dropdownBRect.width;
-        var idealXPos = triggerBRect.left - dropdownBRect.left;
-        var idealYPos = triggerBRect.top - dropdownBRect.top;
-
-        var dropdownBounds = {
-          left: idealXPos,
-          top: idealYPos,
-          height: idealHeight,
-          width: idealWidth
-        };
-
-        // Countainer here will be closest ancestor with overflow: hidden
-        var closestOverflowParent = !!this.dropdownEl.offsetParent ? this.dropdownEl.offsetParent : this.dropdownEl.parentNode;
-
-        var alignments = M.checkPossibleAlignments(this.el, closestOverflowParent, dropdownBounds, this.options.coverTrigger ? 0 : triggerBRect.height);
-
-        var verticalAlignment = 'top';
-        var horizontalAlignment = this.options.alignment;
-        idealYPos += this.options.coverTrigger ? 0 : triggerBRect.height;
-
-        // Reset isScrollable
-        this.isScrollable = false;
-
-        if (!alignments.top) {
-          if (alignments.bottom) {
-            verticalAlignment = 'bottom';
-          } else {
-            this.isScrollable = true;
-
-            // Determine which side has most space and cutoff at correct height
-            if (alignments.spaceOnTop > alignments.spaceOnBottom) {
-              verticalAlignment = 'bottom';
-              idealHeight += alignments.spaceOnTop;
-              idealYPos -= alignments.spaceOnTop;
-            } else {
-              idealHeight += alignments.spaceOnBottom;
-            }
-          }
-        }
-
-        // If preferred horizontal alignment is possible
-        if (!alignments[horizontalAlignment]) {
-          var oppositeAlignment = horizontalAlignment === 'left' ? 'right' : 'left';
-          if (alignments[oppositeAlignment]) {
-            horizontalAlignment = oppositeAlignment;
-          } else {
-            // Determine which side has most space and cutoff at correct height
-            if (alignments.spaceOnLeft > alignments.spaceOnRight) {
-              horizontalAlignment = 'right';
-              idealWidth += alignments.spaceOnLeft;
-              idealXPos -= alignments.spaceOnLeft;
-            } else {
-              horizontalAlignment = 'left';
-              idealWidth += alignments.spaceOnRight;
-            }
-          }
-        }
-
-        if (verticalAlignment === 'bottom') {
-          idealYPos = idealYPos - dropdownBRect.height + (this.options.coverTrigger ? triggerBRect.height : 0);
-        }
-        if (horizontalAlignment === 'right') {
-          idealXPos = idealXPos - dropdownBRect.width + triggerBRect.width;
-        }
-        return {
-          x: idealXPos,
-          y: idealYPos,
-          verticalAlignment: verticalAlignment,
-          horizontalAlignment: horizontalAlignment,
-          height: idealHeight,
-          width: idealWidth
-        };
-      }
-
-      /**
-       * Animate in dropdown
-       */
-
-    }, {
-      key: "_animateIn",
-      value: function _animateIn() {
-        var _this11 = this;
-
-        anim.remove(this.dropdownEl);
-        anim({
-          targets: this.dropdownEl,
-          opacity: {
-            value: [0, 1],
-            easing: 'easeOutQuad'
-          },
-          scaleX: [0.3, 1],
-          scaleY: [0.3, 1],
-          duration: this.options.inDuration,
-          easing: 'easeOutQuint',
-          complete: function (anim) {
-            if (_this11.options.autoFocus) {
-              _this11.dropdownEl.focus();
-            }
-
-            // onOpenEnd callback
-            if (typeof _this11.options.onOpenEnd === 'function') {
-              _this11.options.onOpenEnd.call(_this11, _this11.el);
-            }
-          }
-        });
-      }
-
-      /**
-       * Animate out dropdown
-       */
-
-    }, {
-      key: "_animateOut",
-      value: function _animateOut() {
-        var _this12 = this;
-
-        anim.remove(this.dropdownEl);
-        anim({
-          targets: this.dropdownEl,
-          opacity: {
-            value: 0,
-            easing: 'easeOutQuint'
-          },
-          scaleX: 0.3,
-          scaleY: 0.3,
-          duration: this.options.outDuration,
-          easing: 'easeOutQuint',
-          complete: function (anim) {
-            _this12._resetDropdownStyles();
-
-            // onCloseEnd callback
-            if (typeof _this12.options.onCloseEnd === 'function') {
-              _this12.options.onCloseEnd.call(_this12, _this12.el);
-            }
-          }
-        });
-      }
-
-      /**
-       * Place dropdown
-       */
-
-    }, {
-      key: "_placeDropdown",
-      value: function _placeDropdown() {
-        // Set width before calculating positionInfo
-        var idealWidth = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width;
-        this.dropdownEl.style.width = idealWidth + 'px';
-
-        var positionInfo = this._getDropdownPosition();
-        this.dropdownEl.style.left = positionInfo.x + 'px';
-        this.dropdownEl.style.top = positionInfo.y + 'px';
-        this.dropdownEl.style.height = positionInfo.height + 'px';
-        this.dropdownEl.style.width = positionInfo.width + 'px';
-        this.dropdownEl.style.transformOrigin = (positionInfo.horizontalAlignment === 'left' ? '0' : '100%') + " " + (positionInfo.verticalAlignment === 'top' ? '0' : '100%');
-      }
-
-      /**
-       * Open Dropdown
-       */
-
-    }, {
-      key: "open",
-      value: function open() {
-        if (this.isOpen) {
-          return;
-        }
-        this.isOpen = true;
-
-        // onOpenStart callback
-        if (typeof this.options.onOpenStart === 'function') {
-          this.options.onOpenStart.call(this, this.el);
-        }
-
-        // Reset styles
-        this._resetDropdownStyles();
-        this.dropdownEl.style.display = 'block';
-
-        this._placeDropdown();
-        this._animateIn();
-        this._setupTemporaryEventHandlers();
-      }
-
-      /**
-       * Close Dropdown
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-        this.isOpen = false;
-        this.focusedIndex = -1;
-
-        // onCloseStart callback
-        if (typeof this.options.onCloseStart === 'function') {
-          this.options.onCloseStart.call(this, this.el);
-        }
-
-        this._animateOut();
-        this._removeTemporaryEventHandlers();
-
-        if (this.options.autoFocus) {
-          this.el.focus();
-        }
-      }
-
-      /**
-       * Recalculate dimensions
-       */
-
-    }, {
-      key: "recalculateDimensions",
-      value: function recalculateDimensions() {
-        if (this.isOpen) {
-          this.$dropdownEl.css({
-            width: '',
-            height: '',
-            left: '',
-            top: '',
-            'transform-origin': ''
-          });
-          this._placeDropdown();
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Dropdown.__proto__ || Object.getPrototypeOf(Dropdown), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Dropdown;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Dropdown;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Dropdown
-   */
-
-
-  Dropdown._dropdowns = [];
-
-  M.Dropdown = Dropdown;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
-  }
-})(cash, M.anime);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    opacity: 0.5,
-    inDuration: 250,
-    outDuration: 250,
-    onOpenStart: null,
-    onOpenEnd: null,
-    onCloseStart: null,
-    onCloseEnd: null,
-    preventScrolling: true,
-    dismissible: true,
-    startingTop: '4%',
-    endingTop: '10%'
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Modal = function (_Component3) {
-    _inherits(Modal, _Component3);
-
-    /**
-     * Construct Modal instance and set up overlay
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Modal(el, options) {
-      _classCallCheck(this, Modal);
-
-      var _this13 = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, Modal, el, options));
-
-      _this13.el.M_Modal = _this13;
-
-      /**
-       * Options for the modal
-       * @member Modal#options
-       * @prop {Number} [opacity=0.5] - Opacity of the modal overlay
-       * @prop {Number} [inDuration=250] - Length in ms of enter transition
-       * @prop {Number} [outDuration=250] - Length in ms of exit transition
-       * @prop {Function} onOpenStart - Callback function called before modal is opened
-       * @prop {Function} onOpenEnd - Callback function called after modal is opened
-       * @prop {Function} onCloseStart - Callback function called before modal is closed
-       * @prop {Function} onCloseEnd - Callback function called after modal is closed
-       * @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click
-       * @prop {String} [startingTop='4%'] - startingTop
-       * @prop {String} [endingTop='10%'] - endingTop
-       */
-      _this13.options = $.extend({}, Modal.defaults, options);
-
-      /**
-       * Describes open/close state of modal
-       * @type {Boolean}
-       */
-      _this13.isOpen = false;
-
-      _this13.id = _this13.$el.attr('id');
-      _this13._openingTrigger = undefined;
-      _this13.$overlay = $('<div class="modal-overlay"></div>');
-      _this13.el.tabIndex = 0;
-      _this13._nthModalOpened = 0;
-
-      Modal._count++;
-      _this13._setupEventHandlers();
-      return _this13;
-    }
-
-    _createClass(Modal, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        Modal._count--;
-        this._removeEventHandlers();
-        this.el.removeAttribute('style');
-        this.$overlay.remove();
-        this.el.M_Modal = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleOverlayClickBound = this._handleOverlayClick.bind(this);
-        this._handleModalCloseClickBound = this._handleModalCloseClick.bind(this);
-
-        if (Modal._count === 1) {
-          document.body.addEventListener('click', this._handleTriggerClick);
-        }
-        this.$overlay[0].addEventListener('click', this._handleOverlayClickBound);
-        this.el.addEventListener('click', this._handleModalCloseClickBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        if (Modal._count === 0) {
-          document.body.removeEventListener('click', this._handleTriggerClick);
-        }
-        this.$overlay[0].removeEventListener('click', this._handleOverlayClickBound);
-        this.el.removeEventListener('click', this._handleModalCloseClickBound);
-      }
-
-      /**
-       * Handle Trigger Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleTriggerClick",
-      value: function _handleTriggerClick(e) {
-        var $trigger = $(e.target).closest('.modal-trigger');
-        if ($trigger.length) {
-          var modalId = M.getIdFromTrigger($trigger[0]);
-          var modalInstance = document.getElementById(modalId).M_Modal;
-          if (modalInstance) {
-            modalInstance.open($trigger);
-          }
-          e.preventDefault();
-        }
-      }
-
-      /**
-       * Handle Overlay Click
-       */
-
-    }, {
-      key: "_handleOverlayClick",
-      value: function _handleOverlayClick() {
-        if (this.options.dismissible) {
-          this.close();
-        }
-      }
-
-      /**
-       * Handle Modal Close Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleModalCloseClick",
-      value: function _handleModalCloseClick(e) {
-        var $closeTrigger = $(e.target).closest('.modal-close');
-        if ($closeTrigger.length) {
-          this.close();
-        }
-      }
-
-      /**
-       * Handle Keydown
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleKeydown",
-      value: function _handleKeydown(e) {
-        // ESC key
-        if (e.keyCode === 27 && this.options.dismissible) {
-          this.close();
-        }
-      }
-
-      /**
-       * Handle Focus
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleFocus",
-      value: function _handleFocus(e) {
-        // Only trap focus if this modal is the last model opened (prevents loops in nested modals).
-        if (!this.el.contains(e.target) && this._nthModalOpened === Modal._modalsOpen) {
-          this.el.focus();
-        }
-      }
-
-      /**
-       * Animate in modal
-       */
-
-    }, {
-      key: "_animateIn",
-      value: function _animateIn() {
-        var _this14 = this;
-
-        // Set initial styles
-        $.extend(this.el.style, {
-          display: 'block',
-          opacity: 0
-        });
-        $.extend(this.$overlay[0].style, {
-          display: 'block',
-          opacity: 0
-        });
-
-        // Animate overlay
-        anim({
-          targets: this.$overlay[0],
-          opacity: this.options.opacity,
-          duration: this.options.inDuration,
-          easing: 'easeOutQuad'
-        });
-
-        // Define modal animation options
-        var enterAnimOptions = {
-          targets: this.el,
-          duration: this.options.inDuration,
-          easing: 'easeOutCubic',
-          // Handle modal onOpenEnd callback
-          complete: function () {
-            if (typeof _this14.options.onOpenEnd === 'function') {
-              _this14.options.onOpenEnd.call(_this14, _this14.el, _this14._openingTrigger);
-            }
-          }
-        };
-
-        // Bottom sheet animation
-        if (this.el.classList.contains('bottom-sheet')) {
-          $.extend(enterAnimOptions, {
-            bottom: 0,
-            opacity: 1
-          });
-          anim(enterAnimOptions);
-
-          // Normal modal animation
-        } else {
-          $.extend(enterAnimOptions, {
-            top: [this.options.startingTop, this.options.endingTop],
-            opacity: 1,
-            scaleX: [0.8, 1],
-            scaleY: [0.8, 1]
-          });
-          anim(enterAnimOptions);
-        }
-      }
-
-      /**
-       * Animate out modal
-       */
-
-    }, {
-      key: "_animateOut",
-      value: function _animateOut() {
-        var _this15 = this;
-
-        // Animate overlay
-        anim({
-          targets: this.$overlay[0],
-          opacity: 0,
-          duration: this.options.outDuration,
-          easing: 'easeOutQuart'
-        });
-
-        // Define modal animation options
-        var exitAnimOptions = {
-          targets: this.el,
-          duration: this.options.outDuration,
-          easing: 'easeOutCubic',
-          // Handle modal ready callback
-          complete: function () {
-            _this15.el.style.display = 'none';
-            _this15.$overlay.remove();
-
-            // Call onCloseEnd callback
-            if (typeof _this15.options.onCloseEnd === 'function') {
-              _this15.options.onCloseEnd.call(_this15, _this15.el);
-            }
-          }
-        };
-
-        // Bottom sheet animation
-        if (this.el.classList.contains('bottom-sheet')) {
-          $.extend(exitAnimOptions, {
-            bottom: '-100%',
-            opacity: 0
-          });
-          anim(exitAnimOptions);
-
-          // Normal modal animation
-        } else {
-          $.extend(exitAnimOptions, {
-            top: [this.options.endingTop, this.options.startingTop],
-            opacity: 0,
-            scaleX: 0.8,
-            scaleY: 0.8
-          });
-          anim(exitAnimOptions);
-        }
-      }
-
-      /**
-       * Open Modal
-       * @param {cash} [$trigger]
-       */
-
-    }, {
-      key: "open",
-      value: function open($trigger) {
-        if (this.isOpen) {
-          return;
-        }
-
-        this.isOpen = true;
-        Modal._modalsOpen++;
-        this._nthModalOpened = Modal._modalsOpen;
-
-        // Set Z-Index based on number of currently open modals
-        this.$overlay[0].style.zIndex = 1000 + Modal._modalsOpen * 2;
-        this.el.style.zIndex = 1000 + Modal._modalsOpen * 2 + 1;
-
-        // Set opening trigger, undefined indicates modal was opened by javascript
-        this._openingTrigger = !!$trigger ? $trigger[0] : undefined;
-
-        // onOpenStart callback
-        if (typeof this.options.onOpenStart === 'function') {
-          this.options.onOpenStart.call(this, this.el, this._openingTrigger);
-        }
-
-        if (this.options.preventScrolling) {
-          document.body.style.overflow = 'hidden';
-        }
-
-        this.el.classList.add('open');
-        this.el.insertAdjacentElement('afterend', this.$overlay[0]);
-
-        if (this.options.dismissible) {
-          this._handleKeydownBound = this._handleKeydown.bind(this);
-          this._handleFocusBound = this._handleFocus.bind(this);
-          document.addEventListener('keydown', this._handleKeydownBound);
-          document.addEventListener('focus', this._handleFocusBound, true);
-        }
-
-        anim.remove(this.el);
-        anim.remove(this.$overlay[0]);
-        this._animateIn();
-
-        // Focus modal
-        this.el.focus();
-
-        return this;
-      }
-
-      /**
-       * Close Modal
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-
-        this.isOpen = false;
-        Modal._modalsOpen--;
-        this._nthModalOpened = 0;
-
-        // Call onCloseStart callback
-        if (typeof this.options.onCloseStart === 'function') {
-          this.options.onCloseStart.call(this, this.el);
-        }
-
-        this.el.classList.remove('open');
-
-        // Enable body scrolling only if there are no more modals open.
-        if (Modal._modalsOpen === 0) {
-          document.body.style.overflow = '';
-        }
-
-        if (this.options.dismissible) {
-          document.removeEventListener('keydown', this._handleKeydownBound);
-          document.removeEventListener('focus', this._handleFocusBound, true);
-        }
-
-        anim.remove(this.el);
-        anim.remove(this.$overlay[0]);
-        this._animateOut();
-        return this;
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Modal.__proto__ || Object.getPrototypeOf(Modal), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Modal;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Modal;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Modal
-   */
-
-
-  Modal._modalsOpen = 0;
-
-  /**
-   * @static
-   * @memberof Modal
-   */
-  Modal._count = 0;
-
-  M.Modal = Modal;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal');
-  }
-})(cash, M.anime);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    inDuration: 275,
-    outDuration: 200,
-    onOpenStart: null,
-    onOpenEnd: null,
-    onCloseStart: null,
-    onCloseEnd: null
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Materialbox = function (_Component4) {
-    _inherits(Materialbox, _Component4);
-
-    /**
-     * Construct Materialbox instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Materialbox(el, options) {
-      _classCallCheck(this, Materialbox);
-
-      var _this16 = _possibleConstructorReturn(this, (Materialbox.__proto__ || Object.getPrototypeOf(Materialbox)).call(this, Materialbox, el, options));
-
-      _this16.el.M_Materialbox = _this16;
-
-      /**
-       * Options for the modal
-       * @member Materialbox#options
-       * @prop {Number} [inDuration=275] - Length in ms of enter transition
-       * @prop {Number} [outDuration=200] - Length in ms of exit transition
-       * @prop {Function} onOpenStart - Callback function called before materialbox is opened
-       * @prop {Function} onOpenEnd - Callback function called after materialbox is opened
-       * @prop {Function} onCloseStart - Callback function called before materialbox is closed
-       * @prop {Function} onCloseEnd - Callback function called after materialbox is closed
-       */
-      _this16.options = $.extend({}, Materialbox.defaults, options);
-
-      _this16.overlayActive = false;
-      _this16.doneAnimating = true;
-      _this16.placeholder = $('<div></div>').addClass('material-placeholder');
-      _this16.originalWidth = 0;
-      _this16.originalHeight = 0;
-      _this16.originInlineStyles = _this16.$el.attr('style');
-      _this16.caption = _this16.el.getAttribute('data-caption') || '';
-
-      // Wrap
-      _this16.$el.before(_this16.placeholder);
-      _this16.placeholder.append(_this16.$el);
-
-      _this16._setupEventHandlers();
-      return _this16;
-    }
-
-    _createClass(Materialbox, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.el.M_Materialbox = undefined;
-
-        // Unwrap image
-        $(this.placeholder).after(this.el).remove();
-
-        this.$el.removeAttr('style');
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleMaterialboxClickBound = this._handleMaterialboxClick.bind(this);
-        this.el.addEventListener('click', this._handleMaterialboxClickBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('click', this._handleMaterialboxClickBound);
-      }
-
-      /**
-       * Handle Materialbox Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleMaterialboxClick",
-      value: function _handleMaterialboxClick(e) {
-        // If already modal, return to original
-        if (this.doneAnimating === false || this.overlayActive && this.doneAnimating) {
-          this.close();
-        } else {
-          this.open();
-        }
-      }
-
-      /**
-       * Handle Window Scroll
-       */
-
-    }, {
-      key: "_handleWindowScroll",
-      value: function _handleWindowScroll() {
-        if (this.overlayActive) {
-          this.close();
-        }
-      }
-
-      /**
-       * Handle Window Resize
-       */
-
-    }, {
-      key: "_handleWindowResize",
-      value: function _handleWindowResize() {
-        if (this.overlayActive) {
-          this.close();
-        }
-      }
-
-      /**
-       * Handle Window Resize
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleWindowEscape",
-      value: function _handleWindowEscape(e) {
-        // ESC key
-        if (e.keyCode === 27 && this.doneAnimating && this.overlayActive) {
-          this.close();
-        }
-      }
-
-      /**
-       * Find ancestors with overflow: hidden; and make visible
-       */
-
-    }, {
-      key: "_makeAncestorsOverflowVisible",
-      value: function _makeAncestorsOverflowVisible() {
-        this.ancestorsChanged = $();
-        var ancestor = this.placeholder[0].parentNode;
-        while (ancestor !== null && !$(ancestor).is(document)) {
-          var curr = $(ancestor);
-          if (curr.css('overflow') !== 'visible') {
-            curr.css('overflow', 'visible');
-            if (this.ancestorsChanged === undefined) {
-              this.ancestorsChanged = curr;
-            } else {
-              this.ancestorsChanged = this.ancestorsChanged.add(curr);
-            }
-          }
-          ancestor = ancestor.parentNode;
-        }
-      }
-
-      /**
-       * Animate image in
-       */
-
-    }, {
-      key: "_animateImageIn",
-      value: function _animateImageIn() {
-        var _this17 = this;
-
-        var animOptions = {
-          targets: this.el,
-          height: [this.originalHeight, this.newHeight],
-          width: [this.originalWidth, this.newWidth],
-          left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
-          top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2,
-          duration: this.options.inDuration,
-          easing: 'easeOutQuad',
-          complete: function () {
-            _this17.doneAnimating = true;
-
-            // onOpenEnd callback
-            if (typeof _this17.options.onOpenEnd === 'function') {
-              _this17.options.onOpenEnd.call(_this17, _this17.el);
-            }
-          }
-        };
-
-        // Override max-width or max-height if needed
-        this.maxWidth = this.$el.css('max-width');
-        this.maxHeight = this.$el.css('max-height');
-        if (this.maxWidth !== 'none') {
-          animOptions.maxWidth = this.newWidth;
-        }
-        if (this.maxHeight !== 'none') {
-          animOptions.maxHeight = this.newHeight;
-        }
-
-        anim(animOptions);
-      }
-
-      /**
-       * Animate image out
-       */
-
-    }, {
-      key: "_animateImageOut",
-      value: function _animateImageOut() {
-        var _this18 = this;
-
-        var animOptions = {
-          targets: this.el,
-          width: this.originalWidth,
-          height: this.originalHeight,
-          left: 0,
-          top: 0,
-          duration: this.options.outDuration,
-          easing: 'easeOutQuad',
-          complete: function () {
-            _this18.placeholder.css({
-              height: '',
-              width: '',
-              position: '',
-              top: '',
-              left: ''
-            });
-
-            // Revert to width or height attribute
-            if (_this18.attrWidth) {
-              _this18.$el.attr('width', _this18.attrWidth);
-            }
-            if (_this18.attrHeight) {
-              _this18.$el.attr('height', _this18.attrHeight);
-            }
-
-            _this18.$el.removeAttr('style');
-            _this18.originInlineStyles && _this18.$el.attr('style', _this18.originInlineStyles);
-
-            // Remove class
-            _this18.$el.removeClass('active');
-            _this18.doneAnimating = true;
-
-            // Remove overflow overrides on ancestors
-            if (_this18.ancestorsChanged.length) {
-              _this18.ancestorsChanged.css('overflow', '');
-            }
-
-            // onCloseEnd callback
-            if (typeof _this18.options.onCloseEnd === 'function') {
-              _this18.options.onCloseEnd.call(_this18, _this18.el);
-            }
-          }
-        };
-
-        anim(animOptions);
-      }
-
-      /**
-       * Update open and close vars
-       */
-
-    }, {
-      key: "_updateVars",
-      value: function _updateVars() {
-        this.windowWidth = window.innerWidth;
-        this.windowHeight = window.innerHeight;
-        this.caption = this.el.getAttribute('data-caption') || '';
-      }
-
-      /**
-       * Open Materialbox
-       */
-
-    }, {
-      key: "open",
-      value: function open() {
-        var _this19 = this;
-
-        this._updateVars();
-        this.originalWidth = this.el.getBoundingClientRect().width;
-        this.originalHeight = this.el.getBoundingClientRect().height;
-
-        // Set states
-        this.doneAnimating = false;
-        this.$el.addClass('active');
-        this.overlayActive = true;
-
-        // onOpenStart callback
-        if (typeof this.options.onOpenStart === 'function') {
-          this.options.onOpenStart.call(this, this.el);
-        }
-
-        // Set positioning for placeholder
-        this.placeholder.css({
-          width: this.placeholder[0].getBoundingClientRect().width + 'px',
-          height: this.placeholder[0].getBoundingClientRect().height + 'px',
-          position: 'relative',
-          top: 0,
-          left: 0
-        });
-
-        this._makeAncestorsOverflowVisible();
-
-        // Set css on origin
-        this.$el.css({
-          position: 'absolute',
-          'z-index': 1000,
-          'will-change': 'left, top, width, height'
-        });
-
-        // Change from width or height attribute to css
-        this.attrWidth = this.$el.attr('width');
-        this.attrHeight = this.$el.attr('height');
-        if (this.attrWidth) {
-          this.$el.css('width', this.attrWidth + 'px');
-          this.$el.removeAttr('width');
-        }
-        if (this.attrHeight) {
-          this.$el.css('width', this.attrHeight + 'px');
-          this.$el.removeAttr('height');
-        }
-
-        // Add overlay
-        this.$overlay = $('<div id="materialbox-overlay"></div>').css({
-          opacity: 0
-        }).one('click', function () {
-          if (_this19.doneAnimating) {
-            _this19.close();
-          }
-        });
-
-        // Put before in origin image to preserve z-index layering.
-        this.$el.before(this.$overlay);
-
-        // Set dimensions if needed
-        var overlayOffset = this.$overlay[0].getBoundingClientRect();
-        this.$overlay.css({
-          width: this.windowWidth + 'px',
-          height: this.windowHeight + 'px',
-          left: -1 * overlayOffset.left + 'px',
-          top: -1 * overlayOffset.top + 'px'
-        });
-
-        anim.remove(this.el);
-        anim.remove(this.$overlay[0]);
-
-        // Animate Overlay
-        anim({
-          targets: this.$overlay[0],
-          opacity: 1,
-          duration: this.options.inDuration,
-          easing: 'easeOutQuad'
-        });
-
-        // Add and animate caption if it exists
-        if (this.caption !== '') {
-          if (this.$photocaption) {
-            anim.remove(this.$photoCaption[0]);
-          }
-          this.$photoCaption = $('<div class="materialbox-caption"></div>');
-          this.$photoCaption.text(this.caption);
-          $('body').append(this.$photoCaption);
-          this.$photoCaption.css({ display: 'inline' });
-
-          anim({
-            targets: this.$photoCaption[0],
-            opacity: 1,
-            duration: this.options.inDuration,
-            easing: 'easeOutQuad'
-          });
-        }
-
-        // Resize Image
-        var ratio = 0;
-        var widthPercent = this.originalWidth / this.windowWidth;
-        var heightPercent = this.originalHeight / this.windowHeight;
-        this.newWidth = 0;
-        this.newHeight = 0;
-
-        if (widthPercent > heightPercent) {
-          ratio = this.originalHeight / this.originalWidth;
-          this.newWidth = this.windowWidth * 0.9;
-          this.newHeight = this.windowWidth * 0.9 * ratio;
-        } else {
-          ratio = this.originalWidth / this.originalHeight;
-          this.newWidth = this.windowHeight * 0.9 * ratio;
-          this.newHeight = this.windowHeight * 0.9;
-        }
-
-        this._animateImageIn();
-
-        // Handle Exit triggers
-        this._handleWindowScrollBound = this._handleWindowScroll.bind(this);
-        this._handleWindowResizeBound = this._handleWindowResize.bind(this);
-        this._handleWindowEscapeBound = this._handleWindowEscape.bind(this);
-
-        window.addEventListener('scroll', this._handleWindowScrollBound);
-        window.addEventListener('resize', this._handleWindowResizeBound);
-        window.addEventListener('keyup', this._handleWindowEscapeBound);
-      }
-
-      /**
-       * Close Materialbox
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        var _this20 = this;
-
-        this._updateVars();
-        this.doneAnimating = false;
-
-        // onCloseStart callback
-        if (typeof this.options.onCloseStart === 'function') {
-          this.options.onCloseStart.call(this, this.el);
-        }
-
-        anim.remove(this.el);
-        anim.remove(this.$overlay[0]);
-
-        if (this.caption !== '') {
-          anim.remove(this.$photoCaption[0]);
-        }
-
-        // disable exit handlers
-        window.removeEventListener('scroll', this._handleWindowScrollBound);
-        window.removeEventListener('resize', this._handleWindowResizeBound);
-        window.removeEventListener('keyup', this._handleWindowEscapeBound);
-
-        anim({
-          targets: this.$overlay[0],
-          opacity: 0,
-          duration: this.options.outDuration,
-          easing: 'easeOutQuad',
-          complete: function () {
-            _this20.overlayActive = false;
-            _this20.$overlay.remove();
-          }
-        });
-
-        this._animateImageOut();
-
-        // Remove Caption + reset css settings on image
-        if (this.caption !== '') {
-          anim({
-            targets: this.$photoCaption[0],
-            opacity: 0,
-            duration: this.options.outDuration,
-            easing: 'easeOutQuad',
-            complete: function () {
-              _this20.$photoCaption.remove();
-            }
-          });
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Materialbox.__proto__ || Object.getPrototypeOf(Materialbox), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Materialbox;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Materialbox;
-  }(Component);
-
-  M.Materialbox = Materialbox;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Materialbox, 'materialbox', 'M_Materialbox');
-  }
-})(cash, M.anime);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    responsiveThreshold: 0 // breakpoint for swipeable
-  };
-
-  var Parallax = function (_Component5) {
-    _inherits(Parallax, _Component5);
-
-    function Parallax(el, options) {
-      _classCallCheck(this, Parallax);
-
-      var _this21 = _possibleConstructorReturn(this, (Parallax.__proto__ || Object.getPrototypeOf(Parallax)).call(this, Parallax, el, options));
-
-      _this21.el.M_Parallax = _this21;
-
-      /**
-       * Options for the Parallax
-       * @member Parallax#options
-       * @prop {Number} responsiveThreshold
-       */
-      _this21.options = $.extend({}, Parallax.defaults, options);
-      _this21._enabled = window.innerWidth > _this21.options.responsiveThreshold;
-
-      _this21.$img = _this21.$el.find('img').first();
-      _this21.$img.each(function () {
-        var el = this;
-        if (el.complete) $(el).trigger('load');
-      });
-
-      _this21._updateParallax();
-      _this21._setupEventHandlers();
-      _this21._setupStyles();
-
-      Parallax._parallaxes.push(_this21);
-      return _this21;
-    }
-
-    _createClass(Parallax, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        Parallax._parallaxes.splice(Parallax._parallaxes.indexOf(this), 1);
-        this.$img[0].style.transform = '';
-        this._removeEventHandlers();
-
-        this.$el[0].M_Parallax = undefined;
-      }
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleImageLoadBound = this._handleImageLoad.bind(this);
-        this.$img[0].addEventListener('load', this._handleImageLoadBound);
-
-        if (Parallax._parallaxes.length === 0) {
-          Parallax._handleScrollThrottled = M.throttle(Parallax._handleScroll, 5);
-          window.addEventListener('scroll', Parallax._handleScrollThrottled);
-
-          Parallax._handleWindowResizeThrottled = M.throttle(Parallax._handleWindowResize, 5);
-          window.addEventListener('resize', Parallax._handleWindowResizeThrottled);
-        }
-      }
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.$img[0].removeEventListener('load', this._handleImageLoadBound);
-
-        if (Parallax._parallaxes.length === 0) {
-          window.removeEventListener('scroll', Parallax._handleScrollThrottled);
-          window.removeEventListener('resize', Parallax._handleWindowResizeThrottled);
-        }
-      }
-    }, {
-      key: "_setupStyles",
-      value: function _setupStyles() {
-        this.$img[0].style.opacity = 1;
-      }
-    }, {
-      key: "_handleImageLoad",
-      value: function _handleImageLoad() {
-        this._updateParallax();
-      }
-    }, {
-      key: "_updateParallax",
-      value: function _updateParallax() {
-        var containerHeight = this.$el.height() > 0 ? this.el.parentNode.offsetHeight : 500;
-        var imgHeight = this.$img[0].offsetHeight;
-        var parallaxDist = imgHeight - containerHeight;
-        var bottom = this.$el.offset().top + containerHeight;
-        var top = this.$el.offset().top;
-        var scrollTop = M.getDocumentScrollTop();
-        var windowHeight = window.innerHeight;
-        var windowBottom = scrollTop + windowHeight;
-        var percentScrolled = (windowBottom - top) / (containerHeight + windowHeight);
-        var parallax = parallaxDist * percentScrolled;
-
-        if (!this._enabled) {
-          this.$img[0].style.transform = '';
-        } else if (bottom > scrollTop && top < scrollTop + windowHeight) {
-          this.$img[0].style.transform = "translate3D(-50%, " + parallax + "px, 0)";
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Parallax.__proto__ || Object.getPrototypeOf(Parallax), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Parallax;
-      }
-    }, {
-      key: "_handleScroll",
-      value: function _handleScroll() {
-        for (var i = 0; i < Parallax._parallaxes.length; i++) {
-          var parallaxInstance = Parallax._parallaxes[i];
-          parallaxInstance._updateParallax.call(parallaxInstance);
-        }
-      }
-    }, {
-      key: "_handleWindowResize",
-      value: function _handleWindowResize() {
-        for (var i = 0; i < Parallax._parallaxes.length; i++) {
-          var parallaxInstance = Parallax._parallaxes[i];
-          parallaxInstance._enabled = window.innerWidth > parallaxInstance.options.responsiveThreshold;
-        }
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Parallax;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Parallax
-   */
-
-
-  Parallax._parallaxes = [];
-
-  M.Parallax = Parallax;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Parallax, 'parallax', 'M_Parallax');
-  }
-})(cash);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    duration: 300,
-    onShow: null,
-    swipeable: false,
-    responsiveThreshold: Infinity // breakpoint for swipeable
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Tabs = function (_Component6) {
-    _inherits(Tabs, _Component6);
-
-    /**
-     * Construct Tabs instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Tabs(el, options) {
-      _classCallCheck(this, Tabs);
-
-      var _this22 = _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call(this, Tabs, el, options));
-
-      _this22.el.M_Tabs = _this22;
-
-      /**
-       * Options for the Tabs
-       * @member Tabs#options
-       * @prop {Number} duration
-       * @prop {Function} onShow
-       * @prop {Boolean} swipeable
-       * @prop {Number} responsiveThreshold
-       */
-      _this22.options = $.extend({}, Tabs.defaults, options);
-
-      // Setup
-      _this22.$tabLinks = _this22.$el.children('li.tab').children('a');
-      _this22.index = 0;
-      _this22._setupActiveTabLink();
-
-      // Setup tabs content
-      if (_this22.options.swipeable) {
-        _this22._setupSwipeableTabs();
-      } else {
-        _this22._setupNormalTabs();
-      }
-
-      // Setup tabs indicator after content to ensure accurate widths
-      _this22._setTabsAndTabWidth();
-      _this22._createIndicator();
-
-      _this22._setupEventHandlers();
-      return _this22;
-    }
-
-    _createClass(Tabs, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this._indicator.parentNode.removeChild(this._indicator);
-
-        if (this.options.swipeable) {
-          this._teardownSwipeableTabs();
-        } else {
-          this._teardownNormalTabs();
-        }
-
-        this.$el[0].M_Tabs = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleWindowResizeBound = this._handleWindowResize.bind(this);
-        window.addEventListener('resize', this._handleWindowResizeBound);
-
-        this._handleTabClickBound = this._handleTabClick.bind(this);
-        this.el.addEventListener('click', this._handleTabClickBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        window.removeEventListener('resize', this._handleWindowResizeBound);
-        this.el.removeEventListener('click', this._handleTabClickBound);
-      }
-
-      /**
-       * Handle window Resize
-       */
-
-    }, {
-      key: "_handleWindowResize",
-      value: function _handleWindowResize() {
-        this._setTabsAndTabWidth();
-
-        if (this.tabWidth !== 0 && this.tabsWidth !== 0) {
-          this._indicator.style.left = this._calcLeftPos(this.$activeTabLink) + 'px';
-          this._indicator.style.right = this._calcRightPos(this.$activeTabLink) + 'px';
-        }
-      }
-
-      /**
-       * Handle tab click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleTabClick",
-      value: function _handleTabClick(e) {
-        var _this23 = this;
-
-        var tab = $(e.target).closest('li.tab');
-        var tabLink = $(e.target).closest('a');
-
-        // Handle click on tab link only
-        if (!tabLink.length || !tabLink.parent().hasClass('tab')) {
-          return;
-        }
-
-        if (tab.hasClass('disabled')) {
-          e.preventDefault();
-          return;
-        }
-
-        // Act as regular link if target attribute is specified.
-        if (!!tabLink.attr('target')) {
-          return;
-        }
-
-        // Make the old tab inactive.
-        this.$activeTabLink.removeClass('active');
-        var $oldContent = this.$content;
-
-        // Update the variables with the new link and content
-        this.$activeTabLink = tabLink;
-        this.$content = $(M.escapeHash(tabLink[0].hash));
-        this.$tabLinks = this.$el.children('li.tab').children('a');
-
-        // Make the tab active.
-        this.$activeTabLink.addClass('active');
-        var prevIndex = this.index;
-        this.index = Math.max(this.$tabLinks.index(tabLink), 0);
-
-        // Swap content
-        if (this.options.swipeable) {
-          if (this._tabsCarousel) {
-            this._tabsCarousel.set(this.index, function () {
-              if (typeof _this23.options.onShow === 'function') {
-                _this23.options.onShow.call(_this23, _this23.$content[0]);
-              }
-            });
-          }
-        } else {
-          if (this.$content.length) {
-            this.$content[0].style.display = 'block';
-            this.$content.addClass('active');
-            if (typeof this.options.onShow === 'function') {
-              this.options.onShow.call(this, this.$content[0]);
-            }
-
-            if ($oldContent.length && !$oldContent.is(this.$content)) {
-              $oldContent[0].style.display = 'none';
-              $oldContent.removeClass('active');
-            }
-          }
-        }
-
-        // Update widths after content is swapped (scrollbar bugfix)
-        this._setTabsAndTabWidth();
-
-        // Update indicator
-        this._animateIndicator(prevIndex);
-
-        // Prevent the anchor's default click action
-        e.preventDefault();
-      }
-
-      /**
-       * Generate elements for tab indicator.
-       */
-
-    }, {
-      key: "_createIndicator",
-      value: function _createIndicator() {
-        var _this24 = this;
-
-        var indicator = document.createElement('li');
-        indicator.classList.add('indicator');
-
-        this.el.appendChild(indicator);
-        this._indicator = indicator;
-
-        setTimeout(function () {
-          _this24._indicator.style.left = _this24._calcLeftPos(_this24.$activeTabLink) + 'px';
-          _this24._indicator.style.right = _this24._calcRightPos(_this24.$activeTabLink) + 'px';
-        }, 0);
-      }
-
-      /**
-       * Setup first active tab link.
-       */
-
-    }, {
-      key: "_setupActiveTabLink",
-      value: function _setupActiveTabLink() {
-        // If the location.hash matches one of the links, use that as the active tab.
-        this.$activeTabLink = $(this.$tabLinks.filter('[href="' + location.hash + '"]'));
-
-        // If no match is found, use the first link or any with class 'active' as the initial active tab.
-        if (this.$activeTabLink.length === 0) {
-          this.$activeTabLink = this.$el.children('li.tab').children('a.active').first();
-        }
-        if (this.$activeTabLink.length === 0) {
-          this.$activeTabLink = this.$el.children('li.tab').children('a').first();
-        }
-
-        this.$tabLinks.removeClass('active');
-        this.$activeTabLink[0].classList.add('active');
-
-        this.index = Math.max(this.$tabLinks.index(this.$activeTabLink), 0);
-
-        if (this.$activeTabLink.length) {
-          this.$content = $(M.escapeHash(this.$activeTabLink[0].hash));
-          this.$content.addClass('active');
-        }
-      }
-
-      /**
-       * Setup swipeable tabs
-       */
-
-    }, {
-      key: "_setupSwipeableTabs",
-      value: function _setupSwipeableTabs() {
-        var _this25 = this;
-
-        // Change swipeable according to responsive threshold
-        if (window.innerWidth > this.options.responsiveThreshold) {
-          this.options.swipeable = false;
-        }
-
-        var $tabsContent = $();
-        this.$tabLinks.each(function (link) {
-          var $currContent = $(M.escapeHash(link.hash));
-          $currContent.addClass('carousel-item');
-          $tabsContent = $tabsContent.add($currContent);
-        });
-
-        var $tabsWrapper = $('<div class="tabs-content carousel carousel-slider"></div>');
-        $tabsContent.first().before($tabsWrapper);
-        $tabsWrapper.append($tabsContent);
-        $tabsContent[0].style.display = '';
-
-        // Keep active tab index to set initial carousel slide
-        var activeTabIndex = this.$activeTabLink.closest('.tab').index();
-
-        this._tabsCarousel = M.Carousel.init($tabsWrapper[0], {
-          fullWidth: true,
-          noWrap: true,
-          onCycleTo: function (item) {
-            var prevIndex = _this25.index;
-            _this25.index = $(item).index();
-            _this25.$activeTabLink.removeClass('active');
-            _this25.$activeTabLink = _this25.$tabLinks.eq(_this25.index);
-            _this25.$activeTabLink.addClass('active');
-            _this25._animateIndicator(prevIndex);
-            if (typeof _this25.options.onShow === 'function') {
-              _this25.options.onShow.call(_this25, _this25.$content[0]);
-            }
-          }
-        });
-
-        // Set initial carousel slide to active tab
-        this._tabsCarousel.set(activeTabIndex);
-      }
-
-      /**
-       * Teardown normal tabs.
-       */
-
-    }, {
-      key: "_teardownSwipeableTabs",
-      value: function _teardownSwipeableTabs() {
-        var $tabsWrapper = this._tabsCarousel.$el;
-        this._tabsCarousel.destroy();
-
-        // Unwrap
-        $tabsWrapper.after($tabsWrapper.children());
-        $tabsWrapper.remove();
-      }
-
-      /**
-       * Setup normal tabs.
-       */
-
-    }, {
-      key: "_setupNormalTabs",
-      value: function _setupNormalTabs() {
-        // Hide Tabs Content
-        this.$tabLinks.not(this.$activeTabLink).each(function (link) {
-          if (!!link.hash) {
-            var $currContent = $(M.escapeHash(link.hash));
-            if ($currContent.length) {
-              $currContent[0].style.display = 'none';
-            }
-          }
-        });
-      }
-
-      /**
-       * Teardown normal tabs.
-       */
-
-    }, {
-      key: "_teardownNormalTabs",
-      value: function _teardownNormalTabs() {
-        // show Tabs Content
-        this.$tabLinks.each(function (link) {
-          if (!!link.hash) {
-            var $currContent = $(M.escapeHash(link.hash));
-            if ($currContent.length) {
-              $currContent[0].style.display = '';
-            }
-          }
-        });
-      }
-
-      /**
-       * set tabs and tab width
-       */
-
-    }, {
-      key: "_setTabsAndTabWidth",
-      value: function _setTabsAndTabWidth() {
-        this.tabsWidth = this.$el.width();
-        this.tabWidth = Math.max(this.tabsWidth, this.el.scrollWidth) / this.$tabLinks.length;
-      }
-
-      /**
-       * Finds right attribute for indicator based on active tab.
-       * @param {cash} el
-       */
-
-    }, {
-      key: "_calcRightPos",
-      value: function _calcRightPos(el) {
-        return Math.ceil(this.tabsWidth - el.position().left - el[0].getBoundingClientRect().width);
-      }
-
-      /**
-       * Finds left attribute for indicator based on active tab.
-       * @param {cash} el
-       */
-
-    }, {
-      key: "_calcLeftPos",
-      value: function _calcLeftPos(el) {
-        return Math.floor(el.position().left);
-      }
-    }, {
-      key: "updateTabIndicator",
-      value: function updateTabIndicator() {
-        this._setTabsAndTabWidth();
-        this._animateIndicator(this.index);
-      }
-
-      /**
-       * Animates Indicator to active tab.
-       * @param {Number} prevIndex
-       */
-
-    }, {
-      key: "_animateIndicator",
-      value: function _animateIndicator(prevIndex) {
-        var leftDelay = 0,
-            rightDelay = 0;
-
-        if (this.index - prevIndex >= 0) {
-          leftDelay = 90;
-        } else {
-          rightDelay = 90;
-        }
-
-        // Animate
-        var animOptions = {
-          targets: this._indicator,
-          left: {
-            value: this._calcLeftPos(this.$activeTabLink),
-            delay: leftDelay
-          },
-          right: {
-            value: this._calcRightPos(this.$activeTabLink),
-            delay: rightDelay
-          },
-          duration: this.options.duration,
-          easing: 'easeOutQuad'
-        };
-        anim.remove(this._indicator);
-        anim(animOptions);
-      }
-
-      /**
-       * Select tab.
-       * @param {String} tabId
-       */
-
-    }, {
-      key: "select",
-      value: function select(tabId) {
-        var tab = this.$tabLinks.filter('[href="#' + tabId + '"]');
-        if (tab.length) {
-          tab.trigger('click');
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Tabs.__proto__ || Object.getPrototypeOf(Tabs), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Tabs;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Tabs;
-  }(Component);
-
-  M.Tabs = Tabs;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Tabs, 'tabs', 'M_Tabs');
-  }
-})(cash, M.anime);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    exitDelay: 200,
-    enterDelay: 0,
-    html: null,
-    margin: 5,
-    inDuration: 250,
-    outDuration: 200,
-    position: 'bottom',
-    transitionMovement: 10
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Tooltip = function (_Component7) {
-    _inherits(Tooltip, _Component7);
-
-    /**
-     * Construct Tooltip instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Tooltip(el, options) {
-      _classCallCheck(this, Tooltip);
-
-      var _this26 = _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call(this, Tooltip, el, options));
-
-      _this26.el.M_Tooltip = _this26;
-      _this26.options = $.extend({}, Tooltip.defaults, options);
-
-      _this26.isOpen = false;
-      _this26.isHovered = false;
-      _this26.isFocused = false;
-      _this26._appendTooltipEl();
-      _this26._setupEventHandlers();
-      return _this26;
-    }
-
-    _createClass(Tooltip, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        $(this.tooltipEl).remove();
-        this._removeEventHandlers();
-        this.el.M_Tooltip = undefined;
-      }
-    }, {
-      key: "_appendTooltipEl",
-      value: function _appendTooltipEl() {
-        var tooltipEl = document.createElement('div');
-        tooltipEl.classList.add('material-tooltip');
-        this.tooltipEl = tooltipEl;
-
-        var tooltipContentEl = document.createElement('div');
-        tooltipContentEl.classList.add('tooltip-content');
-        tooltipContentEl.innerHTML = this.options.html;
-        tooltipEl.appendChild(tooltipContentEl);
-        document.body.appendChild(tooltipEl);
-      }
-    }, {
-      key: "_updateTooltipContent",
-      value: function _updateTooltipContent() {
-        this.tooltipEl.querySelector('.tooltip-content').innerHTML = this.options.html;
-      }
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleMouseEnterBound = this._handleMouseEnter.bind(this);
-        this._handleMouseLeaveBound = this._handleMouseLeave.bind(this);
-        this._handleFocusBound = this._handleFocus.bind(this);
-        this._handleBlurBound = this._handleBlur.bind(this);
-        this.el.addEventListener('mouseenter', this._handleMouseEnterBound);
-        this.el.addEventListener('mouseleave', this._handleMouseLeaveBound);
-        this.el.addEventListener('focus', this._handleFocusBound, true);
-        this.el.addEventListener('blur', this._handleBlurBound, true);
-      }
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('mouseenter', this._handleMouseEnterBound);
-        this.el.removeEventListener('mouseleave', this._handleMouseLeaveBound);
-        this.el.removeEventListener('focus', this._handleFocusBound, true);
-        this.el.removeEventListener('blur', this._handleBlurBound, true);
-      }
-    }, {
-      key: "open",
-      value: function open(isManual) {
-        if (this.isOpen) {
-          return;
-        }
-        isManual = isManual === undefined ? true : undefined; // Default value true
-        this.isOpen = true;
-        // Update tooltip content with HTML attribute options
-        this.options = $.extend({}, this.options, this._getAttributeOptions());
-        this._updateTooltipContent();
-        this._setEnterDelayTimeout(isManual);
-      }
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-
-        this.isHovered = false;
-        this.isFocused = false;
-        this.isOpen = false;
-        this._setExitDelayTimeout();
-      }
-
-      /**
-       * Create timeout which delays when the tooltip closes
-       */
-
-    }, {
-      key: "_setExitDelayTimeout",
-      value: function _setExitDelayTimeout() {
-        var _this27 = this;
-
-        clearTimeout(this._exitDelayTimeout);
-
-        this._exitDelayTimeout = setTimeout(function () {
-          if (_this27.isHovered || _this27.isFocused) {
-            return;
-          }
-
-          _this27._animateOut();
-        }, this.options.exitDelay);
-      }
-
-      /**
-       * Create timeout which delays when the toast closes
-       */
-
-    }, {
-      key: "_setEnterDelayTimeout",
-      value: function _setEnterDelayTimeout(isManual) {
-        var _this28 = this;
-
-        clearTimeout(this._enterDelayTimeout);
-
-        this._enterDelayTimeout = setTimeout(function () {
-          if (!_this28.isHovered && !_this28.isFocused && !isManual) {
-            return;
-          }
-
-          _this28._animateIn();
-        }, this.options.enterDelay);
-      }
-    }, {
-      key: "_positionTooltip",
-      value: function _positionTooltip() {
-        var origin = this.el,
-            tooltip = this.tooltipEl,
-            originHeight = origin.offsetHeight,
-            originWidth = origin.offsetWidth,
-            tooltipHeight = tooltip.offsetHeight,
-            tooltipWidth = tooltip.offsetWidth,
-            newCoordinates = void 0,
-            margin = this.options.margin,
-            targetTop = void 0,
-            targetLeft = void 0;
-
-        this.xMovement = 0, this.yMovement = 0;
-
-        targetTop = origin.getBoundingClientRect().top + M.getDocumentScrollTop();
-        targetLeft = origin.getBoundingClientRect().left + M.getDocumentScrollLeft();
-
-        if (this.options.position === 'top') {
-          targetTop += -tooltipHeight - margin;
-          targetLeft += originWidth / 2 - tooltipWidth / 2;
-          this.yMovement = -this.options.transitionMovement;
-        } else if (this.options.position === 'right') {
-          targetTop += originHeight / 2 - tooltipHeight / 2;
-          targetLeft += originWidth + margin;
-          this.xMovement = this.options.transitionMovement;
-        } else if (this.options.position === 'left') {
-          targetTop += originHeight / 2 - tooltipHeight / 2;
-          targetLeft += -tooltipWidth - margin;
-          this.xMovement = -this.options.transitionMovement;
-        } else {
-          targetTop += originHeight + margin;
-          targetLeft += originWidth / 2 - tooltipWidth / 2;
-          this.yMovement = this.options.transitionMovement;
-        }
-
-        newCoordinates = this._repositionWithinScreen(targetLeft, targetTop, tooltipWidth, tooltipHeight);
-        $(tooltip).css({
-          top: newCoordinates.y + 'px',
-          left: newCoordinates.x + 'px'
-        });
-      }
-    }, {
-      key: "_repositionWithinScreen",
-      value: function _repositionWithinScreen(x, y, width, height) {
-        var scrollLeft = M.getDocumentScrollLeft();
-        var scrollTop = M.getDocumentScrollTop();
-        var newX = x - scrollLeft;
-        var newY = y - scrollTop;
-
-        var bounding = {
-          left: newX,
-          top: newY,
-          width: width,
-          height: height
-        };
-
-        var offset = this.options.margin + this.options.transitionMovement;
-        var edges = M.checkWithinContainer(document.body, bounding, offset);
-
-        if (edges.left) {
-          newX = offset;
-        } else if (edges.right) {
-          newX -= newX + width - window.innerWidth;
-        }
-
-        if (edges.top) {
-          newY = offset;
-        } else if (edges.bottom) {
-          newY -= newY + height - window.innerHeight;
-        }
-
-        return {
-          x: newX + scrollLeft,
-          y: newY + scrollTop
-        };
-      }
-    }, {
-      key: "_animateIn",
-      value: function _animateIn() {
-        this._positionTooltip();
-        this.tooltipEl.style.visibility = 'visible';
-        anim.remove(this.tooltipEl);
-        anim({
-          targets: this.tooltipEl,
-          opacity: 1,
-          translateX: this.xMovement,
-          translateY: this.yMovement,
-          duration: this.options.inDuration,
-          easing: 'easeOutCubic'
-        });
-      }
-    }, {
-      key: "_animateOut",
-      value: function _animateOut() {
-        anim.remove(this.tooltipEl);
-        anim({
-          targets: this.tooltipEl,
-          opacity: 0,
-          translateX: 0,
-          translateY: 0,
-          duration: this.options.outDuration,
-          easing: 'easeOutCubic'
-        });
-      }
-    }, {
-      key: "_handleMouseEnter",
-      value: function _handleMouseEnter() {
-        this.isHovered = true;
-        this.isFocused = false; // Allows close of tooltip when opened by focus.
-        this.open(false);
-      }
-    }, {
-      key: "_handleMouseLeave",
-      value: function _handleMouseLeave() {
-        this.isHovered = false;
-        this.isFocused = false; // Allows close of tooltip when opened by focus.
-        this.close();
-      }
-    }, {
-      key: "_handleFocus",
-      value: function _handleFocus() {
-        if (M.tabPressed) {
-          this.isFocused = true;
-          this.open(false);
-        }
-      }
-    }, {
-      key: "_handleBlur",
-      value: function _handleBlur() {
-        this.isFocused = false;
-        this.close();
-      }
-    }, {
-      key: "_getAttributeOptions",
-      value: function _getAttributeOptions() {
-        var attributeOptions = {};
-        var tooltipTextOption = this.el.getAttribute('data-tooltip');
-        var positionOption = this.el.getAttribute('data-position');
-
-        if (tooltipTextOption) {
-          attributeOptions.html = tooltipTextOption;
-        }
-
-        if (positionOption) {
-          attributeOptions.position = positionOption;
-        }
-        return attributeOptions;
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Tooltip.__proto__ || Object.getPrototypeOf(Tooltip), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Tooltip;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Tooltip;
-  }(Component);
-
-  M.Tooltip = Tooltip;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Tooltip, 'tooltip', 'M_Tooltip');
-  }
-})(cash, M.anime);
-; /*!
-  * Waves v0.6.4
-  * http://fian.my.id/Waves
-  *
-  * Copyright 2014 Alfiana E. Sibuea and other contributors
-  * Released under the MIT license
-  * https://github.com/fians/Waves/blob/master/LICENSE
-  */
-
-;(function (window) {
-  'use strict';
-
-  var Waves = Waves || {};
-  var $$ = document.querySelectorAll.bind(document);
-
-  // Find exact position of element
-  function isWindow(obj) {
-    return obj !== null && obj === obj.window;
-  }
-
-  function getWindow(elem) {
-    return isWindow(elem) ? elem : elem.nodeType === 9 && elem.defaultView;
-  }
-
-  function offset(elem) {
-    var docElem,
-        win,
-        box = { top: 0, left: 0 },
-        doc = elem && elem.ownerDocument;
-
-    docElem = doc.documentElement;
-
-    if (typeof elem.getBoundingClientRect !== typeof undefined) {
-      box = elem.getBoundingClientRect();
-    }
-    win = getWindow(doc);
-    return {
-      top: box.top + win.pageYOffset - docElem.clientTop,
-      left: box.left + win.pageXOffset - docElem.clientLeft
-    };
-  }
-
-  function convertStyle(obj) {
-    var style = '';
-
-    for (var a in obj) {
-      if (obj.hasOwnProperty(a)) {
-        style += a + ':' + obj[a] + ';';
-      }
-    }
-
-    return style;
-  }
-
-  var Effect = {
-
-    // Effect delay
-    duration: 750,
-
-    show: function (e, element) {
-
-      // Disable right click
-      if (e.button === 2) {
-        return false;
-      }
-
-      var el = element || this;
-
-      // Create ripple
-      var ripple = document.createElement('div');
-      ripple.className = 'waves-ripple';
-      el.appendChild(ripple);
-
-      // Get click coordinate and element witdh
-      var pos = offset(el);
-      var relativeY = e.pageY - pos.top;
-      var relativeX = e.pageX - pos.left;
-      var scale = 'scale(' + el.clientWidth / 100 * 10 + ')';
-
-      // Support for touch devices
-      if ('touches' in e) {
-        relativeY = e.touches[0].pageY - pos.top;
-        relativeX = e.touches[0].pageX - pos.left;
-      }
-
-      // Attach data to element
-      ripple.setAttribute('data-hold', Date.now());
-      ripple.setAttribute('data-scale', scale);
-      ripple.setAttribute('data-x', relativeX);
-      ripple.setAttribute('data-y', relativeY);
-
-      // Set ripple position
-      var rippleStyle = {
-        'top': relativeY + 'px',
-        'left': relativeX + 'px'
-      };
-
-      ripple.className = ripple.className + ' waves-notransition';
-      ripple.setAttribute('style', convertStyle(rippleStyle));
-      ripple.className = ripple.className.replace('waves-notransition', '');
-
-      // Scale the ripple
-      rippleStyle['-webkit-transform'] = scale;
-      rippleStyle['-moz-transform'] = scale;
-      rippleStyle['-ms-transform'] = scale;
-      rippleStyle['-o-transform'] = scale;
-      rippleStyle.transform = scale;
-      rippleStyle.opacity = '1';
-
-      rippleStyle['-webkit-transition-duration'] = Effect.duration + 'ms';
-      rippleStyle['-moz-transition-duration'] = Effect.duration + 'ms';
-      rippleStyle['-o-transition-duration'] = Effect.duration + 'ms';
-      rippleStyle['transition-duration'] = Effect.duration + 'ms';
-
-      rippleStyle['-webkit-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
-      rippleStyle['-moz-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
-      rippleStyle['-o-transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
-      rippleStyle['transition-timing-function'] = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)';
-
-      ripple.setAttribute('style', convertStyle(rippleStyle));
-    },
-
-    hide: function (e) {
-      TouchHandler.touchup(e);
-
-      var el = this;
-      var width = el.clientWidth * 1.4;
-
-      // Get first ripple
-      var ripple = null;
-      var ripples = el.getElementsByClassName('waves-ripple');
-      if (ripples.length > 0) {
-        ripple = ripples[ripples.length - 1];
-      } else {
-        return false;
-      }
-
-      var relativeX = ripple.getAttribute('data-x');
-      var relativeY = ripple.getAttribute('data-y');
-      var scale = ripple.getAttribute('data-scale');
-
-      // Get delay beetween mousedown and mouse leave
-      var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
-      var delay = 350 - diff;
-
-      if (delay < 0) {
-        delay = 0;
-      }
-
-      // Fade out ripple after delay
-      setTimeout(function () {
-        var style = {
-          'top': relativeY + 'px',
-          'left': relativeX + 'px',
-          'opacity': '0',
-
-          // Duration
-          '-webkit-transition-duration': Effect.duration + 'ms',
-          '-moz-transition-duration': Effect.duration + 'ms',
-          '-o-transition-duration': Effect.duration + 'ms',
-          'transition-duration': Effect.duration + 'ms',
-          '-webkit-transform': scale,
-          '-moz-transform': scale,
-          '-ms-transform': scale,
-          '-o-transform': scale,
-          'transform': scale
-        };
-
-        ripple.setAttribute('style', convertStyle(style));
-
-        setTimeout(function () {
-          try {
-            el.removeChild(ripple);
-          } catch (e) {
-            return false;
-          }
-        }, Effect.duration);
-      }, delay);
-    },
-
-    // Little hack to make <input> can perform waves effect
-    wrapInput: function (elements) {
-      for (var a = 0; a < elements.length; a++) {
-        var el = elements[a];
-
-        if (el.tagName.toLowerCase() === 'input') {
-          var parent = el.parentNode;
-
-          // If input already have parent just pass through
-          if (parent.tagName.toLowerCase() === 'i' && parent.className.indexOf('waves-effect') !== -1) {
-            continue;
-          }
-
-          // Put element class and style to the specified parent
-          var wrapper = document.createElement('i');
-          wrapper.className = el.className + ' waves-input-wrapper';
-
-          var elementStyle = el.getAttribute('style');
-
-          if (!elementStyle) {
-            elementStyle = '';
-          }
-
-          wrapper.setAttribute('style', elementStyle);
-
-          el.className = 'waves-button-input';
-          el.removeAttribute('style');
-
-          // Put element as child
-          parent.replaceChild(wrapper, el);
-          wrapper.appendChild(el);
-        }
-      }
-    }
-  };
-
-  /**
-   * Disable mousedown event for 500ms during and after touch
-   */
-  var TouchHandler = {
-    /* uses an integer rather than bool so there's no issues with
-     * needing to clear timeouts if another touch event occurred
-     * within the 500ms. Cannot mouseup between touchstart and
-     * touchend, nor in the 500ms after touchend. */
-    touches: 0,
-    allowEvent: function (e) {
-      var allow = true;
-
-      if (e.type === 'touchstart') {
-        TouchHandler.touches += 1; //push
-      } else if (e.type === 'touchend' || e.type === 'touchcancel') {
-        setTimeout(function () {
-          if (TouchHandler.touches > 0) {
-            TouchHandler.touches -= 1; //pop after 500ms
-          }
-        }, 500);
-      } else if (e.type === 'mousedown' && TouchHandler.touches > 0) {
-        allow = false;
-      }
-
-      return allow;
-    },
-    touchup: function (e) {
-      TouchHandler.allowEvent(e);
-    }
-  };
-
-  /**
-   * Delegated click handler for .waves-effect element.
-   * returns null when .waves-effect element not in "click tree"
-   */
-  function getWavesEffectElement(e) {
-    if (TouchHandler.allowEvent(e) === false) {
-      return null;
-    }
-
-    var element = null;
-    var target = e.target || e.srcElement;
-
-    while (target.parentNode !== null) {
-      if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {
-        element = target;
-        break;
-      }
-      target = target.parentNode;
-    }
-    return element;
-  }
-
-  /**
-   * Bubble the click and show effect if .waves-effect elem was found
-   */
-  function showEffect(e) {
-    var element = getWavesEffectElement(e);
-
-    if (element !== null) {
-      Effect.show(e, element);
-
-      if ('ontouchstart' in window) {
-        element.addEventListener('touchend', Effect.hide, false);
-        element.addEventListener('touchcancel', Effect.hide, false);
-      }
-
-      element.addEventListener('mouseup', Effect.hide, false);
-      element.addEventListener('mouseleave', Effect.hide, false);
-      element.addEventListener('dragend', Effect.hide, false);
-    }
-  }
-
-  Waves.displayEffect = function (options) {
-    options = options || {};
-
-    if ('duration' in options) {
-      Effect.duration = options.duration;
-    }
-
-    //Wrap input inside <i> tag
-    Effect.wrapInput($$('.waves-effect'));
-
-    if ('ontouchstart' in window) {
-      document.body.addEventListener('touchstart', showEffect, false);
-    }
-
-    document.body.addEventListener('mousedown', showEffect, false);
-  };
-
-  /**
-   * Attach Waves to an input element (or any element which doesn't
-   * bubble mouseup/mousedown events).
-   *   Intended to be used with dynamically loaded forms/inputs, or
-   * where the user doesn't want a delegated click handler.
-   */
-  Waves.attach = function (element) {
-    //FUTURE: automatically add waves classes and allow users
-    // to specify them with an options param? Eg. light/classic/button
-    if (element.tagName.toLowerCase() === 'input') {
-      Effect.wrapInput([element]);
-      element = element.parentNode;
-    }
-
-    if ('ontouchstart' in window) {
-      element.addEventListener('touchstart', showEffect, false);
-    }
-
-    element.addEventListener('mousedown', showEffect, false);
-  };
-
-  window.Waves = Waves;
-
-  document.addEventListener('DOMContentLoaded', function () {
-    Waves.displayEffect();
-  }, false);
-})(window);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    html: '',
-    displayLength: 4000,
-    inDuration: 300,
-    outDuration: 375,
-    classes: '',
-    completeCallback: null,
-    activationPercent: 0.8
-  };
-
-  var Toast = function () {
-    function Toast(options) {
-      _classCallCheck(this, Toast);
-
-      /**
-       * Options for the toast
-       * @member Toast#options
-       */
-      this.options = $.extend({}, Toast.defaults, options);
-      this.message = this.options.html;
-
-      /**
-       * Describes current pan state toast
-       * @type {Boolean}
-       */
-      this.panning = false;
-
-      /**
-       * Time remaining until toast is removed
-       */
-      this.timeRemaining = this.options.displayLength;
-
-      if (Toast._toasts.length === 0) {
-        Toast._createContainer();
-      }
-
-      // Create new toast
-      Toast._toasts.push(this);
-      var toastElement = this._createToast();
-      toastElement.M_Toast = this;
-      this.el = toastElement;
-      this.$el = $(toastElement);
-      this._animateIn();
-      this._setTimer();
-    }
-
-    _createClass(Toast, [{
-      key: "_createToast",
-
-
-      /**
-       * Create toast and append it to toast container
-       */
-      value: function _createToast() {
-        var toast = document.createElement('div');
-        toast.classList.add('toast');
-
-        // Add custom classes onto toast
-        if (!!this.options.classes.length) {
-          $(toast).addClass(this.options.classes);
-        }
-
-        // Set content
-        if (typeof HTMLElement === 'object' ? this.message instanceof HTMLElement : this.message && typeof this.message === 'object' && this.message !== null && this.message.nodeType === 1 && typeof this.message.nodeName === 'string') {
-          toast.appendChild(this.message);
-
-          // Check if it is jQuery object
-        } else if (!!this.message.jquery) {
-          $(toast).append(this.message[0]);
-
-          // Insert as html;
-        } else {
-          toast.innerHTML = this.message;
-        }
-
-        // Append toasft
-        Toast._container.appendChild(toast);
-        return toast;
-      }
-
-      /**
-       * Animate in toast
-       */
-
-    }, {
-      key: "_animateIn",
-      value: function _animateIn() {
-        // Animate toast in
-        anim({
-          targets: this.el,
-          top: 0,
-          opacity: 1,
-          duration: this.options.inDuration,
-          easing: 'easeOutCubic'
-        });
-      }
-
-      /**
-       * Create setInterval which automatically removes toast when timeRemaining >= 0
-       * has been reached
-       */
-
-    }, {
-      key: "_setTimer",
-      value: function _setTimer() {
-        var _this29 = this;
-
-        if (this.timeRemaining !== Infinity) {
-          this.counterInterval = setInterval(function () {
-            // If toast is not being dragged, decrease its time remaining
-            if (!_this29.panning) {
-              _this29.timeRemaining -= 20;
-            }
-
-            // Animate toast out
-            if (_this29.timeRemaining <= 0) {
-              _this29.dismiss();
-            }
-          }, 20);
-        }
-      }
-
-      /**
-       * Dismiss toast with animation
-       */
-
-    }, {
-      key: "dismiss",
-      value: function dismiss() {
-        var _this30 = this;
-
-        window.clearInterval(this.counterInterval);
-        var activationDistance = this.el.offsetWidth * this.options.activationPercent;
-
-        if (this.wasSwiped) {
-          this.el.style.transition = 'transform .05s, opacity .05s';
-          this.el.style.transform = "translateX(" + activationDistance + "px)";
-          this.el.style.opacity = 0;
-        }
-
-        anim({
-          targets: this.el,
-          opacity: 0,
-          marginTop: -40,
-          duration: this.options.outDuration,
-          easing: 'easeOutExpo',
-          complete: function () {
-            // Call the optional callback
-            if (typeof _this30.options.completeCallback === 'function') {
-              _this30.options.completeCallback();
-            }
-            // Remove toast from DOM
-            _this30.$el.remove();
-            Toast._toasts.splice(Toast._toasts.indexOf(_this30), 1);
-            if (Toast._toasts.length === 0) {
-              Toast._removeContainer();
-            }
-          }
-        });
-      }
-    }], [{
-      key: "getInstance",
-
-
-      /**
-       * Get Instance
-       */
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Toast;
-      }
-
-      /**
-       * Append toast container and add event handlers
-       */
-
-    }, {
-      key: "_createContainer",
-      value: function _createContainer() {
-        var container = document.createElement('div');
-        container.setAttribute('id', 'toast-container');
-
-        // Add event handler
-        container.addEventListener('touchstart', Toast._onDragStart);
-        container.addEventListener('touchmove', Toast._onDragMove);
-        container.addEventListener('touchend', Toast._onDragEnd);
-
-        container.addEventListener('mousedown', Toast._onDragStart);
-        document.addEventListener('mousemove', Toast._onDragMove);
-        document.addEventListener('mouseup', Toast._onDragEnd);
-
-        document.body.appendChild(container);
-        Toast._container = container;
-      }
-
-      /**
-       * Remove toast container and event handlers
-       */
-
-    }, {
-      key: "_removeContainer",
-      value: function _removeContainer() {
-        // Add event handler
-        document.removeEventListener('mousemove', Toast._onDragMove);
-        document.removeEventListener('mouseup', Toast._onDragEnd);
-
-        $(Toast._container).remove();
-        Toast._container = null;
-      }
-
-      /**
-       * Begin drag handler
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_onDragStart",
-      value: function _onDragStart(e) {
-        if (e.target && $(e.target).closest('.toast').length) {
-          var $toast = $(e.target).closest('.toast');
-          var toast = $toast[0].M_Toast;
-          toast.panning = true;
-          Toast._draggedToast = toast;
-          toast.el.classList.add('panning');
-          toast.el.style.transition = '';
-          toast.startingXPos = Toast._xPos(e);
-          toast.time = Date.now();
-          toast.xPos = Toast._xPos(e);
-        }
-      }
-
-      /**
-       * Drag move handler
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_onDragMove",
-      value: function _onDragMove(e) {
-        if (!!Toast._draggedToast) {
-          e.preventDefault();
-          var toast = Toast._draggedToast;
-          toast.deltaX = Math.abs(toast.xPos - Toast._xPos(e));
-          toast.xPos = Toast._xPos(e);
-          toast.velocityX = toast.deltaX / (Date.now() - toast.time);
-          toast.time = Date.now();
-
-          var totalDeltaX = toast.xPos - toast.startingXPos;
-          var activationDistance = toast.el.offsetWidth * toast.options.activationPercent;
-          toast.el.style.transform = "translateX(" + totalDeltaX + "px)";
-          toast.el.style.opacity = 1 - Math.abs(totalDeltaX / activationDistance);
-        }
-      }
-
-      /**
-       * End drag handler
-       */
-
-    }, {
-      key: "_onDragEnd",
-      value: function _onDragEnd() {
-        if (!!Toast._draggedToast) {
-          var toast = Toast._draggedToast;
-          toast.panning = false;
-          toast.el.classList.remove('panning');
-
-          var totalDeltaX = toast.xPos - toast.startingXPos;
-          var activationDistance = toast.el.offsetWidth * toast.options.activationPercent;
-          var shouldBeDismissed = Math.abs(totalDeltaX) > activationDistance || toast.velocityX > 1;
-
-          // Remove toast
-          if (shouldBeDismissed) {
-            toast.wasSwiped = true;
-            toast.dismiss();
-
-            // Animate toast back to original position
-          } else {
-            toast.el.style.transition = 'transform .2s, opacity .2s';
-            toast.el.style.transform = '';
-            toast.el.style.opacity = '';
-          }
-          Toast._draggedToast = null;
-        }
-      }
-
-      /**
-       * Get x position of mouse or touch event
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_xPos",
-      value: function _xPos(e) {
-        if (e.targetTouches && e.targetTouches.length >= 1) {
-          return e.targetTouches[0].clientX;
-        }
-        // mouse event
-        return e.clientX;
-      }
-
-      /**
-       * Remove all toasts
-       */
-
-    }, {
-      key: "dismissAll",
-      value: function dismissAll() {
-        for (var toastIndex in Toast._toasts) {
-          Toast._toasts[toastIndex].dismiss();
-        }
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Toast;
-  }();
-
-  /**
-   * @static
-   * @memberof Toast
-   * @type {Array.<Toast>}
-   */
-
-
-  Toast._toasts = [];
-
-  /**
-   * @static
-   * @memberof Toast
-   */
-  Toast._container = null;
-
-  /**
-   * @static
-   * @memberof Toast
-   * @type {Toast}
-   */
-  Toast._draggedToast = null;
-
-  M.Toast = Toast;
-  M.toast = function (options) {
-    return new Toast(options);
-  };
-})(cash, M.anime);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    edge: 'left',
-    draggable: true,
-    inDuration: 250,
-    outDuration: 200,
-    onOpenStart: null,
-    onOpenEnd: null,
-    onCloseStart: null,
-    onCloseEnd: null,
-    preventScrolling: true
-  };
-
-  /**
-   * @class
-   */
-
-  var Sidenav = function (_Component8) {
-    _inherits(Sidenav, _Component8);
-
-    /**
-     * Construct Sidenav instance and set up overlay
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Sidenav(el, options) {
-      _classCallCheck(this, Sidenav);
-
-      var _this31 = _possibleConstructorReturn(this, (Sidenav.__proto__ || Object.getPrototypeOf(Sidenav)).call(this, Sidenav, el, options));
-
-      _this31.el.M_Sidenav = _this31;
-      _this31.id = _this31.$el.attr('id');
-
-      /**
-       * Options for the Sidenav
-       * @member Sidenav#options
-       * @prop {String} [edge='left'] - Side of screen on which Sidenav appears
-       * @prop {Boolean} [draggable=true] - Allow swipe gestures to open/close Sidenav
-       * @prop {Number} [inDuration=250] - Length in ms of enter transition
-       * @prop {Number} [outDuration=200] - Length in ms of exit transition
-       * @prop {Function} onOpenStart - Function called when sidenav starts entering
-       * @prop {Function} onOpenEnd - Function called when sidenav finishes entering
-       * @prop {Function} onCloseStart - Function called when sidenav starts exiting
-       * @prop {Function} onCloseEnd - Function called when sidenav finishes exiting
-       */
-      _this31.options = $.extend({}, Sidenav.defaults, options);
-
-      /**
-       * Describes open/close state of Sidenav
-       * @type {Boolean}
-       */
-      _this31.isOpen = false;
-
-      /**
-       * Describes if Sidenav is fixed
-       * @type {Boolean}
-       */
-      _this31.isFixed = _this31.el.classList.contains('sidenav-fixed');
-
-      /**
-       * Describes if Sidenav is being draggeed
-       * @type {Boolean}
-       */
-      _this31.isDragged = false;
-
-      // Window size variables for window resize checks
-      _this31.lastWindowWidth = window.innerWidth;
-      _this31.lastWindowHeight = window.innerHeight;
-
-      _this31._createOverlay();
-      _this31._createDragTarget();
-      _this31._setupEventHandlers();
-      _this31._setupClasses();
-      _this31._setupFixed();
-
-      Sidenav._sidenavs.push(_this31);
-      return _this31;
-    }
-
-    _createClass(Sidenav, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this._enableBodyScrolling();
-        this._overlay.parentNode.removeChild(this._overlay);
-        this.dragTarget.parentNode.removeChild(this.dragTarget);
-        this.el.M_Sidenav = undefined;
-        this.el.style.transform = '';
-
-        var index = Sidenav._sidenavs.indexOf(this);
-        if (index >= 0) {
-          Sidenav._sidenavs.splice(index, 1);
-        }
-      }
-    }, {
-      key: "_createOverlay",
-      value: function _createOverlay() {
-        var overlay = document.createElement('div');
-        this._closeBound = this.close.bind(this);
-        overlay.classList.add('sidenav-overlay');
-
-        overlay.addEventListener('click', this._closeBound);
-
-        document.body.appendChild(overlay);
-        this._overlay = overlay;
-      }
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        if (Sidenav._sidenavs.length === 0) {
-          document.body.addEventListener('click', this._handleTriggerClick);
-        }
-
-        this._handleDragTargetDragBound = this._handleDragTargetDrag.bind(this);
-        this._handleDragTargetReleaseBound = this._handleDragTargetRelease.bind(this);
-        this._handleCloseDragBound = this._handleCloseDrag.bind(this);
-        this._handleCloseReleaseBound = this._handleCloseRelease.bind(this);
-        this._handleCloseTriggerClickBound = this._handleCloseTriggerClick.bind(this);
-
-        this.dragTarget.addEventListener('touchmove', this._handleDragTargetDragBound);
-        this.dragTarget.addEventListener('touchend', this._handleDragTargetReleaseBound);
-        this._overlay.addEventListener('touchmove', this._handleCloseDragBound);
-        this._overlay.addEventListener('touchend', this._handleCloseReleaseBound);
-        this.el.addEventListener('touchmove', this._handleCloseDragBound);
-        this.el.addEventListener('touchend', this._handleCloseReleaseBound);
-        this.el.addEventListener('click', this._handleCloseTriggerClickBound);
-
-        // Add resize for side nav fixed
-        if (this.isFixed) {
-          this._handleWindowResizeBound = this._handleWindowResize.bind(this);
-          window.addEventListener('resize', this._handleWindowResizeBound);
-        }
-      }
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        if (Sidenav._sidenavs.length === 1) {
-          document.body.removeEventListener('click', this._handleTriggerClick);
-        }
-
-        this.dragTarget.removeEventListener('touchmove', this._handleDragTargetDragBound);
-        this.dragTarget.removeEventListener('touchend', this._handleDragTargetReleaseBound);
-        this._overlay.removeEventListener('touchmove', this._handleCloseDragBound);
-        this._overlay.removeEventListener('touchend', this._handleCloseReleaseBound);
-        this.el.removeEventListener('touchmove', this._handleCloseDragBound);
-        this.el.removeEventListener('touchend', this._handleCloseReleaseBound);
-        this.el.removeEventListener('click', this._handleCloseTriggerClickBound);
-
-        // Remove resize for side nav fixed
-        if (this.isFixed) {
-          window.removeEventListener('resize', this._handleWindowResizeBound);
-        }
-      }
-
-      /**
-       * Handle Trigger Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleTriggerClick",
-      value: function _handleTriggerClick(e) {
-        var $trigger = $(e.target).closest('.sidenav-trigger');
-        if (e.target && $trigger.length) {
-          var sidenavId = M.getIdFromTrigger($trigger[0]);
-
-          var sidenavInstance = document.getElementById(sidenavId).M_Sidenav;
-          if (sidenavInstance) {
-            sidenavInstance.open($trigger);
-          }
-          e.preventDefault();
-        }
-      }
-
-      /**
-       * Set variables needed at the beggining of drag
-       * and stop any current transition.
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_startDrag",
-      value: function _startDrag(e) {
-        var clientX = e.targetTouches[0].clientX;
-        this.isDragged = true;
-        this._startingXpos = clientX;
-        this._xPos = this._startingXpos;
-        this._time = Date.now();
-        this._width = this.el.getBoundingClientRect().width;
-        this._overlay.style.display = 'block';
-        this._initialScrollTop = this.isOpen ? this.el.scrollTop : M.getDocumentScrollTop();
-        this._verticallyScrolling = false;
-        anim.remove(this.el);
-        anim.remove(this._overlay);
-      }
-
-      /**
-       * Set variables needed at each drag move update tick
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_dragMoveUpdate",
-      value: function _dragMoveUpdate(e) {
-        var clientX = e.targetTouches[0].clientX;
-        var currentScrollTop = this.isOpen ? this.el.scrollTop : M.getDocumentScrollTop();
-        this.deltaX = Math.abs(this._xPos - clientX);
-        this._xPos = clientX;
-        this.velocityX = this.deltaX / (Date.now() - this._time);
-        this._time = Date.now();
-        if (this._initialScrollTop !== currentScrollTop) {
-          this._verticallyScrolling = true;
-        }
-      }
-
-      /**
-       * Handles Dragging of Sidenav
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleDragTargetDrag",
-      value: function _handleDragTargetDrag(e) {
-        // Check if draggable
-        if (!this.options.draggable || this._isCurrentlyFixed() || this._verticallyScrolling) {
-          return;
-        }
-
-        // If not being dragged, set initial drag start variables
-        if (!this.isDragged) {
-          this._startDrag(e);
-        }
-
-        // Run touchmove updates
-        this._dragMoveUpdate(e);
-
-        // Calculate raw deltaX
-        var totalDeltaX = this._xPos - this._startingXpos;
-
-        // dragDirection is the attempted user drag direction
-        var dragDirection = totalDeltaX > 0 ? 'right' : 'left';
-
-        // Don't allow totalDeltaX to exceed Sidenav width or be dragged in the opposite direction
-        totalDeltaX = Math.min(this._width, Math.abs(totalDeltaX));
-        if (this.options.edge === dragDirection) {
-          totalDeltaX = 0;
-        }
-
-        /**
-         * transformX is the drag displacement
-         * transformPrefix is the initial transform placement
-         * Invert values if Sidenav is right edge
-         */
-        var transformX = totalDeltaX;
-        var transformPrefix = 'translateX(-100%)';
-        if (this.options.edge === 'right') {
-          transformPrefix = 'translateX(100%)';
-          transformX = -transformX;
-        }
-
-        // Calculate open/close percentage of sidenav, with open = 1 and close = 0
-        this.percentOpen = Math.min(1, totalDeltaX / this._width);
-
-        // Set transform and opacity styles
-        this.el.style.transform = transformPrefix + " translateX(" + transformX + "px)";
-        this._overlay.style.opacity = this.percentOpen;
-      }
-
-      /**
-       * Handle Drag Target Release
-       */
-
-    }, {
-      key: "_handleDragTargetRelease",
-      value: function _handleDragTargetRelease() {
-        if (this.isDragged) {
-          if (this.percentOpen > 0.2) {
-            this.open();
-          } else {
-            this._animateOut();
-          }
-
-          this.isDragged = false;
-          this._verticallyScrolling = false;
-        }
-      }
-
-      /**
-       * Handle Close Drag
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCloseDrag",
-      value: function _handleCloseDrag(e) {
-        if (this.isOpen) {
-          // Check if draggable
-          if (!this.options.draggable || this._isCurrentlyFixed() || this._verticallyScrolling) {
-            return;
-          }
-
-          // If not being dragged, set initial drag start variables
-          if (!this.isDragged) {
-            this._startDrag(e);
-          }
-
-          // Run touchmove updates
-          this._dragMoveUpdate(e);
-
-          // Calculate raw deltaX
-          var totalDeltaX = this._xPos - this._startingXpos;
-
-          // dragDirection is the attempted user drag direction
-          var dragDirection = totalDeltaX > 0 ? 'right' : 'left';
-
-          // Don't allow totalDeltaX to exceed Sidenav width or be dragged in the opposite direction
-          totalDeltaX = Math.min(this._width, Math.abs(totalDeltaX));
-          if (this.options.edge !== dragDirection) {
-            totalDeltaX = 0;
-          }
-
-          var transformX = -totalDeltaX;
-          if (this.options.edge === 'right') {
-            transformX = -transformX;
-          }
-
-          // Calculate open/close percentage of sidenav, with open = 1 and close = 0
-          this.percentOpen = Math.min(1, 1 - totalDeltaX / this._width);
-
-          // Set transform and opacity styles
-          this.el.style.transform = "translateX(" + transformX + "px)";
-          this._overlay.style.opacity = this.percentOpen;
-        }
-      }
-
-      /**
-       * Handle Close Release
-       */
-
-    }, {
-      key: "_handleCloseRelease",
-      value: function _handleCloseRelease() {
-        if (this.isOpen && this.isDragged) {
-          if (this.percentOpen > 0.8) {
-            this._animateIn();
-          } else {
-            this.close();
-          }
-
-          this.isDragged = false;
-          this._verticallyScrolling = false;
-        }
-      }
-
-      /**
-       * Handles closing of Sidenav when element with class .sidenav-close
-       */
-
-    }, {
-      key: "_handleCloseTriggerClick",
-      value: function _handleCloseTriggerClick(e) {
-        var $closeTrigger = $(e.target).closest('.sidenav-close');
-        if ($closeTrigger.length && !this._isCurrentlyFixed()) {
-          this.close();
-        }
-      }
-
-      /**
-       * Handle Window Resize
-       */
-
-    }, {
-      key: "_handleWindowResize",
-      value: function _handleWindowResize() {
-        // Only handle horizontal resizes
-        if (this.lastWindowWidth !== window.innerWidth) {
-          if (window.innerWidth > 992) {
-            this.open();
-          } else {
-            this.close();
-          }
-        }
-
-        this.lastWindowWidth = window.innerWidth;
-        this.lastWindowHeight = window.innerHeight;
-      }
-    }, {
-      key: "_setupClasses",
-      value: function _setupClasses() {
-        if (this.options.edge === 'right') {
-          this.el.classList.add('right-aligned');
-          this.dragTarget.classList.add('right-aligned');
-        }
-      }
-    }, {
-      key: "_removeClasses",
-      value: function _removeClasses() {
-        this.el.classList.remove('right-aligned');
-        this.dragTarget.classList.remove('right-aligned');
-      }
-    }, {
-      key: "_setupFixed",
-      value: function _setupFixed() {
-        if (this._isCurrentlyFixed()) {
-          this.open();
-        }
-      }
-    }, {
-      key: "_isCurrentlyFixed",
-      value: function _isCurrentlyFixed() {
-        return this.isFixed && window.innerWidth > 992;
-      }
-    }, {
-      key: "_createDragTarget",
-      value: function _createDragTarget() {
-        var dragTarget = document.createElement('div');
-        dragTarget.classList.add('drag-target');
-        document.body.appendChild(dragTarget);
-        this.dragTarget = dragTarget;
-      }
-    }, {
-      key: "_preventBodyScrolling",
-      value: function _preventBodyScrolling() {
-        var body = document.body;
-        body.style.overflow = 'hidden';
-      }
-    }, {
-      key: "_enableBodyScrolling",
-      value: function _enableBodyScrolling() {
-        var body = document.body;
-        body.style.overflow = '';
-      }
-    }, {
-      key: "open",
-      value: function open() {
-        if (this.isOpen === true) {
-          return;
-        }
-
-        this.isOpen = true;
-
-        // Run onOpenStart callback
-        if (typeof this.options.onOpenStart === 'function') {
-          this.options.onOpenStart.call(this, this.el);
-        }
-
-        // Handle fixed Sidenav
-        if (this._isCurrentlyFixed()) {
-          anim.remove(this.el);
-          anim({
-            targets: this.el,
-            translateX: 0,
-            duration: 0,
-            easing: 'easeOutQuad'
-          });
-          this._enableBodyScrolling();
-          this._overlay.style.display = 'none';
-
-          // Handle non-fixed Sidenav
-        } else {
-          if (this.options.preventScrolling) {
-            this._preventBodyScrolling();
-          }
-
-          if (!this.isDragged || this.percentOpen != 1) {
-            this._animateIn();
-          }
-        }
-      }
-    }, {
-      key: "close",
-      value: function close() {
-        if (this.isOpen === false) {
-          return;
-        }
-
-        this.isOpen = false;
-
-        // Run onCloseStart callback
-        if (typeof this.options.onCloseStart === 'function') {
-          this.options.onCloseStart.call(this, this.el);
-        }
-
-        // Handle fixed Sidenav
-        if (this._isCurrentlyFixed()) {
-          var transformX = this.options.edge === 'left' ? '-105%' : '105%';
-          this.el.style.transform = "translateX(" + transformX + ")";
-
-          // Handle non-fixed Sidenav
-        } else {
-          this._enableBodyScrolling();
-
-          if (!this.isDragged || this.percentOpen != 0) {
-            this._animateOut();
-          } else {
-            this._overlay.style.display = 'none';
-          }
-        }
-      }
-    }, {
-      key: "_animateIn",
-      value: function _animateIn() {
-        this._animateSidenavIn();
-        this._animateOverlayIn();
-      }
-    }, {
-      key: "_animateSidenavIn",
-      value: function _animateSidenavIn() {
-        var _this32 = this;
-
-        var slideOutPercent = this.options.edge === 'left' ? -1 : 1;
-        if (this.isDragged) {
-          slideOutPercent = this.options.edge === 'left' ? slideOutPercent + this.percentOpen : slideOutPercent - this.percentOpen;
-        }
-
-        anim.remove(this.el);
-        anim({
-          targets: this.el,
-          translateX: [slideOutPercent * 100 + "%", 0],
-          duration: this.options.inDuration,
-          easing: 'easeOutQuad',
-          complete: function () {
-            // Run onOpenEnd callback
-            if (typeof _this32.options.onOpenEnd === 'function') {
-              _this32.options.onOpenEnd.call(_this32, _this32.el);
-            }
-          }
-        });
-      }
-    }, {
-      key: "_animateOverlayIn",
-      value: function _animateOverlayIn() {
-        var start = 0;
-        if (this.isDragged) {
-          start = this.percentOpen;
-        } else {
-          $(this._overlay).css({
-            display: 'block'
-          });
-        }
-
-        anim.remove(this._overlay);
-        anim({
-          targets: this._overlay,
-          opacity: [start, 1],
-          duration: this.options.inDuration,
-          easing: 'easeOutQuad'
-        });
-      }
-    }, {
-      key: "_animateOut",
-      value: function _animateOut() {
-        this._animateSidenavOut();
-        this._animateOverlayOut();
-      }
-    }, {
-      key: "_animateSidenavOut",
-      value: function _animateSidenavOut() {
-        var _this33 = this;
-
-        var endPercent = this.options.edge === 'left' ? -1 : 1;
-        var slideOutPercent = 0;
-        if (this.isDragged) {
-          slideOutPercent = this.options.edge === 'left' ? endPercent + this.percentOpen : endPercent - this.percentOpen;
-        }
-
-        anim.remove(this.el);
-        anim({
-          targets: this.el,
-          translateX: [slideOutPercent * 100 + "%", endPercent * 105 + "%"],
-          duration: this.options.outDuration,
-          easing: 'easeOutQuad',
-          complete: function () {
-            // Run onOpenEnd callback
-            if (typeof _this33.options.onCloseEnd === 'function') {
-              _this33.options.onCloseEnd.call(_this33, _this33.el);
-            }
-          }
-        });
-      }
-    }, {
-      key: "_animateOverlayOut",
-      value: function _animateOverlayOut() {
-        var _this34 = this;
-
-        anim.remove(this._overlay);
-        anim({
-          targets: this._overlay,
-          opacity: 0,
-          duration: this.options.outDuration,
-          easing: 'easeOutQuad',
-          complete: function () {
-            $(_this34._overlay).css('display', 'none');
-          }
-        });
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Sidenav.__proto__ || Object.getPrototypeOf(Sidenav), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Sidenav;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Sidenav;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Sidenav
-   * @type {Array.<Sidenav>}
-   */
-
-
-  Sidenav._sidenavs = [];
-
-  M.Sidenav = Sidenav;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Sidenav, 'sidenav', 'M_Sidenav');
-  }
-})(cash, M.anime);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    throttle: 100,
-    scrollOffset: 200, // offset - 200 allows elements near bottom of page to scroll
-    activeClass: 'active',
-    getActiveElement: function (id) {
-      return 'a[href="#' + id + '"]';
-    }
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var ScrollSpy = function (_Component9) {
-    _inherits(ScrollSpy, _Component9);
-
-    /**
-     * Construct ScrollSpy instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function ScrollSpy(el, options) {
-      _classCallCheck(this, ScrollSpy);
-
-      var _this35 = _possibleConstructorReturn(this, (ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy)).call(this, ScrollSpy, el, options));
-
-      _this35.el.M_ScrollSpy = _this35;
-
-      /**
-       * Options for the modal
-       * @member Modal#options
-       * @prop {Number} [throttle=100] - Throttle of scroll handler
-       * @prop {Number} [scrollOffset=200] - Offset for centering element when scrolled to
-       * @prop {String} [activeClass='active'] - Class applied to active elements
-       * @prop {Function} [getActiveElement] - Used to find active element
-       */
-      _this35.options = $.extend({}, ScrollSpy.defaults, options);
-
-      // setup
-      ScrollSpy._elements.push(_this35);
-      ScrollSpy._count++;
-      ScrollSpy._increment++;
-      _this35.tickId = -1;
-      _this35.id = ScrollSpy._increment;
-      _this35._setupEventHandlers();
-      _this35._handleWindowScroll();
-      return _this35;
-    }
-
-    _createClass(ScrollSpy, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        ScrollSpy._elements.splice(ScrollSpy._elements.indexOf(this), 1);
-        ScrollSpy._elementsInView.splice(ScrollSpy._elementsInView.indexOf(this), 1);
-        ScrollSpy._visibleElements.splice(ScrollSpy._visibleElements.indexOf(this.$el), 1);
-        ScrollSpy._count--;
-        this._removeEventHandlers();
-        $(this.options.getActiveElement(this.$el.attr('id'))).removeClass(this.options.activeClass);
-        this.el.M_ScrollSpy = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        var throttledResize = M.throttle(this._handleWindowScroll, 200);
-        this._handleThrottledResizeBound = throttledResize.bind(this);
-        this._handleWindowScrollBound = this._handleWindowScroll.bind(this);
-        if (ScrollSpy._count === 1) {
-          window.addEventListener('scroll', this._handleWindowScrollBound);
-          window.addEventListener('resize', this._handleThrottledResizeBound);
-          document.body.addEventListener('click', this._handleTriggerClick);
-        }
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        if (ScrollSpy._count === 0) {
-          window.removeEventListener('scroll', this._handleWindowScrollBound);
-          window.removeEventListener('resize', this._handleThrottledResizeBound);
-          document.body.removeEventListener('click', this._handleTriggerClick);
-        }
-      }
-
-      /**
-       * Handle Trigger Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleTriggerClick",
-      value: function _handleTriggerClick(e) {
-        var $trigger = $(e.target);
-        for (var i = ScrollSpy._elements.length - 1; i >= 0; i--) {
-          var scrollspy = ScrollSpy._elements[i];
-          if ($trigger.is('a[href="#' + scrollspy.$el.attr('id') + '"]')) {
-            e.preventDefault();
-            var offset = scrollspy.$el.offset().top + 1;
-
-            anim({
-              targets: [document.documentElement, document.body],
-              scrollTop: offset - scrollspy.options.scrollOffset,
-              duration: 400,
-              easing: 'easeOutCubic'
-            });
-            break;
-          }
-        }
-      }
-
-      /**
-       * Handle Window Scroll
-       */
-
-    }, {
-      key: "_handleWindowScroll",
-      value: function _handleWindowScroll() {
-        // unique tick id
-        ScrollSpy._ticks++;
-
-        // viewport rectangle
-        var top = M.getDocumentScrollTop(),
-            left = M.getDocumentScrollLeft(),
-            right = left + window.innerWidth,
-            bottom = top + window.innerHeight;
-
-        // determine which elements are in view
-        var intersections = ScrollSpy._findElements(top, right, bottom, left);
-        for (var i = 0; i < intersections.length; i++) {
-          var scrollspy = intersections[i];
-          var lastTick = scrollspy.tickId;
-          if (lastTick < 0) {
-            // entered into view
-            scrollspy._enter();
-          }
-
-          // update tick id
-          scrollspy.tickId = ScrollSpy._ticks;
-        }
-
-        for (var _i = 0; _i < ScrollSpy._elementsInView.length; _i++) {
-          var _scrollspy = ScrollSpy._elementsInView[_i];
-          var _lastTick = _scrollspy.tickId;
-          if (_lastTick >= 0 && _lastTick !== ScrollSpy._ticks) {
-            // exited from view
-            _scrollspy._exit();
-            _scrollspy.tickId = -1;
-          }
-        }
-
-        // remember elements in view for next tick
-        ScrollSpy._elementsInView = intersections;
-      }
-
-      /**
-       * Find elements that are within the boundary
-       * @param {number} top
-       * @param {number} right
-       * @param {number} bottom
-       * @param {number} left
-       * @return {Array.<ScrollSpy>}   A collection of elements
-       */
-
-    }, {
-      key: "_enter",
-      value: function _enter() {
-        ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (value) {
-          return value.height() != 0;
-        });
-
-        if (ScrollSpy._visibleElements[0]) {
-          $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).removeClass(this.options.activeClass);
-          if (ScrollSpy._visibleElements[0][0].M_ScrollSpy && this.id < ScrollSpy._visibleElements[0][0].M_ScrollSpy.id) {
-            ScrollSpy._visibleElements.unshift(this.$el);
-          } else {
-            ScrollSpy._visibleElements.push(this.$el);
-          }
-        } else {
-          ScrollSpy._visibleElements.push(this.$el);
-        }
-
-        $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).addClass(this.options.activeClass);
-      }
-    }, {
-      key: "_exit",
-      value: function _exit() {
-        var _this36 = this;
-
-        ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (value) {
-          return value.height() != 0;
-        });
-
-        if (ScrollSpy._visibleElements[0]) {
-          $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).removeClass(this.options.activeClass);
-
-          ScrollSpy._visibleElements = ScrollSpy._visibleElements.filter(function (el) {
-            return el.attr('id') != _this36.$el.attr('id');
-          });
-          if (ScrollSpy._visibleElements[0]) {
-            // Check if empty
-            $(this.options.getActiveElement(ScrollSpy._visibleElements[0].attr('id'))).addClass(this.options.activeClass);
-          }
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(ScrollSpy.__proto__ || Object.getPrototypeOf(ScrollSpy), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_ScrollSpy;
-      }
-    }, {
-      key: "_findElements",
-      value: function _findElements(top, right, bottom, left) {
-        var hits = [];
-        for (var i = 0; i < ScrollSpy._elements.length; i++) {
-          var scrollspy = ScrollSpy._elements[i];
-          var currTop = top + scrollspy.options.scrollOffset || 200;
-
-          if (scrollspy.$el.height() > 0) {
-            var elTop = scrollspy.$el.offset().top,
-                elLeft = scrollspy.$el.offset().left,
-                elRight = elLeft + scrollspy.$el.width(),
-                elBottom = elTop + scrollspy.$el.height();
-
-            var isIntersect = !(elLeft > right || elRight < left || elTop > bottom || elBottom < currTop);
-
-            if (isIntersect) {
-              hits.push(scrollspy);
-            }
-          }
-        }
-        return hits;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return ScrollSpy;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof ScrollSpy
-   * @type {Array.<ScrollSpy>}
-   */
-
-
-  ScrollSpy._elements = [];
-
-  /**
-   * @static
-   * @memberof ScrollSpy
-   * @type {Array.<ScrollSpy>}
-   */
-  ScrollSpy._elementsInView = [];
-
-  /**
-   * @static
-   * @memberof ScrollSpy
-   * @type {Array.<cash>}
-   */
-  ScrollSpy._visibleElements = [];
-
-  /**
-   * @static
-   * @memberof ScrollSpy
-   */
-  ScrollSpy._count = 0;
-
-  /**
-   * @static
-   * @memberof ScrollSpy
-   */
-  ScrollSpy._increment = 0;
-
-  /**
-   * @static
-   * @memberof ScrollSpy
-   */
-  ScrollSpy._ticks = 0;
-
-  M.ScrollSpy = ScrollSpy;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(ScrollSpy, 'scrollSpy', 'M_ScrollSpy');
-  }
-})(cash, M.anime);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    data: {}, // Autocomplete data set
-    limit: Infinity, // Limit of results the autocomplete shows
-    onAutocomplete: null, // Callback for when autocompleted
-    minLength: 1, // Min characters before autocomplete starts
-    sortFunction: function (a, b, inputString) {
-      // Sort function for sorting autocomplete results
-      return a.indexOf(inputString) - b.indexOf(inputString);
-    }
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Autocomplete = function (_Component10) {
-    _inherits(Autocomplete, _Component10);
-
-    /**
-     * Construct Autocomplete instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Autocomplete(el, options) {
-      _classCallCheck(this, Autocomplete);
-
-      var _this37 = _possibleConstructorReturn(this, (Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call(this, Autocomplete, el, options));
-
-      _this37.el.M_Autocomplete = _this37;
-
-      /**
-       * Options for the autocomplete
-       * @member Autocomplete#options
-       * @prop {Number} duration
-       * @prop {Number} dist
-       * @prop {number} shift
-       * @prop {number} padding
-       * @prop {Boolean} fullWidth
-       * @prop {Boolean} indicators
-       * @prop {Boolean} noWrap
-       * @prop {Function} onCycleTo
-       */
-      _this37.options = $.extend({}, Autocomplete.defaults, options);
-
-      // Setup
-      _this37.isOpen = false;
-      _this37.count = 0;
-      _this37.activeIndex = -1;
-      _this37.oldVal;
-      _this37.$inputField = _this37.$el.closest('.input-field');
-      _this37.$active = $();
-      _this37._mousedown = false;
-      _this37._setupDropdown();
-
-      _this37._setupEventHandlers();
-      return _this37;
-    }
-
-    _createClass(Autocomplete, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this._removeDropdown();
-        this.el.M_Autocomplete = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleInputBlurBound = this._handleInputBlur.bind(this);
-        this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this);
-        this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
-        this._handleInputClickBound = this._handleInputClick.bind(this);
-        this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this);
-        this._handleContainerMouseupAndTouchendBound = this._handleContainerMouseupAndTouchend.bind(this);
-
-        this.el.addEventListener('blur', this._handleInputBlurBound);
-        this.el.addEventListener('keyup', this._handleInputKeyupAndFocusBound);
-        this.el.addEventListener('focus', this._handleInputKeyupAndFocusBound);
-        this.el.addEventListener('keydown', this._handleInputKeydownBound);
-        this.el.addEventListener('click', this._handleInputClickBound);
-        this.container.addEventListener('mousedown', this._handleContainerMousedownAndTouchstartBound);
-        this.container.addEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);
-
-        if (typeof window.ontouchstart !== 'undefined') {
-          this.container.addEventListener('touchstart', this._handleContainerMousedownAndTouchstartBound);
-          this.container.addEventListener('touchend', this._handleContainerMouseupAndTouchendBound);
-        }
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('blur', this._handleInputBlurBound);
-        this.el.removeEventListener('keyup', this._handleInputKeyupAndFocusBound);
-        this.el.removeEventListener('focus', this._handleInputKeyupAndFocusBound);
-        this.el.removeEventListener('keydown', this._handleInputKeydownBound);
-        this.el.removeEventListener('click', this._handleInputClickBound);
-        this.container.removeEventListener('mousedown', this._handleContainerMousedownAndTouchstartBound);
-        this.container.removeEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);
-
-        if (typeof window.ontouchstart !== 'undefined') {
-          this.container.removeEventListener('touchstart', this._handleContainerMousedownAndTouchstartBound);
-          this.container.removeEventListener('touchend', this._handleContainerMouseupAndTouchendBound);
-        }
-      }
-
-      /**
-       * Setup dropdown
-       */
-
-    }, {
-      key: "_setupDropdown",
-      value: function _setupDropdown() {
-        var _this38 = this;
-
-        this.container = document.createElement('ul');
-        this.container.id = "autocomplete-options-" + M.guid();
-        $(this.container).addClass('autocomplete-content dropdown-content');
-        this.$inputField.append(this.container);
-        this.el.setAttribute('data-target', this.container.id);
-
-        this.dropdown = M.Dropdown.init(this.el, {
-          autoFocus: false,
-          closeOnClick: false,
-          coverTrigger: false,
-          onItemClick: function (itemEl) {
-            _this38.selectOption($(itemEl));
-          }
-        });
-
-        // Sketchy removal of dropdown click handler
-        this.el.removeEventListener('click', this.dropdown._handleClickBound);
-      }
-
-      /**
-       * Remove dropdown
-       */
-
-    }, {
-      key: "_removeDropdown",
-      value: function _removeDropdown() {
-        this.container.parentNode.removeChild(this.container);
-      }
-
-      /**
-       * Handle Input Blur
-       */
-
-    }, {
-      key: "_handleInputBlur",
-      value: function _handleInputBlur() {
-        if (!this._mousedown) {
-          this.close();
-          this._resetAutocomplete();
-        }
-      }
-
-      /**
-       * Handle Input Keyup and Focus
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleInputKeyupAndFocus",
-      value: function _handleInputKeyupAndFocus(e) {
-        if (e.type === 'keyup') {
-          Autocomplete._keydown = false;
-        }
-
-        this.count = 0;
-        var val = this.el.value.toLowerCase();
-
-        // Don't capture enter or arrow key usage.
-        if (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40) {
-          return;
-        }
-
-        // Check if the input isn't empty
-        // Check if focus triggered by tab
-        if (this.oldVal !== val && (M.tabPressed || e.type !== 'focus')) {
-          this.open();
-        }
-
-        // Update oldVal
-        this.oldVal = val;
-      }
-
-      /**
-       * Handle Input Keydown
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleInputKeydown",
-      value: function _handleInputKeydown(e) {
-        Autocomplete._keydown = true;
-
-        // Arrow keys and enter key usage
-        var keyCode = e.keyCode,
-            liElement = void 0,
-            numItems = $(this.container).children('li').length;
-
-        // select element on Enter
-        if (keyCode === M.keys.ENTER && this.activeIndex >= 0) {
-          liElement = $(this.container).children('li').eq(this.activeIndex);
-          if (liElement.length) {
-            this.selectOption(liElement);
-            e.preventDefault();
-          }
-          return;
-        }
-
-        // Capture up and down key
-        if (keyCode === M.keys.ARROW_UP || keyCode === M.keys.ARROW_DOWN) {
-          e.preventDefault();
-
-          if (keyCode === M.keys.ARROW_UP && this.activeIndex > 0) {
-            this.activeIndex--;
-          }
-
-          if (keyCode === M.keys.ARROW_DOWN && this.activeIndex < numItems - 1) {
-            this.activeIndex++;
-          }
-
-          this.$active.removeClass('active');
-          if (this.activeIndex >= 0) {
-            this.$active = $(this.container).children('li').eq(this.activeIndex);
-            this.$active.addClass('active');
-          }
-        }
-      }
-
-      /**
-       * Handle Input Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleInputClick",
-      value: function _handleInputClick(e) {
-        this.open();
-      }
-
-      /**
-       * Handle Container Mousedown and Touchstart
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleContainerMousedownAndTouchstart",
-      value: function _handleContainerMousedownAndTouchstart(e) {
-        this._mousedown = true;
-      }
-
-      /**
-       * Handle Container Mouseup and Touchend
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleContainerMouseupAndTouchend",
-      value: function _handleContainerMouseupAndTouchend(e) {
-        this._mousedown = false;
-      }
-
-      /**
-       * Highlight partial match
-       */
-
-    }, {
-      key: "_highlight",
-      value: function _highlight(string, $el) {
-        var img = $el.find('img');
-        var matchStart = $el.text().toLowerCase().indexOf('' + string.toLowerCase() + ''),
-            matchEnd = matchStart + string.length - 1,
-            beforeMatch = $el.text().slice(0, matchStart),
-            matchText = $el.text().slice(matchStart, matchEnd + 1),
-            afterMatch = $el.text().slice(matchEnd + 1);
-        $el.html("<span>" + beforeMatch + "<span class='highlight'>" + matchText + "</span>" + afterMatch + "</span>");
-        if (img.length) {
-          $el.prepend(img);
-        }
-      }
-
-      /**
-       * Reset current element position
-       */
-
-    }, {
-      key: "_resetCurrentElement",
-      value: function _resetCurrentElement() {
-        this.activeIndex = -1;
-        this.$active.removeClass('active');
-      }
-
-      /**
-       * Reset autocomplete elements
-       */
-
-    }, {
-      key: "_resetAutocomplete",
-      value: function _resetAutocomplete() {
-        $(this.container).empty();
-        this._resetCurrentElement();
-        this.oldVal = null;
-        this.isOpen = false;
-        this._mousedown = false;
-      }
-
-      /**
-       * Select autocomplete option
-       * @param {Element} el  Autocomplete option list item element
-       */
-
-    }, {
-      key: "selectOption",
-      value: function selectOption(el) {
-        var text = el.text().trim();
-        this.el.value = text;
-        this.$el.trigger('change');
-        this._resetAutocomplete();
-        this.close();
-
-        // Handle onAutocomplete callback.
-        if (typeof this.options.onAutocomplete === 'function') {
-          this.options.onAutocomplete.call(this, text);
-        }
-      }
-
-      /**
-       * Render dropdown content
-       * @param {Object} data  data set
-       * @param {String} val  current input value
-       */
-
-    }, {
-      key: "_renderDropdown",
-      value: function _renderDropdown(data, val) {
-        var _this39 = this;
-
-        this._resetAutocomplete();
-
-        var matchingData = [];
-
-        // Gather all matching data
-        for (var key in data) {
-          if (data.hasOwnProperty(key) && key.toLowerCase().indexOf(val) !== -1) {
-            // Break if past limit
-            if (this.count >= this.options.limit) {
-              break;
-            }
-
-            var entry = {
-              data: data[key],
-              key: key
-            };
-            matchingData.push(entry);
-
-            this.count++;
-          }
-        }
-
-        // Sort
-        if (this.options.sortFunction) {
-          var sortFunctionBound = function (a, b) {
-            return _this39.options.sortFunction(a.key.toLowerCase(), b.key.toLowerCase(), val.toLowerCase());
-          };
-          matchingData.sort(sortFunctionBound);
-        }
-
-        // Render
-        for (var i = 0; i < matchingData.length; i++) {
-          var _entry = matchingData[i];
-          var $autocompleteOption = $('<li></li>');
-          if (!!_entry.data) {
-            $autocompleteOption.append("<img src=\"" + _entry.data + "\" class=\"right circle\"><span>" + _entry.key + "</span>");
-          } else {
-            $autocompleteOption.append('<span>' + _entry.key + '</span>');
-          }
-
-          $(this.container).append($autocompleteOption);
-          this._highlight(val, $autocompleteOption);
-        }
-      }
-
-      /**
-       * Open Autocomplete Dropdown
-       */
-
-    }, {
-      key: "open",
-      value: function open() {
-        var val = this.el.value.toLowerCase();
-
-        this._resetAutocomplete();
-
-        if (val.length >= this.options.minLength) {
-          this.isOpen = true;
-          this._renderDropdown(this.options.data, val);
-        }
-
-        // Open dropdown
-        if (!this.dropdown.isOpen) {
-          this.dropdown.open();
-        } else {
-          // Recalculate dropdown when its already open
-          this.dropdown.recalculateDimensions();
-        }
-      }
-
-      /**
-       * Close Autocomplete Dropdown
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        this.dropdown.close();
-      }
-
-      /**
-       * Update Data
-       * @param {Object} data
-       */
-
-    }, {
-      key: "updateData",
-      value: function updateData(data) {
-        var val = this.el.value.toLowerCase();
-        this.options.data = data;
-
-        if (this.isOpen) {
-          this._renderDropdown(data, val);
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Autocomplete;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Autocomplete;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Autocomplete
-   */
-
-
-  Autocomplete._keydown = false;
-
-  M.Autocomplete = Autocomplete;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Autocomplete, 'autocomplete', 'M_Autocomplete');
-  }
-})(cash);
-;(function ($) {
-  // Function to update labels of text fields
-  M.updateTextFields = function () {
-    var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea';
-    $(input_selector).each(function (element, index) {
-      var $this = $(this);
-      if (element.value.length > 0 || $(element).is(':focus') || element.autofocus || $this.attr('placeholder') !== null) {
-        $this.siblings('label').addClass('active');
-      } else if (element.validity) {
-        $this.siblings('label').toggleClass('active', element.validity.badInput === true);
-      } else {
-        $this.siblings('label').removeClass('active');
-      }
-    });
-  };
-
-  M.validate_field = function (object) {
-    var hasLength = object.attr('data-length') !== null;
-    var lenAttr = parseInt(object.attr('data-length'));
-    var len = object[0].value.length;
-
-    if (len === 0 && object[0].validity.badInput === false && !object.is(':required')) {
-      if (object.hasClass('validate')) {
-        object.removeClass('valid');
-        object.removeClass('invalid');
-      }
-    } else {
-      if (object.hasClass('validate')) {
-        // Check for character counter attributes
-        if (object.is(':valid') && hasLength && len <= lenAttr || object.is(':valid') && !hasLength) {
-          object.removeClass('invalid');
-          object.addClass('valid');
-        } else {
-          object.removeClass('valid');
-          object.addClass('invalid');
-        }
-      }
-    }
-  };
-
-  M.textareaAutoResize = function ($textarea) {
-    // Wrap if native element
-    if ($textarea instanceof Element) {
-      $textarea = $($textarea);
-    }
-
-    if (!$textarea.length) {
-      console.error('No textarea element found');
-      return;
-    }
-
-    // Textarea Auto Resize
-    var hiddenDiv = $('.hiddendiv').first();
-    if (!hiddenDiv.length) {
-      hiddenDiv = $('<div class="hiddendiv common"></div>');
-      $('body').append(hiddenDiv);
-    }
-
-    // Set font properties of hiddenDiv
-    var fontFamily = $textarea.css('font-family');
-    var fontSize = $textarea.css('font-size');
-    var lineHeight = $textarea.css('line-height');
-
-    // Firefox can't handle padding shorthand.
-    var paddingTop = $textarea.css('padding-top');
-    var paddingRight = $textarea.css('padding-right');
-    var paddingBottom = $textarea.css('padding-bottom');
-    var paddingLeft = $textarea.css('padding-left');
-
-    if (fontSize) {
-      hiddenDiv.css('font-size', fontSize);
-    }
-    if (fontFamily) {
-      hiddenDiv.css('font-family', fontFamily);
-    }
-    if (lineHeight) {
-      hiddenDiv.css('line-height', lineHeight);
-    }
-    if (paddingTop) {
-      hiddenDiv.css('padding-top', paddingTop);
-    }
-    if (paddingRight) {
-      hiddenDiv.css('padding-right', paddingRight);
-    }
-    if (paddingBottom) {
-      hiddenDiv.css('padding-bottom', paddingBottom);
-    }
-    if (paddingLeft) {
-      hiddenDiv.css('padding-left', paddingLeft);
-    }
-
-    // Set original-height, if none
-    if (!$textarea.data('original-height')) {
-      $textarea.data('original-height', $textarea.height());
-    }
-
-    if ($textarea.attr('wrap') === 'off') {
-      hiddenDiv.css('overflow-wrap', 'normal').css('white-space', 'pre');
-    }
-
-    hiddenDiv.text($textarea[0].value + '\n');
-    var content = hiddenDiv.html().replace(/\n/g, '<br>');
-    hiddenDiv.html(content);
-
-    // When textarea is hidden, width goes crazy.
-    // Approximate with half of window size
-
-    if ($textarea[0].offsetWidth > 0 && $textarea[0].offsetHeight > 0) {
-      hiddenDiv.css('width', $textarea.width() + 'px');
-    } else {
-      hiddenDiv.css('width', window.innerWidth / 2 + 'px');
-    }
-
-    /**
-     * Resize if the new height is greater than the
-     * original height of the textarea
-     */
-    if ($textarea.data('original-height') <= hiddenDiv.innerHeight()) {
-      $textarea.css('height', hiddenDiv.innerHeight() + 'px');
-    } else if ($textarea[0].value.length < $textarea.data('previous-length')) {
-      /**
-       * In case the new height is less than original height, it
-       * means the textarea has less text than before
-       * So we set the height to the original one
-       */
-      $textarea.css('height', $textarea.data('original-height') + 'px');
-    }
-    $textarea.data('previous-length', $textarea[0].value.length);
-  };
-
-  $(document).ready(function () {
-    // Text based inputs
-    var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea';
-
-    // Add active if form auto complete
-    $(document).on('change', input_selector, function () {
-      if (this.value.length !== 0 || $(this).attr('placeholder') !== null) {
-        $(this).siblings('label').addClass('active');
-      }
-      M.validate_field($(this));
-    });
-
-    // Add active if input element has been pre-populated on document ready
-    $(document).ready(function () {
-      M.updateTextFields();
-    });
-
-    // HTML DOM FORM RESET handling
-    $(document).on('reset', function (e) {
-      var formReset = $(e.target);
-      if (formReset.is('form')) {
-        formReset.find(input_selector).removeClass('valid').removeClass('invalid');
-        formReset.find(input_selector).each(function (e) {
-          if (this.value.length) {
-            $(this).siblings('label').removeClass('active');
-          }
-        });
-
-        // Reset select (after native reset)
-        setTimeout(function () {
-          formReset.find('select').each(function () {
-            // check if initialized
-            if (this.M_FormSelect) {
-              $(this).trigger('change');
-            }
-          });
-        }, 0);
-      }
-    });
-
-    /**
-     * Add active when element has focus
-     * @param {Event} e
-     */
-    document.addEventListener('focus', function (e) {
-      if ($(e.target).is(input_selector)) {
-        $(e.target).siblings('label, .prefix').addClass('active');
-      }
-    }, true);
-
-    /**
-     * Remove active when element is blurred
-     * @param {Event} e
-     */
-    document.addEventListener('blur', function (e) {
-      var $inputElement = $(e.target);
-      if ($inputElement.is(input_selector)) {
-        var selector = '.prefix';
-
-        if ($inputElement[0].value.length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') === null) {
-          selector += ', label';
-        }
-        $inputElement.siblings(selector).removeClass('active');
-        M.validate_field($inputElement);
-      }
-    }, true);
-
-    // Radio and Checkbox focus class
-    var radio_checkbox = 'input[type=radio], input[type=checkbox]';
-    $(document).on('keyup', radio_checkbox, function (e) {
-      // TAB, check if tabbing to radio or checkbox.
-      if (e.which === M.keys.TAB) {
-        $(this).addClass('tabbed');
-        var $this = $(this);
-        $this.one('blur', function (e) {
-          $(this).removeClass('tabbed');
-        });
-        return;
-      }
-    });
-
-    var text_area_selector = '.materialize-textarea';
-    $(text_area_selector).each(function () {
-      var $textarea = $(this);
-      /**
-       * Resize textarea on document load after storing
-       * the original height and the original length
-       */
-      $textarea.data('original-height', $textarea.height());
-      $textarea.data('previous-length', this.value.length);
-      M.textareaAutoResize($textarea);
-    });
-
-    $(document).on('keyup', text_area_selector, function () {
-      M.textareaAutoResize($(this));
-    });
-    $(document).on('keydown', text_area_selector, function () {
-      M.textareaAutoResize($(this));
-    });
-
-    // File Input Path
-    $(document).on('change', '.file-field input[type="file"]', function () {
-      var file_field = $(this).closest('.file-field');
-      var path_input = file_field.find('input.file-path');
-      var files = $(this)[0].files;
-      var file_names = [];
-      for (var i = 0; i < files.length; i++) {
-        file_names.push(files[i].name);
-      }
-      path_input[0].value = file_names.join(', ');
-      path_input.trigger('change');
-    });
-  }); // End of $(document).ready
-})(cash);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    indicators: true,
-    height: 400,
-    duration: 500,
-    interval: 6000
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Slider = function (_Component11) {
-    _inherits(Slider, _Component11);
-
-    /**
-     * Construct Slider instance and set up overlay
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Slider(el, options) {
-      _classCallCheck(this, Slider);
-
-      var _this40 = _possibleConstructorReturn(this, (Slider.__proto__ || Object.getPrototypeOf(Slider)).call(this, Slider, el, options));
-
-      _this40.el.M_Slider = _this40;
-
-      /**
-       * Options for the modal
-       * @member Slider#options
-       * @prop {Boolean} [indicators=true] - Show indicators
-       * @prop {Number} [height=400] - height of slider
-       * @prop {Number} [duration=500] - Length in ms of slide transition
-       * @prop {Number} [interval=6000] - Length in ms of slide interval
-       */
-      _this40.options = $.extend({}, Slider.defaults, options);
-
-      // setup
-      _this40.$slider = _this40.$el.find('.slides');
-      _this40.$slides = _this40.$slider.children('li');
-      _this40.activeIndex = _this40.$slides.filter(function (item) {
-        return $(item).hasClass('active');
-      }).first().index();
-      if (_this40.activeIndex != -1) {
-        _this40.$active = _this40.$slides.eq(_this40.activeIndex);
-      }
-
-      _this40._setSliderHeight();
-
-      // Set initial positions of captions
-      _this40.$slides.find('.caption').each(function (el) {
-        _this40._animateCaptionIn(el, 0);
-      });
-
-      // Move img src into background-image
-      _this40.$slides.find('img').each(function (el) {
-        var placeholderBase64 = 'data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
-        if ($(el).attr('src') !== placeholderBase64) {
-          $(el).css('background-image', 'url("' + $(el).attr('src') + '")');
-          $(el).attr('src', placeholderBase64);
-        }
-      });
-
-      _this40._setupIndicators();
-
-      // Show active slide
-      if (_this40.$active) {
-        _this40.$active.css('display', 'block');
-      } else {
-        _this40.$slides.first().addClass('active');
-        anim({
-          targets: _this40.$slides.first()[0],
-          opacity: 1,
-          duration: _this40.options.duration,
-          easing: 'easeOutQuad'
-        });
-
-        _this40.activeIndex = 0;
-        _this40.$active = _this40.$slides.eq(_this40.activeIndex);
-
-        // Update indicators
-        if (_this40.options.indicators) {
-          _this40.$indicators.eq(_this40.activeIndex).addClass('active');
-        }
-      }
-
-      // Adjust height to current slide
-      _this40.$active.find('img').each(function (el) {
-        anim({
-          targets: _this40.$active.find('.caption')[0],
-          opacity: 1,
-          translateX: 0,
-          translateY: 0,
-          duration: _this40.options.duration,
-          easing: 'easeOutQuad'
-        });
-      });
-
-      _this40._setupEventHandlers();
-
-      // auto scroll
-      _this40.start();
-      return _this40;
-    }
-
-    _createClass(Slider, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this.pause();
-        this._removeIndicators();
-        this._removeEventHandlers();
-        this.el.M_Slider = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        var _this41 = this;
-
-        this._handleIntervalBound = this._handleInterval.bind(this);
-        this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
-
-        if (this.options.indicators) {
-          this.$indicators.each(function (el) {
-            el.addEventListener('click', _this41._handleIndicatorClickBound);
-          });
-        }
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        var _this42 = this;
-
-        if (this.options.indicators) {
-          this.$indicators.each(function (el) {
-            el.removeEventListener('click', _this42._handleIndicatorClickBound);
-          });
-        }
-      }
-
-      /**
-       * Handle indicator click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleIndicatorClick",
-      value: function _handleIndicatorClick(e) {
-        var currIndex = $(e.target).index();
-        this.set(currIndex);
-      }
-
-      /**
-       * Handle Interval
-       */
-
-    }, {
-      key: "_handleInterval",
-      value: function _handleInterval() {
-        var newActiveIndex = this.$slider.find('.active').index();
-        if (this.$slides.length === newActiveIndex + 1) newActiveIndex = 0;
-        // loop to start
-        else newActiveIndex += 1;
-
-        this.set(newActiveIndex);
-      }
-
-      /**
-       * Animate in caption
-       * @param {Element} caption
-       * @param {Number} duration
-       */
-
-    }, {
-      key: "_animateCaptionIn",
-      value: function _animateCaptionIn(caption, duration) {
-        var animOptions = {
-          targets: caption,
-          opacity: 0,
-          duration: duration,
-          easing: 'easeOutQuad'
-        };
-
-        if ($(caption).hasClass('center-align')) {
-          animOptions.translateY = -100;
-        } else if ($(caption).hasClass('right-align')) {
-          animOptions.translateX = 100;
-        } else if ($(caption).hasClass('left-align')) {
-          animOptions.translateX = -100;
-        }
-
-        anim(animOptions);
-      }
-
-      /**
-       * Set height of slider
-       */
-
-    }, {
-      key: "_setSliderHeight",
-      value: function _setSliderHeight() {
-        // If fullscreen, do nothing
-        if (!this.$el.hasClass('fullscreen')) {
-          if (this.options.indicators) {
-            // Add height if indicators are present
-            this.$el.css('height', this.options.height + 40 + 'px');
-          } else {
-            this.$el.css('height', this.options.height + 'px');
-          }
-          this.$slider.css('height', this.options.height + 'px');
-        }
-      }
-
-      /**
-       * Setup indicators
-       */
-
-    }, {
-      key: "_setupIndicators",
-      value: function _setupIndicators() {
-        var _this43 = this;
-
-        if (this.options.indicators) {
-          this.$indicators = $('<ul class="indicators"></ul>');
-          this.$slides.each(function (el, index) {
-            var $indicator = $('<li class="indicator-item"></li>');
-            _this43.$indicators.append($indicator[0]);
-          });
-          this.$el.append(this.$indicators[0]);
-          this.$indicators = this.$indicators.children('li.indicator-item');
-        }
-      }
-
-      /**
-       * Remove indicators
-       */
-
-    }, {
-      key: "_removeIndicators",
-      value: function _removeIndicators() {
-        this.$el.find('ul.indicators').remove();
-      }
-
-      /**
-       * Cycle to nth item
-       * @param {Number} index
-       */
-
-    }, {
-      key: "set",
-      value: function set(index) {
-        var _this44 = this;
-
-        // Wrap around indices.
-        if (index >= this.$slides.length) index = 0;else if (index < 0) index = this.$slides.length - 1;
-
-        // Only do if index changes
-        if (this.activeIndex != index) {
-          this.$active = this.$slides.eq(this.activeIndex);
-          var $caption = this.$active.find('.caption');
-          this.$active.removeClass('active');
-
-          anim({
-            targets: this.$active[0],
-            opacity: 0,
-            duration: this.options.duration,
-            easing: 'easeOutQuad',
-            complete: function () {
-              _this44.$slides.not('.active').each(function (el) {
-                anim({
-                  targets: el,
-                  opacity: 0,
-                  translateX: 0,
-                  translateY: 0,
-                  duration: 0,
-                  easing: 'easeOutQuad'
-                });
-              });
-            }
-          });
-
-          this._animateCaptionIn($caption[0], this.options.duration);
-
-          // Update indicators
-          if (this.options.indicators) {
-            this.$indicators.eq(this.activeIndex).removeClass('active');
-            this.$indicators.eq(index).addClass('active');
-          }
-
-          anim({
-            targets: this.$slides.eq(index)[0],
-            opacity: 1,
-            duration: this.options.duration,
-            easing: 'easeOutQuad'
-          });
-
-          anim({
-            targets: this.$slides.eq(index).find('.caption')[0],
-            opacity: 1,
-            translateX: 0,
-            translateY: 0,
-            duration: this.options.duration,
-            delay: this.options.duration,
-            easing: 'easeOutQuad'
-          });
-
-          this.$slides.eq(index).addClass('active');
-          this.activeIndex = index;
-
-          // Reset interval
-          this.start();
-        }
-      }
-
-      /**
-       * Pause slider interval
-       */
-
-    }, {
-      key: "pause",
-      value: function pause() {
-        clearInterval(this.interval);
-      }
-
-      /**
-       * Start slider interval
-       */
-
-    }, {
-      key: "start",
-      value: function start() {
-        clearInterval(this.interval);
-        this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval);
-      }
-
-      /**
-       * Move to next slide
-       */
-
-    }, {
-      key: "next",
-      value: function next() {
-        var newIndex = this.activeIndex + 1;
-
-        // Wrap around indices.
-        if (newIndex >= this.$slides.length) newIndex = 0;else if (newIndex < 0) newIndex = this.$slides.length - 1;
-
-        this.set(newIndex);
-      }
-
-      /**
-       * Move to previous slide
-       */
-
-    }, {
-      key: "prev",
-      value: function prev() {
-        var newIndex = this.activeIndex - 1;
-
-        // Wrap around indices.
-        if (newIndex >= this.$slides.length) newIndex = 0;else if (newIndex < 0) newIndex = this.$slides.length - 1;
-
-        this.set(newIndex);
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Slider.__proto__ || Object.getPrototypeOf(Slider), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Slider;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Slider;
-  }(Component);
-
-  M.Slider = Slider;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Slider, 'slider', 'M_Slider');
-  }
-})(cash, M.anime);
-;(function ($, anim) {
-  $(document).on('click', '.card', function (e) {
-    if ($(this).children('.card-reveal').length) {
-      var $card = $(e.target).closest('.card');
-      if ($card.data('initialOverflow') === undefined) {
-        $card.data('initialOverflow', $card.css('overflow') === undefined ? '' : $card.css('overflow'));
-      }
-      var $cardReveal = $(this).find('.card-reveal');
-      if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
-        // Make Reveal animate down and display none
-        anim({
-          targets: $cardReveal[0],
-          translateY: 0,
-          duration: 225,
-          easing: 'easeInOutQuad',
-          complete: function (anim) {
-            var el = anim.animatables[0].target;
-            $(el).css({ display: 'none' });
-            $card.css('overflow', $card.data('initialOverflow'));
-          }
-        });
-      } else if ($(e.target).is($('.card .activator')) || $(e.target).is($('.card .activator i'))) {
-        $card.css('overflow', 'hidden');
-        $cardReveal.css({ display: 'block' });
-        anim({
-          targets: $cardReveal[0],
-          translateY: '-100%',
-          duration: 300,
-          easing: 'easeInOutQuad'
-        });
-      }
-    }
-  });
-})(cash, M.anime);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    data: [],
-    placeholder: '',
-    secondaryPlaceholder: '',
-    autocompleteOptions: {},
-    limit: Infinity,
-    onChipAdd: null,
-    onChipSelect: null,
-    onChipDelete: null
-  };
-
-  /**
-   * @typedef {Object} chip
-   * @property {String} tag  chip tag string
-   * @property {String} [image]  chip avatar image string
-   */
-
-  /**
-   * @class
-   *
-   */
-
-  var Chips = function (_Component12) {
-    _inherits(Chips, _Component12);
-
-    /**
-     * Construct Chips instance and set up overlay
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Chips(el, options) {
-      _classCallCheck(this, Chips);
-
-      var _this45 = _possibleConstructorReturn(this, (Chips.__proto__ || Object.getPrototypeOf(Chips)).call(this, Chips, el, options));
-
-      _this45.el.M_Chips = _this45;
-
-      /**
-       * Options for the modal
-       * @member Chips#options
-       * @prop {Array} data
-       * @prop {String} placeholder
-       * @prop {String} secondaryPlaceholder
-       * @prop {Object} autocompleteOptions
-       */
-      _this45.options = $.extend({}, Chips.defaults, options);
-
-      _this45.$el.addClass('chips input-field');
-      _this45.chipsData = [];
-      _this45.$chips = $();
-      _this45._setupInput();
-      _this45.hasAutocomplete = Object.keys(_this45.options.autocompleteOptions).length > 0;
-
-      // Set input id
-      if (!_this45.$input.attr('id')) {
-        _this45.$input.attr('id', M.guid());
-      }
-
-      // Render initial chips
-      if (_this45.options.data.length) {
-        _this45.chipsData = _this45.options.data;
-        _this45._renderChips(_this45.chipsData);
-      }
-
-      // Setup autocomplete if needed
-      if (_this45.hasAutocomplete) {
-        _this45._setupAutocomplete();
-      }
-
-      _this45._setPlaceholder();
-      _this45._setupLabel();
-      _this45._setupEventHandlers();
-      return _this45;
-    }
-
-    _createClass(Chips, [{
-      key: "getData",
-
-
-      /**
-       * Get Chips Data
-       */
-      value: function getData() {
-        return this.chipsData;
-      }
-
-      /**
-       * Teardown component
-       */
-
-    }, {
-      key: "destroy",
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.$chips.remove();
-        this.el.M_Chips = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleChipClickBound = this._handleChipClick.bind(this);
-        this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
-        this._handleInputFocusBound = this._handleInputFocus.bind(this);
-        this._handleInputBlurBound = this._handleInputBlur.bind(this);
-
-        this.el.addEventListener('click', this._handleChipClickBound);
-        document.addEventListener('keydown', Chips._handleChipsKeydown);
-        document.addEventListener('keyup', Chips._handleChipsKeyup);
-        this.el.addEventListener('blur', Chips._handleChipsBlur, true);
-        this.$input[0].addEventListener('focus', this._handleInputFocusBound);
-        this.$input[0].addEventListener('blur', this._handleInputBlurBound);
-        this.$input[0].addEventListener('keydown', this._handleInputKeydownBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('click', this._handleChipClickBound);
-        document.removeEventListener('keydown', Chips._handleChipsKeydown);
-        document.removeEventListener('keyup', Chips._handleChipsKeyup);
-        this.el.removeEventListener('blur', Chips._handleChipsBlur, true);
-        this.$input[0].removeEventListener('focus', this._handleInputFocusBound);
-        this.$input[0].removeEventListener('blur', this._handleInputBlurBound);
-        this.$input[0].removeEventListener('keydown', this._handleInputKeydownBound);
-      }
-
-      /**
-       * Handle Chip Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleChipClick",
-      value: function _handleChipClick(e) {
-        var $chip = $(e.target).closest('.chip');
-        var clickedClose = $(e.target).is('.close');
-        if ($chip.length) {
-          var index = $chip.index();
-          if (clickedClose) {
-            // delete chip
-            this.deleteChip(index);
-            this.$input[0].focus();
-          } else {
-            // select chip
-            this.selectChip(index);
-          }
-
-          // Default handle click to focus on input
-        } else {
-          this.$input[0].focus();
-        }
-      }
-
-      /**
-       * Handle Chips Keydown
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleInputFocus",
-
-
-      /**
-       * Handle Input Focus
-       */
-      value: function _handleInputFocus() {
-        this.$el.addClass('focus');
-      }
-
-      /**
-       * Handle Input Blur
-       */
-
-    }, {
-      key: "_handleInputBlur",
-      value: function _handleInputBlur() {
-        this.$el.removeClass('focus');
-      }
-
-      /**
-       * Handle Input Keydown
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleInputKeydown",
-      value: function _handleInputKeydown(e) {
-        Chips._keydown = true;
-
-        // enter
-        if (e.keyCode === 13) {
-          // Override enter if autocompleting.
-          if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen) {
-            return;
-          }
-
-          e.preventDefault();
-          this.addChip({
-            tag: this.$input[0].value
-          });
-          this.$input[0].value = '';
-
-          // delete or left
-        } else if ((e.keyCode === 8 || e.keyCode === 37) && this.$input[0].value === '' && this.chipsData.length) {
-          e.preventDefault();
-          this.selectChip(this.chipsData.length - 1);
-        }
-      }
-
-      /**
-       * Render Chip
-       * @param {chip} chip
-       * @return {Element}
-       */
-
-    }, {
-      key: "_renderChip",
-      value: function _renderChip(chip) {
-        if (!chip.tag) {
-          return;
-        }
-
-        var renderedChip = document.createElement('div');
-        var closeIcon = document.createElement('i');
-        renderedChip.classList.add('chip');
-        renderedChip.textContent = chip.tag;
-        renderedChip.setAttribute('tabindex', 0);
-        $(closeIcon).addClass('material-icons close');
-        closeIcon.textContent = 'close';
-
-        // attach image if needed
-        if (chip.image) {
-          var img = document.createElement('img');
-          img.setAttribute('src', chip.image);
-          renderedChip.insertBefore(img, renderedChip.firstChild);
-        }
-
-        renderedChip.appendChild(closeIcon);
-        return renderedChip;
-      }
-
-      /**
-       * Render Chips
-       */
-
-    }, {
-      key: "_renderChips",
-      value: function _renderChips() {
-        this.$chips.remove();
-        for (var i = 0; i < this.chipsData.length; i++) {
-          var chipEl = this._renderChip(this.chipsData[i]);
-          this.$el.append(chipEl);
-          this.$chips.add(chipEl);
-        }
-
-        // move input to end
-        this.$el.append(this.$input[0]);
-      }
-
-      /**
-       * Setup Autocomplete
-       */
-
-    }, {
-      key: "_setupAutocomplete",
-      value: function _setupAutocomplete() {
-        var _this46 = this;
-
-        this.options.autocompleteOptions.onAutocomplete = function (val) {
-          _this46.addChip({
-            tag: val
-          });
-          _this46.$input[0].value = '';
-          _this46.$input[0].focus();
-        };
-
-        this.autocomplete = M.Autocomplete.init(this.$input[0], this.options.autocompleteOptions);
-      }
-
-      /**
-       * Setup Input
-       */
-
-    }, {
-      key: "_setupInput",
-      value: function _setupInput() {
-        this.$input = this.$el.find('input');
-        if (!this.$input.length) {
-          this.$input = $('<input></input>');
-          this.$el.append(this.$input);
-        }
-
-        this.$input.addClass('input');
-      }
-
-      /**
-       * Setup Label
-       */
-
-    }, {
-      key: "_setupLabel",
-      value: function _setupLabel() {
-        this.$label = this.$el.find('label');
-        if (this.$label.length) {
-          this.$label.setAttribute('for', this.$input.attr('id'));
-        }
-      }
-
-      /**
-       * Set placeholder
-       */
-
-    }, {
-      key: "_setPlaceholder",
-      value: function _setPlaceholder() {
-        if (this.chipsData !== undefined && !this.chipsData.length && this.options.placeholder) {
-          $(this.$input).prop('placeholder', this.options.placeholder);
-        } else if ((this.chipsData === undefined || !!this.chipsData.length) && this.options.secondaryPlaceholder) {
-          $(this.$input).prop('placeholder', this.options.secondaryPlaceholder);
-        }
-      }
-
-      /**
-       * Check if chip is valid
-       * @param {chip} chip
-       */
-
-    }, {
-      key: "_isValid",
-      value: function _isValid(chip) {
-        if (chip.hasOwnProperty('tag') && chip.tag !== '') {
-          var exists = false;
-          for (var i = 0; i < this.chipsData.length; i++) {
-            if (this.chipsData[i].tag === chip.tag) {
-              exists = true;
-              break;
-            }
-          }
-          return !exists;
-        }
-
-        return false;
-      }
-
-      /**
-       * Add chip
-       * @param {chip} chip
-       */
-
-    }, {
-      key: "addChip",
-      value: function addChip(chip) {
-        if (!this._isValid(chip) || this.chipsData.length >= this.options.limit) {
-          return;
-        }
-
-        var renderedChip = this._renderChip(chip);
-        this.$chips.add(renderedChip);
-        this.chipsData.push(chip);
-        $(this.$input).before(renderedChip);
-        this._setPlaceholder();
-
-        // fire chipAdd callback
-        if (typeof this.options.onChipAdd === 'function') {
-          this.options.onChipAdd.call(this, this.$el, renderedChip);
-        }
-      }
-
-      /**
-       * Delete chip
-       * @param {Number} chip
-       */
-
-    }, {
-      key: "deleteChip",
-      value: function deleteChip(chipIndex) {
-        var $chip = this.$chips.eq(chipIndex);
-        this.$chips.eq(chipIndex).remove();
-        this.$chips = this.$chips.filter(function (el) {
-          return $(el).index() >= 0;
-        });
-        this.chipsData.splice(chipIndex, 1);
-        this._setPlaceholder();
-
-        // fire chipDelete callback
-        if (typeof this.options.onChipDelete === 'function') {
-          this.options.onChipDelete.call(this, this.$el, $chip[0]);
-        }
-      }
-
-      /**
-       * Select chip
-       * @param {Number} chip
-       */
-
-    }, {
-      key: "selectChip",
-      value: function selectChip(chipIndex) {
-        var $chip = this.$chips.eq(chipIndex);
-        this._selectedChip = $chip;
-        $chip[0].focus();
-
-        // fire chipSelect callback
-        if (typeof this.options.onChipSelect === 'function') {
-          this.options.onChipSelect.call(this, this.$el, $chip[0]);
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Chips.__proto__ || Object.getPrototypeOf(Chips), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Chips;
-      }
-    }, {
-      key: "_handleChipsKeydown",
-      value: function _handleChipsKeydown(e) {
-        Chips._keydown = true;
-
-        var $chips = $(e.target).closest('.chips');
-        var chipsKeydown = e.target && $chips.length;
-
-        // Don't handle keydown inputs on input and textarea
-        if ($(e.target).is('input, textarea') || !chipsKeydown) {
-          return;
-        }
-
-        var currChips = $chips[0].M_Chips;
-
-        // backspace and delete
-        if (e.keyCode === 8 || e.keyCode === 46) {
-          e.preventDefault();
-
-          var selectIndex = currChips.chipsData.length;
-          if (currChips._selectedChip) {
-            var index = currChips._selectedChip.index();
-            currChips.deleteChip(index);
-            currChips._selectedChip = null;
-
-            // Make sure selectIndex doesn't go negative
-            selectIndex = Math.max(index - 1, 0);
-          }
-
-          if (currChips.chipsData.length) {
-            currChips.selectChip(selectIndex);
-          }
-
-          // left arrow key
-        } else if (e.keyCode === 37) {
-          if (currChips._selectedChip) {
-            var _selectIndex = currChips._selectedChip.index() - 1;
-            if (_selectIndex < 0) {
-              return;
-            }
-            currChips.selectChip(_selectIndex);
-          }
-
-          // right arrow key
-        } else if (e.keyCode === 39) {
-          if (currChips._selectedChip) {
-            var _selectIndex2 = currChips._selectedChip.index() + 1;
-
-            if (_selectIndex2 >= currChips.chipsData.length) {
-              currChips.$input[0].focus();
-            } else {
-              currChips.selectChip(_selectIndex2);
-            }
-          }
-        }
-      }
-
-      /**
-       * Handle Chips Keyup
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleChipsKeyup",
-      value: function _handleChipsKeyup(e) {
-        Chips._keydown = false;
-      }
-
-      /**
-       * Handle Chips Blur
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleChipsBlur",
-      value: function _handleChipsBlur(e) {
-        if (!Chips._keydown) {
-          var $chips = $(e.target).closest('.chips');
-          var currChips = $chips[0].M_Chips;
-
-          currChips._selectedChip = null;
-        }
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Chips;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Chips
-   */
-
-
-  Chips._keydown = false;
-
-  M.Chips = Chips;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Chips, 'chips', 'M_Chips');
-  }
-
-  $(document).ready(function () {
-    // Handle removal of static chips.
-    $(document.body).on('click', '.chip .close', function () {
-      var $chips = $(this).closest('.chips');
-      if ($chips.length && $chips[0].M_Chips) {
-        return;
-      }
-      $(this).closest('.chip').remove();
-    });
-  });
-})(cash);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    top: 0,
-    bottom: Infinity,
-    offset: 0,
-    onPositionChange: null
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Pushpin = function (_Component13) {
-    _inherits(Pushpin, _Component13);
-
-    /**
-     * Construct Pushpin instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Pushpin(el, options) {
-      _classCallCheck(this, Pushpin);
-
-      var _this47 = _possibleConstructorReturn(this, (Pushpin.__proto__ || Object.getPrototypeOf(Pushpin)).call(this, Pushpin, el, options));
-
-      _this47.el.M_Pushpin = _this47;
-
-      /**
-       * Options for the modal
-       * @member Pushpin#options
-       */
-      _this47.options = $.extend({}, Pushpin.defaults, options);
-
-      _this47.originalOffset = _this47.el.offsetTop;
-      Pushpin._pushpins.push(_this47);
-      _this47._setupEventHandlers();
-      _this47._updatePosition();
-      return _this47;
-    }
-
-    _createClass(Pushpin, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this.el.style.top = null;
-        this._removePinClasses();
-        this._removeEventHandlers();
-
-        // Remove pushpin Inst
-        var index = Pushpin._pushpins.indexOf(this);
-        Pushpin._pushpins.splice(index, 1);
-      }
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        document.addEventListener('scroll', Pushpin._updateElements);
-      }
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        document.removeEventListener('scroll', Pushpin._updateElements);
-      }
-    }, {
-      key: "_updatePosition",
-      value: function _updatePosition() {
-        var scrolled = M.getDocumentScrollTop() + this.options.offset;
-
-        if (this.options.top <= scrolled && this.options.bottom >= scrolled && !this.el.classList.contains('pinned')) {
-          this._removePinClasses();
-          this.el.style.top = this.options.offset + "px";
-          this.el.classList.add('pinned');
-
-          // onPositionChange callback
-          if (typeof this.options.onPositionChange === 'function') {
-            this.options.onPositionChange.call(this, 'pinned');
-          }
-        }
-
-        // Add pin-top (when scrolled position is above top)
-        if (scrolled < this.options.top && !this.el.classList.contains('pin-top')) {
-          this._removePinClasses();
-          this.el.style.top = 0;
-          this.el.classList.add('pin-top');
-
-          // onPositionChange callback
-          if (typeof this.options.onPositionChange === 'function') {
-            this.options.onPositionChange.call(this, 'pin-top');
-          }
-        }
-
-        // Add pin-bottom (when scrolled position is below bottom)
-        if (scrolled > this.options.bottom && !this.el.classList.contains('pin-bottom')) {
-          this._removePinClasses();
-          this.el.classList.add('pin-bottom');
-          this.el.style.top = this.options.bottom - this.originalOffset + "px";
-
-          // onPositionChange callback
-          if (typeof this.options.onPositionChange === 'function') {
-            this.options.onPositionChange.call(this, 'pin-bottom');
-          }
-        }
-      }
-    }, {
-      key: "_removePinClasses",
-      value: function _removePinClasses() {
-        // IE 11 bug (can't remove multiple classes in one line)
-        this.el.classList.remove('pin-top');
-        this.el.classList.remove('pinned');
-        this.el.classList.remove('pin-bottom');
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Pushpin.__proto__ || Object.getPrototypeOf(Pushpin), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Pushpin;
-      }
-    }, {
-      key: "_updateElements",
-      value: function _updateElements() {
-        for (var elIndex in Pushpin._pushpins) {
-          var pInstance = Pushpin._pushpins[elIndex];
-          pInstance._updatePosition();
-        }
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Pushpin;
-  }(Component);
-
-  /**
-   * @static
-   * @memberof Pushpin
-   */
-
-
-  Pushpin._pushpins = [];
-
-  M.Pushpin = Pushpin;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Pushpin, 'pushpin', 'M_Pushpin');
-  }
-})(cash);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {
-    direction: 'top',
-    hoverEnabled: true,
-    toolbarEnabled: false
-  };
-
-  $.fn.reverse = [].reverse;
-
-  /**
-   * @class
-   *
-   */
-
-  var FloatingActionButton = function (_Component14) {
-    _inherits(FloatingActionButton, _Component14);
-
-    /**
-     * Construct FloatingActionButton instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function FloatingActionButton(el, options) {
-      _classCallCheck(this, FloatingActionButton);
-
-      var _this48 = _possibleConstructorReturn(this, (FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton)).call(this, FloatingActionButton, el, options));
-
-      _this48.el.M_FloatingActionButton = _this48;
-
-      /**
-       * Options for the fab
-       * @member FloatingActionButton#options
-       * @prop {Boolean} [direction] - Direction fab menu opens
-       * @prop {Boolean} [hoverEnabled=true] - Enable hover vs click
-       * @prop {Boolean} [toolbarEnabled=false] - Enable toolbar transition
-       */
-      _this48.options = $.extend({}, FloatingActionButton.defaults, options);
-
-      _this48.isOpen = false;
-      _this48.$anchor = _this48.$el.children('a').first();
-      _this48.$menu = _this48.$el.children('ul').first();
-      _this48.$floatingBtns = _this48.$el.find('ul .btn-floating');
-      _this48.$floatingBtnsReverse = _this48.$el.find('ul .btn-floating').reverse();
-      _this48.offsetY = 0;
-      _this48.offsetX = 0;
-
-      _this48.$el.addClass("direction-" + _this48.options.direction);
-      if (_this48.options.direction === 'top') {
-        _this48.offsetY = 40;
-      } else if (_this48.options.direction === 'right') {
-        _this48.offsetX = -40;
-      } else if (_this48.options.direction === 'bottom') {
-        _this48.offsetY = -40;
-      } else {
-        _this48.offsetX = 40;
-      }
-      _this48._setupEventHandlers();
-      return _this48;
-    }
-
-    _createClass(FloatingActionButton, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.el.M_FloatingActionButton = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleFABClickBound = this._handleFABClick.bind(this);
-        this._handleOpenBound = this.open.bind(this);
-        this._handleCloseBound = this.close.bind(this);
-
-        if (this.options.hoverEnabled && !this.options.toolbarEnabled) {
-          this.el.addEventListener('mouseenter', this._handleOpenBound);
-          this.el.addEventListener('mouseleave', this._handleCloseBound);
-        } else {
-          this.el.addEventListener('click', this._handleFABClickBound);
-        }
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        if (this.options.hoverEnabled && !this.options.toolbarEnabled) {
-          this.el.removeEventListener('mouseenter', this._handleOpenBound);
-          this.el.removeEventListener('mouseleave', this._handleCloseBound);
-        } else {
-          this.el.removeEventListener('click', this._handleFABClickBound);
-        }
-      }
-
-      /**
-       * Handle FAB Click
-       */
-
-    }, {
-      key: "_handleFABClick",
-      value: function _handleFABClick() {
-        if (this.isOpen) {
-          this.close();
-        } else {
-          this.open();
-        }
-      }
-
-      /**
-       * Handle Document Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleDocumentClick",
-      value: function _handleDocumentClick(e) {
-        if (!$(e.target).closest(this.$menu).length) {
-          this.close();
-        }
-      }
-
-      /**
-       * Open FAB
-       */
-
-    }, {
-      key: "open",
-      value: function open() {
-        if (this.isOpen) {
-          return;
-        }
-
-        if (this.options.toolbarEnabled) {
-          this._animateInToolbar();
-        } else {
-          this._animateInFAB();
-        }
-        this.isOpen = true;
-      }
-
-      /**
-       * Close FAB
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-
-        if (this.options.toolbarEnabled) {
-          window.removeEventListener('scroll', this._handleCloseBound, true);
-          document.body.removeEventListener('click', this._handleDocumentClickBound, true);
-          this._animateOutToolbar();
-        } else {
-          this._animateOutFAB();
-        }
-        this.isOpen = false;
-      }
-
-      /**
-       * Classic FAB Menu open
-       */
-
-    }, {
-      key: "_animateInFAB",
-      value: function _animateInFAB() {
-        var _this49 = this;
-
-        this.$el.addClass('active');
-
-        var time = 0;
-        this.$floatingBtnsReverse.each(function (el) {
-          anim({
-            targets: el,
-            opacity: 1,
-            scale: [0.4, 1],
-            translateY: [_this49.offsetY, 0],
-            translateX: [_this49.offsetX, 0],
-            duration: 275,
-            delay: time,
-            easing: 'easeInOutQuad'
-          });
-          time += 40;
-        });
-      }
-
-      /**
-       * Classic FAB Menu close
-       */
-
-    }, {
-      key: "_animateOutFAB",
-      value: function _animateOutFAB() {
-        var _this50 = this;
-
-        this.$floatingBtnsReverse.each(function (el) {
-          anim.remove(el);
-          anim({
-            targets: el,
-            opacity: 0,
-            scale: 0.4,
-            translateY: _this50.offsetY,
-            translateX: _this50.offsetX,
-            duration: 175,
-            easing: 'easeOutQuad',
-            complete: function () {
-              _this50.$el.removeClass('active');
-            }
-          });
-        });
-      }
-
-      /**
-       * Toolbar transition Menu open
-       */
-
-    }, {
-      key: "_animateInToolbar",
-      value: function _animateInToolbar() {
-        var _this51 = this;
-
-        var scaleFactor = void 0;
-        var windowWidth = window.innerWidth;
-        var windowHeight = window.innerHeight;
-        var btnRect = this.el.getBoundingClientRect();
-        var backdrop = $('<div class="fab-backdrop"></div>');
-        var fabColor = this.$anchor.css('background-color');
-        this.$anchor.append(backdrop);
-
-        this.offsetX = btnRect.left - windowWidth / 2 + btnRect.width / 2;
-        this.offsetY = windowHeight - btnRect.bottom;
-        scaleFactor = windowWidth / backdrop[0].clientWidth;
-        this.btnBottom = btnRect.bottom;
-        this.btnLeft = btnRect.left;
-        this.btnWidth = btnRect.width;
-
-        // Set initial state
-        this.$el.addClass('active');
-        this.$el.css({
-          'text-align': 'center',
-          width: '100%',
-          bottom: 0,
-          left: 0,
-          transform: 'translateX(' + this.offsetX + 'px)',
-          transition: 'none'
-        });
-        this.$anchor.css({
-          transform: 'translateY(' + -this.offsetY + 'px)',
-          transition: 'none'
-        });
-        backdrop.css({
-          'background-color': fabColor
-        });
-
-        setTimeout(function () {
-          _this51.$el.css({
-            transform: '',
-            transition: 'transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s'
-          });
-          _this51.$anchor.css({
-            overflow: 'visible',
-            transform: '',
-            transition: 'transform .2s'
-          });
-
-          setTimeout(function () {
-            _this51.$el.css({
-              overflow: 'hidden',
-              'background-color': fabColor
-            });
-            backdrop.css({
-              transform: 'scale(' + scaleFactor + ')',
-              transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
-            });
-            _this51.$menu.children('li').children('a').css({
-              opacity: 1
-            });
-
-            // Scroll to close.
-            _this51._handleDocumentClickBound = _this51._handleDocumentClick.bind(_this51);
-            window.addEventListener('scroll', _this51._handleCloseBound, true);
-            document.body.addEventListener('click', _this51._handleDocumentClickBound, true);
-          }, 100);
-        }, 0);
-      }
-
-      /**
-       * Toolbar transition Menu close
-       */
-
-    }, {
-      key: "_animateOutToolbar",
-      value: function _animateOutToolbar() {
-        var _this52 = this;
-
-        var windowWidth = window.innerWidth;
-        var windowHeight = window.innerHeight;
-        var backdrop = this.$el.find('.fab-backdrop');
-        var fabColor = this.$anchor.css('background-color');
-
-        this.offsetX = this.btnLeft - windowWidth / 2 + this.btnWidth / 2;
-        this.offsetY = windowHeight - this.btnBottom;
-
-        // Hide backdrop
-        this.$el.removeClass('active');
-        this.$el.css({
-          'background-color': 'transparent',
-          transition: 'none'
-        });
-        this.$anchor.css({
-          transition: 'none'
-        });
-        backdrop.css({
-          transform: 'scale(0)',
-          'background-color': fabColor
-        });
-        this.$menu.children('li').children('a').css({
-          opacity: ''
-        });
-
-        setTimeout(function () {
-          backdrop.remove();
-
-          // Set initial state.
-          _this52.$el.css({
-            'text-align': '',
-            width: '',
-            bottom: '',
-            left: '',
-            overflow: '',
-            'background-color': '',
-            transform: 'translate3d(' + -_this52.offsetX + 'px,0,0)'
-          });
-          _this52.$anchor.css({
-            overflow: '',
-            transform: 'translate3d(0,' + _this52.offsetY + 'px,0)'
-          });
-
-          setTimeout(function () {
-            _this52.$el.css({
-              transform: 'translate3d(0,0,0)',
-              transition: 'transform .2s'
-            });
-            _this52.$anchor.css({
-              transform: 'translate3d(0,0,0)',
-              transition: 'transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)'
-            });
-          }, 20);
-        }, 200);
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(FloatingActionButton.__proto__ || Object.getPrototypeOf(FloatingActionButton), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_FloatingActionButton;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return FloatingActionButton;
-  }(Component);
-
-  M.FloatingActionButton = FloatingActionButton;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(FloatingActionButton, 'floatingActionButton', 'M_FloatingActionButton');
-  }
-})(cash, M.anime);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    // Close when date is selected
-    autoClose: false,
-
-    // the default output format for the input field value
-    format: 'mmm dd, yyyy',
-
-    // Used to create date object from current input string
-    parse: null,
-
-    // The initial date to view when first opened
-    defaultDate: null,
-
-    // Make the `defaultDate` the initial selected value
-    setDefaultDate: false,
-
-    disableWeekends: false,
-
-    disableDayFn: null,
-
-    // First day of week (0: Sunday, 1: Monday etc)
-    firstDay: 0,
-
-    // The earliest date that can be selected
-    minDate: null,
-    // Thelatest date that can be selected
-    maxDate: null,
-
-    // Number of years either side, or array of upper/lower range
-    yearRange: 10,
-
-    // used internally (don't config outside)
-    minYear: 0,
-    maxYear: 9999,
-    minMonth: undefined,
-    maxMonth: undefined,
-
-    startRange: null,
-    endRange: null,
-
-    isRTL: false,
-
-    // Render the month after year in the calendar title
-    showMonthAfterYear: false,
-
-    // Render days of the calendar grid that fall in the next or previous month
-    showDaysInNextAndPreviousMonths: false,
-
-    // Specify a DOM element to render the calendar in
-    container: null,
-
-    // Show clear button
-    showClearBtn: false,
-
-    // internationalization
-    i18n: {
-      cancel: 'Cancel',
-      clear: 'Clear',
-      done: 'Ok',
-      previousMonth: '‹',
-      nextMonth: '›',
-      months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
-      monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
-      weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
-      weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
-      weekdaysAbbrev: ['S', 'M', 'T', 'W', 'T', 'F', 'S']
-    },
-
-    // events array
-    events: [],
-
-    // callback function
-    onSelect: null,
-    onOpen: null,
-    onClose: null,
-    onDraw: null
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Datepicker = function (_Component15) {
-    _inherits(Datepicker, _Component15);
-
-    /**
-     * Construct Datepicker instance and set up overlay
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Datepicker(el, options) {
-      _classCallCheck(this, Datepicker);
-
-      var _this53 = _possibleConstructorReturn(this, (Datepicker.__proto__ || Object.getPrototypeOf(Datepicker)).call(this, Datepicker, el, options));
-
-      _this53.el.M_Datepicker = _this53;
-
-      _this53.options = $.extend({}, Datepicker.defaults, options);
-
-      // make sure i18n defaults are not lost when only few i18n option properties are passed
-      if (!!options && options.hasOwnProperty('i18n') && typeof options.i18n === 'object') {
-        _this53.options.i18n = $.extend({}, Datepicker.defaults.i18n, options.i18n);
-      }
-
-      // Remove time component from minDate and maxDate options
-      if (_this53.options.minDate) _this53.options.minDate.setHours(0, 0, 0, 0);
-      if (_this53.options.maxDate) _this53.options.maxDate.setHours(0, 0, 0, 0);
-
-      _this53.id = M.guid();
-
-      _this53._setupVariables();
-      _this53._insertHTMLIntoDOM();
-      _this53._setupModal();
-
-      _this53._setupEventHandlers();
-
-      if (!_this53.options.defaultDate) {
-        _this53.options.defaultDate = new Date(Date.parse(_this53.el.value));
-      }
-
-      var defDate = _this53.options.defaultDate;
-      if (Datepicker._isDate(defDate)) {
-        if (_this53.options.setDefaultDate) {
-          _this53.setDate(defDate, true);
-          _this53.setInputValue();
-        } else {
-          _this53.gotoDate(defDate);
-        }
-      } else {
-        _this53.gotoDate(new Date());
-      }
-
-      /**
-       * Describes open/close state of datepicker
-       * @type {Boolean}
-       */
-      _this53.isOpen = false;
-      return _this53;
-    }
-
-    _createClass(Datepicker, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.modal.destroy();
-        $(this.modalEl).remove();
-        this.destroySelects();
-        this.el.M_Datepicker = undefined;
-      }
-    }, {
-      key: "destroySelects",
-      value: function destroySelects() {
-        var oldYearSelect = this.calendarEl.querySelector('.orig-select-year');
-        if (oldYearSelect) {
-          M.FormSelect.getInstance(oldYearSelect).destroy();
-        }
-        var oldMonthSelect = this.calendarEl.querySelector('.orig-select-month');
-        if (oldMonthSelect) {
-          M.FormSelect.getInstance(oldMonthSelect).destroy();
-        }
-      }
-    }, {
-      key: "_insertHTMLIntoDOM",
-      value: function _insertHTMLIntoDOM() {
-        if (this.options.showClearBtn) {
-          $(this.clearBtn).css({ visibility: '' });
-          this.clearBtn.innerHTML = this.options.i18n.clear;
-        }
-
-        this.doneBtn.innerHTML = this.options.i18n.done;
-        this.cancelBtn.innerHTML = this.options.i18n.cancel;
-
-        if (this.options.container) {
-          this.$modalEl.appendTo(this.options.container);
-        } else {
-          this.$modalEl.insertBefore(this.el);
-        }
-      }
-    }, {
-      key: "_setupModal",
-      value: function _setupModal() {
-        var _this54 = this;
-
-        this.modalEl.id = 'modal-' + this.id;
-        this.modal = M.Modal.init(this.modalEl, {
-          onCloseEnd: function () {
-            _this54.isOpen = false;
-          }
-        });
-      }
-    }, {
-      key: "toString",
-      value: function toString(format) {
-        var _this55 = this;
-
-        format = format || this.options.format;
-        if (!Datepicker._isDate(this.date)) {
-          return '';
-        }
-
-        var formatArray = format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);
-        var formattedDate = formatArray.map(function (label) {
-          if (_this55.formats[label]) {
-            return _this55.formats[label]();
-          }
-
-          return label;
-        }).join('');
-        return formattedDate;
-      }
-    }, {
-      key: "setDate",
-      value: function setDate(date, preventOnSelect) {
-        if (!date) {
-          this.date = null;
-          this._renderDateDisplay();
-          return this.draw();
-        }
-        if (typeof date === 'string') {
-          date = new Date(Date.parse(date));
-        }
-        if (!Datepicker._isDate(date)) {
-          return;
-        }
-
-        var min = this.options.minDate,
-            max = this.options.maxDate;
-
-        if (Datepicker._isDate(min) && date < min) {
-          date = min;
-        } else if (Datepicker._isDate(max) && date > max) {
-          date = max;
-        }
-
-        this.date = new Date(date.getTime());
-
-        this._renderDateDisplay();
-
-        Datepicker._setToStartOfDay(this.date);
-        this.gotoDate(this.date);
-
-        if (!preventOnSelect && typeof this.options.onSelect === 'function') {
-          this.options.onSelect.call(this, this.date);
-        }
-      }
-    }, {
-      key: "setInputValue",
-      value: function setInputValue() {
-        this.el.value = this.toString();
-        this.$el.trigger('change', { firedBy: this });
-      }
-    }, {
-      key: "_renderDateDisplay",
-      value: function _renderDateDisplay() {
-        var displayDate = Datepicker._isDate(this.date) ? this.date : new Date();
-        var i18n = this.options.i18n;
-        var day = i18n.weekdaysShort[displayDate.getDay()];
-        var month = i18n.monthsShort[displayDate.getMonth()];
-        var date = displayDate.getDate();
-        this.yearTextEl.innerHTML = displayDate.getFullYear();
-        this.dateTextEl.innerHTML = day + ", " + month + " " + date;
-      }
-
-      /**
-       * change view to a specific date
-       */
-
-    }, {
-      key: "gotoDate",
-      value: function gotoDate(date) {
-        var newCalendar = true;
-
-        if (!Datepicker._isDate(date)) {
-          return;
-        }
-
-        if (this.calendars) {
-          var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
-              lastVisibleDate = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1),
-              visibleDate = date.getTime();
-          // get the end of the month
-          lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1);
-          lastVisibleDate.setDate(lastVisibleDate.getDate() - 1);
-          newCalendar = visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate;
-        }
-
-        if (newCalendar) {
-          this.calendars = [{
-            month: date.getMonth(),
-            year: date.getFullYear()
-          }];
-        }
-
-        this.adjustCalendars();
-      }
-    }, {
-      key: "adjustCalendars",
-      value: function adjustCalendars() {
-        this.calendars[0] = this.adjustCalendar(this.calendars[0]);
-        this.draw();
-      }
-    }, {
-      key: "adjustCalendar",
-      value: function adjustCalendar(calendar) {
-        if (calendar.month < 0) {
-          calendar.year -= Math.ceil(Math.abs(calendar.month) / 12);
-          calendar.month += 12;
-        }
-        if (calendar.month > 11) {
-          calendar.year += Math.floor(Math.abs(calendar.month) / 12);
-          calendar.month -= 12;
-        }
-        return calendar;
-      }
-    }, {
-      key: "nextMonth",
-      value: function nextMonth() {
-        this.calendars[0].month++;
-        this.adjustCalendars();
-      }
-    }, {
-      key: "prevMonth",
-      value: function prevMonth() {
-        this.calendars[0].month--;
-        this.adjustCalendars();
-      }
-    }, {
-      key: "render",
-      value: function render(year, month, randId) {
-        var opts = this.options,
-            now = new Date(),
-            days = Datepicker._getDaysInMonth(year, month),
-            before = new Date(year, month, 1).getDay(),
-            data = [],
-            row = [];
-        Datepicker._setToStartOfDay(now);
-        if (opts.firstDay > 0) {
-          before -= opts.firstDay;
-          if (before < 0) {
-            before += 7;
-          }
-        }
-        var previousMonth = month === 0 ? 11 : month - 1,
-            nextMonth = month === 11 ? 0 : month + 1,
-            yearOfPreviousMonth = month === 0 ? year - 1 : year,
-            yearOfNextMonth = month === 11 ? year + 1 : year,
-            daysInPreviousMonth = Datepicker._getDaysInMonth(yearOfPreviousMonth, previousMonth);
-        var cells = days + before,
-            after = cells;
-        while (after > 7) {
-          after -= 7;
-        }
-        cells += 7 - after;
-        var isWeekSelected = false;
-        for (var i = 0, r = 0; i < cells; i++) {
-          var day = new Date(year, month, 1 + (i - before)),
-              isSelected = Datepicker._isDate(this.date) ? Datepicker._compareDates(day, this.date) : false,
-              isToday = Datepicker._compareDates(day, now),
-              hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,
-              isEmpty = i < before || i >= days + before,
-              dayNumber = 1 + (i - before),
-              monthNumber = month,
-              yearNumber = year,
-              isStartRange = opts.startRange && Datepicker._compareDates(opts.startRange, day),
-              isEndRange = opts.endRange && Datepicker._compareDates(opts.endRange, day),
-              isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
-              isDisabled = opts.minDate && day < opts.minDate || opts.maxDate && day > opts.maxDate || opts.disableWeekends && Datepicker._isWeekend(day) || opts.disableDayFn && opts.disableDayFn(day);
-
-          if (isEmpty) {
-            if (i < before) {
-              dayNumber = daysInPreviousMonth + dayNumber;
-              monthNumber = previousMonth;
-              yearNumber = yearOfPreviousMonth;
-            } else {
-              dayNumber = dayNumber - days;
-              monthNumber = nextMonth;
-              yearNumber = yearOfNextMonth;
-            }
-          }
-
-          var dayConfig = {
-            day: dayNumber,
-            month: monthNumber,
-            year: yearNumber,
-            hasEvent: hasEvent,
-            isSelected: isSelected,
-            isToday: isToday,
-            isDisabled: isDisabled,
-            isEmpty: isEmpty,
-            isStartRange: isStartRange,
-            isEndRange: isEndRange,
-            isInRange: isInRange,
-            showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths
-          };
-
-          row.push(this.renderDay(dayConfig));
-
-          if (++r === 7) {
-            data.push(this.renderRow(row, opts.isRTL, isWeekSelected));
-            row = [];
-            r = 0;
-            isWeekSelected = false;
-          }
-        }
-        return this.renderTable(opts, data, randId);
-      }
-    }, {
-      key: "renderDay",
-      value: function renderDay(opts) {
-        var arr = [];
-        var ariaSelected = 'false';
-        if (opts.isEmpty) {
-          if (opts.showDaysInNextAndPreviousMonths) {
-            arr.push('is-outside-current-month');
-            arr.push('is-selection-disabled');
-          } else {
-            return '<td class="is-empty"></td>';
-          }
-        }
-        if (opts.isDisabled) {
-          arr.push('is-disabled');
-        }
-
-        if (opts.isToday) {
-          arr.push('is-today');
-        }
-        if (opts.isSelected) {
-          arr.push('is-selected');
-          ariaSelected = 'true';
-        }
-        if (opts.hasEvent) {
-          arr.push('has-event');
-        }
-        if (opts.isInRange) {
-          arr.push('is-inrange');
-        }
-        if (opts.isStartRange) {
-          arr.push('is-startrange');
-        }
-        if (opts.isEndRange) {
-          arr.push('is-endrange');
-        }
-        return "<td data-day=\"" + opts.day + "\" class=\"" + arr.join(' ') + "\" aria-selected=\"" + ariaSelected + "\">" + ("<button class=\"datepicker-day-button\" type=\"button\" data-year=\"" + opts.year + "\" data-month=\"" + opts.month + "\" data-day=\"" + opts.day + "\">" + opts.day + "</button>") + '</td>';
-      }
-    }, {
-      key: "renderRow",
-      value: function renderRow(days, isRTL, isRowSelected) {
-        return '<tr class="datepicker-row' + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>';
-      }
-    }, {
-      key: "renderTable",
-      value: function renderTable(opts, data, randId) {
-        return '<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="' + randId + '">' + this.renderHead(opts) + this.renderBody(data) + '</table></div>';
-      }
-    }, {
-      key: "renderHead",
-      value: function renderHead(opts) {
-        var i = void 0,
-            arr = [];
-        for (i = 0; i < 7; i++) {
-          arr.push("<th scope=\"col\"><abbr title=\"" + this.renderDayName(opts, i) + "\">" + this.renderDayName(opts, i, true) + "</abbr></th>");
-        }
-        return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
-      }
-    }, {
-      key: "renderBody",
-      value: function renderBody(rows) {
-        return '<tbody>' + rows.join('') + '</tbody>';
-      }
-    }, {
-      key: "renderTitle",
-      value: function renderTitle(instance, c, year, month, refYear, randId) {
-        var i = void 0,
-            j = void 0,
-            arr = void 0,
-            opts = this.options,
-            isMinYear = year === opts.minYear,
-            isMaxYear = year === opts.maxYear,
-            html = '<div id="' + randId + '" class="datepicker-controls" role="heading" aria-live="assertive">',
-            monthHtml = void 0,
-            yearHtml = void 0,
-            prev = true,
-            next = true;
-
-        for (arr = [], i = 0; i < 12; i++) {
-          arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' + (i === month ? ' selected="selected"' : '') + (isMinYear && i < opts.minMonth || isMaxYear && i > opts.maxMonth ? 'disabled="disabled"' : '') + '>' + opts.i18n.months[i] + '</option>');
-        }
-
-        monthHtml = '<select class="datepicker-select orig-select-month" tabindex="-1">' + arr.join('') + '</select>';
-
-        if ($.isArray(opts.yearRange)) {
-          i = opts.yearRange[0];
-          j = opts.yearRange[1] + 1;
-        } else {
-          i = year - opts.yearRange;
-          j = 1 + year + opts.yearRange;
-        }
-
-        for (arr = []; i < j && i <= opts.maxYear; i++) {
-          if (i >= opts.minYear) {
-            arr.push("<option value=\"" + i + "\" " + (i === year ? 'selected="selected"' : '') + ">" + i + "</option>");
-          }
-        }
-
-        yearHtml = "<select class=\"datepicker-select orig-select-year\" tabindex=\"-1\">" + arr.join('') + "</select>";
-
-        var leftArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg>';
-        html += "<button class=\"month-prev" + (prev ? '' : ' is-disabled') + "\" type=\"button\">" + leftArrow + "</button>";
-
-        html += '<div class="selects-container">';
-        if (opts.showMonthAfterYear) {
-          html += yearHtml + monthHtml;
-        } else {
-          html += monthHtml + yearHtml;
-        }
-        html += '</div>';
-
-        if (isMinYear && (month === 0 || opts.minMonth >= month)) {
-          prev = false;
-        }
-
-        if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
-          next = false;
-        }
-
-        var rightArrow = '<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg>';
-        html += "<button class=\"month-next" + (next ? '' : ' is-disabled') + "\" type=\"button\">" + rightArrow + "</button>";
-
-        return html += '</div>';
-      }
-
-      /**
-       * refresh the HTML
-       */
-
-    }, {
-      key: "draw",
-      value: function draw(force) {
-        if (!this.isOpen && !force) {
-          return;
-        }
-        var opts = this.options,
-            minYear = opts.minYear,
-            maxYear = opts.maxYear,
-            minMonth = opts.minMonth,
-            maxMonth = opts.maxMonth,
-            html = '',
-            randId = void 0;
-
-        if (this._y <= minYear) {
-          this._y = minYear;
-          if (!isNaN(minMonth) && this._m < minMonth) {
-            this._m = minMonth;
-          }
-        }
-        if (this._y >= maxYear) {
-          this._y = maxYear;
-          if (!isNaN(maxMonth) && this._m > maxMonth) {
-            this._m = maxMonth;
-          }
-        }
-
-        randId = 'datepicker-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
-
-        for (var c = 0; c < 1; c++) {
-          this._renderDateDisplay();
-          html += this.renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId);
-        }
-
-        this.destroySelects();
-
-        this.calendarEl.innerHTML = html;
-
-        // Init Materialize Select
-        var yearSelect = this.calendarEl.querySelector('.orig-select-year');
-        var monthSelect = this.calendarEl.querySelector('.orig-select-month');
-        M.FormSelect.init(yearSelect, {
-          classes: 'select-year',
-          dropdownOptions: { container: document.body, constrainWidth: false }
-        });
-        M.FormSelect.init(monthSelect, {
-          classes: 'select-month',
-          dropdownOptions: { container: document.body, constrainWidth: false }
-        });
-
-        // Add change handlers for select
-        yearSelect.addEventListener('change', this._handleYearChange.bind(this));
-        monthSelect.addEventListener('change', this._handleMonthChange.bind(this));
-
-        if (typeof this.options.onDraw === 'function') {
-          this.options.onDraw(this);
-        }
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
-        this._handleInputClickBound = this._handleInputClick.bind(this);
-        this._handleInputChangeBound = this._handleInputChange.bind(this);
-        this._handleCalendarClickBound = this._handleCalendarClick.bind(this);
-        this._finishSelectionBound = this._finishSelection.bind(this);
-        this._handleMonthChange = this._handleMonthChange.bind(this);
-        this._closeBound = this.close.bind(this);
-
-        this.el.addEventListener('click', this._handleInputClickBound);
-        this.el.addEventListener('keydown', this._handleInputKeydownBound);
-        this.el.addEventListener('change', this._handleInputChangeBound);
-        this.calendarEl.addEventListener('click', this._handleCalendarClickBound);
-        this.doneBtn.addEventListener('click', this._finishSelectionBound);
-        this.cancelBtn.addEventListener('click', this._closeBound);
-
-        if (this.options.showClearBtn) {
-          this._handleClearClickBound = this._handleClearClick.bind(this);
-          this.clearBtn.addEventListener('click', this._handleClearClickBound);
-        }
-      }
-    }, {
-      key: "_setupVariables",
-      value: function _setupVariables() {
-        var _this56 = this;
-
-        this.$modalEl = $(Datepicker._template);
-        this.modalEl = this.$modalEl[0];
-
-        this.calendarEl = this.modalEl.querySelector('.datepicker-calendar');
-
-        this.yearTextEl = this.modalEl.querySelector('.year-text');
-        this.dateTextEl = this.modalEl.querySelector('.date-text');
-        if (this.options.showClearBtn) {
-          this.clearBtn = this.modalEl.querySelector('.datepicker-clear');
-        }
-        this.doneBtn = this.modalEl.querySelector('.datepicker-done');
-        this.cancelBtn = this.modalEl.querySelector('.datepicker-cancel');
-
-        this.formats = {
-          d: function () {
-            return _this56.date.getDate();
-          },
-          dd: function () {
-            var d = _this56.date.getDate();
-            return (d < 10 ? '0' : '') + d;
-          },
-          ddd: function () {
-            return _this56.options.i18n.weekdaysShort[_this56.date.getDay()];
-          },
-          dddd: function () {
-            return _this56.options.i18n.weekdays[_this56.date.getDay()];
-          },
-          m: function () {
-            return _this56.date.getMonth() + 1;
-          },
-          mm: function () {
-            var m = _this56.date.getMonth() + 1;
-            return (m < 10 ? '0' : '') + m;
-          },
-          mmm: function () {
-            return _this56.options.i18n.monthsShort[_this56.date.getMonth()];
-          },
-          mmmm: function () {
-            return _this56.options.i18n.months[_this56.date.getMonth()];
-          },
-          yy: function () {
-            return ('' + _this56.date.getFullYear()).slice(2);
-          },
-          yyyy: function () {
-            return _this56.date.getFullYear();
-          }
-        };
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('click', this._handleInputClickBound);
-        this.el.removeEventListener('keydown', this._handleInputKeydownBound);
-        this.el.removeEventListener('change', this._handleInputChangeBound);
-        this.calendarEl.removeEventListener('click', this._handleCalendarClickBound);
-      }
-    }, {
-      key: "_handleInputClick",
-      value: function _handleInputClick() {
-        this.open();
-      }
-    }, {
-      key: "_handleInputKeydown",
-      value: function _handleInputKeydown(e) {
-        if (e.which === M.keys.ENTER) {
-          e.preventDefault();
-          this.open();
-        }
-      }
-    }, {
-      key: "_handleCalendarClick",
-      value: function _handleCalendarClick(e) {
-        if (!this.isOpen) {
-          return;
-        }
-
-        var $target = $(e.target);
-        if (!$target.hasClass('is-disabled')) {
-          if ($target.hasClass('datepicker-day-button') && !$target.hasClass('is-empty') && !$target.parent().hasClass('is-disabled')) {
-            this.setDate(new Date(e.target.getAttribute('data-year'), e.target.getAttribute('data-month'), e.target.getAttribute('data-day')));
-            if (this.options.autoClose) {
-              this._finishSelection();
-            }
-          } else if ($target.closest('.month-prev').length) {
-            this.prevMonth();
-          } else if ($target.closest('.month-next').length) {
-            this.nextMonth();
-          }
-        }
-      }
-    }, {
-      key: "_handleClearClick",
-      value: function _handleClearClick() {
-        this.date = null;
-        this.setInputValue();
-        this.close();
-      }
-    }, {
-      key: "_handleMonthChange",
-      value: function _handleMonthChange(e) {
-        this.gotoMonth(e.target.value);
-      }
-    }, {
-      key: "_handleYearChange",
-      value: function _handleYearChange(e) {
-        this.gotoYear(e.target.value);
-      }
-
-      /**
-       * change view to a specific month (zero-index, e.g. 0: January)
-       */
-
-    }, {
-      key: "gotoMonth",
-      value: function gotoMonth(month) {
-        if (!isNaN(month)) {
-          this.calendars[0].month = parseInt(month, 10);
-          this.adjustCalendars();
-        }
-      }
-
-      /**
-       * change view to a specific full year (e.g. "2012")
-       */
-
-    }, {
-      key: "gotoYear",
-      value: function gotoYear(year) {
-        if (!isNaN(year)) {
-          this.calendars[0].year = parseInt(year, 10);
-          this.adjustCalendars();
-        }
-      }
-    }, {
-      key: "_handleInputChange",
-      value: function _handleInputChange(e) {
-        var date = void 0;
-
-        // Prevent change event from being fired when triggered by the plugin
-        if (e.firedBy === this) {
-          return;
-        }
-        if (this.options.parse) {
-          date = this.options.parse(this.el.value, this.options.format);
-        } else {
-          date = new Date(Date.parse(this.el.value));
-        }
-
-        if (Datepicker._isDate(date)) {
-          this.setDate(date);
-        }
-      }
-    }, {
-      key: "renderDayName",
-      value: function renderDayName(opts, day, abbr) {
-        day += opts.firstDay;
-        while (day >= 7) {
-          day -= 7;
-        }
-        return abbr ? opts.i18n.weekdaysAbbrev[day] : opts.i18n.weekdays[day];
-      }
-
-      /**
-       * Set input value to the selected date and close Datepicker
-       */
-
-    }, {
-      key: "_finishSelection",
-      value: function _finishSelection() {
-        this.setInputValue();
-        this.close();
-      }
-
-      /**
-       * Open Datepicker
-       */
-
-    }, {
-      key: "open",
-      value: function open() {
-        if (this.isOpen) {
-          return;
-        }
-
-        this.isOpen = true;
-        if (typeof this.options.onOpen === 'function') {
-          this.options.onOpen.call(this);
-        }
-        this.draw();
-        this.modal.open();
-        return this;
-      }
-
-      /**
-       * Close Datepicker
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-
-        this.isOpen = false;
-        if (typeof this.options.onClose === 'function') {
-          this.options.onClose.call(this);
-        }
-        this.modal.close();
-        return this;
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Datepicker.__proto__ || Object.getPrototypeOf(Datepicker), "init", this).call(this, this, els, options);
-      }
-    }, {
-      key: "_isDate",
-      value: function _isDate(obj) {
-        return (/Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime())
-        );
-      }
-    }, {
-      key: "_isWeekend",
-      value: function _isWeekend(date) {
-        var day = date.getDay();
-        return day === 0 || day === 6;
-      }
-    }, {
-      key: "_setToStartOfDay",
-      value: function _setToStartOfDay(date) {
-        if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0);
-      }
-    }, {
-      key: "_getDaysInMonth",
-      value: function _getDaysInMonth(year, month) {
-        return [31, Datepicker._isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
-      }
-    }, {
-      key: "_isLeapYear",
-      value: function _isLeapYear(year) {
-        // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
-        return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
-      }
-    }, {
-      key: "_compareDates",
-      value: function _compareDates(a, b) {
-        // weak date comparison (use setToStartOfDay(date) to ensure correct result)
-        return a.getTime() === b.getTime();
-      }
-    }, {
-      key: "_setToStartOfDay",
-      value: function _setToStartOfDay(date) {
-        if (Datepicker._isDate(date)) date.setHours(0, 0, 0, 0);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Datepicker;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Datepicker;
-  }(Component);
-
-  Datepicker._template = ['<div class= "modal datepicker-modal">', '<div class="modal-content datepicker-container">', '<div class="datepicker-date-display">', '<span class="year-text"></span>', '<span class="date-text"></span>', '</div>', '<div class="datepicker-calendar-container">', '<div class="datepicker-calendar"></div>', '<div class="datepicker-footer">', '<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>', '<div class="confirmation-btns">', '<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>', '<button class="btn-flat datepicker-done waves-effect" type="button"></button>', '</div>', '</div>', '</div>', '</div>', '</div>'].join('');
-
-  M.Datepicker = Datepicker;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Datepicker, 'datepicker', 'M_Datepicker');
-  }
-})(cash);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    dialRadius: 135,
-    outerRadius: 105,
-    innerRadius: 70,
-    tickRadius: 20,
-    duration: 350,
-    container: null,
-    defaultTime: 'now', // default time, 'now' or '13:14' e.g.
-    fromNow: 0, // Millisecond offset from the defaultTime
-    showClearBtn: false,
-
-    // internationalization
-    i18n: {
-      cancel: 'Cancel',
-      clear: 'Clear',
-      done: 'Ok'
-    },
-
-    autoClose: false, // auto close when minute is selected
-    twelveHour: true, // change to 12 hour AM/PM clock from 24 hour
-    vibrate: true, // vibrate the device when dragging clock hand
-
-    // Callbacks
-    onOpenStart: null,
-    onOpenEnd: null,
-    onCloseStart: null,
-    onCloseEnd: null,
-    onSelect: null
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Timepicker = function (_Component16) {
-    _inherits(Timepicker, _Component16);
-
-    function Timepicker(el, options) {
-      _classCallCheck(this, Timepicker);
-
-      var _this57 = _possibleConstructorReturn(this, (Timepicker.__proto__ || Object.getPrototypeOf(Timepicker)).call(this, Timepicker, el, options));
-
-      _this57.el.M_Timepicker = _this57;
-
-      _this57.options = $.extend({}, Timepicker.defaults, options);
-
-      _this57.id = M.guid();
-      _this57._insertHTMLIntoDOM();
-      _this57._setupModal();
-      _this57._setupVariables();
-      _this57._setupEventHandlers();
-
-      _this57._clockSetup();
-      _this57._pickerSetup();
-      return _this57;
-    }
-
-    _createClass(Timepicker, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.modal.destroy();
-        $(this.modalEl).remove();
-        this.el.M_Timepicker = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
-        this._handleInputClickBound = this._handleInputClick.bind(this);
-        this._handleClockClickStartBound = this._handleClockClickStart.bind(this);
-        this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this);
-        this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this);
-
-        this.el.addEventListener('click', this._handleInputClickBound);
-        this.el.addEventListener('keydown', this._handleInputKeydownBound);
-        this.plate.addEventListener('mousedown', this._handleClockClickStartBound);
-        this.plate.addEventListener('touchstart', this._handleClockClickStartBound);
-
-        $(this.spanHours).on('click', this.showView.bind(this, 'hours'));
-        $(this.spanMinutes).on('click', this.showView.bind(this, 'minutes'));
-      }
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('click', this._handleInputClickBound);
-        this.el.removeEventListener('keydown', this._handleInputKeydownBound);
-      }
-    }, {
-      key: "_handleInputClick",
-      value: function _handleInputClick() {
-        this.open();
-      }
-    }, {
-      key: "_handleInputKeydown",
-      value: function _handleInputKeydown(e) {
-        if (e.which === M.keys.ENTER) {
-          e.preventDefault();
-          this.open();
-        }
-      }
-    }, {
-      key: "_handleClockClickStart",
-      value: function _handleClockClickStart(e) {
-        e.preventDefault();
-        var clockPlateBR = this.plate.getBoundingClientRect();
-        var offset = { x: clockPlateBR.left, y: clockPlateBR.top };
-
-        this.x0 = offset.x + this.options.dialRadius;
-        this.y0 = offset.y + this.options.dialRadius;
-        this.moved = false;
-        var clickPos = Timepicker._Pos(e);
-        this.dx = clickPos.x - this.x0;
-        this.dy = clickPos.y - this.y0;
-
-        // Set clock hands
-        this.setHand(this.dx, this.dy, false);
-
-        // Mousemove on document
-        document.addEventListener('mousemove', this._handleDocumentClickMoveBound);
-        document.addEventListener('touchmove', this._handleDocumentClickMoveBound);
-
-        // Mouseup on document
-        document.addEventListener('mouseup', this._handleDocumentClickEndBound);
-        document.addEventListener('touchend', this._handleDocumentClickEndBound);
-      }
-    }, {
-      key: "_handleDocumentClickMove",
-      value: function _handleDocumentClickMove(e) {
-        e.preventDefault();
-        var clickPos = Timepicker._Pos(e);
-        var x = clickPos.x - this.x0;
-        var y = clickPos.y - this.y0;
-        this.moved = true;
-        this.setHand(x, y, false, true);
-      }
-    }, {
-      key: "_handleDocumentClickEnd",
-      value: function _handleDocumentClickEnd(e) {
-        var _this58 = this;
-
-        e.preventDefault();
-        document.removeEventListener('mouseup', this._handleDocumentClickEndBound);
-        document.removeEventListener('touchend', this._handleDocumentClickEndBound);
-        var clickPos = Timepicker._Pos(e);
-        var x = clickPos.x - this.x0;
-        var y = clickPos.y - this.y0;
-        if (this.moved && x === this.dx && y === this.dy) {
-          this.setHand(x, y);
-        }
-
-        if (this.currentView === 'hours') {
-          this.showView('minutes', this.options.duration / 2);
-        } else if (this.options.autoClose) {
-          $(this.minutesView).addClass('timepicker-dial-out');
-          setTimeout(function () {
-            _this58.done();
-          }, this.options.duration / 2);
-        }
-
-        if (typeof this.options.onSelect === 'function') {
-          this.options.onSelect.call(this, this.hours, this.minutes);
-        }
-
-        // Unbind mousemove event
-        document.removeEventListener('mousemove', this._handleDocumentClickMoveBound);
-        document.removeEventListener('touchmove', this._handleDocumentClickMoveBound);
-      }
-    }, {
-      key: "_insertHTMLIntoDOM",
-      value: function _insertHTMLIntoDOM() {
-        this.$modalEl = $(Timepicker._template);
-        this.modalEl = this.$modalEl[0];
-        this.modalEl.id = 'modal-' + this.id;
-
-        // Append popover to input by default
-        var containerEl = document.querySelector(this.options.container);
-        if (this.options.container && !!containerEl) {
-          this.$modalEl.appendTo(containerEl);
-        } else {
-          this.$modalEl.insertBefore(this.el);
-        }
-      }
-    }, {
-      key: "_setupModal",
-      value: function _setupModal() {
-        var _this59 = this;
-
-        this.modal = M.Modal.init(this.modalEl, {
-          onOpenStart: this.options.onOpenStart,
-          onOpenEnd: this.options.onOpenEnd,
-          onCloseStart: this.options.onCloseStart,
-          onCloseEnd: function () {
-            if (typeof _this59.options.onCloseEnd === 'function') {
-              _this59.options.onCloseEnd.call(_this59);
-            }
-            _this59.isOpen = false;
-          }
-        });
-      }
-    }, {
-      key: "_setupVariables",
-      value: function _setupVariables() {
-        this.currentView = 'hours';
-        this.vibrate = navigator.vibrate ? 'vibrate' : navigator.webkitVibrate ? 'webkitVibrate' : null;
-
-        this._canvas = this.modalEl.querySelector('.timepicker-canvas');
-        this.plate = this.modalEl.querySelector('.timepicker-plate');
-
-        this.hoursView = this.modalEl.querySelector('.timepicker-hours');
-        this.minutesView = this.modalEl.querySelector('.timepicker-minutes');
-        this.spanHours = this.modalEl.querySelector('.timepicker-span-hours');
-        this.spanMinutes = this.modalEl.querySelector('.timepicker-span-minutes');
-        this.spanAmPm = this.modalEl.querySelector('.timepicker-span-am-pm');
-        this.footer = this.modalEl.querySelector('.timepicker-footer');
-        this.amOrPm = 'PM';
-      }
-    }, {
-      key: "_pickerSetup",
-      value: function _pickerSetup() {
-        var $clearBtn = $("<button class=\"btn-flat timepicker-clear waves-effect\" style=\"visibility: hidden;\" type=\"button\" tabindex=\"" + (this.options.twelveHour ? '3' : '1') + "\">" + this.options.i18n.clear + "</button>").appendTo(this.footer).on('click', this.clear.bind(this));
-        if (this.options.showClearBtn) {
-          $clearBtn.css({ visibility: '' });
-        }
-
-        var confirmationBtnsContainer = $('<div class="confirmation-btns"></div>');
-        $('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="' + (this.options.twelveHour ? '3' : '1') + '">' + this.options.i18n.cancel + '</button>').appendTo(confirmationBtnsContainer).on('click', this.close.bind(this));
-        $('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="' + (this.options.twelveHour ? '3' : '1') + '">' + this.options.i18n.done + '</button>').appendTo(confirmationBtnsContainer).on('click', this.done.bind(this));
-        confirmationBtnsContainer.appendTo(this.footer);
-      }
-    }, {
-      key: "_clockSetup",
-      value: function _clockSetup() {
-        if (this.options.twelveHour) {
-          this.$amBtn = $('<div class="am-btn">AM</div>');
-          this.$pmBtn = $('<div class="pm-btn">PM</div>');
-          this.$amBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm);
-          this.$pmBtn.on('click', this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm);
-        }
-
-        this._buildHoursView();
-        this._buildMinutesView();
-        this._buildSVGClock();
-      }
-    }, {
-      key: "_buildSVGClock",
-      value: function _buildSVGClock() {
-        // Draw clock hands and others
-        var dialRadius = this.options.dialRadius;
-        var tickRadius = this.options.tickRadius;
-        var diameter = dialRadius * 2;
-
-        var svg = Timepicker._createSVGEl('svg');
-        svg.setAttribute('class', 'timepicker-svg');
-        svg.setAttribute('width', diameter);
-        svg.setAttribute('height', diameter);
-        var g = Timepicker._createSVGEl('g');
-        g.setAttribute('transform', 'translate(' + dialRadius + ',' + dialRadius + ')');
-        var bearing = Timepicker._createSVGEl('circle');
-        bearing.setAttribute('class', 'timepicker-canvas-bearing');
-        bearing.setAttribute('cx', 0);
-        bearing.setAttribute('cy', 0);
-        bearing.setAttribute('r', 4);
-        var hand = Timepicker._createSVGEl('line');
-        hand.setAttribute('x1', 0);
-        hand.setAttribute('y1', 0);
-        var bg = Timepicker._createSVGEl('circle');
-        bg.setAttribute('class', 'timepicker-canvas-bg');
-        bg.setAttribute('r', tickRadius);
-        g.appendChild(hand);
-        g.appendChild(bg);
-        g.appendChild(bearing);
-        svg.appendChild(g);
-        this._canvas.appendChild(svg);
-
-        this.hand = hand;
-        this.bg = bg;
-        this.bearing = bearing;
-        this.g = g;
-      }
-    }, {
-      key: "_buildHoursView",
-      value: function _buildHoursView() {
-        var $tick = $('<div class="timepicker-tick"></div>');
-        // Hours view
-        if (this.options.twelveHour) {
-          for (var i = 1; i < 13; i += 1) {
-            var tick = $tick.clone();
-            var radian = i / 6 * Math.PI;
-            var radius = this.options.outerRadius;
-            tick.css({
-              left: this.options.dialRadius + Math.sin(radian) * radius - this.options.tickRadius + 'px',
-              top: this.options.dialRadius - Math.cos(radian) * radius - this.options.tickRadius + 'px'
-            });
-            tick.html(i === 0 ? '00' : i);
-            this.hoursView.appendChild(tick[0]);
-            // tick.on(mousedownEvent, mousedown);
-          }
-        } else {
-          for (var _i2 = 0; _i2 < 24; _i2 += 1) {
-            var _tick = $tick.clone();
-            var _radian = _i2 / 6 * Math.PI;
-            var inner = _i2 > 0 && _i2 < 13;
-            var _radius = inner ? this.options.innerRadius : this.options.outerRadius;
-            _tick.css({
-              left: this.options.dialRadius + Math.sin(_radian) * _radius - this.options.tickRadius + 'px',
-              top: this.options.dialRadius - Math.cos(_radian) * _radius - this.options.tickRadius + 'px'
-            });
-            _tick.html(_i2 === 0 ? '00' : _i2);
-            this.hoursView.appendChild(_tick[0]);
-            // tick.on(mousedownEvent, mousedown);
-          }
-        }
-      }
-    }, {
-      key: "_buildMinutesView",
-      value: function _buildMinutesView() {
-        var $tick = $('<div class="timepicker-tick"></div>');
-        // Minutes view
-        for (var i = 0; i < 60; i += 5) {
-          var tick = $tick.clone();
-          var radian = i / 30 * Math.PI;
-          tick.css({
-            left: this.options.dialRadius + Math.sin(radian) * this.options.outerRadius - this.options.tickRadius + 'px',
-            top: this.options.dialRadius - Math.cos(radian) * this.options.outerRadius - this.options.tickRadius + 'px'
-          });
-          tick.html(Timepicker._addLeadingZero(i));
-          this.minutesView.appendChild(tick[0]);
-        }
-      }
-    }, {
-      key: "_handleAmPmClick",
-      value: function _handleAmPmClick(e) {
-        var $btnClicked = $(e.target);
-        this.amOrPm = $btnClicked.hasClass('am-btn') ? 'AM' : 'PM';
-        this._updateAmPmView();
-      }
-    }, {
-      key: "_updateAmPmView",
-      value: function _updateAmPmView() {
-        if (this.options.twelveHour) {
-          this.$amBtn.toggleClass('text-primary', this.amOrPm === 'AM');
-          this.$pmBtn.toggleClass('text-primary', this.amOrPm === 'PM');
-        }
-      }
-    }, {
-      key: "_updateTimeFromInput",
-      value: function _updateTimeFromInput() {
-        // Get the time
-        var value = ((this.el.value || this.options.defaultTime || '') + '').split(':');
-        if (this.options.twelveHour && !(typeof value[1] === 'undefined')) {
-          if (value[1].toUpperCase().indexOf('AM') > 0) {
-            this.amOrPm = 'AM';
-          } else {
-            this.amOrPm = 'PM';
-          }
-          value[1] = value[1].replace('AM', '').replace('PM', '');
-        }
-        if (value[0] === 'now') {
-          var now = new Date(+new Date() + this.options.fromNow);
-          value = [now.getHours(), now.getMinutes()];
-          if (this.options.twelveHour) {
-            this.amOrPm = value[0] >= 12 && value[0] < 24 ? 'PM' : 'AM';
-          }
-        }
-        this.hours = +value[0] || 0;
-        this.minutes = +value[1] || 0;
-        this.spanHours.innerHTML = this.hours;
-        this.spanMinutes.innerHTML = Timepicker._addLeadingZero(this.minutes);
-
-        this._updateAmPmView();
-      }
-    }, {
-      key: "showView",
-      value: function showView(view, delay) {
-        if (view === 'minutes' && $(this.hoursView).css('visibility') === 'visible') {
-          // raiseCallback(this.options.beforeHourSelect);
-        }
-        var isHours = view === 'hours',
-            nextView = isHours ? this.hoursView : this.minutesView,
-            hideView = isHours ? this.minutesView : this.hoursView;
-        this.currentView = view;
-
-        $(this.spanHours).toggleClass('text-primary', isHours);
-        $(this.spanMinutes).toggleClass('text-primary', !isHours);
-
-        // Transition view
-        hideView.classList.add('timepicker-dial-out');
-        $(nextView).css('visibility', 'visible').removeClass('timepicker-dial-out');
-
-        // Reset clock hand
-        this.resetClock(delay);
-
-        // After transitions ended
-        clearTimeout(this.toggleViewTimer);
-        this.toggleViewTimer = setTimeout(function () {
-          $(hideView).css('visibility', 'hidden');
-        }, this.options.duration);
-      }
-    }, {
-      key: "resetClock",
-      value: function resetClock(delay) {
-        var view = this.currentView,
-            value = this[view],
-            isHours = view === 'hours',
-            unit = Math.PI / (isHours ? 6 : 30),
-            radian = value * unit,
-            radius = isHours && value > 0 && value < 13 ? this.options.innerRadius : this.options.outerRadius,
-            x = Math.sin(radian) * radius,
-            y = -Math.cos(radian) * radius,
-            self = this;
-
-        if (delay) {
-          $(this.canvas).addClass('timepicker-canvas-out');
-          setTimeout(function () {
-            $(self.canvas).removeClass('timepicker-canvas-out');
-            self.setHand(x, y);
-          }, delay);
-        } else {
-          this.setHand(x, y);
-        }
-      }
-    }, {
-      key: "setHand",
-      value: function setHand(x, y, roundBy5) {
-        var _this60 = this;
-
-        var radian = Math.atan2(x, -y),
-            isHours = this.currentView === 'hours',
-            unit = Math.PI / (isHours || roundBy5 ? 6 : 30),
-            z = Math.sqrt(x * x + y * y),
-            inner = isHours && z < (this.options.outerRadius + this.options.innerRadius) / 2,
-            radius = inner ? this.options.innerRadius : this.options.outerRadius;
-
-        if (this.options.twelveHour) {
-          radius = this.options.outerRadius;
-        }
-
-        // Radian should in range [0, 2PI]
-        if (radian < 0) {
-          radian = Math.PI * 2 + radian;
-        }
-
-        // Get the round value
-        var value = Math.round(radian / unit);
-
-        // Get the round radian
-        radian = value * unit;
-
-        // Correct the hours or minutes
-        if (this.options.twelveHour) {
-          if (isHours) {
-            if (value === 0) value = 12;
-          } else {
-            if (roundBy5) value *= 5;
-            if (value === 60) value = 0;
-          }
-        } else {
-          if (isHours) {
-            if (value === 12) {
-              value = 0;
-            }
-            value = inner ? value === 0 ? 12 : value : value === 0 ? 0 : value + 12;
-          } else {
-            if (roundBy5) {
-              value *= 5;
-            }
-            if (value === 60) {
-              value = 0;
-            }
-          }
-        }
-
-        // Once hours or minutes changed, vibrate the device
-        if (this[this.currentView] !== value) {
-          if (this.vibrate && this.options.vibrate) {
-            // Do not vibrate too frequently
-            if (!this.vibrateTimer) {
-              navigator[this.vibrate](10);
-              this.vibrateTimer = setTimeout(function () {
-                _this60.vibrateTimer = null;
-              }, 100);
-            }
-          }
-        }
-
-        this[this.currentView] = value;
-        if (isHours) {
-          this['spanHours'].innerHTML = value;
-        } else {
-          this['spanMinutes'].innerHTML = Timepicker._addLeadingZero(value);
-        }
-
-        // Set clock hand and others' position
-        var cx1 = Math.sin(radian) * (radius - this.options.tickRadius),
-            cy1 = -Math.cos(radian) * (radius - this.options.tickRadius),
-            cx2 = Math.sin(radian) * radius,
-            cy2 = -Math.cos(radian) * radius;
-        this.hand.setAttribute('x2', cx1);
-        this.hand.setAttribute('y2', cy1);
-        this.bg.setAttribute('cx', cx2);
-        this.bg.setAttribute('cy', cy2);
-      }
-    }, {
-      key: "open",
-      value: function open() {
-        if (this.isOpen) {
-          return;
-        }
-
-        this.isOpen = true;
-        this._updateTimeFromInput();
-        this.showView('hours');
-
-        this.modal.open();
-      }
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-
-        this.isOpen = false;
-        this.modal.close();
-      }
-
-      /**
-       * Finish timepicker selection.
-       */
-
-    }, {
-      key: "done",
-      value: function done(e, clearValue) {
-        // Set input value
-        var last = this.el.value;
-        var value = clearValue ? '' : Timepicker._addLeadingZero(this.hours) + ':' + Timepicker._addLeadingZero(this.minutes);
-        this.time = value;
-        if (!clearValue && this.options.twelveHour) {
-          value = value + " " + this.amOrPm;
-        }
-        this.el.value = value;
-
-        // Trigger change event
-        if (value !== last) {
-          this.$el.trigger('change');
-        }
-
-        this.close();
-        this.el.focus();
-      }
-    }, {
-      key: "clear",
-      value: function clear() {
-        this.done(null, true);
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Timepicker.__proto__ || Object.getPrototypeOf(Timepicker), "init", this).call(this, this, els, options);
-      }
-    }, {
-      key: "_addLeadingZero",
-      value: function _addLeadingZero(num) {
-        return (num < 10 ? '0' : '') + num;
-      }
-    }, {
-      key: "_createSVGEl",
-      value: function _createSVGEl(name) {
-        var svgNS = 'http://www.w3.org/2000/svg';
-        return document.createElementNS(svgNS, name);
-      }
-
-      /**
-       * @typedef {Object} Point
-       * @property {number} x The X Coordinate
-       * @property {number} y The Y Coordinate
-       */
-
-      /**
-       * Get x position of mouse or touch event
-       * @param {Event} e
-       * @return {Point} x and y location
-       */
-
-    }, {
-      key: "_Pos",
-      value: function _Pos(e) {
-        if (e.targetTouches && e.targetTouches.length >= 1) {
-          return { x: e.targetTouches[0].clientX, y: e.targetTouches[0].clientY };
-        }
-        // mouse event
-        return { x: e.clientX, y: e.clientY };
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Timepicker;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Timepicker;
-  }(Component);
-
-  Timepicker._template = ['<div class= "modal timepicker-modal">', '<div class="modal-content timepicker-container">', '<div class="timepicker-digital-display">', '<div class="timepicker-text-container">', '<div class="timepicker-display-column">', '<span class="timepicker-span-hours text-primary"></span>', ':', '<span class="timepicker-span-minutes"></span>', '</div>', '<div class="timepicker-display-column timepicker-display-am-pm">', '<div class="timepicker-span-am-pm"></div>', '</div>', '</div>', '</div>', '<div class="timepicker-analog-display">', '<div class="timepicker-plate">', '<div class="timepicker-canvas"></div>', '<div class="timepicker-dial timepicker-hours"></div>', '<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>', '</div>', '<div class="timepicker-footer"></div>', '</div>', '</div>', '</div>'].join('');
-
-  M.Timepicker = Timepicker;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Timepicker, 'timepicker', 'M_Timepicker');
-  }
-})(cash);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {};
-
-  /**
-   * @class
-   *
-   */
-
-  var CharacterCounter = function (_Component17) {
-    _inherits(CharacterCounter, _Component17);
-
-    /**
-     * Construct CharacterCounter instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function CharacterCounter(el, options) {
-      _classCallCheck(this, CharacterCounter);
-
-      var _this61 = _possibleConstructorReturn(this, (CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter)).call(this, CharacterCounter, el, options));
-
-      _this61.el.M_CharacterCounter = _this61;
-
-      /**
-       * Options for the character counter
-       */
-      _this61.options = $.extend({}, CharacterCounter.defaults, options);
-
-      _this61.isInvalid = false;
-      _this61.isValidLength = false;
-      _this61._setupCounter();
-      _this61._setupEventHandlers();
-      return _this61;
-    }
-
-    _createClass(CharacterCounter, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.el.CharacterCounter = undefined;
-        this._removeCounter();
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleUpdateCounterBound = this.updateCounter.bind(this);
-
-        this.el.addEventListener('focus', this._handleUpdateCounterBound, true);
-        this.el.addEventListener('input', this._handleUpdateCounterBound, true);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('focus', this._handleUpdateCounterBound, true);
-        this.el.removeEventListener('input', this._handleUpdateCounterBound, true);
-      }
-
-      /**
-       * Setup counter element
-       */
-
-    }, {
-      key: "_setupCounter",
-      value: function _setupCounter() {
-        this.counterEl = document.createElement('span');
-        $(this.counterEl).addClass('character-counter').css({
-          float: 'right',
-          'font-size': '12px',
-          height: 1
-        });
-
-        this.$el.parent().append(this.counterEl);
-      }
-
-      /**
-       * Remove counter element
-       */
-
-    }, {
-      key: "_removeCounter",
-      value: function _removeCounter() {
-        $(this.counterEl).remove();
-      }
-
-      /**
-       * Update counter
-       */
-
-    }, {
-      key: "updateCounter",
-      value: function updateCounter() {
-        var maxLength = +this.$el.attr('data-length'),
-            actualLength = this.el.value.length;
-        this.isValidLength = actualLength <= maxLength;
-        var counterString = actualLength;
-
-        if (maxLength) {
-          counterString += '/' + maxLength;
-          this._validateInput();
-        }
-
-        $(this.counterEl).html(counterString);
-      }
-
-      /**
-       * Add validation classes
-       */
-
-    }, {
-      key: "_validateInput",
-      value: function _validateInput() {
-        if (this.isValidLength && this.isInvalid) {
-          this.isInvalid = false;
-          this.$el.removeClass('invalid');
-        } else if (!this.isValidLength && !this.isInvalid) {
-          this.isInvalid = true;
-          this.$el.removeClass('valid');
-          this.$el.addClass('invalid');
-        }
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(CharacterCounter.__proto__ || Object.getPrototypeOf(CharacterCounter), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_CharacterCounter;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return CharacterCounter;
-  }(Component);
-
-  M.CharacterCounter = CharacterCounter;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(CharacterCounter, 'characterCounter', 'M_CharacterCounter');
-  }
-})(cash);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    duration: 200, // ms
-    dist: -100, // zoom scale TODO: make this more intuitive as an option
-    shift: 0, // spacing for center image
-    padding: 0, // Padding between non center items
-    numVisible: 5, // Number of visible items in carousel
-    fullWidth: false, // Change to full width styles
-    indicators: false, // Toggle indicators
-    noWrap: false, // Don't wrap around and cycle through items.
-    onCycleTo: null // Callback for when a new slide is cycled to.
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var Carousel = function (_Component18) {
-    _inherits(Carousel, _Component18);
-
-    /**
-     * Construct Carousel instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Carousel(el, options) {
-      _classCallCheck(this, Carousel);
-
-      var _this62 = _possibleConstructorReturn(this, (Carousel.__proto__ || Object.getPrototypeOf(Carousel)).call(this, Carousel, el, options));
-
-      _this62.el.M_Carousel = _this62;
-
-      /**
-       * Options for the carousel
-       * @member Carousel#options
-       * @prop {Number} duration
-       * @prop {Number} dist
-       * @prop {Number} shift
-       * @prop {Number} padding
-       * @prop {Number} numVisible
-       * @prop {Boolean} fullWidth
-       * @prop {Boolean} indicators
-       * @prop {Boolean} noWrap
-       * @prop {Function} onCycleTo
-       */
-      _this62.options = $.extend({}, Carousel.defaults, options);
-
-      // Setup
-      _this62.hasMultipleSlides = _this62.$el.find('.carousel-item').length > 1;
-      _this62.showIndicators = _this62.options.indicators && _this62.hasMultipleSlides;
-      _this62.noWrap = _this62.options.noWrap || !_this62.hasMultipleSlides;
-      _this62.pressed = false;
-      _this62.dragged = false;
-      _this62.offset = _this62.target = 0;
-      _this62.images = [];
-      _this62.itemWidth = _this62.$el.find('.carousel-item').first().innerWidth();
-      _this62.itemHeight = _this62.$el.find('.carousel-item').first().innerHeight();
-      _this62.dim = _this62.itemWidth * 2 + _this62.options.padding || 1; // Make sure dim is non zero for divisions.
-      _this62._autoScrollBound = _this62._autoScroll.bind(_this62);
-      _this62._trackBound = _this62._track.bind(_this62);
-
-      // Full Width carousel setup
-      if (_this62.options.fullWidth) {
-        _this62.options.dist = 0;
-        _this62._setCarouselHeight();
-
-        // Offset fixed items when indicators.
-        if (_this62.showIndicators) {
-          _this62.$el.find('.carousel-fixed-item').addClass('with-indicators');
-        }
-      }
-
-      // Iterate through slides
-      _this62.$indicators = $('<ul class="indicators"></ul>');
-      _this62.$el.find('.carousel-item').each(function (el, i) {
-        _this62.images.push(el);
-        if (_this62.showIndicators) {
-          var $indicator = $('<li class="indicator-item"></li>');
-
-          // Add active to first by default.
-          if (i === 0) {
-            $indicator[0].classList.add('active');
-          }
-
-          _this62.$indicators.append($indicator);
-        }
-      });
-      if (_this62.showIndicators) {
-        _this62.$el.append(_this62.$indicators);
-      }
-      _this62.count = _this62.images.length;
-
-      // Cap numVisible at count
-      _this62.options.numVisible = Math.min(_this62.count, _this62.options.numVisible);
-
-      // Setup cross browser string
-      _this62.xform = 'transform';
-      ['webkit', 'Moz', 'O', 'ms'].every(function (prefix) {
-        var e = prefix + 'Transform';
-        if (typeof document.body.style[e] !== 'undefined') {
-          _this62.xform = e;
-          return false;
-        }
-        return true;
-      });
-
-      _this62._setupEventHandlers();
-      _this62._scroll(_this62.offset);
-      return _this62;
-    }
-
-    _createClass(Carousel, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.el.M_Carousel = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        var _this63 = this;
-
-        this._handleCarouselTapBound = this._handleCarouselTap.bind(this);
-        this._handleCarouselDragBound = this._handleCarouselDrag.bind(this);
-        this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this);
-        this._handleCarouselClickBound = this._handleCarouselClick.bind(this);
-
-        if (typeof window.ontouchstart !== 'undefined') {
-          this.el.addEventListener('touchstart', this._handleCarouselTapBound);
-          this.el.addEventListener('touchmove', this._handleCarouselDragBound);
-          this.el.addEventListener('touchend', this._handleCarouselReleaseBound);
-        }
-
-        this.el.addEventListener('mousedown', this._handleCarouselTapBound);
-        this.el.addEventListener('mousemove', this._handleCarouselDragBound);
-        this.el.addEventListener('mouseup', this._handleCarouselReleaseBound);
-        this.el.addEventListener('mouseleave', this._handleCarouselReleaseBound);
-        this.el.addEventListener('click', this._handleCarouselClickBound);
-
-        if (this.showIndicators && this.$indicators) {
-          this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this);
-          this.$indicators.find('.indicator-item').each(function (el, i) {
-            el.addEventListener('click', _this63._handleIndicatorClickBound);
-          });
-        }
-
-        // Resize
-        var throttledResize = M.throttle(this._handleResize, 200);
-        this._handleThrottledResizeBound = throttledResize.bind(this);
-
-        window.addEventListener('resize', this._handleThrottledResizeBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        var _this64 = this;
-
-        if (typeof window.ontouchstart !== 'undefined') {
-          this.el.removeEventListener('touchstart', this._handleCarouselTapBound);
-          this.el.removeEventListener('touchmove', this._handleCarouselDragBound);
-          this.el.removeEventListener('touchend', this._handleCarouselReleaseBound);
-        }
-        this.el.removeEventListener('mousedown', this._handleCarouselTapBound);
-        this.el.removeEventListener('mousemove', this._handleCarouselDragBound);
-        this.el.removeEventListener('mouseup', this._handleCarouselReleaseBound);
-        this.el.removeEventListener('mouseleave', this._handleCarouselReleaseBound);
-        this.el.removeEventListener('click', this._handleCarouselClickBound);
-
-        if (this.showIndicators && this.$indicators) {
-          this.$indicators.find('.indicator-item').each(function (el, i) {
-            el.removeEventListener('click', _this64._handleIndicatorClickBound);
-          });
-        }
-
-        window.removeEventListener('resize', this._handleThrottledResizeBound);
-      }
-
-      /**
-       * Handle Carousel Tap
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCarouselTap",
-      value: function _handleCarouselTap(e) {
-        // Fixes firefox draggable image bug
-        if (e.type === 'mousedown' && $(e.target).is('img')) {
-          e.preventDefault();
-        }
-        this.pressed = true;
-        this.dragged = false;
-        this.verticalDragged = false;
-        this.reference = this._xpos(e);
-        this.referenceY = this._ypos(e);
-
-        this.velocity = this.amplitude = 0;
-        this.frame = this.offset;
-        this.timestamp = Date.now();
-        clearInterval(this.ticker);
-        this.ticker = setInterval(this._trackBound, 100);
-      }
-
-      /**
-       * Handle Carousel Drag
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCarouselDrag",
-      value: function _handleCarouselDrag(e) {
-        var x = void 0,
-            y = void 0,
-            delta = void 0,
-            deltaY = void 0;
-        if (this.pressed) {
-          x = this._xpos(e);
-          y = this._ypos(e);
-          delta = this.reference - x;
-          deltaY = Math.abs(this.referenceY - y);
-          if (deltaY < 30 && !this.verticalDragged) {
-            // If vertical scrolling don't allow dragging.
-            if (delta > 2 || delta < -2) {
-              this.dragged = true;
-              this.reference = x;
-              this._scroll(this.offset + delta);
-            }
-          } else if (this.dragged) {
-            // If dragging don't allow vertical scroll.
-            e.preventDefault();
-            e.stopPropagation();
-            return false;
-          } else {
-            // Vertical scrolling.
-            this.verticalDragged = true;
-          }
-        }
-
-        if (this.dragged) {
-          // If dragging don't allow vertical scroll.
-          e.preventDefault();
-          e.stopPropagation();
-          return false;
-        }
-      }
-
-      /**
-       * Handle Carousel Release
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCarouselRelease",
-      value: function _handleCarouselRelease(e) {
-        if (this.pressed) {
-          this.pressed = false;
-        } else {
-          return;
-        }
-
-        clearInterval(this.ticker);
-        this.target = this.offset;
-        if (this.velocity > 10 || this.velocity < -10) {
-          this.amplitude = 0.9 * this.velocity;
-          this.target = this.offset + this.amplitude;
-        }
-        this.target = Math.round(this.target / this.dim) * this.dim;
-
-        // No wrap of items.
-        if (this.noWrap) {
-          if (this.target >= this.dim * (this.count - 1)) {
-            this.target = this.dim * (this.count - 1);
-          } else if (this.target < 0) {
-            this.target = 0;
-          }
-        }
-        this.amplitude = this.target - this.offset;
-        this.timestamp = Date.now();
-        requestAnimationFrame(this._autoScrollBound);
-
-        if (this.dragged) {
-          e.preventDefault();
-          e.stopPropagation();
-        }
-        return false;
-      }
-
-      /**
-       * Handle Carousel CLick
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleCarouselClick",
-      value: function _handleCarouselClick(e) {
-        // Disable clicks if carousel was dragged.
-        if (this.dragged) {
-          e.preventDefault();
-          e.stopPropagation();
-          return false;
-        } else if (!this.options.fullWidth) {
-          var clickedIndex = $(e.target).closest('.carousel-item').index();
-          var diff = this._wrap(this.center) - clickedIndex;
-
-          // Disable clicks if carousel was shifted by click
-          if (diff !== 0) {
-            e.preventDefault();
-            e.stopPropagation();
-          }
-          this._cycleTo(clickedIndex);
-        }
-      }
-
-      /**
-       * Handle Indicator CLick
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleIndicatorClick",
-      value: function _handleIndicatorClick(e) {
-        e.stopPropagation();
-
-        var indicator = $(e.target).closest('.indicator-item');
-        if (indicator.length) {
-          this._cycleTo(indicator.index());
-        }
-      }
-
-      /**
-       * Handle Throttle Resize
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleResize",
-      value: function _handleResize(e) {
-        if (this.options.fullWidth) {
-          this.itemWidth = this.$el.find('.carousel-item').first().innerWidth();
-          this.imageHeight = this.$el.find('.carousel-item.active').height();
-          this.dim = this.itemWidth * 2 + this.options.padding;
-          this.offset = this.center * 2 * this.itemWidth;
-          this.target = this.offset;
-          this._setCarouselHeight(true);
-        } else {
-          this._scroll();
-        }
-      }
-
-      /**
-       * Set carousel height based on first slide
-       * @param {Booleam} imageOnly - true for image slides
-       */
-
-    }, {
-      key: "_setCarouselHeight",
-      value: function _setCarouselHeight(imageOnly) {
-        var _this65 = this;
-
-        var firstSlide = this.$el.find('.carousel-item.active').length ? this.$el.find('.carousel-item.active').first() : this.$el.find('.carousel-item').first();
-        var firstImage = firstSlide.find('img').first();
-        if (firstImage.length) {
-          if (firstImage[0].complete) {
-            // If image won't trigger the load event
-            var imageHeight = firstImage.height();
-            if (imageHeight > 0) {
-              this.$el.css('height', imageHeight + 'px');
-            } else {
-              // If image still has no height, use the natural dimensions to calculate
-              var naturalWidth = firstImage[0].naturalWidth;
-              var naturalHeight = firstImage[0].naturalHeight;
-              var adjustedHeight = this.$el.width() / naturalWidth * naturalHeight;
-              this.$el.css('height', adjustedHeight + 'px');
-            }
-          } else {
-            // Get height when image is loaded normally
-            firstImage.one('load', function (el, i) {
-              _this65.$el.css('height', el.offsetHeight + 'px');
-            });
-          }
-        } else if (!imageOnly) {
-          var slideHeight = firstSlide.height();
-          this.$el.css('height', slideHeight + 'px');
-        }
-      }
-
-      /**
-       * Get x position from event
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_xpos",
-      value: function _xpos(e) {
-        // touch event
-        if (e.targetTouches && e.targetTouches.length >= 1) {
-          return e.targetTouches[0].clientX;
-        }
-
-        // mouse event
-        return e.clientX;
-      }
-
-      /**
-       * Get y position from event
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_ypos",
-      value: function _ypos(e) {
-        // touch event
-        if (e.targetTouches && e.targetTouches.length >= 1) {
-          return e.targetTouches[0].clientY;
-        }
-
-        // mouse event
-        return e.clientY;
-      }
-
-      /**
-       * Wrap index
-       * @param {Number} x
-       */
-
-    }, {
-      key: "_wrap",
-      value: function _wrap(x) {
-        return x >= this.count ? x % this.count : x < 0 ? this._wrap(this.count + x % this.count) : x;
-      }
-
-      /**
-       * Tracks scrolling information
-       */
-
-    }, {
-      key: "_track",
-      value: function _track() {
-        var now = void 0,
-            elapsed = void 0,
-            delta = void 0,
-            v = void 0;
-
-        now = Date.now();
-        elapsed = now - this.timestamp;
-        this.timestamp = now;
-        delta = this.offset - this.frame;
-        this.frame = this.offset;
-
-        v = 1000 * delta / (1 + elapsed);
-        this.velocity = 0.8 * v + 0.2 * this.velocity;
-      }
-
-      /**
-       * Auto scrolls to nearest carousel item.
-       */
-
-    }, {
-      key: "_autoScroll",
-      value: function _autoScroll() {
-        var elapsed = void 0,
-            delta = void 0;
-
-        if (this.amplitude) {
-          elapsed = Date.now() - this.timestamp;
-          delta = this.amplitude * Math.exp(-elapsed / this.options.duration);
-          if (delta > 2 || delta < -2) {
-            this._scroll(this.target - delta);
-            requestAnimationFrame(this._autoScrollBound);
-          } else {
-            this._scroll(this.target);
-          }
-        }
-      }
-
-      /**
-       * Scroll to target
-       * @param {Number} x
-       */
-
-    }, {
-      key: "_scroll",
-      value: function _scroll(x) {
-        var _this66 = this;
-
-        // Track scrolling state
-        if (!this.$el.hasClass('scrolling')) {
-          this.el.classList.add('scrolling');
-        }
-        if (this.scrollingTimeout != null) {
-          window.clearTimeout(this.scrollingTimeout);
-        }
-        this.scrollingTimeout = window.setTimeout(function () {
-          _this66.$el.removeClass('scrolling');
-        }, this.options.duration);
-
-        // Start actual scroll
-        var i = void 0,
-            half = void 0,
-            delta = void 0,
-            dir = void 0,
-            tween = void 0,
-            el = void 0,
-            alignment = void 0,
-            zTranslation = void 0,
-            tweenedOpacity = void 0,
-            centerTweenedOpacity = void 0;
-        var lastCenter = this.center;
-        var numVisibleOffset = 1 / this.options.numVisible;
-
-        this.offset = typeof x === 'number' ? x : this.offset;
-        this.center = Math.floor((this.offset + this.dim / 2) / this.dim);
-        delta = this.offset - this.center * this.dim;
-        dir = delta < 0 ? 1 : -1;
-        tween = -dir * delta * 2 / this.dim;
-        half = this.count >> 1;
-
-        if (this.options.fullWidth) {
-          alignment = 'translateX(0)';
-          centerTweenedOpacity = 1;
-        } else {
-          alignment = 'translateX(' + (this.el.clientWidth - this.itemWidth) / 2 + 'px) ';
-          alignment += 'translateY(' + (this.el.clientHeight - this.itemHeight) / 2 + 'px)';
-          centerTweenedOpacity = 1 - numVisibleOffset * tween;
-        }
-
-        // Set indicator active
-        if (this.showIndicators) {
-          var diff = this.center % this.count;
-          var activeIndicator = this.$indicators.find('.indicator-item.active');
-          if (activeIndicator.index() !== diff) {
-            activeIndicator.removeClass('active');
-            this.$indicators.find('.indicator-item').eq(diff)[0].classList.add('active');
-          }
-        }
-
-        // center
-        // Don't show wrapped items.
-        if (!this.noWrap || this.center >= 0 && this.center < this.count) {
-          el = this.images[this._wrap(this.center)];
-
-          // Add active class to center item.
-          if (!$(el).hasClass('active')) {
-            this.$el.find('.carousel-item').removeClass('active');
-            el.classList.add('active');
-          }
-          var transformString = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween * i + "px) translateZ(" + this.options.dist * tween + "px)";
-          this._updateItemStyle(el, centerTweenedOpacity, 0, transformString);
-        }
-
-        for (i = 1; i <= half; ++i) {
-          // right side
-          if (this.options.fullWidth) {
-            zTranslation = this.options.dist;
-            tweenedOpacity = i === half && delta < 0 ? 1 - tween : 1;
-          } else {
-            zTranslation = this.options.dist * (i * 2 + tween * dir);
-            tweenedOpacity = 1 - numVisibleOffset * (i * 2 + tween * dir);
-          }
-          // Don't show wrapped items.
-          if (!this.noWrap || this.center + i < this.count) {
-            el = this.images[this._wrap(this.center + i)];
-            var _transformString = alignment + " translateX(" + (this.options.shift + (this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)";
-            this._updateItemStyle(el, tweenedOpacity, -i, _transformString);
-          }
-
-          // left side
-          if (this.options.fullWidth) {
-            zTranslation = this.options.dist;
-            tweenedOpacity = i === half && delta > 0 ? 1 - tween : 1;
-          } else {
-            zTranslation = this.options.dist * (i * 2 - tween * dir);
-            tweenedOpacity = 1 - numVisibleOffset * (i * 2 - tween * dir);
-          }
-          // Don't show wrapped items.
-          if (!this.noWrap || this.center - i >= 0) {
-            el = this.images[this._wrap(this.center - i)];
-            var _transformString2 = alignment + " translateX(" + (-this.options.shift + (-this.dim * i - delta) / 2) + "px) translateZ(" + zTranslation + "px)";
-            this._updateItemStyle(el, tweenedOpacity, -i, _transformString2);
-          }
-        }
-
-        // center
-        // Don't show wrapped items.
-        if (!this.noWrap || this.center >= 0 && this.center < this.count) {
-          el = this.images[this._wrap(this.center)];
-          var _transformString3 = alignment + " translateX(" + -delta / 2 + "px) translateX(" + dir * this.options.shift * tween + "px) translateZ(" + this.options.dist * tween + "px)";
-          this._updateItemStyle(el, centerTweenedOpacity, 0, _transformString3);
-        }
-
-        // onCycleTo callback
-        var $currItem = this.$el.find('.carousel-item').eq(this._wrap(this.center));
-        if (lastCenter !== this.center && typeof this.options.onCycleTo === 'function') {
-          this.options.onCycleTo.call(this, $currItem[0], this.dragged);
-        }
-
-        // One time callback
-        if (typeof this.oneTimeCallback === 'function') {
-          this.oneTimeCallback.call(this, $currItem[0], this.dragged);
-          this.oneTimeCallback = null;
-        }
-      }
-
-      /**
-       * Cycle to target
-       * @param {Element} el
-       * @param {Number} opacity
-       * @param {Number} zIndex
-       * @param {String} transform
-       */
-
-    }, {
-      key: "_updateItemStyle",
-      value: function _updateItemStyle(el, opacity, zIndex, transform) {
-        el.style[this.xform] = transform;
-        el.style.zIndex = zIndex;
-        el.style.opacity = opacity;
-        el.style.visibility = 'visible';
-      }
-
-      /**
-       * Cycle to target
-       * @param {Number} n
-       * @param {Function} callback
-       */
-
-    }, {
-      key: "_cycleTo",
-      value: function _cycleTo(n, callback) {
-        var diff = this.center % this.count - n;
-
-        // Account for wraparound.
-        if (!this.noWrap) {
-          if (diff < 0) {
-            if (Math.abs(diff + this.count) < Math.abs(diff)) {
-              diff += this.count;
-            }
-          } else if (diff > 0) {
-            if (Math.abs(diff - this.count) < diff) {
-              diff -= this.count;
-            }
-          }
-        }
-
-        this.target = this.dim * Math.round(this.offset / this.dim);
-        // Next
-        if (diff < 0) {
-          this.target += this.dim * Math.abs(diff);
-
-          // Prev
-        } else if (diff > 0) {
-          this.target -= this.dim * diff;
-        }
-
-        // Set one time callback
-        if (typeof callback === 'function') {
-          this.oneTimeCallback = callback;
-        }
-
-        // Scroll
-        if (this.offset !== this.target) {
-          this.amplitude = this.target - this.offset;
-          this.timestamp = Date.now();
-          requestAnimationFrame(this._autoScrollBound);
-        }
-      }
-
-      /**
-       * Cycle to next item
-       * @param {Number} [n]
-       */
-
-    }, {
-      key: "next",
-      value: function next(n) {
-        if (n === undefined || isNaN(n)) {
-          n = 1;
-        }
-
-        var index = this.center + n;
-        if (index >= this.count || index < 0) {
-          if (this.noWrap) {
-            return;
-          }
-
-          index = this._wrap(index);
-        }
-        this._cycleTo(index);
-      }
-
-      /**
-       * Cycle to previous item
-       * @param {Number} [n]
-       */
-
-    }, {
-      key: "prev",
-      value: function prev(n) {
-        if (n === undefined || isNaN(n)) {
-          n = 1;
-        }
-
-        var index = this.center - n;
-        if (index >= this.count || index < 0) {
-          if (this.noWrap) {
-            return;
-          }
-
-          index = this._wrap(index);
-        }
-
-        this._cycleTo(index);
-      }
-
-      /**
-       * Cycle to nth item
-       * @param {Number} [n]
-       * @param {Function} callback
-       */
-
-    }, {
-      key: "set",
-      value: function set(n, callback) {
-        if (n === undefined || isNaN(n)) {
-          n = 0;
-        }
-
-        if (n > this.count || n < 0) {
-          if (this.noWrap) {
-            return;
-          }
-
-          n = this._wrap(n);
-        }
-
-        this._cycleTo(n, callback);
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Carousel.__proto__ || Object.getPrototypeOf(Carousel), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Carousel;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Carousel;
-  }(Component);
-
-  M.Carousel = Carousel;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Carousel, 'carousel', 'M_Carousel');
-  }
-})(cash);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    onOpen: undefined,
-    onClose: undefined
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var TapTarget = function (_Component19) {
-    _inherits(TapTarget, _Component19);
-
-    /**
-     * Construct TapTarget instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function TapTarget(el, options) {
-      _classCallCheck(this, TapTarget);
-
-      var _this67 = _possibleConstructorReturn(this, (TapTarget.__proto__ || Object.getPrototypeOf(TapTarget)).call(this, TapTarget, el, options));
-
-      _this67.el.M_TapTarget = _this67;
-
-      /**
-       * Options for the select
-       * @member TapTarget#options
-       * @prop {Function} onOpen - Callback function called when feature discovery is opened
-       * @prop {Function} onClose - Callback function called when feature discovery is closed
-       */
-      _this67.options = $.extend({}, TapTarget.defaults, options);
-
-      _this67.isOpen = false;
-
-      // setup
-      _this67.$origin = $('#' + _this67.$el.attr('data-target'));
-      _this67._setup();
-
-      _this67._calculatePositioning();
-      _this67._setupEventHandlers();
-      return _this67;
-    }
-
-    _createClass(TapTarget, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this.el.TapTarget = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleDocumentClickBound = this._handleDocumentClick.bind(this);
-        this._handleTargetClickBound = this._handleTargetClick.bind(this);
-        this._handleOriginClickBound = this._handleOriginClick.bind(this);
-
-        this.el.addEventListener('click', this._handleTargetClickBound);
-        this.originEl.addEventListener('click', this._handleOriginClickBound);
-
-        // Resize
-        var throttledResize = M.throttle(this._handleResize, 200);
-        this._handleThrottledResizeBound = throttledResize.bind(this);
-
-        window.addEventListener('resize', this._handleThrottledResizeBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('click', this._handleTargetClickBound);
-        this.originEl.removeEventListener('click', this._handleOriginClickBound);
-        window.removeEventListener('resize', this._handleThrottledResizeBound);
-      }
-
-      /**
-       * Handle Target Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleTargetClick",
-      value: function _handleTargetClick(e) {
-        this.open();
-      }
-
-      /**
-       * Handle Origin Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleOriginClick",
-      value: function _handleOriginClick(e) {
-        this.close();
-      }
-
-      /**
-       * Handle Resize
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleResize",
-      value: function _handleResize(e) {
-        this._calculatePositioning();
-      }
-
-      /**
-       * Handle Resize
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleDocumentClick",
-      value: function _handleDocumentClick(e) {
-        if (!$(e.target).closest('.tap-target-wrapper').length) {
-          this.close();
-          e.preventDefault();
-          e.stopPropagation();
-        }
-      }
-
-      /**
-       * Setup Tap Target
-       */
-
-    }, {
-      key: "_setup",
-      value: function _setup() {
-        // Creating tap target
-        this.wrapper = this.$el.parent()[0];
-        this.waveEl = $(this.wrapper).find('.tap-target-wave')[0];
-        this.originEl = $(this.wrapper).find('.tap-target-origin')[0];
-        this.contentEl = this.$el.find('.tap-target-content')[0];
-
-        // Creating wrapper
-        if (!$(this.wrapper).hasClass('.tap-target-wrapper')) {
-          this.wrapper = document.createElement('div');
-          this.wrapper.classList.add('tap-target-wrapper');
-          this.$el.before($(this.wrapper));
-          this.wrapper.append(this.el);
-        }
-
-        // Creating content
-        if (!this.contentEl) {
-          this.contentEl = document.createElement('div');
-          this.contentEl.classList.add('tap-target-content');
-          this.$el.append(this.contentEl);
-        }
-
-        // Creating foreground wave
-        if (!this.waveEl) {
-          this.waveEl = document.createElement('div');
-          this.waveEl.classList.add('tap-target-wave');
-
-          // Creating origin
-          if (!this.originEl) {
-            this.originEl = this.$origin.clone(true, true);
-            this.originEl.addClass('tap-target-origin');
-            this.originEl.removeAttr('id');
-            this.originEl.removeAttr('style');
-            this.originEl = this.originEl[0];
-            this.waveEl.append(this.originEl);
-          }
-
-          this.wrapper.append(this.waveEl);
-        }
-      }
-
-      /**
-       * Calculate positioning
-       */
-
-    }, {
-      key: "_calculatePositioning",
-      value: function _calculatePositioning() {
-        // Element or parent is fixed position?
-        var isFixed = this.$origin.css('position') === 'fixed';
-        if (!isFixed) {
-          var parents = this.$origin.parents();
-          for (var i = 0; i < parents.length; i++) {
-            isFixed = $(parents[i]).css('position') == 'fixed';
-            if (isFixed) {
-              break;
-            }
-          }
-        }
-
-        // Calculating origin
-        var originWidth = this.$origin.outerWidth();
-        var originHeight = this.$origin.outerHeight();
-        var originTop = isFixed ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top;
-        var originLeft = isFixed ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left;
-
-        // Calculating screen
-        var windowWidth = window.innerWidth;
-        var windowHeight = window.innerHeight;
-        var centerX = windowWidth / 2;
-        var centerY = windowHeight / 2;
-        var isLeft = originLeft <= centerX;
-        var isRight = originLeft > centerX;
-        var isTop = originTop <= centerY;
-        var isBottom = originTop > centerY;
-        var isCenterX = originLeft >= windowWidth * 0.25 && originLeft <= windowWidth * 0.75;
-
-        // Calculating tap target
-        var tapTargetWidth = this.$el.outerWidth();
-        var tapTargetHeight = this.$el.outerHeight();
-        var tapTargetTop = originTop + originHeight / 2 - tapTargetHeight / 2;
-        var tapTargetLeft = originLeft + originWidth / 2 - tapTargetWidth / 2;
-        var tapTargetPosition = isFixed ? 'fixed' : 'absolute';
-
-        // Calculating content
-        var tapTargetTextWidth = isCenterX ? tapTargetWidth : tapTargetWidth / 2 + originWidth;
-        var tapTargetTextHeight = tapTargetHeight / 2;
-        var tapTargetTextTop = isTop ? tapTargetHeight / 2 : 0;
-        var tapTargetTextBottom = 0;
-        var tapTargetTextLeft = isLeft && !isCenterX ? tapTargetWidth / 2 - originWidth : 0;
-        var tapTargetTextRight = 0;
-        var tapTargetTextPadding = originWidth;
-        var tapTargetTextAlign = isBottom ? 'bottom' : 'top';
-
-        // Calculating wave
-        var tapTargetWaveWidth = originWidth > originHeight ? originWidth * 2 : originWidth * 2;
-        var tapTargetWaveHeight = tapTargetWaveWidth;
-        var tapTargetWaveTop = tapTargetHeight / 2 - tapTargetWaveHeight / 2;
-        var tapTargetWaveLeft = tapTargetWidth / 2 - tapTargetWaveWidth / 2;
-
-        // Setting tap target
-        var tapTargetWrapperCssObj = {};
-        tapTargetWrapperCssObj.top = isTop ? tapTargetTop + 'px' : '';
-        tapTargetWrapperCssObj.right = isRight ? windowWidth - tapTargetLeft - tapTargetWidth + 'px' : '';
-        tapTargetWrapperCssObj.bottom = isBottom ? windowHeight - tapTargetTop - tapTargetHeight + 'px' : '';
-        tapTargetWrapperCssObj.left = isLeft ? tapTargetLeft + 'px' : '';
-        tapTargetWrapperCssObj.position = tapTargetPosition;
-        $(this.wrapper).css(tapTargetWrapperCssObj);
-
-        // Setting content
-        $(this.contentEl).css({
-          width: tapTargetTextWidth + 'px',
-          height: tapTargetTextHeight + 'px',
-          top: tapTargetTextTop + 'px',
-          right: tapTargetTextRight + 'px',
-          bottom: tapTargetTextBottom + 'px',
-          left: tapTargetTextLeft + 'px',
-          padding: tapTargetTextPadding + 'px',
-          verticalAlign: tapTargetTextAlign
-        });
-
-        // Setting wave
-        $(this.waveEl).css({
-          top: tapTargetWaveTop + 'px',
-          left: tapTargetWaveLeft + 'px',
-          width: tapTargetWaveWidth + 'px',
-          height: tapTargetWaveHeight + 'px'
-        });
-      }
-
-      /**
-       * Open TapTarget
-       */
-
-    }, {
-      key: "open",
-      value: function open() {
-        if (this.isOpen) {
-          return;
-        }
-
-        // onOpen callback
-        if (typeof this.options.onOpen === 'function') {
-          this.options.onOpen.call(this, this.$origin[0]);
-        }
-
-        this.isOpen = true;
-        this.wrapper.classList.add('open');
-
-        document.body.addEventListener('click', this._handleDocumentClickBound, true);
-        document.body.addEventListener('touchend', this._handleDocumentClickBound);
-      }
-
-      /**
-       * Close Tap Target
-       */
-
-    }, {
-      key: "close",
-      value: function close() {
-        if (!this.isOpen) {
-          return;
-        }
-
-        // onClose callback
-        if (typeof this.options.onClose === 'function') {
-          this.options.onClose.call(this, this.$origin[0]);
-        }
-
-        this.isOpen = false;
-        this.wrapper.classList.remove('open');
-
-        document.body.removeEventListener('click', this._handleDocumentClickBound, true);
-        document.body.removeEventListener('touchend', this._handleDocumentClickBound);
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(TapTarget.__proto__ || Object.getPrototypeOf(TapTarget), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_TapTarget;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return TapTarget;
-  }(Component);
-
-  M.TapTarget = TapTarget;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(TapTarget, 'tapTarget', 'M_TapTarget');
-  }
-})(cash);
-;(function ($) {
-  'use strict';
-
-  var _defaults = {
-    classes: '',
-    dropdownOptions: {}
-  };
-
-  /**
-   * @class
-   *
-   */
-
-  var FormSelect = function (_Component20) {
-    _inherits(FormSelect, _Component20);
-
-    /**
-     * Construct FormSelect instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function FormSelect(el, options) {
-      _classCallCheck(this, FormSelect);
-
-      // Don't init if browser default version
-      var _this68 = _possibleConstructorReturn(this, (FormSelect.__proto__ || Object.getPrototypeOf(FormSelect)).call(this, FormSelect, el, options));
-
-      if (_this68.$el.hasClass('browser-default')) {
-        return _possibleConstructorReturn(_this68);
-      }
-
-      _this68.el.M_FormSelect = _this68;
-
-      /**
-       * Options for the select
-       * @member FormSelect#options
-       */
-      _this68.options = $.extend({}, FormSelect.defaults, options);
-
-      _this68.isMultiple = _this68.$el.prop('multiple');
-
-      // Setup
-      _this68.el.tabIndex = -1;
-      _this68._keysSelected = {};
-      _this68._valueDict = {}; // Maps key to original and generated option element.
-      _this68._setupDropdown();
-
-      _this68._setupEventHandlers();
-      return _this68;
-    }
-
-    _createClass(FormSelect, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this._removeDropdown();
-        this.el.M_FormSelect = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        var _this69 = this;
-
-        this._handleSelectChangeBound = this._handleSelectChange.bind(this);
-        this._handleOptionClickBound = this._handleOptionClick.bind(this);
-        this._handleInputClickBound = this._handleInputClick.bind(this);
-
-        $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
-          el.addEventListener('click', _this69._handleOptionClickBound);
-        });
-        this.el.addEventListener('change', this._handleSelectChangeBound);
-        this.input.addEventListener('click', this._handleInputClickBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        var _this70 = this;
-
-        $(this.dropdownOptions).find('li:not(.optgroup)').each(function (el) {
-          el.removeEventListener('click', _this70._handleOptionClickBound);
-        });
-        this.el.removeEventListener('change', this._handleSelectChangeBound);
-        this.input.removeEventListener('click', this._handleInputClickBound);
-      }
-
-      /**
-       * Handle Select Change
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleSelectChange",
-      value: function _handleSelectChange(e) {
-        this._setValueToInput();
-      }
-
-      /**
-       * Handle Option Click
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleOptionClick",
-      value: function _handleOptionClick(e) {
-        e.preventDefault();
-        var option = $(e.target).closest('li')[0];
-        var key = option.id;
-        if (!$(option).hasClass('disabled') && !$(option).hasClass('optgroup') && key.length) {
-          var selected = true;
-
-          if (this.isMultiple) {
-            // Deselect placeholder option if still selected.
-            var placeholderOption = $(this.dropdownOptions).find('li.disabled.selected');
-            if (placeholderOption.length) {
-              placeholderOption.removeClass('selected');
-              placeholderOption.find('input[type="checkbox"]').prop('checked', false);
-              this._toggleEntryFromArray(placeholderOption[0].id);
-            }
-            selected = this._toggleEntryFromArray(key);
-          } else {
-            $(this.dropdownOptions).find('li').removeClass('selected');
-            $(option).toggleClass('selected', selected);
-          }
-
-          // Set selected on original select option
-          // Only trigger if selected state changed
-          var prevSelected = $(this._valueDict[key].el).prop('selected');
-          if (prevSelected !== selected) {
-            $(this._valueDict[key].el).prop('selected', selected);
-            this.$el.trigger('change');
-          }
-        }
-
-        e.stopPropagation();
-      }
-
-      /**
-       * Handle Input Click
-       */
-
-    }, {
-      key: "_handleInputClick",
-      value: function _handleInputClick() {
-        if (this.dropdown && this.dropdown.isOpen) {
-          this._setValueToInput();
-          this._setSelectedStates();
-        }
-      }
-
-      /**
-       * Setup dropdown
-       */
-
-    }, {
-      key: "_setupDropdown",
-      value: function _setupDropdown() {
-        var _this71 = this;
-
-        this.wrapper = document.createElement('div');
-        $(this.wrapper).addClass('select-wrapper ' + this.options.classes);
-        this.$el.before($(this.wrapper));
-        this.wrapper.appendChild(this.el);
-
-        if (this.el.disabled) {
-          this.wrapper.classList.add('disabled');
-        }
-
-        // Create dropdown
-        this.$selectOptions = this.$el.children('option, optgroup');
-        this.dropdownOptions = document.createElement('ul');
-        this.dropdownOptions.id = "select-options-" + M.guid();
-        $(this.dropdownOptions).addClass('dropdown-content select-dropdown ' + (this.isMultiple ? 'multiple-select-dropdown' : ''));
-
-        // Create dropdown structure.
-        if (this.$selectOptions.length) {
-          this.$selectOptions.each(function (el) {
-            if ($(el).is('option')) {
-              // Direct descendant option.
-              var optionEl = void 0;
-              if (_this71.isMultiple) {
-                optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'multiple');
-              } else {
-                optionEl = _this71._appendOptionWithIcon(_this71.$el, el);
-              }
-
-              _this71._addOptionToValueDict(el, optionEl);
-            } else if ($(el).is('optgroup')) {
-              // Optgroup.
-              var selectOptions = $(el).children('option');
-              $(_this71.dropdownOptions).append($('<li class="optgroup"><span>' + el.getAttribute('label') + '</span></li>')[0]);
-
-              selectOptions.each(function (el) {
-                var optionEl = _this71._appendOptionWithIcon(_this71.$el, el, 'optgroup-option');
-                _this71._addOptionToValueDict(el, optionEl);
-              });
-            }
-          });
-        }
-
-        this.$el.after(this.dropdownOptions);
-
-        // Add input dropdown
-        this.input = document.createElement('input');
-        $(this.input).addClass('select-dropdown dropdown-trigger');
-        this.input.setAttribute('type', 'text');
-        this.input.setAttribute('readonly', 'true');
-        this.input.setAttribute('data-target', this.dropdownOptions.id);
-        if (this.el.disabled) {
-          $(this.input).prop('disabled', 'true');
-        }
-
-        this.$el.before(this.input);
-        this._setValueToInput();
-
-        // Add caret
-        var dropdownIcon = $('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
-        this.$el.before(dropdownIcon[0]);
-
-        // Initialize dropdown
-        if (!this.el.disabled) {
-          var dropdownOptions = $.extend({}, this.options.dropdownOptions);
-
-          // Add callback for centering selected option when dropdown content is scrollable
-          dropdownOptions.onOpenEnd = function (el) {
-            var selectedOption = $(_this71.dropdownOptions).find('.selected').first();
-
-            if (selectedOption.length) {
-              // Focus selected option in dropdown
-              M.keyDown = true;
-              _this71.dropdown.focusedIndex = selectedOption.index();
-              _this71.dropdown._focusFocusedItem();
-              M.keyDown = false;
-
-              // Handle scrolling to selected option
-              if (_this71.dropdown.isScrollable) {
-                var scrollOffset = selectedOption[0].getBoundingClientRect().top - _this71.dropdownOptions.getBoundingClientRect().top; // scroll to selected option
-                scrollOffset -= _this71.dropdownOptions.clientHeight / 2; // center in dropdown
-                _this71.dropdownOptions.scrollTop = scrollOffset;
-              }
-            }
-          };
-
-          if (this.isMultiple) {
-            dropdownOptions.closeOnClick = false;
-          }
-          this.dropdown = M.Dropdown.init(this.input, dropdownOptions);
-        }
-
-        // Add initial selections
-        this._setSelectedStates();
-      }
-
-      /**
-       * Add option to value dict
-       * @param {Element} el  original option element
-       * @param {Element} optionEl  generated option element
-       */
-
-    }, {
-      key: "_addOptionToValueDict",
-      value: function _addOptionToValueDict(el, optionEl) {
-        var index = Object.keys(this._valueDict).length;
-        var key = this.dropdownOptions.id + index;
-        var obj = {};
-        optionEl.id = key;
-
-        obj.el = el;
-        obj.optionEl = optionEl;
-        this._valueDict[key] = obj;
-      }
-
-      /**
-       * Remove dropdown
-       */
-
-    }, {
-      key: "_removeDropdown",
-      value: function _removeDropdown() {
-        $(this.wrapper).find('.caret').remove();
-        $(this.input).remove();
-        $(this.dropdownOptions).remove();
-        $(this.wrapper).before(this.$el);
-        $(this.wrapper).remove();
-      }
-
-      /**
-       * Setup dropdown
-       * @param {Element} select  select element
-       * @param {Element} option  option element from select
-       * @param {String} type
-       * @return {Element}  option element added
-       */
-
-    }, {
-      key: "_appendOptionWithIcon",
-      value: function _appendOptionWithIcon(select, option, type) {
-        // Add disabled attr if disabled
-        var disabledClass = option.disabled ? 'disabled ' : '';
-        var optgroupClass = type === 'optgroup-option' ? 'optgroup-option ' : '';
-        var multipleCheckbox = this.isMultiple ? "<label><input type=\"checkbox\"" + disabledClass + "\"/><span>" + option.innerHTML + "</span></label>" : option.innerHTML;
-        var liEl = $('<li></li>');
-        var spanEl = $('<span></span>');
-        spanEl.html(multipleCheckbox);
-        liEl.addClass(disabledClass + " " + optgroupClass);
-        liEl.append(spanEl);
-
-        // add icons
-        var iconUrl = option.getAttribute('data-icon');
-        if (!!iconUrl) {
-          var imgEl = $("<img alt=\"\" src=\"" + iconUrl + "\">");
-          liEl.prepend(imgEl);
-        }
-
-        // Check for multiple type.
-        $(this.dropdownOptions).append(liEl[0]);
-        return liEl[0];
-      }
-
-      /**
-       * Toggle entry from option
-       * @param {String} key  Option key
-       * @return {Boolean}  if entry was added or removed
-       */
-
-    }, {
-      key: "_toggleEntryFromArray",
-      value: function _toggleEntryFromArray(key) {
-        var notAdded = !this._keysSelected.hasOwnProperty(key);
-        var $optionLi = $(this._valueDict[key].optionEl);
-
-        if (notAdded) {
-          this._keysSelected[key] = true;
-        } else {
-          delete this._keysSelected[key];
-        }
-
-        $optionLi.toggleClass('selected', notAdded);
-
-        // Set checkbox checked value
-        $optionLi.find('input[type="checkbox"]').prop('checked', notAdded);
-
-        // use notAdded instead of true (to detect if the option is selected or not)
-        $optionLi.prop('selected', notAdded);
-
-        return notAdded;
-      }
-
-      /**
-       * Set text value to input
-       */
-
-    }, {
-      key: "_setValueToInput",
-      value: function _setValueToInput() {
-        var values = [];
-        var options = this.$el.find('option');
-
-        options.each(function (el) {
-          if ($(el).prop('selected')) {
-            var text = $(el).text();
-            values.push(text);
-          }
-        });
-
-        if (!values.length) {
-          var firstDisabled = this.$el.find('option:disabled').eq(0);
-          if (firstDisabled.length && firstDisabled[0].value === '') {
-            values.push(firstDisabled.text());
-          }
-        }
-
-        this.input.value = values.join(', ');
-      }
-
-      /**
-       * Set selected state of dropdown to match actual select element
-       */
-
-    }, {
-      key: "_setSelectedStates",
-      value: function _setSelectedStates() {
-        this._keysSelected = {};
-
-        for (var key in this._valueDict) {
-          var option = this._valueDict[key];
-          var optionIsSelected = $(option.el).prop('selected');
-          $(option.optionEl).find('input[type="checkbox"]').prop('checked', optionIsSelected);
-          if (optionIsSelected) {
-            this._activateOption($(this.dropdownOptions), $(option.optionEl));
-            this._keysSelected[key] = true;
-          } else {
-            $(option.optionEl).removeClass('selected');
-          }
-        }
-      }
-
-      /**
-       * Make option as selected and scroll to selected position
-       * @param {jQuery} collection  Select options jQuery element
-       * @param {Element} newOption  element of the new option
-       */
-
-    }, {
-      key: "_activateOption",
-      value: function _activateOption(collection, newOption) {
-        if (newOption) {
-          if (!this.isMultiple) {
-            collection.find('li.selected').removeClass('selected');
-          }
-          var option = $(newOption);
-          option.addClass('selected');
-        }
-      }
-
-      /**
-       * Get Selected Values
-       * @return {Array}  Array of selected values
-       */
-
-    }, {
-      key: "getSelectedValues",
-      value: function getSelectedValues() {
-        var selectedValues = [];
-        for (var key in this._keysSelected) {
-          selectedValues.push(this._valueDict[key].el.value);
-        }
-        return selectedValues;
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(FormSelect.__proto__ || Object.getPrototypeOf(FormSelect), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_FormSelect;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return FormSelect;
-  }(Component);
-
-  M.FormSelect = FormSelect;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(FormSelect, 'formSelect', 'M_FormSelect');
-  }
-})(cash);
-;(function ($, anim) {
-  'use strict';
-
-  var _defaults = {};
-
-  /**
-   * @class
-   *
-   */
-
-  var Range = function (_Component21) {
-    _inherits(Range, _Component21);
-
-    /**
-     * Construct Range instance
-     * @constructor
-     * @param {Element} el
-     * @param {Object} options
-     */
-    function Range(el, options) {
-      _classCallCheck(this, Range);
-
-      var _this72 = _possibleConstructorReturn(this, (Range.__proto__ || Object.getPrototypeOf(Range)).call(this, Range, el, options));
-
-      _this72.el.M_Range = _this72;
-
-      /**
-       * Options for the range
-       * @member Range#options
-       */
-      _this72.options = $.extend({}, Range.defaults, options);
-
-      _this72._mousedown = false;
-
-      // Setup
-      _this72._setupThumb();
-
-      _this72._setupEventHandlers();
-      return _this72;
-    }
-
-    _createClass(Range, [{
-      key: "destroy",
-
-
-      /**
-       * Teardown component
-       */
-      value: function destroy() {
-        this._removeEventHandlers();
-        this._removeThumb();
-        this.el.M_Range = undefined;
-      }
-
-      /**
-       * Setup Event Handlers
-       */
-
-    }, {
-      key: "_setupEventHandlers",
-      value: function _setupEventHandlers() {
-        this._handleRangeChangeBound = this._handleRangeChange.bind(this);
-        this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this);
-        this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this);
-        this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this);
-        this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this);
-
-        this.el.addEventListener('change', this._handleRangeChangeBound);
-
-        this.el.addEventListener('mousedown', this._handleRangeMousedownTouchstartBound);
-        this.el.addEventListener('touchstart', this._handleRangeMousedownTouchstartBound);
-
-        this.el.addEventListener('input', this._handleRangeInputMousemoveTouchmoveBound);
-        this.el.addEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound);
-        this.el.addEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound);
-
-        this.el.addEventListener('mouseup', this._handleRangeMouseupTouchendBound);
-        this.el.addEventListener('touchend', this._handleRangeMouseupTouchendBound);
-
-        this.el.addEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound);
-        this.el.addEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound);
-        this.el.addEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound);
-      }
-
-      /**
-       * Remove Event Handlers
-       */
-
-    }, {
-      key: "_removeEventHandlers",
-      value: function _removeEventHandlers() {
-        this.el.removeEventListener('change', this._handleRangeChangeBound);
-
-        this.el.removeEventListener('mousedown', this._handleRangeMousedownTouchstartBound);
-        this.el.removeEventListener('touchstart', this._handleRangeMousedownTouchstartBound);
-
-        this.el.removeEventListener('input', this._handleRangeInputMousemoveTouchmoveBound);
-        this.el.removeEventListener('mousemove', this._handleRangeInputMousemoveTouchmoveBound);
-        this.el.removeEventListener('touchmove', this._handleRangeInputMousemoveTouchmoveBound);
-
-        this.el.removeEventListener('mouseup', this._handleRangeMouseupTouchendBound);
-        this.el.removeEventListener('touchend', this._handleRangeMouseupTouchendBound);
-
-        this.el.removeEventListener('blur', this._handleRangeBlurMouseoutTouchleaveBound);
-        this.el.removeEventListener('mouseout', this._handleRangeBlurMouseoutTouchleaveBound);
-        this.el.removeEventListener('touchleave', this._handleRangeBlurMouseoutTouchleaveBound);
-      }
-
-      /**
-       * Handle Range Change
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleRangeChange",
-      value: function _handleRangeChange() {
-        $(this.value).html(this.$el.val());
-
-        if (!$(this.thumb).hasClass('active')) {
-          this._showRangeBubble();
-        }
-
-        var offsetLeft = this._calcRangeOffset();
-        $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
-      }
-
-      /**
-       * Handle Range Mousedown and Touchstart
-       * @param {Event} e
-       */
-
-    }, {
-      key: "_handleRangeMousedownTouchstart",
-      value: function _handleRangeMousedownTouchstart(e) {
-        // Set indicator value
-        $(this.value).html(this.$el.val());
-
-        this._mousedown = true;
-        this.$el.addClass('active');
-
-        if (!$(this.thumb).hasClass('active')) {
-          this._showRangeBubble();
-        }
-
-        if (e.type !== 'input') {
-          var offsetLeft = this._calcRangeOffset();
-          $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
-        }
-      }
-
-      /**
-       * Handle Range Input, Mousemove and Touchmove
-       */
-
-    }, {
-      key: "_handleRangeInputMousemoveTouchmove",
-      value: function _handleRangeInputMousemoveTouchmove() {
-        if (this._mousedown) {
-          if (!$(this.thumb).hasClass('active')) {
-            this._showRangeBubble();
-          }
-
-          var offsetLeft = this._calcRangeOffset();
-          $(this.thumb).addClass('active').css('left', offsetLeft + 'px');
-          $(this.value).html(this.$el.val());
-        }
-      }
-
-      /**
-       * Handle Range Mouseup and Touchend
-       */
-
-    }, {
-      key: "_handleRangeMouseupTouchend",
-      value: function _handleRangeMouseupTouchend() {
-        this._mousedown = false;
-        this.$el.removeClass('active');
-      }
-
-      /**
-       * Handle Range Blur, Mouseout and Touchleave
-       */
-
-    }, {
-      key: "_handleRangeBlurMouseoutTouchleave",
-      value: function _handleRangeBlurMouseoutTouchleave() {
-        if (!this._mousedown) {
-          var paddingLeft = parseInt(this.$el.css('padding-left'));
-          var marginLeft = 7 + paddingLeft + 'px';
-
-          if ($(this.thumb).hasClass('active')) {
-            anim.remove(this.thumb);
-            anim({
-              targets: this.thumb,
-              height: 0,
-              width: 0,
-              top: 10,
-              easing: 'easeOutQuad',
-              marginLeft: marginLeft,
-              duration: 100
-            });
-          }
-          $(this.thumb).removeClass('active');
-        }
-      }
-
-      /**
-       * Setup dropdown
-       */
-
-    }, {
-      key: "_setupThumb",
-      value: function _setupThumb() {
-        this.thumb = document.createElement('span');
-        this.value = document.createElement('span');
-        $(this.thumb).addClass('thumb');
-        $(this.value).addClass('value');
-        $(this.thumb).append(this.value);
-        this.$el.after(this.thumb);
-      }
-
-      /**
-       * Remove dropdown
-       */
-
-    }, {
-      key: "_removeThumb",
-      value: function _removeThumb() {
-        $(this.thumb).remove();
-      }
-
-      /**
-       * morph thumb into bubble
-       */
-
-    }, {
-      key: "_showRangeBubble",
-      value: function _showRangeBubble() {
-        var paddingLeft = parseInt($(this.thumb).parent().css('padding-left'));
-        var marginLeft = -7 + paddingLeft + 'px'; // TODO: fix magic number?
-        anim.remove(this.thumb);
-        anim({
-          targets: this.thumb,
-          height: 30,
-          width: 30,
-          top: -30,
-          marginLeft: marginLeft,
-          duration: 300,
-          easing: 'easeOutQuint'
-        });
-      }
-
-      /**
-       * Calculate the offset of the thumb
-       * @return {Number}  offset in pixels
-       */
-
-    }, {
-      key: "_calcRangeOffset",
-      value: function _calcRangeOffset() {
-        var width = this.$el.width() - 15;
-        var max = parseFloat(this.$el.attr('max')) || 100; // Range default max
-        var min = parseFloat(this.$el.attr('min')) || 0; // Range default min
-        var percent = (parseFloat(this.$el.val()) - min) / (max - min);
-        return percent * width;
-      }
-    }], [{
-      key: "init",
-      value: function init(els, options) {
-        return _get(Range.__proto__ || Object.getPrototypeOf(Range), "init", this).call(this, this, els, options);
-      }
-
-      /**
-       * Get Instance
-       */
-
-    }, {
-      key: "getInstance",
-      value: function getInstance(el) {
-        var domElem = !!el.jquery ? el[0] : el;
-        return domElem.M_Range;
-      }
-    }, {
-      key: "defaults",
-      get: function () {
-        return _defaults;
-      }
-    }]);
-
-    return Range;
-  }(Component);
-
-  M.Range = Range;
-
-  if (M.jQueryLoaded) {
-    M.initializeJqueryWrapper(Range, 'range', 'M_Range');
-  }
-
-  Range.init($('input[type=range]'));
-})(cash, M.anime);
diff --git a/gracedb/static/js/materialize.min.js b/gracedb/static/js/materialize.min.js
deleted file mode 100644
index 4ff077d6d..000000000
--- a/gracedb/static/js/materialize.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Materialize v1.0.0 (http://materializecss.com)
- * Copyright 2014-2017 Materialize
- * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
- */
-var _get=function t(e,i,n){null===e&&(e=Function.prototype);var s=Object.getOwnPropertyDescriptor(e,i);if(void 0===s){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in s)return s.value;var a=s.get;return void 0!==a?a.call(n):void 0},_createClass=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}();function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}window.cash=function(){var i,o=document,a=window,t=Array.prototype,r=t.slice,n=t.filter,s=t.push,e=function(){},h=function(t){return typeof t==typeof e&&t.call},d=function(t){return"string"==typeof t},l=/^#[\w-]*$/,u=/^\.[\w-]*$/,c=/<.+>/,p=/^\w+$/;function v(t,e){e=e||o;var i=u.test(t)?e.getElementsByClassName(t.slice(1)):p.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t);return i}function f(t){if(!i){var e=(i=o.implementation.createHTMLDocument(null)).createElement("base");e.href=o.location.href,i.head.appendChild(e)}return i.body.innerHTML=t,i.body.childNodes}function m(t){"loading"!==o.readyState?t():o.addEventListener("DOMContentLoaded",t)}function g(t,e){if(!t)return this;if(t.cash&&t!==a)return t;var i,n=t,s=0;if(d(t))n=l.test(t)?o.getElementById(t.slice(1)):c.test(t)?f(t):v(t,e);else if(h(t))return m(t),this;if(!n)return this;if(n.nodeType||n===a)this[0]=n,this.length=1;else for(i=this.length=n.length;s<i;s++)this[s]=n[s];return this}function _(t,e){return new g(t,e)}var y=_.fn=_.prototype=g.prototype={cash:!0,length:0,push:s,splice:t.splice,map:t.map,init:g};function k(t,e){for(var i=t.length,n=0;n<i&&!1!==e.call(t[n],t[n],n,t);n++);}function b(t,e){var i=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!i&&i.call(t,e)}function w(e){return d(e)?b:e.cash?function(t){return e.is(t)}:function(t,e){return t===e}}function C(t){return _(r.call(t).filter(function(t,e,i){return i.indexOf(t)===e}))}Object.defineProperty(y,"constructor",{value:_}),_.parseHTML=f,_.noop=e,_.isFunction=h,_.isString=d,_.extend=y.extend=function(t){t=t||{};var e=r.call(arguments),i=e.length,n=1;for(1===e.length&&(t=this,n=0);n<i;n++)if(e[n])for(var s in e[n])e[n].hasOwnProperty(s)&&(t[s]=e[n][s]);return t},_.extend({merge:function(t,e){for(var i=+e.length,n=t.length,s=0;s<i;n++,s++)t[n]=e[s];return t.length=n,t},each:k,matches:b,unique:C,isArray:Array.isArray,isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)}});var E=_.uid="_cash"+Date.now();function M(t){return t[E]=t[E]||{}}function O(t,e,i){return M(t)[e]=i}function x(t,e){var i=M(t);return void 0===i[e]&&(i[e]=t.dataset?t.dataset[e]:_(t).attr("data-"+e)),i[e]}y.extend({data:function(e,i){if(d(e))return void 0===i?x(this[0],e):this.each(function(t){return O(t,e,i)});for(var t in e)this.data(t,e[t]);return this},removeData:function(s){return this.each(function(t){return i=s,void((n=M(e=t))?delete n[i]:e.dataset?delete e.dataset[i]:_(e).removeAttr("data-"+name));var e,i,n})}});var L=/\S+/g;function T(t){return d(t)&&t.match(L)}function $(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)}function B(t,e,i){t.classList?t.classList.add(e):i.indexOf(" "+e+" ")&&(t.className+=" "+e)}function D(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(e,"")}y.extend({addClass:function(t){var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){B(e,t,i)})}):this},attr:function(e,i){if(e){if(d(e))return void 0===i?this[0]?this[0].getAttribute?this[0].getAttribute(e):this[0][e]:void 0:this.each(function(t){t.setAttribute?t.setAttribute(e,i):t[e]=i});for(var t in e)this.attr(t,e[t]);return this}},hasClass:function(t){var e=!1,i=T(t);return i&&i.length&&this.each(function(t){return!(e=$(t,i[0]))}),e},prop:function(e,i){if(d(e))return void 0===i?this[0][e]:this.each(function(t){t[e]=i});for(var t in e)this.prop(t,e[t]);return this},removeAttr:function(e){return this.each(function(t){t.removeAttribute?t.removeAttribute(e):delete t[e]})},removeClass:function(t){if(!arguments.length)return this.attr("class","");var i=T(t);return i?this.each(function(e){k(i,function(t){D(e,t)})}):this},removeProp:function(e){return this.each(function(t){delete t[e]})},toggleClass:function(t,e){if(void 0!==e)return this[e?"addClass":"removeClass"](t);var n=T(t);return n?this.each(function(e){var i=" "+e.className+" ";k(n,function(t){$(e,t)?D(e,t):B(e,t,i)})}):this}}),y.extend({add:function(t,e){return C(_.merge(this,_(t,e)))},each:function(t){return k(this,t),this},eq:function(t){return _(this.get(t))},filter:function(e){if(!e)return this;var i=h(e)?e:w(e);return _(n.call(this,function(t){return i(t,e)}))},first:function(){return this.eq(0)},get:function(t){return void 0===t?r.call(this):t<0?this[t+this.length]:this[t]},index:function(t){var e=t?_(t)[0]:this[0],i=t?this:_(e).parent().children();return r.call(i).indexOf(e)},last:function(){return this.eq(-1)}});var S,I,A,R,H,P,W=(H=/(?:^\w|[A-Z]|\b\w)/g,P=/[\s-_]+/g,function(t){return t.replace(H,function(t,e){return t[0===e?"toLowerCase":"toUpperCase"]()}).replace(P,"")}),j=(S={},I=document,A=I.createElement("div"),R=A.style,function(e){if(e=W(e),S[e])return S[e];var t=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+["webkit","moz","ms","o"].join(t+" ")+t).split(" ");return k(i,function(t){if(t in R)return S[t]=e=S[e]=t,!1}),S[e]});function F(t,e){return parseInt(a.getComputedStyle(t[0],null)[e],10)||0}function q(e,i,t){var n,s=x(e,"_cashEvents"),o=s&&s[i];o&&(t?(e.removeEventListener(i,t),0<=(n=o.indexOf(t))&&o.splice(n,1)):(k(o,function(t){e.removeEventListener(i,t)}),o=[]))}function N(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function z(t){var e,i,n,s=t.type;if(!s)return null;switch(s.toLowerCase()){case"select-one":return 0<=(n=(i=t).selectedIndex)?i.options[n].value:null;case"select-multiple":return e=[],k(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null;case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function V(e,i,n){var t=d(i);t||!i.length?k(e,t?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",i)}:function(t,e){return function(t,e,i){if(i){var n=t.childNodes[0];t.insertBefore(e,n)}else t.appendChild(e)}(t,0===e?i:i.cloneNode(!0),n)}):k(i,function(t){return V(e,t,n)})}_.prefixedProp=j,_.camelCase=W,y.extend({css:function(e,i){if(d(e))return e=j(e),1<arguments.length?this.each(function(t){return t.style[e]=i}):a.getComputedStyle(this[0])[e];for(var t in e)this.css(t,e[t]);return this}}),k(["Width","Height"],function(e){var t=e.toLowerCase();y[t]=function(){return this[0].getBoundingClientRect()[t]},y["inner"+e]=function(){return this[0]["client"+e]},y["outer"+e]=function(t){return this[0]["offset"+e]+(t?F(this,"margin"+("Width"===e?"Left":"Top"))+F(this,"margin"+("Width"===e?"Right":"Bottom")):0)}}),y.extend({off:function(e,i){return this.each(function(t){return q(t,e,i)})},on:function(a,i,r,l){var n;if(!d(a)){for(var t in a)this.on(t,i,a[t]);return this}return h(i)&&(r=i,i=null),"ready"===a?(m(r),this):(i&&(n=r,r=function(t){for(var e=t.target;!b(e,i);){if(e===this||null===e)return e=!1;e=e.parentNode}e&&n.call(e,t)}),this.each(function(t){var e,i,n,s,o=r;l&&(o=function(){r.apply(this,arguments),q(t,a,o)}),i=a,n=o,(s=x(e=t,"_cashEvents")||O(e,"_cashEvents",{}))[i]=s[i]||[],s[i].push(n),e.addEventListener(i,n)}))},one:function(t,e,i){return this.on(t,e,i,!0)},ready:m,trigger:function(t,e){if(document.createEvent){var i=document.createEvent("HTMLEvents");return i.initEvent(t,!0,!1),i=this.extend(i,e),this.each(function(t){return t.dispatchEvent(i)})}}}),y.extend({serialize:function(){var s="";return k(this[0].elements||this,function(t){if(!t.disabled&&"FIELDSET"!==t.tagName){var e=t.name;switch(t.type.toLowerCase()){case"file":case"reset":case"submit":case"button":break;case"select-multiple":var i=z(t);null!==i&&k(i,function(t){s+=N(e,t)});break;default:var n=z(t);null!==n&&(s+=N(e,n))}}}),s.substr(1)},val:function(e){return void 0===e?z(this[0]):this.each(function(t){return t.value=e})}}),y.extend({after:function(t){return _(t).insertAfter(this),this},append:function(t){return V(this,t),this},appendTo:function(t){return V(_(t),this),this},before:function(t){return _(t).insertBefore(this),this},clone:function(){return _(this.map(function(t){return t.cloneNode(!0)}))},empty:function(){return this.html(""),this},html:function(t){if(void 0===t)return this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t){return t.innerHTML=e})},insertAfter:function(t){var s=this;return _(t).each(function(t,e){var i=t.parentNode,n=t.nextSibling;s.each(function(t){i.insertBefore(0===e?t:t.cloneNode(!0),n)})}),this},insertBefore:function(t){var s=this;return _(t).each(function(e,i){var n=e.parentNode;s.each(function(t){n.insertBefore(0===i?t:t.cloneNode(!0),e)})}),this},prepend:function(t){return V(this,t,!0),this},prependTo:function(t){return V(_(t),this,!0),this},remove:function(){return this.each(function(t){if(t.parentNode)return t.parentNode.removeChild(t)})},text:function(e){return void 0===e?this[0].textContent:this.each(function(t){return t.textContent=e})}});var X=o.documentElement;return y.extend({position:function(){var t=this[0];return{left:t.offsetLeft,top:t.offsetTop}},offset:function(){var t=this[0].getBoundingClientRect();return{top:t.top+a.pageYOffset-X.clientTop,left:t.left+a.pageXOffset-X.clientLeft}},offsetParent:function(){return _(this[0].offsetParent)}}),y.extend({children:function(e){var i=[];return this.each(function(t){s.apply(i,t.children)}),i=C(i),e?i.filter(function(t){return b(t,e)}):i},closest:function(t){return!t||this.length<1?_():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(e){if(!e)return!1;var i=!1,n=w(e);return this.each(function(t){return!(i=n(t,e))}),i},find:function(e){if(!e||e.nodeType)return _(e&&this.has(e).length?e:null);var i=[];return this.each(function(t){s.apply(i,v(e,t))}),C(i)},has:function(e){var t=d(e)?function(t){return 0!==v(e,t).length}:function(t){return t.contains(e)};return this.filter(t)},next:function(){return _(this[0].nextElementSibling)},not:function(e){if(!e)return this;var i=w(e);return this.filter(function(t){return!i(t,e)})},parent:function(){var e=[];return this.each(function(t){t&&t.parentNode&&e.push(t.parentNode)}),C(e)},parents:function(e){var i,n=[];return this.each(function(t){for(i=t;i&&i.parentNode&&i!==o.body.parentNode;)i=i.parentNode,(!e||e&&b(i,e))&&n.push(i)}),C(n)},prev:function(){return _(this[0].previousElementSibling)},siblings:function(t){var e=this.parent().children(t),i=this[0];return e.filter(function(t){return t!==i})}}),_}();var Component=function(){function s(t,e,i){_classCallCheck(this,s),e instanceof Element||console.error(Error(e+" is not an HTML Element"));var n=t.getInstance(e);n&&n.destroy(),this.el=e,this.$el=cash(e)}return _createClass(s,null,[{key:"init",value:function(t,e,i){var n=null;if(e instanceof Element)n=new t(e,i);else if(e&&(e.jquery||e.cash||e instanceof NodeList)){for(var s=[],o=0;o<e.length;o++)s.push(new t(e[o],i));n=s}return n}}]),s}();!function(t){t.Package?M={}:t.M={},M.jQueryLoaded=!!t.jQuery}(window),"function"==typeof define&&define.amd?define("M",[],function(){return M}):"undefined"==typeof exports||exports.nodeType||("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=M),exports.default=M),M.version="1.0.0",M.keys={TAB:9,ENTER:13,ESC:27,ARROW_UP:38,ARROW_DOWN:40},M.tabPressed=!1,M.keyDown=!1;var docHandleKeydown=function(t){M.keyDown=!0,t.which!==M.keys.TAB&&t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||(M.tabPressed=!0)},docHandleKeyup=function(t){M.keyDown=!1,t.which!==M.keys.TAB&&t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||(M.tabPressed=!1)},docHandleFocus=function(t){M.keyDown&&document.body.classList.add("keyboard-focused")},docHandleBlur=function(t){document.body.classList.remove("keyboard-focused")};document.addEventListener("keydown",docHandleKeydown,!0),document.addEventListener("keyup",docHandleKeyup,!0),document.addEventListener("focus",docHandleFocus,!0),document.addEventListener("blur",docHandleBlur,!0),M.initializeJqueryWrapper=function(n,s,o){jQuery.fn[s]=function(e){if(n.prototype[e]){var i=Array.prototype.slice.call(arguments,1);if("get"===e.slice(0,3)){var t=this.first()[0][o];return t[e].apply(t,i)}return this.each(function(){var t=this[o];t[e].apply(t,i)})}if("object"==typeof e||!e)return n.init(this,e),this;jQuery.error("Method "+e+" does not exist on jQuery."+s)}},M.AutoInit=function(t){var e=t||document.body,i={Autocomplete:e.querySelectorAll(".autocomplete:not(.no-autoinit)"),Carousel:e.querySelectorAll(".carousel:not(.no-autoinit)"),Chips:e.querySelectorAll(".chips:not(.no-autoinit)"),Collapsible:e.querySelectorAll(".collapsible:not(.no-autoinit)"),Datepicker:e.querySelectorAll(".datepicker:not(.no-autoinit)"),Dropdown:e.querySelectorAll(".dropdown-trigger:not(.no-autoinit)"),Materialbox:e.querySelectorAll(".materialboxed:not(.no-autoinit)"),Modal:e.querySelectorAll(".modal:not(.no-autoinit)"),Parallax:e.querySelectorAll(".parallax:not(.no-autoinit)"),Pushpin:e.querySelectorAll(".pushpin:not(.no-autoinit)"),ScrollSpy:e.querySelectorAll(".scrollspy:not(.no-autoinit)"),FormSelect:e.querySelectorAll("select:not(.no-autoinit)"),Sidenav:e.querySelectorAll(".sidenav:not(.no-autoinit)"),Tabs:e.querySelectorAll(".tabs:not(.no-autoinit)"),TapTarget:e.querySelectorAll(".tap-target:not(.no-autoinit)"),Timepicker:e.querySelectorAll(".timepicker:not(.no-autoinit)"),Tooltip:e.querySelectorAll(".tooltipped:not(.no-autoinit)"),FloatingActionButton:e.querySelectorAll(".fixed-action-btn:not(.no-autoinit)")};for(var n in i){M[n].init(i[n])}},M.objectSelectorString=function(t){return((t.prop("tagName")||"")+(t.attr("id")||"")+(t.attr("class")||"")).replace(/\s/g,"")},M.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}(),M.escapeHash=function(t){return t.replace(/(:|\.|\[|\]|,|=|\/)/g,"\\$1")},M.elementOrParentIsFixed=function(t){var e=$(t),i=e.add(e.parents()),n=!1;return i.each(function(){if("fixed"===$(this).css("position"))return!(n=!0)}),n},M.checkWithinContainer=function(t,e,i){var n={top:!1,right:!1,bottom:!1,left:!1},s=t.getBoundingClientRect(),o=t===document.body?Math.max(s.bottom,window.innerHeight):s.bottom,a=t.scrollLeft,r=t.scrollTop,l=e.left-a,h=e.top-r;return(l<s.left+i||l<i)&&(n.left=!0),(l+e.width>s.right-i||l+e.width>window.innerWidth-i)&&(n.right=!0),(h<s.top+i||h<i)&&(n.top=!0),(h+e.height>o-i||h+e.height>window.innerHeight-i)&&(n.bottom=!0),n},M.checkPossibleAlignments=function(t,e,i,n){var s={top:!0,right:!0,bottom:!0,left:!0,spaceOnTop:null,spaceOnRight:null,spaceOnBottom:null,spaceOnLeft:null},o="visible"===getComputedStyle(e).overflow,a=e.getBoundingClientRect(),r=Math.min(a.height,window.innerHeight),l=Math.min(a.width,window.innerWidth),h=t.getBoundingClientRect(),d=e.scrollLeft,u=e.scrollTop,c=i.left-d,p=i.top-u,v=i.top+h.height-u;return s.spaceOnRight=o?window.innerWidth-(h.left+i.width):l-(c+i.width),s.spaceOnRight<0&&(s.left=!1),s.spaceOnLeft=o?h.right-i.width:c-i.width+h.width,s.spaceOnLeft<0&&(s.right=!1),s.spaceOnBottom=o?window.innerHeight-(h.top+i.height+n):r-(p+i.height+n),s.spaceOnBottom<0&&(s.top=!1),s.spaceOnTop=o?h.bottom-(i.height+n):v-(i.height-n),s.spaceOnTop<0&&(s.bottom=!1),s},M.getOverflowParent=function(t){return null==t?null:t===document.body||"visible"!==getComputedStyle(t).overflow?t:M.getOverflowParent(t.parentElement)},M.getIdFromTrigger=function(t){var e=t.getAttribute("data-target");return e||(e=(e=t.getAttribute("href"))?e.slice(1):""),e},M.getDocumentScrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},M.getDocumentScrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var getTime=Date.now||function(){return(new Date).getTime()};M.throttle=function(i,n,s){var o=void 0,a=void 0,r=void 0,l=null,h=0;s||(s={});var d=function(){h=!1===s.leading?0:getTime(),l=null,r=i.apply(o,a),o=a=null};return function(){var t=getTime();h||!1!==s.leading||(h=t);var e=n-(t-h);return o=this,a=arguments,e<=0?(clearTimeout(l),l=null,h=t,r=i.apply(o,a),o=a=null):l||!1===s.trailing||(l=setTimeout(d,e)),r}};var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,i){if(i.get||i.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=i.value)},$jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t},$jscomp.global=$jscomp.getGlobal(this),$jscomp.SYMBOL_PREFIX="jscomp_symbol_",$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){},$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)},$jscomp.symbolCounter_=0,$jscomp.Symbol=function(t){return $jscomp.SYMBOL_PREFIX+(t||"")+$jscomp.symbolCounter_++},$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}}),$jscomp.initSymbolIterator=function(){}},$jscomp.arrayIterator=function(t){var e=0;return $jscomp.iteratorPrototype(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})},$jscomp.iteratorPrototype=function(t){return $jscomp.initSymbolIterator(),(t={next:t})[$jscomp.global.Symbol.iterator]=function(){return this},t},$jscomp.array=$jscomp.array||{},$jscomp.iteratorFromArray=function(e,i){$jscomp.initSymbolIterator(),e instanceof String&&(e+="");var n=0,s={next:function(){if(n<e.length){var t=n++;return{value:i(t,e[t]),done:!1}}return s.next=function(){return{done:!0,value:void 0}},s.next()}};return s[Symbol.iterator]=function(){return s},s},$jscomp.polyfill=function(t,e,i,n){if(e){for(i=$jscomp.global,t=t.split("."),n=0;n<t.length-1;n++){var s=t[n];s in i||(i[s]={}),i=i[s]}(e=e(n=i[t=t[t.length-1]]))!=n&&null!=e&&$jscomp.defineProperty(i,t,{configurable:!0,writable:!0,value:e})}},$jscomp.polyfill("Array.prototype.keys",function(t){return t||function(){return $jscomp.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var $jscomp$this=this;M.anime=function(){function s(t){if(!B.col(t))try{return document.querySelectorAll(t)}catch(t){}}function b(t,e){for(var i=t.length,n=2<=arguments.length?e:void 0,s=[],o=0;o<i;o++)if(o in t){var a=t[o];e.call(n,a,o,t)&&s.push(a)}return s}function d(t){return t.reduce(function(t,e){return t.concat(B.arr(e)?d(e):e)},[])}function o(t){return B.arr(t)?t:(B.str(t)&&(t=s(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function a(t,e){return t.some(function(t){return t===e})}function r(t){var e,i={};for(e in t)i[e]=t[e];return i}function u(t,e){var i,n=r(t);for(i in t)n[i]=e.hasOwnProperty(i)?e[i]:t[i];return n}function c(t,e){var i,n=r(t);for(i in e)n[i]=B.und(t[i])?e[i]:t[i];return n}function l(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function h(t,e){return B.fnc(t)?t(e.target,e.id,e.total):t}function w(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function p(t,e){return B.dom(t)&&a($,e)?"transform":B.dom(t)&&(t.getAttribute(e)||B.svg(t)&&t[e])?"attribute":B.dom(t)&&"transform"!==e&&w(t,e)?"css":null!=t[e]?"object":void 0}function v(t,e){switch(p(t,e)){case"transform":return function(t,i){var e,n=-1<(e=i).indexOf("translate")||"perspective"===e?"px":-1<e.indexOf("rotate")||-1<e.indexOf("skew")?"deg":void 0,n=-1<i.indexOf("scale")?1:0+n;if(!(t=t.style.transform))return n;for(var s=[],o=[],a=[],r=/(\w+)\((.+?)\)/g;s=r.exec(t);)o.push(s[1]),a.push(s[2]);return(t=b(a,function(t,e){return o[e]===i})).length?t[0]:n}(t,e);case"css":return w(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0}function f(t,e){var i=/^(\*=|\+=|-=)/.exec(t);if(!i)return t;var n=l(t)||0;switch(e=parseFloat(e),t=parseFloat(t.replace(i[0],"")),i[0][0]){case"+":return e+t+n;case"-":return e-t+n;case"*":return e*t+n}}function m(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function i(t){t=t.points;for(var e,i=0,n=0;n<t.numberOfItems;n++){var s=t.getItem(n);0<n&&(i+=m(e,s)),e=s}return i}function g(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return 2*Math.PI*t.getAttribute("r");case"rect":return 2*t.getAttribute("width")+2*t.getAttribute("height");case"line":return m({x:t.getAttribute("x1"),y:t.getAttribute("y1")},{x:t.getAttribute("x2"),y:t.getAttribute("y2")});case"polyline":return i(t);case"polygon":var e=t.points;return i(t)+m(e.getItem(e.numberOfItems-1),e.getItem(0))}}function C(e,i){function t(t){return t=void 0===t?0:t,e.el.getPointAtLength(1<=i+t?i+t:0)}var n=t(),s=t(-1),o=t(1);switch(e.property){case"x":return n.x;case"y":return n.y;case"angle":return 180*Math.atan2(o.y-s.y,o.x-s.x)/Math.PI}}function _(t,e){var i,n=/-?\d*\.?\d+/g;if(i=B.pth(t)?t.totalLength:t,B.col(i))if(B.rgb(i)){var s=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);i=s?"rgba("+s[1]+",1)":i}else i=B.hex(i)?function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var i=parseInt(e[2],16),e=parseInt(e[3],16);return"rgba("+t+","+i+","+e+",1)"}(i):B.hsl(i)?function(t){function e(t,e,i){return i<0&&(i+=1),1<i&&--i,i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var i=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(i[1])/360;var n=parseInt(i[2])/100,s=parseInt(i[3])/100,i=i[4]||1;if(0==n)s=n=t=s;else{var o=s<.5?s*(1+n):s+n-s*n,a=2*s-o,s=e(a,o,t+1/3),n=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*s+","+255*n+","+255*t+","+i+")"}(i):void 0;else s=(s=l(i))?i.substr(0,i.length-s.length):i,i=e&&!/\s/g.test(i)?s+e:s;return{original:i+="",numbers:i.match(n)?i.match(n).map(Number):[0],strings:B.str(t)||e?i.split(n):[]}}function y(t){return b(t=t?d(B.arr(t)?t.map(o):o(t)):[],function(t,e,i){return i.indexOf(t)===e})}function k(t,i){var e=r(i);if(B.arr(t)){var n=t.length;2!==n||B.obj(t[0])?B.fnc(i.duration)||(e.duration=i.duration/n):t={value:t}}return o(t).map(function(t,e){return e=e?0:i.delay,t=B.obj(t)&&!B.pth(t)?t:{value:t},B.und(t.delay)&&(t.delay=e),t}).map(function(t){return c(t,e)})}function E(o,a){var r;return o.tweens.map(function(t){var e=(t=function(t,e){var i,n={};for(i in t){var s=h(t[i],e);B.arr(s)&&1===(s=s.map(function(t){return h(t,e)})).length&&(s=s[0]),n[i]=s}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(t,a)).value,i=v(a.target,o.name),n=r?r.to.original:i,n=B.arr(e)?e[0]:n,s=f(B.arr(e)?e[1]:e,n),i=l(s)||l(n)||l(i);return t.from=_(n,i),t.to=_(s,i),t.start=r?r.end:o.offset,t.end=t.start+t.delay+t.duration,t.easing=function(t){return B.arr(t)?D.apply(this,t):S[t]}(t.easing),t.elasticity=(1e3-Math.min(Math.max(t.elasticity,1),999))/1e3,t.isPath=B.pth(e),t.isColor=B.col(t.from.original),t.isColor&&(t.round=1),r=t})}function M(e,t,i,n){var s="delay"===e;return t.length?(s?Math.min:Math.max).apply(Math,t.map(function(t){return t[e]})):s?n.delay:i.offset+n.delay+n.duration}function n(t){var e,i,n,s,o=u(L,t),a=u(T,t),r=(i=t.targets,(n=y(i)).map(function(t,e){return{target:t,id:e,total:n.length}})),l=[],h=c(o,a);for(e in t)h.hasOwnProperty(e)||"targets"===e||l.push({name:e,offset:h.offset,tweens:k(t[e],a)});return s=l,t=b(d(r.map(function(n){return s.map(function(t){var e=p(n.target,t.name);if(e){var i=E(t,n);t={type:e,property:t.name,animatable:n,tweens:i,duration:i[i.length-1].end,delay:i[0].delay}}else t=void 0;return t})})),function(t){return!B.und(t)}),c(o,{children:[],animatables:r,animations:t,duration:M("duration",t,o,a),delay:M("delay",t,o,a)})}function O(t){function d(){return window.Promise&&new Promise(function(t){return _=t})}function u(t){return k.reversed?k.duration-t:t}function c(e){for(var t=0,i={},n=k.animations,s=n.length;t<s;){var o=n[t],a=o.animatable,r=o.tweens,l=r.length-1,h=r[l];l&&(h=b(r,function(t){return e<t.end})[0]||h);for(var r=Math.min(Math.max(e-h.start-h.delay,0),h.duration)/h.duration,d=isNaN(r)?1:h.easing(r,h.elasticity),r=h.to.strings,u=h.round,l=[],c=void 0,c=h.to.numbers.length,p=0;p<c;p++){var v=void 0,v=h.to.numbers[p],f=h.from.numbers[p],v=h.isPath?C(h.value,d*v):f+d*(v-f);u&&(h.isColor&&2<p||(v=Math.round(v*u)/u)),l.push(v)}if(h=r.length)for(c=r[0],d=0;d<h;d++)u=r[d+1],p=l[d],isNaN(p)||(c=u?c+(p+u):c+(p+" "));else c=l[0];I[o.type](a.target,o.property,c,i,a.id),o.currentValue=c,t++}if(t=Object.keys(i).length)for(n=0;n<t;n++)x||(x=w(document.body,"transform")?"transform":"-webkit-transform"),k.animatables[n].target.style[x]=i[n].join(" ");k.currentTime=e,k.progress=e/k.duration*100}function p(t){k[t]&&k[t](k)}function v(){k.remaining&&!0!==k.remaining&&k.remaining--}function e(t){var e=k.duration,i=k.offset,n=i+k.delay,s=k.currentTime,o=k.reversed,a=u(t);if(k.children.length){var r=k.children,l=r.length;if(a>=k.currentTime)for(var h=0;h<l;h++)r[h].seek(a);else for(;l--;)r[l].seek(a)}(n<=a||!e)&&(k.began||(k.began=!0,p("begin")),p("run")),i<a&&a<e?c(a):(a<=i&&0!==s&&(c(0),o&&v()),(e<=a&&s!==e||!e)&&(c(e),o||v())),p("update"),e<=t&&(k.remaining?(m=f,"alternate"===k.direction&&(k.reversed=!k.reversed)):(k.pause(),k.completed||(k.completed=!0,p("complete"),"Promise"in window&&(_(),y=d()))),g=0)}t=void 0===t?{}:t;var f,m,g=0,_=null,y=d(),k=n(t);return k.reset=function(){var t=k.direction,e=k.loop;for(k.currentTime=0,k.progress=0,k.paused=!0,k.began=!1,k.completed=!1,k.reversed="reverse"===t,k.remaining="alternate"===t&&1===e?2:e,c(0),t=k.children.length;t--;)k.children[t].reset()},k.tick=function(t){f=t,m||(m=f),e((g+f-m)*O.speed)},k.seek=function(t){e(u(t))},k.pause=function(){var t=A.indexOf(k);-1<t&&A.splice(t,1),k.paused=!0},k.play=function(){k.paused&&(k.paused=!1,m=0,g=u(k.currentTime),A.push(k),R||H())},k.reverse=function(){k.reversed=!k.reversed,m=0,g=u(k.currentTime)},k.restart=function(){k.pause(),k.reset(),k.play()},k.finished=y,k.reset(),k.autoplay&&k.play(),k}var x,L={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},T={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},$="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),B={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},pth:function(t){return B.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||B.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return B.hex(t)||B.rgb(t)||B.hsl(t)}},D=function(){function u(t,e,i){return(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t}return function(a,r,l,h){if(0<=a&&a<=1&&0<=l&&l<=1){var d=new Float32Array(11);if(a!==r||l!==h)for(var t=0;t<11;++t)d[t]=u(.1*t,a,l);return function(t){if(a===r&&l===h)return t;if(0===t)return 0;if(1===t)return 1;for(var e=0,i=1;10!==i&&d[i]<=t;++i)e+=.1;var i=e+(t-d[--i])/(d[i+1]-d[i])*.1,n=3*(1-3*l+3*a)*i*i+2*(3*l-6*a)*i+3*a;if(.001<=n){for(e=0;e<4&&0!=(n=3*(1-3*l+3*a)*i*i+2*(3*l-6*a)*i+3*a);++e)var s=u(i,a,l)-t,i=i-s/n;t=i}else if(0===n)t=i;else{for(var i=e,e=e+.1,o=0;0<(n=u(s=i+(e-i)/2,a,l)-t)?e=s:i=s,1e-7<Math.abs(n)&&++o<10;);t=s}return u(t,r,h)}}}}(),S=function(){function i(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var t,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),e={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],i],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(t,e){return 1-i(1-t,e)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(t,e){return t<.5?i(2*t,e)/2:1-i(-2*t+2,e)/2}]},s={linear:D(.25,.25,.75,.75)},o={};for(t in e)o.type=t,e[o.type].forEach(function(i){return function(t,e){s["ease"+i.type+n[e]]=B.fnc(t)?t:D.apply($jscomp$this,t)}}(o)),o={type:o.type};return s}(),I={css:function(t,e,i){return t.style[e]=i},attribute:function(t,e,i){return t.setAttribute(e,i)},object:function(t,e,i){return t[e]=i},transform:function(t,e,i,n,s){n[s]||(n[s]=[]),n[s].push(e+"("+i+")")}},A=[],R=0,H=function(){function n(){R=requestAnimationFrame(t)}function t(t){var e=A.length;if(e){for(var i=0;i<e;)A[i]&&A[i].tick(t),i++;n()}else cancelAnimationFrame(R),R=0}return n}();return O.version="2.2.0",O.speed=1,O.running=A,O.remove=function(t){t=y(t);for(var e=A.length;e--;)for(var i=A[e],n=i.animations,s=n.length;s--;)a(t,n[s].animatable.target)&&(n.splice(s,1),n.length||i.pause())},O.getValue=v,O.path=function(t,e){var i=B.str(t)?s(t)[0]:t,n=e||100;return function(t){return{el:i,property:t,totalLength:g(i)*(n/100)}}},O.setDashoffset=function(t){var e=g(t);return t.setAttribute("stroke-dasharray",e),e},O.bezier=D,O.easings=S,O.timeline=function(n){var s=O(n);return s.pause(),s.duration=0,s.add=function(t){return s.children.forEach(function(t){t.began=!0,t.completed=!0}),o(t).forEach(function(t){var e=c(t,u(T,n||{}));e.targets=e.targets||n.targets,t=s.duration;var i=e.offset;e.autoplay=!1,e.direction=s.direction,e.offset=B.und(i)?t:f(i,t),s.began=!0,s.completed=!0,s.seek(e.offset),(e=O(e)).began=!0,e.completed=!0,e.duration>t&&(s.duration=e.duration),s.children.push(e)}),s.seek(0),s.reset(),s.autoplay&&s.restart(),s},s},O.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},O}(),function(r,l){"use strict";var e={accordion:!0,onOpenStart:void 0,onOpenEnd:void 0,onCloseStart:void 0,onCloseEnd:void 0,inDuration:300,outDuration:300},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));(i.el.M_Collapsible=i).options=r.extend({},s.defaults,e),i.$headers=i.$el.children("li").children(".collapsible-header"),i.$headers.attr("tabindex",0),i._setupEventHandlers();var n=i.$el.children("li.active").children(".collapsible-body");return i.options.accordion?n.first().css("display","block"):n.css("display","block"),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Collapsible=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleCollapsibleClickBound=this._handleCollapsibleClick.bind(this),this._handleCollapsibleKeydownBound=this._handleCollapsibleKeydown.bind(this),this.el.addEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.addEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.el.removeEventListener("click",this._handleCollapsibleClickBound),this.$headers.each(function(t){t.removeEventListener("keydown",e._handleCollapsibleKeydownBound)})}},{key:"_handleCollapsibleClick",value:function(t){var e=r(t.target).closest(".collapsible-header");if(t.target&&e.length){var i=e.closest(".collapsible");if(i[0]===this.el){var n=e.closest("li"),s=i.children("li"),o=n[0].classList.contains("active"),a=s.index(n);o?this.close(a):this.open(a)}}}},{key:"_handleCollapsibleKeydown",value:function(t){13===t.keyCode&&this._handleCollapsibleClickBound(t)}},{key:"_animateIn",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css({display:"block",overflow:"hidden",height:0,paddingTop:"",paddingBottom:""});var s=n.css("padding-top"),o=n.css("padding-bottom"),a=n[0].scrollHeight;n.css({paddingTop:0,paddingBottom:0}),l({targets:n[0],height:a,paddingTop:s,paddingBottom:o,duration:this.options.inDuration,easing:"easeInOutCubic",complete:function(t){n.css({overflow:"",paddingTop:"",paddingBottom:"",height:""}),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,i[0])}})}}},{key:"_animateOut",value:function(t){var e=this,i=this.$el.children("li").eq(t);if(i.length){var n=i.children(".collapsible-body");l.remove(n[0]),n.css("overflow","hidden"),l({targets:n[0],height:0,paddingTop:0,paddingBottom:0,duration:this.options.outDuration,easing:"easeInOutCubic",complete:function(){n.css({height:"",overflow:"",padding:"",display:""}),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,i[0])}})}}},{key:"open",value:function(t){var i=this,e=this.$el.children("li").eq(t);if(e.length&&!e[0].classList.contains("active")){if("function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,e[0]),this.options.accordion){var n=this.$el.children("li");this.$el.children("li.active").each(function(t){var e=n.index(r(t));i.close(e)})}e[0].classList.add("active"),this._animateIn(t)}}},{key:"close",value:function(t){var e=this.$el.children("li").eq(t);e.length&&e[0].classList.contains("active")&&("function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,e[0]),e[0].classList.remove("active"),this._animateOut(t))}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Collapsible}},{key:"defaults",get:function(){return e}}]),s}();M.Collapsible=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"collapsible","M_Collapsible")}(cash,M.anime),function(h,i){"use strict";var e={alignment:"left",autoFocus:!0,constrainWidth:!0,container:null,coverTrigger:!0,closeOnClick:!0,hover:!1,inDuration:150,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onItemClick:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.el.M_Dropdown=i,n._dropdowns.push(i),i.id=M.getIdFromTrigger(t),i.dropdownEl=document.getElementById(i.id),i.$dropdownEl=h(i.dropdownEl),i.options=h.extend({},n.defaults,e),i.isOpen=!1,i.isScrollable=!1,i.isTouchMoving=!1,i.focusedIndex=-1,i.filterQuery=[],i.options.container?h(i.options.container).append(i.dropdownEl):i.$el.after(i.dropdownEl),i._makeDropdownFocusable(),i._resetFilterQueryBound=i._resetFilterQuery.bind(i),i._handleDocumentClickBound=i._handleDocumentClick.bind(i),i._handleDocumentTouchmoveBound=i._handleDocumentTouchmove.bind(i),i._handleDropdownClickBound=i._handleDropdownClick.bind(i),i._handleDropdownKeydownBound=i._handleDropdownKeydown.bind(i),i._handleTriggerKeydownBound=i._handleTriggerKeydown.bind(i),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._resetDropdownStyles(),this._removeEventHandlers(),n._dropdowns.splice(n._dropdowns.indexOf(this),1),this.el.M_Dropdown=void 0}},{key:"_setupEventHandlers",value:function(){this.el.addEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.addEventListener("click",this._handleDropdownClickBound),this.options.hover?(this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.addEventListener("mouseleave",this._handleMouseLeaveBound)):(this._handleClickBound=this._handleClick.bind(this),this.el.addEventListener("click",this._handleClickBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("keydown",this._handleTriggerKeydownBound),this.dropdownEl.removeEventListener("click",this._handleDropdownClickBound),this.options.hover?(this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.dropdownEl.removeEventListener("mouseleave",this._handleMouseLeaveBound)):this.el.removeEventListener("click",this._handleClickBound)}},{key:"_setupTemporaryEventHandlers",value:function(){document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound),document.body.addEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.addEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_removeTemporaryEventHandlers",value:function(){document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound),document.body.removeEventListener("touchmove",this._handleDocumentTouchmoveBound),this.dropdownEl.removeEventListener("keydown",this._handleDropdownKeydownBound)}},{key:"_handleClick",value:function(t){t.preventDefault(),this.open()}},{key:"_handleMouseEnter",value:function(){this.open()}},{key:"_handleMouseLeave",value:function(t){var e=t.toElement||t.relatedTarget,i=!!h(e).closest(".dropdown-content").length,n=!1,s=h(e).closest(".dropdown-trigger");s.length&&s[0].M_Dropdown&&s[0].M_Dropdown.isOpen&&(n=!0),n||i||this.close()}},{key:"_handleDocumentClick",value:function(t){var e=this,i=h(t.target);this.options.closeOnClick&&i.closest(".dropdown-content").length&&!this.isTouchMoving?setTimeout(function(){e.close()},0):!i.closest(".dropdown-trigger").length&&i.closest(".dropdown-content").length||setTimeout(function(){e.close()},0),this.isTouchMoving=!1}},{key:"_handleTriggerKeydown",value:function(t){t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ENTER||this.isOpen||(t.preventDefault(),this.open())}},{key:"_handleDocumentTouchmove",value:function(t){h(t.target).closest(".dropdown-content").length&&(this.isTouchMoving=!0)}},{key:"_handleDropdownClick",value:function(t){if("function"==typeof this.options.onItemClick){var e=h(t.target).closest("li")[0];this.options.onItemClick.call(this,e)}}},{key:"_handleDropdownKeydown",value:function(t){if(t.which===M.keys.TAB)t.preventDefault(),this.close();else if(t.which!==M.keys.ARROW_DOWN&&t.which!==M.keys.ARROW_UP||!this.isOpen)if(t.which===M.keys.ENTER&&this.isOpen){var e=this.dropdownEl.children[this.focusedIndex],i=h(e).find("a, button").first();i.length?i[0].click():e&&e.click()}else t.which===M.keys.ESC&&this.isOpen&&(t.preventDefault(),this.close());else{t.preventDefault();var n=t.which===M.keys.ARROW_DOWN?1:-1,s=this.focusedIndex,o=!1;do{if(s+=n,this.dropdownEl.children[s]&&-1!==this.dropdownEl.children[s].tabIndex){o=!0;break}}while(s<this.dropdownEl.children.length&&0<=s);o&&(this.focusedIndex=s,this._focusFocusedItem())}var a=String.fromCharCode(t.which).toLowerCase();if(a&&-1===[9,13,27,38,40].indexOf(t.which)){this.filterQuery.push(a);var r=this.filterQuery.join(""),l=h(this.dropdownEl).find("li").filter(function(t){return 0===h(t).text().toLowerCase().indexOf(r)})[0];l&&(this.focusedIndex=h(l).index(),this._focusFocusedItem())}this.filterTimeout=setTimeout(this._resetFilterQueryBound,1e3)}},{key:"_resetFilterQuery",value:function(){this.filterQuery=[]}},{key:"_resetDropdownStyles",value:function(){this.$dropdownEl.css({display:"",width:"",height:"",left:"",top:"","transform-origin":"",transform:"",opacity:""})}},{key:"_makeDropdownFocusable",value:function(){this.dropdownEl.tabIndex=0,h(this.dropdownEl).children().each(function(t){t.getAttribute("tabindex")||t.setAttribute("tabindex",0)})}},{key:"_focusFocusedItem",value:function(){0<=this.focusedIndex&&this.focusedIndex<this.dropdownEl.children.length&&this.options.autoFocus&&this.dropdownEl.children[this.focusedIndex].focus()}},{key:"_getDropdownPosition",value:function(){this.el.offsetParent.getBoundingClientRect();var t=this.el.getBoundingClientRect(),e=this.dropdownEl.getBoundingClientRect(),i=e.height,n=e.width,s=t.left-e.left,o=t.top-e.top,a={left:s,top:o,height:i,width:n},r=this.dropdownEl.offsetParent?this.dropdownEl.offsetParent:this.dropdownEl.parentNode,l=M.checkPossibleAlignments(this.el,r,a,this.options.coverTrigger?0:t.height),h="top",d=this.options.alignment;if(o+=this.options.coverTrigger?0:t.height,this.isScrollable=!1,l.top||(l.bottom?h="bottom":(this.isScrollable=!0,l.spaceOnTop>l.spaceOnBottom?(h="bottom",i+=l.spaceOnTop,o-=l.spaceOnTop):i+=l.spaceOnBottom)),!l[d]){var u="left"===d?"right":"left";l[u]?d=u:l.spaceOnLeft>l.spaceOnRight?(d="right",n+=l.spaceOnLeft,s-=l.spaceOnLeft):(d="left",n+=l.spaceOnRight)}return"bottom"===h&&(o=o-e.height+(this.options.coverTrigger?t.height:0)),"right"===d&&(s=s-e.width+t.width),{x:s,y:o,verticalAlignment:h,horizontalAlignment:d,height:i,width:n}}},{key:"_animateIn",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:[0,1],easing:"easeOutQuad"},scaleX:[.3,1],scaleY:[.3,1],duration:this.options.inDuration,easing:"easeOutQuint",complete:function(t){e.options.autoFocus&&e.dropdownEl.focus(),"function"==typeof e.options.onOpenEnd&&e.options.onOpenEnd.call(e,e.el)}})}},{key:"_animateOut",value:function(){var e=this;i.remove(this.dropdownEl),i({targets:this.dropdownEl,opacity:{value:0,easing:"easeOutQuint"},scaleX:.3,scaleY:.3,duration:this.options.outDuration,easing:"easeOutQuint",complete:function(t){e._resetDropdownStyles(),"function"==typeof e.options.onCloseEnd&&e.options.onCloseEnd.call(e,e.el)}})}},{key:"_placeDropdown",value:function(){var t=this.options.constrainWidth?this.el.getBoundingClientRect().width:this.dropdownEl.getBoundingClientRect().width;this.dropdownEl.style.width=t+"px";var e=this._getDropdownPosition();this.dropdownEl.style.left=e.x+"px",this.dropdownEl.style.top=e.y+"px",this.dropdownEl.style.height=e.height+"px",this.dropdownEl.style.width=e.width+"px",this.dropdownEl.style.transformOrigin=("left"===e.horizontalAlignment?"0":"100%")+" "+("top"===e.verticalAlignment?"0":"100%")}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._resetDropdownStyles(),this.dropdownEl.style.display="block",this._placeDropdown(),this._animateIn(),this._setupTemporaryEventHandlers())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.focusedIndex=-1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._animateOut(),this._removeTemporaryEventHandlers(),this.options.autoFocus&&this.el.focus())}},{key:"recalculateDimensions",value:function(){this.isOpen&&(this.$dropdownEl.css({width:"",height:"",left:"",top:"","transform-origin":""}),this._placeDropdown())}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Dropdown}},{key:"defaults",get:function(){return e}}]),n}();t._dropdowns=[],M.Dropdown=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"dropdown","M_Dropdown")}(cash,M.anime),function(s,i){"use strict";var e={opacity:.5,inDuration:250,outDuration:250,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0,dismissible:!0,startingTop:"4%",endingTop:"10%"},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Modal=i).options=s.extend({},n.defaults,e),i.isOpen=!1,i.id=i.$el.attr("id"),i._openingTrigger=void 0,i.$overlay=s('<div class="modal-overlay"></div>'),i.el.tabIndex=0,i._nthModalOpened=0,n._count++,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._count--,this._removeEventHandlers(),this.el.removeAttribute("style"),this.$overlay.remove(),this.el.M_Modal=void 0}},{key:"_setupEventHandlers",value:function(){this._handleOverlayClickBound=this._handleOverlayClick.bind(this),this._handleModalCloseClickBound=this._handleModalCloseClick.bind(this),1===n._count&&document.body.addEventListener("click",this._handleTriggerClick),this.$overlay[0].addEventListener("click",this._handleOverlayClickBound),this.el.addEventListener("click",this._handleModalCloseClickBound)}},{key:"_removeEventHandlers",value:function(){0===n._count&&document.body.removeEventListener("click",this._handleTriggerClick),this.$overlay[0].removeEventListener("click",this._handleOverlayClickBound),this.el.removeEventListener("click",this._handleModalCloseClickBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".modal-trigger");if(e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Modal;n&&n.open(e),t.preventDefault()}}},{key:"_handleOverlayClick",value:function(){this.options.dismissible&&this.close()}},{key:"_handleModalCloseClick",value:function(t){s(t.target).closest(".modal-close").length&&this.close()}},{key:"_handleKeydown",value:function(t){27===t.keyCode&&this.options.dismissible&&this.close()}},{key:"_handleFocus",value:function(t){this.el.contains(t.target)||this._nthModalOpened!==n._modalsOpen||this.el.focus()}},{key:"_animateIn",value:function(){var t=this;s.extend(this.el.style,{display:"block",opacity:0}),s.extend(this.$overlay[0].style,{display:"block",opacity:0}),i({targets:this.$overlay[0],opacity:this.options.opacity,duration:this.options.inDuration,easing:"easeOutQuad"});var e={targets:this.el,duration:this.options.inDuration,easing:"easeOutCubic",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el,t._openingTrigger)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:0,opacity:1}):s.extend(e,{top:[this.options.startingTop,this.options.endingTop],opacity:1,scaleX:[.8,1],scaleY:[.8,1]}),i(e)}},{key:"_animateOut",value:function(){var t=this;i({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuart"});var e={targets:this.el,duration:this.options.outDuration,easing:"easeOutCubic",complete:function(){t.el.style.display="none",t.$overlay.remove(),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};this.el.classList.contains("bottom-sheet")?s.extend(e,{bottom:"-100%",opacity:0}):s.extend(e,{top:[this.options.endingTop,this.options.startingTop],opacity:0,scaleX:.8,scaleY:.8}),i(e)}},{key:"open",value:function(t){if(!this.isOpen)return this.isOpen=!0,n._modalsOpen++,this._nthModalOpened=n._modalsOpen,this.$overlay[0].style.zIndex=1e3+2*n._modalsOpen,this.el.style.zIndex=1e3+2*n._modalsOpen+1,this._openingTrigger=t?t[0]:void 0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el,this._openingTrigger),this.options.preventScrolling&&(document.body.style.overflow="hidden"),this.el.classList.add("open"),this.el.insertAdjacentElement("afterend",this.$overlay[0]),this.options.dismissible&&(this._handleKeydownBound=this._handleKeydown.bind(this),this._handleFocusBound=this._handleFocus.bind(this),document.addEventListener("keydown",this._handleKeydownBound),document.addEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateIn(),this.el.focus(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,n._modalsOpen--,this._nthModalOpened=0,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this.el.classList.remove("open"),0===n._modalsOpen&&(document.body.style.overflow=""),this.options.dismissible&&(document.removeEventListener("keydown",this._handleKeydownBound),document.removeEventListener("focus",this._handleFocusBound,!0)),i.remove(this.el),i.remove(this.$overlay[0]),this._animateOut(),this}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Modal}},{key:"defaults",get:function(){return e}}]),n}();t._modalsOpen=0,t._count=0,M.Modal=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"modal","M_Modal")}(cash,M.anime),function(o,a){"use strict";var e={inDuration:275,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Materialbox=i).options=o.extend({},n.defaults,e),i.overlayActive=!1,i.doneAnimating=!0,i.placeholder=o("<div></div>").addClass("material-placeholder"),i.originalWidth=0,i.originalHeight=0,i.originInlineStyles=i.$el.attr("style"),i.caption=i.el.getAttribute("data-caption")||"",i.$el.before(i.placeholder),i.placeholder.append(i.$el),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Materialbox=void 0,o(this.placeholder).after(this.el).remove(),this.$el.removeAttr("style")}},{key:"_setupEventHandlers",value:function(){this._handleMaterialboxClickBound=this._handleMaterialboxClick.bind(this),this.el.addEventListener("click",this._handleMaterialboxClickBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleMaterialboxClickBound)}},{key:"_handleMaterialboxClick",value:function(t){!1===this.doneAnimating||this.overlayActive&&this.doneAnimating?this.close():this.open()}},{key:"_handleWindowScroll",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowResize",value:function(){this.overlayActive&&this.close()}},{key:"_handleWindowEscape",value:function(t){27===t.keyCode&&this.doneAnimating&&this.overlayActive&&this.close()}},{key:"_makeAncestorsOverflowVisible",value:function(){this.ancestorsChanged=o();for(var t=this.placeholder[0].parentNode;null!==t&&!o(t).is(document);){var e=o(t);"visible"!==e.css("overflow")&&(e.css("overflow","visible"),void 0===this.ancestorsChanged?this.ancestorsChanged=e:this.ancestorsChanged=this.ancestorsChanged.add(e)),t=t.parentNode}}},{key:"_animateImageIn",value:function(){var t=this,e={targets:this.el,height:[this.originalHeight,this.newHeight],width:[this.originalWidth,this.newWidth],left:M.getDocumentScrollLeft()+this.windowWidth/2-this.placeholder.offset().left-this.newWidth/2,top:M.getDocumentScrollTop()+this.windowHeight/2-this.placeholder.offset().top-this.newHeight/2,duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){t.doneAnimating=!0,"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}};this.maxWidth=this.$el.css("max-width"),this.maxHeight=this.$el.css("max-height"),"none"!==this.maxWidth&&(e.maxWidth=this.newWidth),"none"!==this.maxHeight&&(e.maxHeight=this.newHeight),a(e)}},{key:"_animateImageOut",value:function(){var t=this,e={targets:this.el,width:this.originalWidth,height:this.originalHeight,left:0,top:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.placeholder.css({height:"",width:"",position:"",top:"",left:""}),t.attrWidth&&t.$el.attr("width",t.attrWidth),t.attrHeight&&t.$el.attr("height",t.attrHeight),t.$el.removeAttr("style"),t.originInlineStyles&&t.$el.attr("style",t.originInlineStyles),t.$el.removeClass("active"),t.doneAnimating=!0,t.ancestorsChanged.length&&t.ancestorsChanged.css("overflow",""),"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}};a(e)}},{key:"_updateVars",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.caption=this.el.getAttribute("data-caption")||""}},{key:"open",value:function(){var t=this;this._updateVars(),this.originalWidth=this.el.getBoundingClientRect().width,this.originalHeight=this.el.getBoundingClientRect().height,this.doneAnimating=!1,this.$el.addClass("active"),this.overlayActive=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this.placeholder.css({width:this.placeholder[0].getBoundingClientRect().width+"px",height:this.placeholder[0].getBoundingClientRect().height+"px",position:"relative",top:0,left:0}),this._makeAncestorsOverflowVisible(),this.$el.css({position:"absolute","z-index":1e3,"will-change":"left, top, width, height"}),this.attrWidth=this.$el.attr("width"),this.attrHeight=this.$el.attr("height"),this.attrWidth&&(this.$el.css("width",this.attrWidth+"px"),this.$el.removeAttr("width")),this.attrHeight&&(this.$el.css("width",this.attrHeight+"px"),this.$el.removeAttr("height")),this.$overlay=o('<div id="materialbox-overlay"></div>').css({opacity:0}).one("click",function(){t.doneAnimating&&t.close()}),this.$el.before(this.$overlay);var e=this.$overlay[0].getBoundingClientRect();this.$overlay.css({width:this.windowWidth+"px",height:this.windowHeight+"px",left:-1*e.left+"px",top:-1*e.top+"px"}),a.remove(this.el),a.remove(this.$overlay[0]),a({targets:this.$overlay[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}),""!==this.caption&&(this.$photocaption&&a.remove(this.$photoCaption[0]),this.$photoCaption=o('<div class="materialbox-caption"></div>'),this.$photoCaption.text(this.caption),o("body").append(this.$photoCaption),this.$photoCaption.css({display:"inline"}),a({targets:this.$photoCaption[0],opacity:1,duration:this.options.inDuration,easing:"easeOutQuad"}));var i=0,n=this.originalWidth/this.windowWidth,s=this.originalHeight/this.windowHeight;this.newWidth=0,this.newHeight=0,s<n?(i=this.originalHeight/this.originalWidth,this.newWidth=.9*this.windowWidth,this.newHeight=.9*this.windowWidth*i):(i=this.originalWidth/this.originalHeight,this.newWidth=.9*this.windowHeight*i,this.newHeight=.9*this.windowHeight),this._animateImageIn(),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),this._handleWindowResizeBound=this._handleWindowResize.bind(this),this._handleWindowEscapeBound=this._handleWindowEscape.bind(this),window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleWindowResizeBound),window.addEventListener("keyup",this._handleWindowEscapeBound)}},{key:"close",value:function(){var t=this;this._updateVars(),this.doneAnimating=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),a.remove(this.el),a.remove(this.$overlay[0]),""!==this.caption&&a.remove(this.$photoCaption[0]),window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleWindowResizeBound),window.removeEventListener("keyup",this._handleWindowEscapeBound),a({targets:this.$overlay[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.overlayActive=!1,t.$overlay.remove()}}),this._animateImageOut(),""!==this.caption&&a({targets:this.$photoCaption[0],opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){t.$photoCaption.remove()}})}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Materialbox}},{key:"defaults",get:function(){return e}}]),n}();M.Materialbox=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"materialbox","M_Materialbox")}(cash,M.anime),function(s){"use strict";var e={responsiveThreshold:0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Parallax=i).options=s.extend({},n.defaults,e),i._enabled=window.innerWidth>i.options.responsiveThreshold,i.$img=i.$el.find("img").first(),i.$img.each(function(){this.complete&&s(this).trigger("load")}),i._updateParallax(),i._setupEventHandlers(),i._setupStyles(),n._parallaxes.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){n._parallaxes.splice(n._parallaxes.indexOf(this),1),this.$img[0].style.transform="",this._removeEventHandlers(),this.$el[0].M_Parallax=void 0}},{key:"_setupEventHandlers",value:function(){this._handleImageLoadBound=this._handleImageLoad.bind(this),this.$img[0].addEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(n._handleScrollThrottled=M.throttle(n._handleScroll,5),window.addEventListener("scroll",n._handleScrollThrottled),n._handleWindowResizeThrottled=M.throttle(n._handleWindowResize,5),window.addEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_removeEventHandlers",value:function(){this.$img[0].removeEventListener("load",this._handleImageLoadBound),0===n._parallaxes.length&&(window.removeEventListener("scroll",n._handleScrollThrottled),window.removeEventListener("resize",n._handleWindowResizeThrottled))}},{key:"_setupStyles",value:function(){this.$img[0].style.opacity=1}},{key:"_handleImageLoad",value:function(){this._updateParallax()}},{key:"_updateParallax",value:function(){var t=0<this.$el.height()?this.el.parentNode.offsetHeight:500,e=this.$img[0].offsetHeight-t,i=this.$el.offset().top+t,n=this.$el.offset().top,s=M.getDocumentScrollTop(),o=window.innerHeight,a=e*((s+o-n)/(t+o));this._enabled?s<i&&n<s+o&&(this.$img[0].style.transform="translate3D(-50%, "+a+"px, 0)"):this.$img[0].style.transform=""}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Parallax}},{key:"_handleScroll",value:function(){for(var t=0;t<n._parallaxes.length;t++){var e=n._parallaxes[t];e._updateParallax.call(e)}}},{key:"_handleWindowResize",value:function(){for(var t=0;t<n._parallaxes.length;t++){var e=n._parallaxes[t];e._enabled=window.innerWidth>e.options.responsiveThreshold}}},{key:"defaults",get:function(){return e}}]),n}();t._parallaxes=[],M.Parallax=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"parallax","M_Parallax")}(cash),function(a,s){"use strict";var e={duration:300,onShow:null,swipeable:!1,responsiveThreshold:1/0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tabs=i).options=a.extend({},n.defaults,e),i.$tabLinks=i.$el.children("li.tab").children("a"),i.index=0,i._setupActiveTabLink(),i.options.swipeable?i._setupSwipeableTabs():i._setupNormalTabs(),i._setTabsAndTabWidth(),i._createIndicator(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._indicator.parentNode.removeChild(this._indicator),this.options.swipeable?this._teardownSwipeableTabs():this._teardownNormalTabs(),this.$el[0].M_Tabs=void 0}},{key:"_setupEventHandlers",value:function(){this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound),this._handleTabClickBound=this._handleTabClick.bind(this),this.el.addEventListener("click",this._handleTabClickBound)}},{key:"_removeEventHandlers",value:function(){window.removeEventListener("resize",this._handleWindowResizeBound),this.el.removeEventListener("click",this._handleTabClickBound)}},{key:"_handleWindowResize",value:function(){this._setTabsAndTabWidth(),0!==this.tabWidth&&0!==this.tabsWidth&&(this._indicator.style.left=this._calcLeftPos(this.$activeTabLink)+"px",this._indicator.style.right=this._calcRightPos(this.$activeTabLink)+"px")}},{key:"_handleTabClick",value:function(t){var e=this,i=a(t.target).closest("li.tab"),n=a(t.target).closest("a");if(n.length&&n.parent().hasClass("tab"))if(i.hasClass("disabled"))t.preventDefault();else if(!n.attr("target")){this.$activeTabLink.removeClass("active");var s=this.$content;this.$activeTabLink=n,this.$content=a(M.escapeHash(n[0].hash)),this.$tabLinks=this.$el.children("li.tab").children("a"),this.$activeTabLink.addClass("active");var o=this.index;this.index=Math.max(this.$tabLinks.index(n),0),this.options.swipeable?this._tabsCarousel&&this._tabsCarousel.set(this.index,function(){"function"==typeof e.options.onShow&&e.options.onShow.call(e,e.$content[0])}):this.$content.length&&(this.$content[0].style.display="block",this.$content.addClass("active"),"function"==typeof this.options.onShow&&this.options.onShow.call(this,this.$content[0]),s.length&&!s.is(this.$content)&&(s[0].style.display="none",s.removeClass("active"))),this._setTabsAndTabWidth(),this._animateIndicator(o),t.preventDefault()}}},{key:"_createIndicator",value:function(){var t=this,e=document.createElement("li");e.classList.add("indicator"),this.el.appendChild(e),this._indicator=e,setTimeout(function(){t._indicator.style.left=t._calcLeftPos(t.$activeTabLink)+"px",t._indicator.style.right=t._calcRightPos(t.$activeTabLink)+"px"},0)}},{key:"_setupActiveTabLink",value:function(){this.$activeTabLink=a(this.$tabLinks.filter('[href="'+location.hash+'"]')),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a.active").first()),0===this.$activeTabLink.length&&(this.$activeTabLink=this.$el.children("li.tab").children("a").first()),this.$tabLinks.removeClass("active"),this.$activeTabLink[0].classList.add("active"),this.index=Math.max(this.$tabLinks.index(this.$activeTabLink),0),this.$activeTabLink.length&&(this.$content=a(M.escapeHash(this.$activeTabLink[0].hash)),this.$content.addClass("active"))}},{key:"_setupSwipeableTabs",value:function(){var i=this;window.innerWidth>this.options.responsiveThreshold&&(this.options.swipeable=!1);var n=a();this.$tabLinks.each(function(t){var e=a(M.escapeHash(t.hash));e.addClass("carousel-item"),n=n.add(e)});var t=a('<div class="tabs-content carousel carousel-slider"></div>');n.first().before(t),t.append(n),n[0].style.display="";var e=this.$activeTabLink.closest(".tab").index();this._tabsCarousel=M.Carousel.init(t[0],{fullWidth:!0,noWrap:!0,onCycleTo:function(t){var e=i.index;i.index=a(t).index(),i.$activeTabLink.removeClass("active"),i.$activeTabLink=i.$tabLinks.eq(i.index),i.$activeTabLink.addClass("active"),i._animateIndicator(e),"function"==typeof i.options.onShow&&i.options.onShow.call(i,i.$content[0])}}),this._tabsCarousel.set(e)}},{key:"_teardownSwipeableTabs",value:function(){var t=this._tabsCarousel.$el;this._tabsCarousel.destroy(),t.after(t.children()),t.remove()}},{key:"_setupNormalTabs",value:function(){this.$tabLinks.not(this.$activeTabLink).each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="none")}})}},{key:"_teardownNormalTabs",value:function(){this.$tabLinks.each(function(t){if(t.hash){var e=a(M.escapeHash(t.hash));e.length&&(e[0].style.display="")}})}},{key:"_setTabsAndTabWidth",value:function(){this.tabsWidth=this.$el.width(),this.tabWidth=Math.max(this.tabsWidth,this.el.scrollWidth)/this.$tabLinks.length}},{key:"_calcRightPos",value:function(t){return Math.ceil(this.tabsWidth-t.position().left-t[0].getBoundingClientRect().width)}},{key:"_calcLeftPos",value:function(t){return Math.floor(t.position().left)}},{key:"updateTabIndicator",value:function(){this._setTabsAndTabWidth(),this._animateIndicator(this.index)}},{key:"_animateIndicator",value:function(t){var e=0,i=0;0<=this.index-t?e=90:i=90;var n={targets:this._indicator,left:{value:this._calcLeftPos(this.$activeTabLink),delay:e},right:{value:this._calcRightPos(this.$activeTabLink),delay:i},duration:this.options.duration,easing:"easeOutQuad"};s.remove(this._indicator),s(n)}},{key:"select",value:function(t){var e=this.$tabLinks.filter('[href="#'+t+'"]');e.length&&e.trigger("click")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tabs}},{key:"defaults",get:function(){return e}}]),n}();M.Tabs=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tabs","M_Tabs")}(cash,M.anime),function(d,e){"use strict";var i={exitDelay:200,enterDelay:0,html:null,margin:5,inDuration:250,outDuration:200,position:"bottom",transitionMovement:10},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Tooltip=i).options=d.extend({},n.defaults,e),i.isOpen=!1,i.isHovered=!1,i.isFocused=!1,i._appendTooltipEl(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){d(this.tooltipEl).remove(),this._removeEventHandlers(),this.el.M_Tooltip=void 0}},{key:"_appendTooltipEl",value:function(){var t=document.createElement("div");t.classList.add("material-tooltip"),this.tooltipEl=t;var e=document.createElement("div");e.classList.add("tooltip-content"),e.innerHTML=this.options.html,t.appendChild(e),document.body.appendChild(t)}},{key:"_updateTooltipContent",value:function(){this.tooltipEl.querySelector(".tooltip-content").innerHTML=this.options.html}},{key:"_setupEventHandlers",value:function(){this._handleMouseEnterBound=this._handleMouseEnter.bind(this),this._handleMouseLeaveBound=this._handleMouseLeave.bind(this),this._handleFocusBound=this._handleFocus.bind(this),this._handleBlurBound=this._handleBlur.bind(this),this.el.addEventListener("mouseenter",this._handleMouseEnterBound),this.el.addEventListener("mouseleave",this._handleMouseLeaveBound),this.el.addEventListener("focus",this._handleFocusBound,!0),this.el.addEventListener("blur",this._handleBlurBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("mouseenter",this._handleMouseEnterBound),this.el.removeEventListener("mouseleave",this._handleMouseLeaveBound),this.el.removeEventListener("focus",this._handleFocusBound,!0),this.el.removeEventListener("blur",this._handleBlurBound,!0)}},{key:"open",value:function(t){this.isOpen||(t=void 0===t||void 0,this.isOpen=!0,this.options=d.extend({},this.options,this._getAttributeOptions()),this._updateTooltipContent(),this._setEnterDelayTimeout(t))}},{key:"close",value:function(){this.isOpen&&(this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this._setExitDelayTimeout())}},{key:"_setExitDelayTimeout",value:function(){var t=this;clearTimeout(this._exitDelayTimeout),this._exitDelayTimeout=setTimeout(function(){t.isHovered||t.isFocused||t._animateOut()},this.options.exitDelay)}},{key:"_setEnterDelayTimeout",value:function(t){var e=this;clearTimeout(this._enterDelayTimeout),this._enterDelayTimeout=setTimeout(function(){(e.isHovered||e.isFocused||t)&&e._animateIn()},this.options.enterDelay)}},{key:"_positionTooltip",value:function(){var t,e=this.el,i=this.tooltipEl,n=e.offsetHeight,s=e.offsetWidth,o=i.offsetHeight,a=i.offsetWidth,r=this.options.margin,l=void 0,h=void 0;this.xMovement=0,this.yMovement=0,l=e.getBoundingClientRect().top+M.getDocumentScrollTop(),h=e.getBoundingClientRect().left+M.getDocumentScrollLeft(),"top"===this.options.position?(l+=-o-r,h+=s/2-a/2,this.yMovement=-this.options.transitionMovement):"right"===this.options.position?(l+=n/2-o/2,h+=s+r,this.xMovement=this.options.transitionMovement):"left"===this.options.position?(l+=n/2-o/2,h+=-a-r,this.xMovement=-this.options.transitionMovement):(l+=n+r,h+=s/2-a/2,this.yMovement=this.options.transitionMovement),t=this._repositionWithinScreen(h,l,a,o),d(i).css({top:t.y+"px",left:t.x+"px"})}},{key:"_repositionWithinScreen",value:function(t,e,i,n){var s=M.getDocumentScrollLeft(),o=M.getDocumentScrollTop(),a=t-s,r=e-o,l={left:a,top:r,width:i,height:n},h=this.options.margin+this.options.transitionMovement,d=M.checkWithinContainer(document.body,l,h);return d.left?a=h:d.right&&(a-=a+i-window.innerWidth),d.top?r=h:d.bottom&&(r-=r+n-window.innerHeight),{x:a+s,y:r+o}}},{key:"_animateIn",value:function(){this._positionTooltip(),this.tooltipEl.style.visibility="visible",e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:1,translateX:this.xMovement,translateY:this.yMovement,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_animateOut",value:function(){e.remove(this.tooltipEl),e({targets:this.tooltipEl,opacity:0,translateX:0,translateY:0,duration:this.options.outDuration,easing:"easeOutCubic"})}},{key:"_handleMouseEnter",value:function(){this.isHovered=!0,this.isFocused=!1,this.open(!1)}},{key:"_handleMouseLeave",value:function(){this.isHovered=!1,this.isFocused=!1,this.close()}},{key:"_handleFocus",value:function(){M.tabPressed&&(this.isFocused=!0,this.open(!1))}},{key:"_handleBlur",value:function(){this.isFocused=!1,this.close()}},{key:"_getAttributeOptions",value:function(){var t={},e=this.el.getAttribute("data-tooltip"),i=this.el.getAttribute("data-position");return e&&(t.html=e),i&&(t.position=i),t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Tooltip}},{key:"defaults",get:function(){return i}}]),n}();M.Tooltip=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tooltip","M_Tooltip")}(cash,M.anime),function(i){"use strict";var t=t||{},e=document.querySelectorAll.bind(document);function m(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";");return e}var g={duration:750,show:function(t,e){if(2===t.button)return!1;var i=e||this,n=document.createElement("div");n.className="waves-ripple",i.appendChild(n);var s,o,a,r,l,h,d,u=(h={top:0,left:0},d=(s=i)&&s.ownerDocument,o=d.documentElement,void 0!==s.getBoundingClientRect&&(h=s.getBoundingClientRect()),a=null!==(l=r=d)&&l===l.window?r:9===r.nodeType&&r.defaultView,{top:h.top+a.pageYOffset-o.clientTop,left:h.left+a.pageXOffset-o.clientLeft}),c=t.pageY-u.top,p=t.pageX-u.left,v="scale("+i.clientWidth/100*10+")";"touches"in t&&(c=t.touches[0].pageY-u.top,p=t.touches[0].pageX-u.left),n.setAttribute("data-hold",Date.now()),n.setAttribute("data-scale",v),n.setAttribute("data-x",p),n.setAttribute("data-y",c);var f={top:c+"px",left:p+"px"};n.className=n.className+" waves-notransition",n.setAttribute("style",m(f)),n.className=n.className.replace("waves-notransition",""),f["-webkit-transform"]=v,f["-moz-transform"]=v,f["-ms-transform"]=v,f["-o-transform"]=v,f.transform=v,f.opacity="1",f["-webkit-transition-duration"]=g.duration+"ms",f["-moz-transition-duration"]=g.duration+"ms",f["-o-transition-duration"]=g.duration+"ms",f["transition-duration"]=g.duration+"ms",f["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",f["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",n.setAttribute("style",m(f))},hide:function(t){l.touchup(t);var e=this,i=(e.clientWidth,null),n=e.getElementsByClassName("waves-ripple");if(!(0<n.length))return!1;var s=(i=n[n.length-1]).getAttribute("data-x"),o=i.getAttribute("data-y"),a=i.getAttribute("data-scale"),r=350-(Date.now()-Number(i.getAttribute("data-hold")));r<0&&(r=0),setTimeout(function(){var t={top:o+"px",left:s+"px",opacity:"0","-webkit-transition-duration":g.duration+"ms","-moz-transition-duration":g.duration+"ms","-o-transition-duration":g.duration+"ms","transition-duration":g.duration+"ms","-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a,transform:a};i.setAttribute("style",m(t)),setTimeout(function(){try{e.removeChild(i)}catch(t){return!1}},g.duration)},r)},wrapInput:function(t){for(var e=0;e<t.length;e++){var i=t[e];if("input"===i.tagName.toLowerCase()){var n=i.parentNode;if("i"===n.tagName.toLowerCase()&&-1!==n.className.indexOf("waves-effect"))continue;var s=document.createElement("i");s.className=i.className+" waves-input-wrapper";var o=i.getAttribute("style");o||(o=""),s.setAttribute("style",o),i.className="waves-button-input",i.removeAttribute("style"),n.replaceChild(s,i),s.appendChild(i)}}}},l={touches:0,allowEvent:function(t){var e=!0;return"touchstart"===t.type?l.touches+=1:"touchend"===t.type||"touchcancel"===t.type?setTimeout(function(){0<l.touches&&(l.touches-=1)},500):"mousedown"===t.type&&0<l.touches&&(e=!1),e},touchup:function(t){l.allowEvent(t)}};function n(t){var e=function(t){if(!1===l.allowEvent(t))return null;for(var e=null,i=t.target||t.srcElement;null!==i.parentNode;){if(!(i instanceof SVGElement)&&-1!==i.className.indexOf("waves-effect")){e=i;break}i=i.parentNode}return e}(t);null!==e&&(g.show(t,e),"ontouchstart"in i&&(e.addEventListener("touchend",g.hide,!1),e.addEventListener("touchcancel",g.hide,!1)),e.addEventListener("mouseup",g.hide,!1),e.addEventListener("mouseleave",g.hide,!1),e.addEventListener("dragend",g.hide,!1))}t.displayEffect=function(t){"duration"in(t=t||{})&&(g.duration=t.duration),g.wrapInput(e(".waves-effect")),"ontouchstart"in i&&document.body.addEventListener("touchstart",n,!1),document.body.addEventListener("mousedown",n,!1)},t.attach=function(t){"input"===t.tagName.toLowerCase()&&(g.wrapInput([t]),t=t.parentNode),"ontouchstart"in i&&t.addEventListener("touchstart",n,!1),t.addEventListener("mousedown",n,!1)},i.Waves=t,document.addEventListener("DOMContentLoaded",function(){t.displayEffect()},!1)}(window),function(i,n){"use strict";var t={html:"",displayLength:4e3,inDuration:300,outDuration:375,classes:"",completeCallback:null,activationPercent:.8},e=function(){function s(t){_classCallCheck(this,s),this.options=i.extend({},s.defaults,t),this.message=this.options.html,this.panning=!1,this.timeRemaining=this.options.displayLength,0===s._toasts.length&&s._createContainer(),s._toasts.push(this);var e=this._createToast();(e.M_Toast=this).el=e,this.$el=i(e),this._animateIn(),this._setTimer()}return _createClass(s,[{key:"_createToast",value:function(){var t=document.createElement("div");return t.classList.add("toast"),this.options.classes.length&&i(t).addClass(this.options.classes),("object"==typeof HTMLElement?this.message instanceof HTMLElement:this.message&&"object"==typeof this.message&&null!==this.message&&1===this.message.nodeType&&"string"==typeof this.message.nodeName)?t.appendChild(this.message):this.message.jquery?i(t).append(this.message[0]):t.innerHTML=this.message,s._container.appendChild(t),t}},{key:"_animateIn",value:function(){n({targets:this.el,top:0,opacity:1,duration:this.options.inDuration,easing:"easeOutCubic"})}},{key:"_setTimer",value:function(){var t=this;this.timeRemaining!==1/0&&(this.counterInterval=setInterval(function(){t.panning||(t.timeRemaining-=20),t.timeRemaining<=0&&t.dismiss()},20))}},{key:"dismiss",value:function(){var t=this;window.clearInterval(this.counterInterval);var e=this.el.offsetWidth*this.options.activationPercent;this.wasSwiped&&(this.el.style.transition="transform .05s, opacity .05s",this.el.style.transform="translateX("+e+"px)",this.el.style.opacity=0),n({targets:this.el,opacity:0,marginTop:-40,duration:this.options.outDuration,easing:"easeOutExpo",complete:function(){"function"==typeof t.options.completeCallback&&t.options.completeCallback(),t.$el.remove(),s._toasts.splice(s._toasts.indexOf(t),1),0===s._toasts.length&&s._removeContainer()}})}}],[{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Toast}},{key:"_createContainer",value:function(){var t=document.createElement("div");t.setAttribute("id","toast-container"),t.addEventListener("touchstart",s._onDragStart),t.addEventListener("touchmove",s._onDragMove),t.addEventListener("touchend",s._onDragEnd),t.addEventListener("mousedown",s._onDragStart),document.addEventListener("mousemove",s._onDragMove),document.addEventListener("mouseup",s._onDragEnd),document.body.appendChild(t),s._container=t}},{key:"_removeContainer",value:function(){document.removeEventListener("mousemove",s._onDragMove),document.removeEventListener("mouseup",s._onDragEnd),i(s._container).remove(),s._container=null}},{key:"_onDragStart",value:function(t){if(t.target&&i(t.target).closest(".toast").length){var e=i(t.target).closest(".toast")[0].M_Toast;e.panning=!0,(s._draggedToast=e).el.classList.add("panning"),e.el.style.transition="",e.startingXPos=s._xPos(t),e.time=Date.now(),e.xPos=s._xPos(t)}}},{key:"_onDragMove",value:function(t){if(s._draggedToast){t.preventDefault();var e=s._draggedToast;e.deltaX=Math.abs(e.xPos-s._xPos(t)),e.xPos=s._xPos(t),e.velocityX=e.deltaX/(Date.now()-e.time),e.time=Date.now();var i=e.xPos-e.startingXPos,n=e.el.offsetWidth*e.options.activationPercent;e.el.style.transform="translateX("+i+"px)",e.el.style.opacity=1-Math.abs(i/n)}}},{key:"_onDragEnd",value:function(){if(s._draggedToast){var t=s._draggedToast;t.panning=!1,t.el.classList.remove("panning");var e=t.xPos-t.startingXPos,i=t.el.offsetWidth*t.options.activationPercent;Math.abs(e)>i||1<t.velocityX?(t.wasSwiped=!0,t.dismiss()):(t.el.style.transition="transform .2s, opacity .2s",t.el.style.transform="",t.el.style.opacity=""),s._draggedToast=null}}},{key:"_xPos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientX:t.clientX}},{key:"dismissAll",value:function(){for(var t in s._toasts)s._toasts[t].dismiss()}},{key:"defaults",get:function(){return t}}]),s}();e._toasts=[],e._container=null,e._draggedToast=null,M.Toast=e,M.toast=function(t){return new e(t)}}(cash,M.anime),function(s,o){"use strict";var e={edge:"left",draggable:!0,inDuration:250,outDuration:200,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,preventScrolling:!0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Sidenav=i).id=i.$el.attr("id"),i.options=s.extend({},n.defaults,e),i.isOpen=!1,i.isFixed=i.el.classList.contains("sidenav-fixed"),i.isDragged=!1,i.lastWindowWidth=window.innerWidth,i.lastWindowHeight=window.innerHeight,i._createOverlay(),i._createDragTarget(),i._setupEventHandlers(),i._setupClasses(),i._setupFixed(),n._sidenavs.push(i),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._enableBodyScrolling(),this._overlay.parentNode.removeChild(this._overlay),this.dragTarget.parentNode.removeChild(this.dragTarget),this.el.M_Sidenav=void 0,this.el.style.transform="";var t=n._sidenavs.indexOf(this);0<=t&&n._sidenavs.splice(t,1)}},{key:"_createOverlay",value:function(){var t=document.createElement("div");this._closeBound=this.close.bind(this),t.classList.add("sidenav-overlay"),t.addEventListener("click",this._closeBound),document.body.appendChild(t),this._overlay=t}},{key:"_setupEventHandlers",value:function(){0===n._sidenavs.length&&document.body.addEventListener("click",this._handleTriggerClick),this._handleDragTargetDragBound=this._handleDragTargetDrag.bind(this),this._handleDragTargetReleaseBound=this._handleDragTargetRelease.bind(this),this._handleCloseDragBound=this._handleCloseDrag.bind(this),this._handleCloseReleaseBound=this._handleCloseRelease.bind(this),this._handleCloseTriggerClickBound=this._handleCloseTriggerClick.bind(this),this.dragTarget.addEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.addEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.addEventListener("touchmove",this._handleCloseDragBound),this._overlay.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("touchmove",this._handleCloseDragBound),this.el.addEventListener("touchend",this._handleCloseReleaseBound),this.el.addEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&(this._handleWindowResizeBound=this._handleWindowResize.bind(this),window.addEventListener("resize",this._handleWindowResizeBound))}},{key:"_removeEventHandlers",value:function(){1===n._sidenavs.length&&document.body.removeEventListener("click",this._handleTriggerClick),this.dragTarget.removeEventListener("touchmove",this._handleDragTargetDragBound),this.dragTarget.removeEventListener("touchend",this._handleDragTargetReleaseBound),this._overlay.removeEventListener("touchmove",this._handleCloseDragBound),this._overlay.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("touchmove",this._handleCloseDragBound),this.el.removeEventListener("touchend",this._handleCloseReleaseBound),this.el.removeEventListener("click",this._handleCloseTriggerClickBound),this.isFixed&&window.removeEventListener("resize",this._handleWindowResizeBound)}},{key:"_handleTriggerClick",value:function(t){var e=s(t.target).closest(".sidenav-trigger");if(t.target&&e.length){var i=M.getIdFromTrigger(e[0]),n=document.getElementById(i).M_Sidenav;n&&n.open(e),t.preventDefault()}}},{key:"_startDrag",value:function(t){var e=t.targetTouches[0].clientX;this.isDragged=!0,this._startingXpos=e,this._xPos=this._startingXpos,this._time=Date.now(),this._width=this.el.getBoundingClientRect().width,this._overlay.style.display="block",this._initialScrollTop=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop(),this._verticallyScrolling=!1,o.remove(this.el),o.remove(this._overlay)}},{key:"_dragMoveUpdate",value:function(t){var e=t.targetTouches[0].clientX,i=this.isOpen?this.el.scrollTop:M.getDocumentScrollTop();this.deltaX=Math.abs(this._xPos-e),this._xPos=e,this.velocityX=this.deltaX/(Date.now()-this._time),this._time=Date.now(),this._initialScrollTop!==i&&(this._verticallyScrolling=!0)}},{key:"_handleDragTargetDrag",value:function(t){if(this.options.draggable&&!this._isCurrentlyFixed()&&!this._verticallyScrolling){this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=0<e?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge===i&&(e=0);var n=e,s="translateX(-100%)";"right"===this.options.edge&&(s="translateX(100%)",n=-n),this.percentOpen=Math.min(1,e/this._width),this.el.style.transform=s+" translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleDragTargetRelease",value:function(){this.isDragged&&(.2<this.percentOpen?this.open():this._animateOut(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseDrag",value:function(t){if(this.isOpen){if(!this.options.draggable||this._isCurrentlyFixed()||this._verticallyScrolling)return;this.isDragged||this._startDrag(t),this._dragMoveUpdate(t);var e=this._xPos-this._startingXpos,i=0<e?"right":"left";e=Math.min(this._width,Math.abs(e)),this.options.edge!==i&&(e=0);var n=-e;"right"===this.options.edge&&(n=-n),this.percentOpen=Math.min(1,1-e/this._width),this.el.style.transform="translateX("+n+"px)",this._overlay.style.opacity=this.percentOpen}}},{key:"_handleCloseRelease",value:function(){this.isOpen&&this.isDragged&&(.8<this.percentOpen?this._animateIn():this.close(),this.isDragged=!1,this._verticallyScrolling=!1)}},{key:"_handleCloseTriggerClick",value:function(t){s(t.target).closest(".sidenav-close").length&&!this._isCurrentlyFixed()&&this.close()}},{key:"_handleWindowResize",value:function(){this.lastWindowWidth!==window.innerWidth&&(992<window.innerWidth?this.open():this.close()),this.lastWindowWidth=window.innerWidth,this.lastWindowHeight=window.innerHeight}},{key:"_setupClasses",value:function(){"right"===this.options.edge&&(this.el.classList.add("right-aligned"),this.dragTarget.classList.add("right-aligned"))}},{key:"_removeClasses",value:function(){this.el.classList.remove("right-aligned"),this.dragTarget.classList.remove("right-aligned")}},{key:"_setupFixed",value:function(){this._isCurrentlyFixed()&&this.open()}},{key:"_isCurrentlyFixed",value:function(){return this.isFixed&&992<window.innerWidth}},{key:"_createDragTarget",value:function(){var t=document.createElement("div");t.classList.add("drag-target"),document.body.appendChild(t),this.dragTarget=t}},{key:"_preventBodyScrolling",value:function(){document.body.style.overflow="hidden"}},{key:"_enableBodyScrolling",value:function(){document.body.style.overflow=""}},{key:"open",value:function(){!0!==this.isOpen&&(this.isOpen=!0,"function"==typeof this.options.onOpenStart&&this.options.onOpenStart.call(this,this.el),this._isCurrentlyFixed()?(o.remove(this.el),o({targets:this.el,translateX:0,duration:0,easing:"easeOutQuad"}),this._enableBodyScrolling(),this._overlay.style.display="none"):(this.options.preventScrolling&&this._preventBodyScrolling(),this.isDragged&&1==this.percentOpen||this._animateIn()))}},{key:"close",value:function(){if(!1!==this.isOpen)if(this.isOpen=!1,"function"==typeof this.options.onCloseStart&&this.options.onCloseStart.call(this,this.el),this._isCurrentlyFixed()){var t="left"===this.options.edge?"-105%":"105%";this.el.style.transform="translateX("+t+")"}else this._enableBodyScrolling(),this.isDragged&&0==this.percentOpen?this._overlay.style.display="none":this._animateOut()}},{key:"_animateIn",value:function(){this._animateSidenavIn(),this._animateOverlayIn()}},{key:"_animateSidenavIn",value:function(){var t=this,e="left"===this.options.edge?-1:1;this.isDragged&&(e="left"===this.options.edge?e+this.percentOpen:e-this.percentOpen),o.remove(this.el),o({targets:this.el,translateX:[100*e+"%",0],duration:this.options.inDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onOpenEnd&&t.options.onOpenEnd.call(t,t.el)}})}},{key:"_animateOverlayIn",value:function(){var t=0;this.isDragged?t=this.percentOpen:s(this._overlay).css({display:"block"}),o.remove(this._overlay),o({targets:this._overlay,opacity:[t,1],duration:this.options.inDuration,easing:"easeOutQuad"})}},{key:"_animateOut",value:function(){this._animateSidenavOut(),this._animateOverlayOut()}},{key:"_animateSidenavOut",value:function(){var t=this,e="left"===this.options.edge?-1:1,i=0;this.isDragged&&(i="left"===this.options.edge?e+this.percentOpen:e-this.percentOpen),o.remove(this.el),o({targets:this.el,translateX:[100*i+"%",105*e+"%"],duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t,t.el)}})}},{key:"_animateOverlayOut",value:function(){var t=this;o.remove(this._overlay),o({targets:this._overlay,opacity:0,duration:this.options.outDuration,easing:"easeOutQuad",complete:function(){s(t._overlay).css("display","none")}})}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Sidenav}},{key:"defaults",get:function(){return e}}]),n}();t._sidenavs=[],M.Sidenav=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"sidenav","M_Sidenav")}(cash,M.anime),function(o,a){"use strict";var e={throttle:100,scrollOffset:200,activeClass:"active",getActiveElement:function(t){return'a[href="#'+t+'"]'}},t=function(t){function c(t,e){_classCallCheck(this,c);var i=_possibleConstructorReturn(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,c,t,e));return(i.el.M_ScrollSpy=i).options=o.extend({},c.defaults,e),c._elements.push(i),c._count++,c._increment++,i.tickId=-1,i.id=c._increment,i._setupEventHandlers(),i._handleWindowScroll(),i}return _inherits(c,Component),_createClass(c,[{key:"destroy",value:function(){c._elements.splice(c._elements.indexOf(this),1),c._elementsInView.splice(c._elementsInView.indexOf(this),1),c._visibleElements.splice(c._visibleElements.indexOf(this.$el),1),c._count--,this._removeEventHandlers(),o(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),this.el.M_ScrollSpy=void 0}},{key:"_setupEventHandlers",value:function(){var t=M.throttle(this._handleWindowScroll,200);this._handleThrottledResizeBound=t.bind(this),this._handleWindowScrollBound=this._handleWindowScroll.bind(this),1===c._count&&(window.addEventListener("scroll",this._handleWindowScrollBound),window.addEventListener("resize",this._handleThrottledResizeBound),document.body.addEventListener("click",this._handleTriggerClick))}},{key:"_removeEventHandlers",value:function(){0===c._count&&(window.removeEventListener("scroll",this._handleWindowScrollBound),window.removeEventListener("resize",this._handleThrottledResizeBound),document.body.removeEventListener("click",this._handleTriggerClick))}},{key:"_handleTriggerClick",value:function(t){for(var e=o(t.target),i=c._elements.length-1;0<=i;i--){var n=c._elements[i];if(e.is('a[href="#'+n.$el.attr("id")+'"]')){t.preventDefault();var s=n.$el.offset().top+1;a({targets:[document.documentElement,document.body],scrollTop:s-n.options.scrollOffset,duration:400,easing:"easeOutCubic"});break}}}},{key:"_handleWindowScroll",value:function(){c._ticks++;for(var t=M.getDocumentScrollTop(),e=M.getDocumentScrollLeft(),i=e+window.innerWidth,n=t+window.innerHeight,s=c._findElements(t,i,n,e),o=0;o<s.length;o++){var a=s[o];a.tickId<0&&a._enter(),a.tickId=c._ticks}for(var r=0;r<c._elementsInView.length;r++){var l=c._elementsInView[r],h=l.tickId;0<=h&&h!==c._ticks&&(l._exit(),l.tickId=-1)}c._elementsInView=s}},{key:"_enter",value:function(){(c._visibleElements=c._visibleElements.filter(function(t){return 0!=t.height()}))[0]?(o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),c._visibleElements[0][0].M_ScrollSpy&&this.id<c._visibleElements[0][0].M_ScrollSpy.id?c._visibleElements.unshift(this.$el):c._visibleElements.push(this.$el)):c._visibleElements.push(this.$el),o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).addClass(this.options.activeClass)}},{key:"_exit",value:function(){var e=this;(c._visibleElements=c._visibleElements.filter(function(t){return 0!=t.height()}))[0]&&(o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),(c._visibleElements=c._visibleElements.filter(function(t){return t.attr("id")!=e.$el.attr("id")}))[0]&&o(this.options.getActiveElement(c._visibleElements[0].attr("id"))).addClass(this.options.activeClass))}}],[{key:"init",value:function(t,e){return _get(c.__proto__||Object.getPrototypeOf(c),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_ScrollSpy}},{key:"_findElements",value:function(t,e,i,n){for(var s=[],o=0;o<c._elements.length;o++){var a=c._elements[o],r=t+a.options.scrollOffset||200;if(0<a.$el.height()){var l=a.$el.offset().top,h=a.$el.offset().left,d=h+a.$el.width(),u=l+a.$el.height();!(e<h||d<n||i<l||u<r)&&s.push(a)}}return s}},{key:"defaults",get:function(){return e}}]),c}();t._elements=[],t._elementsInView=[],t._visibleElements=[],t._count=0,t._increment=0,t._ticks=0,M.ScrollSpy=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"scrollSpy","M_ScrollSpy")}(cash,M.anime),function(h){"use strict";var e={data:{},limit:1/0,onAutocomplete:null,minLength:1,sortFunction:function(t,e,i){return t.indexOf(i)-e.indexOf(i)}},t=function(t){function s(t,e){_classCallCheck(this,s);var i=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,s,t,e));return(i.el.M_Autocomplete=i).options=h.extend({},s.defaults,e),i.isOpen=!1,i.count=0,i.activeIndex=-1,i.oldVal,i.$inputField=i.$el.closest(".input-field"),i.$active=h(),i._mousedown=!1,i._setupDropdown(),i._setupEventHandlers(),i}return _inherits(s,Component),_createClass(s,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_Autocomplete=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputBlurBound=this._handleInputBlur.bind(this),this._handleInputKeyupAndFocusBound=this._handleInputKeyupAndFocus.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleContainerMousedownAndTouchstartBound=this._handleContainerMousedownAndTouchstart.bind(this),this._handleContainerMouseupAndTouchendBound=this._handleContainerMouseupAndTouchend.bind(this),this.el.addEventListener("blur",this._handleInputBlurBound),this.el.addEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.addEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("click",this._handleInputClickBound),this.container.addEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.addEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.addEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("blur",this._handleInputBlurBound),this.el.removeEventListener("keyup",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("focus",this._handleInputKeyupAndFocusBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("click",this._handleInputClickBound),this.container.removeEventListener("mousedown",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("mouseup",this._handleContainerMouseupAndTouchendBound),void 0!==window.ontouchstart&&(this.container.removeEventListener("touchstart",this._handleContainerMousedownAndTouchstartBound),this.container.removeEventListener("touchend",this._handleContainerMouseupAndTouchendBound))}},{key:"_setupDropdown",value:function(){var e=this;this.container=document.createElement("ul"),this.container.id="autocomplete-options-"+M.guid(),h(this.container).addClass("autocomplete-content dropdown-content"),this.$inputField.append(this.container),this.el.setAttribute("data-target",this.container.id),this.dropdown=M.Dropdown.init(this.el,{autoFocus:!1,closeOnClick:!1,coverTrigger:!1,onItemClick:function(t){e.selectOption(h(t))}}),this.el.removeEventListener("click",this.dropdown._handleClickBound)}},{key:"_removeDropdown",value:function(){this.container.parentNode.removeChild(this.container)}},{key:"_handleInputBlur",value:function(){this._mousedown||(this.close(),this._resetAutocomplete())}},{key:"_handleInputKeyupAndFocus",value:function(t){"keyup"===t.type&&(s._keydown=!1),this.count=0;var e=this.el.value.toLowerCase();13!==t.keyCode&&38!==t.keyCode&&40!==t.keyCode&&(this.oldVal===e||!M.tabPressed&&"focus"===t.type||this.open(),this.oldVal=e)}},{key:"_handleInputKeydown",value:function(t){s._keydown=!0;var e=t.keyCode,i=void 0,n=h(this.container).children("li").length;e===M.keys.ENTER&&0<=this.activeIndex?(i=h(this.container).children("li").eq(this.activeIndex)).length&&(this.selectOption(i),t.preventDefault()):e!==M.keys.ARROW_UP&&e!==M.keys.ARROW_DOWN||(t.preventDefault(),e===M.keys.ARROW_UP&&0<this.activeIndex&&this.activeIndex--,e===M.keys.ARROW_DOWN&&this.activeIndex<n-1&&this.activeIndex++,this.$active.removeClass("active"),0<=this.activeIndex&&(this.$active=h(this.container).children("li").eq(this.activeIndex),this.$active.addClass("active")))}},{key:"_handleInputClick",value:function(t){this.open()}},{key:"_handleContainerMousedownAndTouchstart",value:function(t){this._mousedown=!0}},{key:"_handleContainerMouseupAndTouchend",value:function(t){this._mousedown=!1}},{key:"_highlight",value:function(t,e){var i=e.find("img"),n=e.text().toLowerCase().indexOf(""+t.toLowerCase()),s=n+t.length-1,o=e.text().slice(0,n),a=e.text().slice(n,s+1),r=e.text().slice(s+1);e.html("<span>"+o+"<span class='highlight'>"+a+"</span>"+r+"</span>"),i.length&&e.prepend(i)}},{key:"_resetCurrentElement",value:function(){this.activeIndex=-1,this.$active.removeClass("active")}},{key:"_resetAutocomplete",value:function(){h(this.container).empty(),this._resetCurrentElement(),this.oldVal=null,this.isOpen=!1,this._mousedown=!1}},{key:"selectOption",value:function(t){var e=t.text().trim();this.el.value=e,this.$el.trigger("change"),this._resetAutocomplete(),this.close(),"function"==typeof this.options.onAutocomplete&&this.options.onAutocomplete.call(this,e)}},{key:"_renderDropdown",value:function(t,i){var n=this;this._resetAutocomplete();var e=[];for(var s in t)if(t.hasOwnProperty(s)&&-1!==s.toLowerCase().indexOf(i)){if(this.count>=this.options.limit)break;var o={data:t[s],key:s};e.push(o),this.count++}if(this.options.sortFunction){e.sort(function(t,e){return n.options.sortFunction(t.key.toLowerCase(),e.key.toLowerCase(),i.toLowerCase())})}for(var a=0;a<e.length;a++){var r=e[a],l=h("<li></li>");r.data?l.append('<img src="'+r.data+'" class="right circle"><span>'+r.key+"</span>"):l.append("<span>"+r.key+"</span>"),h(this.container).append(l),this._highlight(i,l)}}},{key:"open",value:function(){var t=this.el.value.toLowerCase();this._resetAutocomplete(),t.length>=this.options.minLength&&(this.isOpen=!0,this._renderDropdown(this.options.data,t)),this.dropdown.isOpen?this.dropdown.recalculateDimensions():this.dropdown.open()}},{key:"close",value:function(){this.dropdown.close()}},{key:"updateData",value:function(t){var e=this.el.value.toLowerCase();this.options.data=t,this.isOpen&&this._renderDropdown(t,e)}}],[{key:"init",value:function(t,e){return _get(s.__proto__||Object.getPrototypeOf(s),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Autocomplete}},{key:"defaults",get:function(){return e}}]),s}();t._keydown=!1,M.Autocomplete=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"autocomplete","M_Autocomplete")}(cash),function(d){M.updateTextFields=function(){d("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea").each(function(t,e){var i=d(this);0<t.value.length||d(t).is(":focus")||t.autofocus||null!==i.attr("placeholder")?i.siblings("label").addClass("active"):t.validity?i.siblings("label").toggleClass("active",!0===t.validity.badInput):i.siblings("label").removeClass("active")})},M.validate_field=function(t){var e=null!==t.attr("data-length"),i=parseInt(t.attr("data-length")),n=t[0].value.length;0!==n||!1!==t[0].validity.badInput||t.is(":required")?t.hasClass("validate")&&(t.is(":valid")&&e&&n<=i||t.is(":valid")&&!e?(t.removeClass("invalid"),t.addClass("valid")):(t.removeClass("valid"),t.addClass("invalid"))):t.hasClass("validate")&&(t.removeClass("valid"),t.removeClass("invalid"))},M.textareaAutoResize=function(t){if(t instanceof Element&&(t=d(t)),t.length){var e=d(".hiddendiv").first();e.length||(e=d('<div class="hiddendiv common"></div>'),d("body").append(e));var i=t.css("font-family"),n=t.css("font-size"),s=t.css("line-height"),o=t.css("padding-top"),a=t.css("padding-right"),r=t.css("padding-bottom"),l=t.css("padding-left");n&&e.css("font-size",n),i&&e.css("font-family",i),s&&e.css("line-height",s),o&&e.css("padding-top",o),a&&e.css("padding-right",a),r&&e.css("padding-bottom",r),l&&e.css("padding-left",l),t.data("original-height")||t.data("original-height",t.height()),"off"===t.attr("wrap")&&e.css("overflow-wrap","normal").css("white-space","pre"),e.text(t[0].value+"\n");var h=e.html().replace(/\n/g,"<br>");e.html(h),0<t[0].offsetWidth&&0<t[0].offsetHeight?e.css("width",t.width()+"px"):e.css("width",window.innerWidth/2+"px"),t.data("original-height")<=e.innerHeight()?t.css("height",e.innerHeight()+"px"):t[0].value.length<t.data("previous-length")&&t.css("height",t.data("original-height")+"px"),t.data("previous-length",t[0].value.length)}else console.error("No textarea element found")},d(document).ready(function(){var n="input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], textarea";d(document).on("change",n,function(){0===this.value.length&&null===d(this).attr("placeholder")||d(this).siblings("label").addClass("active"),M.validate_field(d(this))}),d(document).ready(function(){M.updateTextFields()}),d(document).on("reset",function(t){var e=d(t.target);e.is("form")&&(e.find(n).removeClass("valid").removeClass("invalid"),e.find(n).each(function(t){this.value.length&&d(this).siblings("label").removeClass("active")}),setTimeout(function(){e.find("select").each(function(){this.M_FormSelect&&d(this).trigger("change")})},0))}),document.addEventListener("focus",function(t){d(t.target).is(n)&&d(t.target).siblings("label, .prefix").addClass("active")},!0),document.addEventListener("blur",function(t){var e=d(t.target);if(e.is(n)){var i=".prefix";0===e[0].value.length&&!0!==e[0].validity.badInput&&null===e.attr("placeholder")&&(i+=", label"),e.siblings(i).removeClass("active"),M.validate_field(e)}},!0);d(document).on("keyup","input[type=radio], input[type=checkbox]",function(t){if(t.which===M.keys.TAB)return d(this).addClass("tabbed"),void d(this).one("blur",function(t){d(this).removeClass("tabbed")})});var t=".materialize-textarea";d(t).each(function(){var t=d(this);t.data("original-height",t.height()),t.data("previous-length",this.value.length),M.textareaAutoResize(t)}),d(document).on("keyup",t,function(){M.textareaAutoResize(d(this))}),d(document).on("keydown",t,function(){M.textareaAutoResize(d(this))}),d(document).on("change",'.file-field input[type="file"]',function(){for(var t=d(this).closest(".file-field").find("input.file-path"),e=d(this)[0].files,i=[],n=0;n<e.length;n++)i.push(e[n].name);t[0].value=i.join(", "),t.trigger("change")})})}(cash),function(s,o){"use strict";var e={indicators:!0,height:400,duration:500,interval:6e3},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Slider=i).options=s.extend({},n.defaults,e),i.$slider=i.$el.find(".slides"),i.$slides=i.$slider.children("li"),i.activeIndex=i.$slides.filter(function(t){return s(t).hasClass("active")}).first().index(),-1!=i.activeIndex&&(i.$active=i.$slides.eq(i.activeIndex)),i._setSliderHeight(),i.$slides.find(".caption").each(function(t){i._animateCaptionIn(t,0)}),i.$slides.find("img").each(function(t){var e="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";s(t).attr("src")!==e&&(s(t).css("background-image",'url("'+s(t).attr("src")+'")'),s(t).attr("src",e))}),i._setupIndicators(),i.$active?i.$active.css("display","block"):(i.$slides.first().addClass("active"),o({targets:i.$slides.first()[0],opacity:1,duration:i.options.duration,easing:"easeOutQuad"}),i.activeIndex=0,i.$active=i.$slides.eq(i.activeIndex),i.options.indicators&&i.$indicators.eq(i.activeIndex).addClass("active")),i.$active.find("img").each(function(t){o({targets:i.$active.find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:i.options.duration,easing:"easeOutQuad"})}),i._setupEventHandlers(),i.start(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.pause(),this._removeIndicators(),this._removeEventHandlers(),this.el.M_Slider=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleIntervalBound=this._handleInterval.bind(this),this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.options.indicators&&this.$indicators.each(function(t){t.addEventListener("click",e._handleIndicatorClickBound)})}},{key:"_removeEventHandlers",value:function(){var e=this;this.options.indicators&&this.$indicators.each(function(t){t.removeEventListener("click",e._handleIndicatorClickBound)})}},{key:"_handleIndicatorClick",value:function(t){var e=s(t.target).index();this.set(e)}},{key:"_handleInterval",value:function(){var t=this.$slider.find(".active").index();this.$slides.length===t+1?t=0:t+=1,this.set(t)}},{key:"_animateCaptionIn",value:function(t,e){var i={targets:t,opacity:0,duration:e,easing:"easeOutQuad"};s(t).hasClass("center-align")?i.translateY=-100:s(t).hasClass("right-align")?i.translateX=100:s(t).hasClass("left-align")&&(i.translateX=-100),o(i)}},{key:"_setSliderHeight",value:function(){this.$el.hasClass("fullscreen")||(this.options.indicators?this.$el.css("height",this.options.height+40+"px"):this.$el.css("height",this.options.height+"px"),this.$slider.css("height",this.options.height+"px"))}},{key:"_setupIndicators",value:function(){var n=this;this.options.indicators&&(this.$indicators=s('<ul class="indicators"></ul>'),this.$slides.each(function(t,e){var i=s('<li class="indicator-item"></li>');n.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children("li.indicator-item"))}},{key:"_removeIndicators",value:function(){this.$el.find("ul.indicators").remove()}},{key:"set",value:function(t){var e=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var i=this.$active.find(".caption");this.$active.removeClass("active"),o({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:"easeOutQuad",complete:function(){e.$slides.not(".active").each(function(t){o({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:"easeOutQuad"})})}}),this._animateCaptionIn(i[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass("active"),this.$indicators.eq(t).addClass("active")),o({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:"easeOutQuad"}),o({targets:this.$slides.eq(t).find(".caption")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:"easeOutQuad"}),this.$slides.eq(t).addClass("active"),this.activeIndex=t,this.start()}}},{key:"pause",value:function(){clearInterval(this.interval)}},{key:"start",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:"next",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:"prev",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:"defaults",get:function(){return e}}]),n}();M.Slider=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"slider","M_Slider")}(cash,M.anime),function(n,s){n(document).on("click",".card",function(t){if(n(this).children(".card-reveal").length){var i=n(t.target).closest(".card");void 0===i.data("initialOverflow")&&i.data("initialOverflow",void 0===i.css("overflow")?"":i.css("overflow"));var e=n(this).find(".card-reveal");n(t.target).is(n(".card-reveal .card-title"))||n(t.target).is(n(".card-reveal .card-title i"))?s({targets:e[0],translateY:0,duration:225,easing:"easeInOutQuad",complete:function(t){var e=t.animatables[0].target;n(e).css({display:"none"}),i.css("overflow",i.data("initialOverflow"))}}):(n(t.target).is(n(".card .activator"))||n(t.target).is(n(".card .activator i")))&&(i.css("overflow","hidden"),e.css({display:"block"}),s({targets:e[0],translateY:"-100%",duration:300,easing:"easeInOutQuad"}))}})}(cash,M.anime),function(h){"use strict";var e={data:[],placeholder:"",secondaryPlaceholder:"",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},t=function(t){function l(t,e){_classCallCheck(this,l);var i=_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l,t,e));return(i.el.M_Chips=i).options=h.extend({},l.defaults,e),i.$el.addClass("chips input-field"),i.chipsData=[],i.$chips=h(),i._setupInput(),i.hasAutocomplete=0<Object.keys(i.options.autocompleteOptions).length,i.$input.attr("id")||i.$input.attr("id",M.guid()),i.options.data.length&&(i.chipsData=i.options.data,i._renderChips(i.chipsData)),i.hasAutocomplete&&i._setupAutocomplete(),i._setPlaceholder(),i._setupLabel(),i._setupEventHandlers(),i}return _inherits(l,Component),_createClass(l,[{key:"getData",value:function(){return this.chipsData}},{key:"destroy",value:function(){this._removeEventHandlers(),this.$chips.remove(),this.el.M_Chips=void 0}},{key:"_setupEventHandlers",value:function(){this._handleChipClickBound=this._handleChipClick.bind(this),this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputFocusBound=this._handleInputFocus.bind(this),this._handleInputBlurBound=this._handleInputBlur.bind(this),this.el.addEventListener("click",this._handleChipClickBound),document.addEventListener("keydown",l._handleChipsKeydown),document.addEventListener("keyup",l._handleChipsKeyup),this.el.addEventListener("blur",l._handleChipsBlur,!0),this.$input[0].addEventListener("focus",this._handleInputFocusBound),this.$input[0].addEventListener("blur",this._handleInputBlurBound),this.$input[0].addEventListener("keydown",this._handleInputKeydownBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleChipClickBound),document.removeEventListener("keydown",l._handleChipsKeydown),document.removeEventListener("keyup",l._handleChipsKeyup),this.el.removeEventListener("blur",l._handleChipsBlur,!0),this.$input[0].removeEventListener("focus",this._handleInputFocusBound),this.$input[0].removeEventListener("blur",this._handleInputBlurBound),this.$input[0].removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleChipClick",value:function(t){var e=h(t.target).closest(".chip"),i=h(t.target).is(".close");if(e.length){var n=e.index();i?(this.deleteChip(n),this.$input[0].focus()):this.selectChip(n)}else this.$input[0].focus()}},{key:"_handleInputFocus",value:function(){this.$el.addClass("focus")}},{key:"_handleInputBlur",value:function(){this.$el.removeClass("focus")}},{key:"_handleInputKeydown",value:function(t){if(l._keydown=!0,13===t.keyCode){if(this.hasAutocomplete&&this.autocomplete&&this.autocomplete.isOpen)return;t.preventDefault(),this.addChip({tag:this.$input[0].value}),this.$input[0].value=""}else 8!==t.keyCode&&37!==t.keyCode||""!==this.$input[0].value||!this.chipsData.length||(t.preventDefault(),this.selectChip(this.chipsData.length-1))}},{key:"_renderChip",value:function(t){if(t.tag){var e=document.createElement("div"),i=document.createElement("i");if(e.classList.add("chip"),e.textContent=t.tag,e.setAttribute("tabindex",0),h(i).addClass("material-icons close"),i.textContent="close",t.image){var n=document.createElement("img");n.setAttribute("src",t.image),e.insertBefore(n,e.firstChild)}return e.appendChild(i),e}}},{key:"_renderChips",value:function(){this.$chips.remove();for(var t=0;t<this.chipsData.length;t++){var e=this._renderChip(this.chipsData[t]);this.$el.append(e),this.$chips.add(e)}this.$el.append(this.$input[0])}},{key:"_setupAutocomplete",value:function(){var e=this;this.options.autocompleteOptions.onAutocomplete=function(t){e.addChip({tag:t}),e.$input[0].value="",e.$input[0].focus()},this.autocomplete=M.Autocomplete.init(this.$input[0],this.options.autocompleteOptions)}},{key:"_setupInput",value:function(){this.$input=this.$el.find("input"),this.$input.length||(this.$input=h("<input></input>"),this.$el.append(this.$input)),this.$input.addClass("input")}},{key:"_setupLabel",value:function(){this.$label=this.$el.find("label"),this.$label.length&&this.$label.setAttribute("for",this.$input.attr("id"))}},{key:"_setPlaceholder",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?h(this.$input).prop("placeholder",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&h(this.$input).prop("placeholder",this.options.secondaryPlaceholder)}},{key:"_isValid",value:function(t){if(t.hasOwnProperty("tag")&&""!==t.tag){for(var e=!1,i=0;i<this.chipsData.length;i++)if(this.chipsData[i].tag===t.tag){e=!0;break}return!e}return!1}},{key:"addChip",value:function(t){if(this._isValid(t)&&!(this.chipsData.length>=this.options.limit)){var e=this._renderChip(t);this.$chips.add(e),this.chipsData.push(t),h(this.$input).before(e),this._setPlaceholder(),"function"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,e)}}},{key:"deleteChip",value:function(t){var e=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter(function(t){return 0<=h(t).index()}),this.chipsData.splice(t,1),this._setPlaceholder(),"function"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,e[0])}},{key:"selectChip",value:function(t){var e=this.$chips.eq(t);(this._selectedChip=e)[0].focus(),"function"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:"init",value:function(t,e){return _get(l.__proto__||Object.getPrototypeOf(l),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:"_handleChipsKeydown",value:function(t){l._keydown=!0;var e=h(t.target).closest(".chips"),i=t.target&&e.length;if(!h(t.target).is("input, textarea")&&i){var n=e[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var s=n.chipsData.length;if(n._selectedChip){var o=n._selectedChip.index();n.deleteChip(o),n._selectedChip=null,s=Math.max(o-1,0)}n.chipsData.length&&n.selectChip(s)}else if(37===t.keyCode){if(n._selectedChip){var a=n._selectedChip.index()-1;if(a<0)return;n.selectChip(a)}}else if(39===t.keyCode&&n._selectedChip){var r=n._selectedChip.index()+1;r>=n.chipsData.length?n.$input[0].focus():n.selectChip(r)}}}},{key:"_handleChipsKeyup",value:function(t){l._keydown=!1}},{key:"_handleChipsBlur",value:function(t){l._keydown||(h(t.target).closest(".chips")[0].M_Chips._selectedChip=null)}},{key:"defaults",get:function(){return e}}]),l}();t._keydown=!1,M.Chips=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"chips","M_Chips"),h(document).ready(function(){h(document.body).on("click",".chip .close",function(){var t=h(this).closest(".chips");t.length&&t[0].M_Chips||h(this).closest(".chip").remove()})})}(cash),function(s){"use strict";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Pushpin=i).options=s.extend({},n.defaults,e),i.originalOffset=i.el.offsetTop,n._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:"_setupEventHandlers",value:function(){document.addEventListener("scroll",n._updateElements)}},{key:"_removeEventHandlers",value:function(){document.removeEventListener("scroll",n._updateElements)}},{key:"_updatePosition",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains("pinned")&&(this._removePinClasses(),this.el.style.top=this.options.offset+"px",this.el.classList.add("pinned"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pinned")),t<this.options.top&&!this.el.classList.contains("pin-top")&&(this._removePinClasses(),this.el.style.top=0,this.el.classList.add("pin-top"),"function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-top")),t>this.options.bottom&&!this.el.classList.contains("pin-bottom")&&(this._removePinClasses(),this.el.classList.add("pin-bottom"),this.el.style.top=this.options.bottom-this.originalOffset+"px","function"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,"pin-bottom"))}},{key:"_removePinClasses",value:function(){this.el.classList.remove("pin-top"),this.el.classList.remove("pinned"),this.el.classList.remove("pin-bottom")}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:"_updateElements",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:"defaults",get:function(){return e}}]),n}();t._pushpins=[],M.Pushpin=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"pushpin","M_Pushpin")}(cash),function(r,s){"use strict";var e={direction:"top",hoverEnabled:!0,toolbarEnabled:!1};r.fn.reverse=[].reverse;var t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_FloatingActionButton=i).options=r.extend({},n.defaults,e),i.isOpen=!1,i.$anchor=i.$el.children("a").first(),i.$menu=i.$el.children("ul").first(),i.$floatingBtns=i.$el.find("ul .btn-floating"),i.$floatingBtnsReverse=i.$el.find("ul .btn-floating").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass("direction-"+i.options.direction),"top"===i.options.direction?i.offsetY=40:"right"===i.options.direction?i.offsetX=-40:"bottom"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:"_setupEventHandlers",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener("mouseenter",this._handleOpenBound),this.el.addEventListener("mouseleave",this._handleCloseBound)):this.el.addEventListener("click",this._handleFABClickBound)}},{key:"_removeEventHandlers",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener("mouseenter",this._handleOpenBound),this.el.removeEventListener("mouseleave",this._handleCloseBound)):this.el.removeEventListener("click",this._handleFABClickBound)}},{key:"_handleFABClick",value:function(){this.isOpen?this.close():this.open()}},{key:"_handleDocumentClick",value:function(t){r(t.target).closest(this.$menu).length||this.close()}},{key:"open",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:"close",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener("scroll",this._handleCloseBound,!0),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:"_animateInFAB",value:function(){var e=this;this.$el.addClass("active");var i=0;this.$floatingBtnsReverse.each(function(t){s({targets:t,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:"easeInOutQuad"}),i+=40})}},{key:"_animateOutFAB",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){s.remove(t),s({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:"easeOutQuad",complete:function(){e.$el.removeClass("active")}})})}},{key:"_animateInToolbar",value:function(){var t,e=this,i=window.innerWidth,n=window.innerHeight,s=this.el.getBoundingClientRect(),o=r('<div class="fab-backdrop"></div>'),a=this.$anchor.css("background-color");this.$anchor.append(o),this.offsetX=s.left-i/2+s.width/2,this.offsetY=n-s.bottom,t=i/o[0].clientWidth,this.btnBottom=s.bottom,this.btnLeft=s.left,this.btnWidth=s.width,this.$el.addClass("active"),this.$el.css({"text-align":"center",width:"100%",bottom:0,left:0,transform:"translateX("+this.offsetX+"px)",transition:"none"}),this.$anchor.css({transform:"translateY("+-this.offsetY+"px)",transition:"none"}),o.css({"background-color":a}),setTimeout(function(){e.$el.css({transform:"",transition:"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"}),e.$anchor.css({overflow:"visible",transform:"",transition:"transform .2s"}),setTimeout(function(){e.$el.css({overflow:"hidden","background-color":a}),o.css({transform:"scale("+t+")",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"}),e.$menu.children("li").children("a").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener("scroll",e._handleCloseBound,!0),document.body.addEventListener("click",e._handleDocumentClickBound,!0)},100)},0)}},{key:"_animateOutToolbar",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(".fab-backdrop"),s=this.$anchor.css("background-color");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass("active"),this.$el.css({"background-color":"transparent",transition:"none"}),this.$anchor.css({transition:"none"}),n.css({transform:"scale(0)","background-color":s}),this.$menu.children("li").children("a").css({opacity:""}),setTimeout(function(){n.remove(),t.$el.css({"text-align":"",width:"",bottom:"",left:"",overflow:"","background-color":"",transform:"translate3d("+-t.offsetX+"px,0,0)"}),t.$anchor.css({overflow:"",transform:"translate3d(0,"+t.offsetY+"px,0)"}),setTimeout(function(){t.$el.css({transform:"translate3d(0,0,0)",transition:"transform .2s"}),t.$anchor.css({transform:"translate3d(0,0,0)",transition:"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"})},20)},200)}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:"defaults",get:function(){return e}}]),n}();M.FloatingActionButton=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"floatingActionButton","M_FloatingActionButton")}(cash,M.anime),function(g){"use strict";var e={autoClose:!1,format:"mmm dd, yyyy",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok",previousMonth:"‹",nextMonth:"›",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysAbbrev:["S","M","T","W","T","F","S"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},t=function(t){function B(t,e){_classCallCheck(this,B);var i=_possibleConstructorReturn(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,B,t,e));(i.el.M_Datepicker=i).options=g.extend({},B.defaults,e),e&&e.hasOwnProperty("i18n")&&"object"==typeof e.i18n&&(i.options.i18n=g.extend({},B.defaults.i18n,e.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var n=i.options.defaultDate;return B._isDate(n)?i.options.setDefaultDate?(i.setDate(n,!0),i.setInputValue()):i.gotoDate(n):i.gotoDate(new Date),i.isOpen=!1,i}return _inherits(B,Component),_createClass(B,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),g(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:"destroySelects",value:function(){var t=this.calendarEl.querySelector(".orig-select-year");t&&M.FormSelect.getInstance(t).destroy();var e=this.calendarEl.querySelector(".orig-select-month");e&&M.FormSelect.getInstance(e).destroy()}},{key:"_insertHTMLIntoDOM",value:function(){this.options.showClearBtn&&(g(this.clearBtn).css({visibility:""}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modalEl.id="modal-"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:"toString",value:function(t){var e=this;return t=t||this.options.format,B._isDate(this.date)?t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join(""):""}},{key:"setDate",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),B._isDate(t)){var i=this.options.minDate,n=this.options.maxDate;B._isDate(i)&&t<i?t=i:B._isDate(n)&&n<t&&(t=n),this.date=new Date(t.getTime()),this._renderDateDisplay(),B._setToStartOfDay(this.date),this.gotoDate(this.date),e||"function"!=typeof this.options.onSelect||this.options.onSelect.call(this,this.date)}}},{key:"setInputValue",value:function(){this.el.value=this.toString(),this.$el.trigger("change",{firedBy:this})}},{key:"_renderDateDisplay",value:function(){var t=B._isDate(this.date)?this.date:new Date,e=this.options.i18n,i=e.weekdaysShort[t.getDay()],n=e.monthsShort[t.getMonth()],s=t.getDate();this.yearTextEl.innerHTML=t.getFullYear(),this.dateTextEl.innerHTML=i+", "+n+" "+s}},{key:"gotoDate",value:function(t){var e=!0;if(B._isDate(t)){if(this.calendars){var i=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),s=t.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),e=s<i.getTime()||n.getTime()<s}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}]),this.adjustCalendars()}}},{key:"adjustCalendars",value:function(){this.calendars[0]=this.adjustCalendar(this.calendars[0]),this.draw()}},{key:"adjustCalendar",value:function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),11<t.month&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t}},{key:"nextMonth",value:function(){this.calendars[0].month++,this.adjustCalendars()}},{key:"prevMonth",value:function(){this.calendars[0].month--,this.adjustCalendars()}},{key:"render",value:function(t,e,i){var n=this.options,s=new Date,o=B._getDaysInMonth(t,e),a=new Date(t,e,1).getDay(),r=[],l=[];B._setToStartOfDay(s),0<n.firstDay&&(a-=n.firstDay)<0&&(a+=7);for(var h=0===e?11:e-1,d=11===e?0:e+1,u=0===e?t-1:t,c=11===e?t+1:t,p=B._getDaysInMonth(u,h),v=o+a,f=v;7<f;)f-=7;v+=7-f;for(var m=!1,g=0,_=0;g<v;g++){var y=new Date(t,e,g-a+1),k=!!B._isDate(this.date)&&B._compareDates(y,this.date),b=B._compareDates(y,s),w=-1!==n.events.indexOf(y.toDateString()),C=g<a||o+a<=g,E=g-a+1,M=e,O=t,x=n.startRange&&B._compareDates(n.startRange,y),L=n.endRange&&B._compareDates(n.endRange,y),T=n.startRange&&n.endRange&&n.startRange<y&&y<n.endRange;C&&(g<a?(E=p+E,M=h,O=u):(E-=o,M=d,O=c));var $={day:E,month:M,year:O,hasEvent:w,isSelected:k,isToday:b,isDisabled:n.minDate&&y<n.minDate||n.maxDate&&y>n.maxDate||n.disableWeekends&&B._isWeekend(y)||n.disableDayFn&&n.disableDayFn(y),isEmpty:C,isStartRange:x,isEndRange:L,isInRange:T,showDaysInNextAndPreviousMonths:n.showDaysInNextAndPreviousMonths};l.push(this.renderDay($)),7==++_&&(r.push(this.renderRow(l,n.isRTL,m)),_=0,m=!(l=[]))}return this.renderTable(n,r,i)}},{key:"renderDay",value:function(t){var e=[],i="false";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';e.push("is-outside-current-month"),e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),i="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'" aria-selected="'+i+'"><button class="datepicker-day-button" type="button" data-year="'+t.year+'" data-month="'+t.month+'" data-day="'+t.day+'">'+t.day+"</button></td>"}},{key:"renderRow",value:function(t,e,i){return'<tr class="datepicker-row'+(i?" is-selected":"")+'">'+(e?t.reverse():t).join("")+"</tr>"}},{key:"renderTable",value:function(t,e,i){return'<div class="datepicker-table-wrapper"><table cellpadding="0" cellspacing="0" class="datepicker-table" role="grid" aria-labelledby="'+i+'">'+this.renderHead(t)+this.renderBody(e)+"</table></div>"}},{key:"renderHead",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push('<th scope="col"><abbr title="'+this.renderDayName(t,e)+'">'+this.renderDayName(t,e,!0)+"</abbr></th>");return"<thead><tr>"+(t.isRTL?i.reverse():i).join("")+"</tr></thead>"}},{key:"renderBody",value:function(t){return"<tbody>"+t.join("")+"</tbody>"}},{key:"renderTitle",value:function(t,e,i,n,s,o){var a,r,l=void 0,h=void 0,d=void 0,u=this.options,c=i===u.minYear,p=i===u.maxYear,v='<div id="'+o+'" class="datepicker-controls" role="heading" aria-live="assertive">',f=!0,m=!0;for(d=[],l=0;l<12;l++)d.push('<option value="'+(i===s?l-e:12+l-e)+'"'+(l===n?' selected="selected"':"")+(c&&l<u.minMonth||p&&l>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[l]+"</option>");for(a='<select class="datepicker-select orig-select-month" tabindex="-1">'+d.join("")+"</select>",g.isArray(u.yearRange)?(l=u.yearRange[0],h=u.yearRange[1]+1):(l=i-u.yearRange,h=1+i+u.yearRange),d=[];l<h&&l<=u.maxYear;l++)l>=u.minYear&&d.push('<option value="'+l+'" '+(l===i?'selected="selected"':"")+">"+l+"</option>");r='<select class="datepicker-select orig-select-year" tabindex="-1">'+d.join("")+"</select>";v+='<button class="month-prev'+(f?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/><path d="M0-.5h24v24H0z" fill="none"/></svg></button>',v+='<div class="selects-container">',u.showMonthAfterYear?v+=r+a:v+=a+r,v+="</div>",c&&(0===n||u.minMonth>=n)&&(f=!1),p&&(11===n||u.maxMonth<=n)&&(m=!1);return(v+='<button class="month-next'+(m?"":" is-disabled")+'" type="button"><svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></svg></button>')+"</div>"}},{key:"draw",value:function(t){if(this.isOpen||t){var e,i=this.options,n=i.minYear,s=i.maxYear,o=i.minMonth,a=i.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=s&&(this._y=s,!isNaN(a)&&this._m>a&&(this._m=a)),e="datepicker-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e);this.destroySelects(),this.calendarEl.innerHTML=r;var h=this.calendarEl.querySelector(".orig-select-year"),d=this.calendarEl.querySelector(".orig-select-month");M.FormSelect.init(h,{classes:"select-year",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:"select-month",dropdownOptions:{container:document.body,constrainWidth:!1}}),h.addEventListener("change",this._handleYearChange.bind(this)),d.addEventListener("change",this._handleMonthChange.bind(this)),"function"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.el.addEventListener("change",this._handleInputChangeBound),this.calendarEl.addEventListener("click",this._handleCalendarClickBound),this.doneBtn.addEventListener("click",this._finishSelectionBound),this.cancelBtn.addEventListener("click",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener("click",this._handleClearClickBound))}},{key:"_setupVariables",value:function(){var e=this;this.$modalEl=g(B._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(".datepicker-calendar"),this.yearTextEl=this.modalEl.querySelector(".year-text"),this.dateTextEl=this.modalEl.querySelector(".date-text"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(".datepicker-clear")),this.doneBtn=this.modalEl.querySelector(".datepicker-done"),this.cancelBtn=this.modalEl.querySelector(".datepicker-cancel"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?"0":"")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?"0":"")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(""+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound),this.el.removeEventListener("change",this._handleInputChangeBound),this.calendarEl.removeEventListener("click",this._handleCalendarClickBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleCalendarClick",value:function(t){if(this.isOpen){var e=g(t.target);e.hasClass("is-disabled")||(!e.hasClass("datepicker-day-button")||e.hasClass("is-empty")||e.parent().hasClass("is-disabled")?e.closest(".month-prev").length?this.prevMonth():e.closest(".month-next").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute("data-year"),t.target.getAttribute("data-month"),t.target.getAttribute("data-day"))),this.options.autoClose&&this._finishSelection()))}}},{key:"_handleClearClick",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:"_handleMonthChange",value:function(t){this.gotoMonth(t.target.value)}},{key:"_handleYearChange",value:function(t){this.gotoYear(t.target.value)}},{key:"gotoMonth",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:"gotoYear",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:"_handleInputChange",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),B._isDate(e)&&this.setDate(e))}},{key:"renderDayName",value:function(t,e,i){for(e+=t.firstDay;7<=e;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:"_finishSelection",value:function(){this.setInputValue(),this.close()}},{key:"open",value:function(){if(!this.isOpen)return this.isOpen=!0,"function"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:"close",value:function(){if(this.isOpen)return this.isOpen=!1,"function"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:"init",value:function(t,e){return _get(B.__proto__||Object.getPrototypeOf(B),"init",this).call(this,this,t,e)}},{key:"_isDate",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:"_isWeekend",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"_getDaysInMonth",value:function(t,e){return[31,B._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:"_isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"_compareDates",value:function(t,e){return t.getTime()===e.getTime()}},{key:"_setToStartOfDay",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:"defaults",get:function(){return e}}]),B}();t._template=['<div class= "modal datepicker-modal">','<div class="modal-content datepicker-container">','<div class="datepicker-date-display">','<span class="year-text"></span>','<span class="date-text"></span>',"</div>",'<div class="datepicker-calendar-container">','<div class="datepicker-calendar"></div>','<div class="datepicker-footer">','<button class="btn-flat datepicker-clear waves-effect" style="visibility: hidden;" type="button"></button>','<div class="confirmation-btns">','<button class="btn-flat datepicker-cancel waves-effect" type="button"></button>','<button class="btn-flat datepicker-done waves-effect" type="button"></button>',"</div>","</div>","</div>","</div>","</div>"].join(""),M.Datepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"datepicker","M_Datepicker")}(cash),function(h){"use strict";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:"now",fromNow:0,showClearBtn:!1,i18n:{cancel:"Cancel",clear:"Clear",done:"Ok"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},t=function(t){function f(t,e){_classCallCheck(this,f);var i=_possibleConstructorReturn(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f,t,e));return(i.el.M_Timepicker=i).options=h.extend({},f.defaults,e),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return _inherits(f,Component),_createClass(f,[{key:"destroy",value:function(){this._removeEventHandlers(),this.modal.destroy(),h(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:"_setupEventHandlers",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener("click",this._handleInputClickBound),this.el.addEventListener("keydown",this._handleInputKeydownBound),this.plate.addEventListener("mousedown",this._handleClockClickStartBound),this.plate.addEventListener("touchstart",this._handleClockClickStartBound),h(this.spanHours).on("click",this.showView.bind(this,"hours")),h(this.spanMinutes).on("click",this.showView.bind(this,"minutes"))}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleInputClickBound),this.el.removeEventListener("keydown",this._handleInputKeydownBound)}},{key:"_handleInputClick",value:function(){this.open()}},{key:"_handleInputKeydown",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:"_handleClockClickStart",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,n=e.top;this.x0=i+this.options.dialRadius,this.y0=n+this.options.dialRadius,this.moved=!1;var s=f._Pos(t);this.dx=s.x-this.x0,this.dy=s.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener("mousemove",this._handleDocumentClickMoveBound),document.addEventListener("touchmove",this._handleDocumentClickMoveBound),document.addEventListener("mouseup",this._handleDocumentClickEndBound),document.addEventListener("touchend",this._handleDocumentClickEndBound)}},{key:"_handleDocumentClickMove",value:function(t){t.preventDefault();var e=f._Pos(t),i=e.x-this.x0,n=e.y-this.y0;this.moved=!0,this.setHand(i,n,!1,!0)}},{key:"_handleDocumentClickEnd",value:function(t){var e=this;t.preventDefault(),document.removeEventListener("mouseup",this._handleDocumentClickEndBound),document.removeEventListener("touchend",this._handleDocumentClickEndBound);var i=f._Pos(t),n=i.x-this.x0,s=i.y-this.y0;this.moved&&n===this.dx&&s===this.dy&&this.setHand(n,s),"hours"===this.currentView?this.showView("minutes",this.options.duration/2):this.options.autoClose&&(h(this.minutesView).addClass("timepicker-dial-out"),setTimeout(function(){e.done()},this.options.duration/2)),"function"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener("mousemove",this._handleDocumentClickMoveBound),document.removeEventListener("touchmove",this._handleDocumentClickMoveBound)}},{key:"_insertHTMLIntoDOM",value:function(){this.$modalEl=h(f._template),this.modalEl=this.$modalEl[0],this.modalEl.id="modal-"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:"_setupModal",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){"function"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t),t.isOpen=!1}})}},{key:"_setupVariables",value:function(){this.currentView="hours",this.vibrate=navigator.vibrate?"vibrate":navigator.webkitVibrate?"webkitVibrate":null,this._canvas=this.modalEl.querySelector(".timepicker-canvas"),this.plate=this.modalEl.querySelector(".timepicker-plate"),this.hoursView=this.modalEl.querySelector(".timepicker-hours"),this.minutesView=this.modalEl.querySelector(".timepicker-minutes"),this.spanHours=this.modalEl.querySelector(".timepicker-span-hours"),this.spanMinutes=this.modalEl.querySelector(".timepicker-span-minutes"),this.spanAmPm=this.modalEl.querySelector(".timepicker-span-am-pm"),this.footer=this.modalEl.querySelector(".timepicker-footer"),this.amOrPm="PM"}},{key:"_pickerSetup",value:function(){var t=h('<button class="btn-flat timepicker-clear waves-effect" style="visibility: hidden;" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.clear+"</button>").appendTo(this.footer).on("click",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:""});var e=h('<div class="confirmation-btns"></div>');h('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.cancel+"</button>").appendTo(e).on("click",this.close.bind(this)),h('<button class="btn-flat timepicker-close waves-effect" type="button" tabindex="'+(this.options.twelveHour?"3":"1")+'">'+this.options.i18n.done+"</button>").appendTo(e).on("click",this.done.bind(this)),e.appendTo(this.footer)}},{key:"_clockSetup",value:function(){this.options.twelveHour&&(this.$amBtn=h('<div class="am-btn">AM</div>'),this.$pmBtn=h('<div class="pm-btn">PM</div>'),this.$amBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on("click",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:"_buildSVGClock",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,n=f._createSVGEl("svg");n.setAttribute("class","timepicker-svg"),n.setAttribute("width",i),n.setAttribute("height",i);var s=f._createSVGEl("g");s.setAttribute("transform","translate("+t+","+t+")");var o=f._createSVGEl("circle");o.setAttribute("class","timepicker-canvas-bearing"),o.setAttribute("cx",0),o.setAttribute("cy",0),o.setAttribute("r",4);var a=f._createSVGEl("line");a.setAttribute("x1",0),a.setAttribute("y1",0);var r=f._createSVGEl("circle");r.setAttribute("class","timepicker-canvas-bg"),r.setAttribute("r",e),s.appendChild(a),s.appendChild(r),s.appendChild(o),n.appendChild(s),this._canvas.appendChild(n),this.hand=a,this.bg=r,this.bearing=o,this.g=s}},{key:"_buildHoursView",value:function(){var t=h('<div class="timepicker-tick"></div>');if(this.options.twelveHour)for(var e=1;e<13;e+=1){var i=t.clone(),n=e/6*Math.PI,s=this.options.outerRadius;i.css({left:this.options.dialRadius+Math.sin(n)*s-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*s-this.options.tickRadius+"px"}),i.html(0===e?"00":e),this.hoursView.appendChild(i[0])}else for(var o=0;o<24;o+=1){var a=t.clone(),r=o/6*Math.PI,l=0<o&&o<13?this.options.innerRadius:this.options.outerRadius;a.css({left:this.options.dialRadius+Math.sin(r)*l-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(r)*l-this.options.tickRadius+"px"}),a.html(0===o?"00":o),this.hoursView.appendChild(a[0])}}},{key:"_buildMinutesView",value:function(){for(var t=h('<div class="timepicker-tick"></div>'),e=0;e<60;e+=5){var i=t.clone(),n=e/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(n)*this.options.outerRadius-this.options.tickRadius+"px",top:this.options.dialRadius-Math.cos(n)*this.options.outerRadius-this.options.tickRadius+"px"}),i.html(f._addLeadingZero(e)),this.minutesView.appendChild(i[0])}}},{key:"_handleAmPmClick",value:function(t){var e=h(t.target);this.amOrPm=e.hasClass("am-btn")?"AM":"PM",this._updateAmPmView()}},{key:"_updateAmPmView",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass("text-primary","AM"===this.amOrPm),this.$pmBtn.toggleClass("text-primary","PM"===this.amOrPm))}},{key:"_updateTimeFromInput",value:function(){var t=((this.el.value||this.options.defaultTime||"")+"").split(":");if(this.options.twelveHour&&void 0!==t[1]&&(0<t[1].toUpperCase().indexOf("AM")?this.amOrPm="AM":this.amOrPm="PM",t[1]=t[1].replace("AM","").replace("PM","")),"now"===t[0]){var e=new Date(+new Date+this.options.fromNow);t=[e.getHours(),e.getMinutes()],this.options.twelveHour&&(this.amOrPm=12<=t[0]&&t[0]<24?"PM":"AM")}this.hours=+t[0]||0,this.minutes=+t[1]||0,this.spanHours.innerHTML=this.hours,this.spanMinutes.innerHTML=f._addLeadingZero(this.minutes),this._updateAmPmView()}},{key:"showView",value:function(t,e){"minutes"===t&&h(this.hoursView).css("visibility");var i="hours"===t,n=i?this.hoursView:this.minutesView,s=i?this.minutesView:this.hoursView;this.currentView=t,h(this.spanHours).toggleClass("text-primary",i),h(this.spanMinutes).toggleClass("text-primary",!i),s.classList.add("timepicker-dial-out"),h(n).css("visibility","visible").removeClass("timepicker-dial-out"),this.resetClock(e),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){h(s).css("visibility","hidden")},this.options.duration)}},{key:"resetClock",value:function(t){var e=this.currentView,i=this[e],n="hours"===e,s=i*(Math.PI/(n?6:30)),o=n&&0<i&&i<13?this.options.innerRadius:this.options.outerRadius,a=Math.sin(s)*o,r=-Math.cos(s)*o,l=this;t?(h(this.canvas).addClass("timepicker-canvas-out"),setTimeout(function(){h(l.canvas).removeClass("timepicker-canvas-out"),l.setHand(a,r)},t)):this.setHand(a,r)}},{key:"setHand",value:function(t,e,i){var n=this,s=Math.atan2(t,-e),o="hours"===this.currentView,a=Math.PI/(o||i?6:30),r=Math.sqrt(t*t+e*e),l=o&&r<(this.options.outerRadius+this.options.innerRadius)/2,h=l?this.options.innerRadius:this.options.outerRadius;this.options.twelveHour&&(h=this.options.outerRadius),s<0&&(s=2*Math.PI+s);var d=Math.round(s/a);s=d*a,this.options.twelveHour?o?0===d&&(d=12):(i&&(d*=5),60===d&&(d=0)):o?(12===d&&(d=0),d=l?0===d?12:d:0===d?0:d+12):(i&&(d*=5),60===d&&(d=0)),this[this.currentView]!==d&&this.vibrate&&this.options.vibrate&&(this.vibrateTimer||(navigator[this.vibrate](10),this.vibrateTimer=setTimeout(function(){n.vibrateTimer=null},100))),this[this.currentView]=d,o?this.spanHours.innerHTML=d:this.spanMinutes.innerHTML=f._addLeadingZero(d);var u=Math.sin(s)*(h-this.options.tickRadius),c=-Math.cos(s)*(h-this.options.tickRadius),p=Math.sin(s)*h,v=-Math.cos(s)*h;this.hand.setAttribute("x2",u),this.hand.setAttribute("y2",c),this.bg.setAttribute("cx",p),this.bg.setAttribute("cy",v)}},{key:"open",value:function(){this.isOpen||(this.isOpen=!0,this._updateTimeFromInput(),this.showView("hours"),this.modal.open())}},{key:"close",value:function(){this.isOpen&&(this.isOpen=!1,this.modal.close())}},{key:"done",value:function(t,e){var i=this.el.value,n=e?"":f._addLeadingZero(this.hours)+":"+f._addLeadingZero(this.minutes);this.time=n,!e&&this.options.twelveHour&&(n=n+" "+this.amOrPm),(this.el.value=n)!==i&&this.$el.trigger("change"),this.close(),this.el.focus()}},{key:"clear",value:function(){this.done(null,!0)}}],[{key:"init",value:function(t,e){return _get(f.__proto__||Object.getPrototypeOf(f),"init",this).call(this,this,t,e)}},{key:"_addLeadingZero",value:function(t){return(t<10?"0":"")+t}},{key:"_createSVGEl",value:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}},{key:"_Pos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?{x:t.targetTouches[0].clientX,y:t.targetTouches[0].clientY}:{x:t.clientX,y:t.clientY}}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Timepicker}},{key:"defaults",get:function(){return e}}]),f}();t._template=['<div class= "modal timepicker-modal">','<div class="modal-content timepicker-container">','<div class="timepicker-digital-display">','<div class="timepicker-text-container">','<div class="timepicker-display-column">','<span class="timepicker-span-hours text-primary"></span>',":",'<span class="timepicker-span-minutes"></span>',"</div>",'<div class="timepicker-display-column timepicker-display-am-pm">','<div class="timepicker-span-am-pm"></div>',"</div>","</div>","</div>",'<div class="timepicker-analog-display">','<div class="timepicker-plate">','<div class="timepicker-canvas"></div>','<div class="timepicker-dial timepicker-hours"></div>','<div class="timepicker-dial timepicker-minutes timepicker-dial-out"></div>',"</div>",'<div class="timepicker-footer"></div>',"</div>","</div>","</div>"].join(""),M.Timepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"timepicker","M_Timepicker")}(cash),function(s){"use strict";var e={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_CharacterCounter=i).options=s.extend({},n.defaults,e),i.isInvalid=!1,i.isValidLength=!1,i._setupCounter(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:"_setupEventHandlers",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener("focus",this._handleUpdateCounterBound,!0),this.el.addEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("focus",this._handleUpdateCounterBound,!0),this.el.removeEventListener("input",this._handleUpdateCounterBound,!0)}},{key:"_setupCounter",value:function(){this.counterEl=document.createElement("span"),s(this.counterEl).addClass("character-counter").css({float:"right","font-size":"12px",height:1}),this.$el.parent().append(this.counterEl)}},{key:"_removeCounter",value:function(){s(this.counterEl).remove()}},{key:"updateCounter",value:function(){var t=+this.$el.attr("data-length"),e=this.el.value.length;this.isValidLength=e<=t;var i=e;t&&(i+="/"+t,this._validateInput()),s(this.counterEl).html(i)}},{key:"_validateInput",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass("invalid")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass("valid"),this.$el.addClass("invalid"))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:"defaults",get:function(){return e}}]),n}();M.CharacterCounter=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"characterCounter","M_CharacterCounter")}(cash),function(b){"use strict";var e={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},t=function(t){function i(t,e){_classCallCheck(this,i);var n=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,e));return(n.el.M_Carousel=n).options=b.extend({},i.defaults,e),n.hasMultipleSlides=1<n.$el.find(".carousel-item").length,n.showIndicators=n.options.indicators&&n.hasMultipleSlides,n.noWrap=n.options.noWrap||!n.hasMultipleSlides,n.pressed=!1,n.dragged=!1,n.offset=n.target=0,n.images=[],n.itemWidth=n.$el.find(".carousel-item").first().innerWidth(),n.itemHeight=n.$el.find(".carousel-item").first().innerHeight(),n.dim=2*n.itemWidth+n.options.padding||1,n._autoScrollBound=n._autoScroll.bind(n),n._trackBound=n._track.bind(n),n.options.fullWidth&&(n.options.dist=0,n._setCarouselHeight(),n.showIndicators&&n.$el.find(".carousel-fixed-item").addClass("with-indicators")),n.$indicators=b('<ul class="indicators"></ul>'),n.$el.find(".carousel-item").each(function(t,e){if(n.images.push(t),n.showIndicators){var i=b('<li class="indicator-item"></li>');0===e&&i[0].classList.add("active"),n.$indicators.append(i)}}),n.showIndicators&&n.$el.append(n.$indicators),n.count=n.images.length,n.options.numVisible=Math.min(n.count,n.options.numVisible),n.xform="transform",["webkit","Moz","O","ms"].every(function(t){var e=t+"Transform";return void 0===document.body.style[e]||(n.xform=e,!1)}),n._setupEventHandlers(),n._scroll(n.offset),n}return _inherits(i,Component),_createClass(i,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:"_setupEventHandlers",value:function(){var i=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener("touchstart",this._handleCarouselTapBound),this.el.addEventListener("touchmove",this._handleCarouselDragBound),this.el.addEventListener("touchend",this._handleCarouselReleaseBound)),this.el.addEventListener("mousedown",this._handleCarouselTapBound),this.el.addEventListener("mousemove",this._handleCarouselDragBound),this.el.addEventListener("mouseup",this._handleCarouselReleaseBound),this.el.addEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.addEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(".indicator-item").each(function(t,e){t.addEventListener("click",i._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){var i=this;void 0!==window.ontouchstart&&(this.el.removeEventListener("touchstart",this._handleCarouselTapBound),this.el.removeEventListener("touchmove",this._handleCarouselDragBound),this.el.removeEventListener("touchend",this._handleCarouselReleaseBound)),this.el.removeEventListener("mousedown",this._handleCarouselTapBound),this.el.removeEventListener("mousemove",this._handleCarouselDragBound),this.el.removeEventListener("mouseup",this._handleCarouselReleaseBound),this.el.removeEventListener("mouseleave",this._handleCarouselReleaseBound),this.el.removeEventListener("click",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(".indicator-item").each(function(t,e){t.removeEventListener("click",i._handleIndicatorClickBound)}),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleCarouselTap",value:function(t){"mousedown"===t.type&&b(t.target).is("img")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:"_handleCarouselDrag",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(2<n||n<-2)&&(this.dragged=!0,this.reference=e,this._scroll(this.offset+n));else{if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;this.verticalDragged=!0}if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1}},{key:"_handleCarouselRelease",value:function(t){if(this.pressed)return this.pressed=!1,clearInterval(this.ticker),this.target=this.offset,(10<this.velocity||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude),this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:"_handleCarouselClick",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var e=b(t.target).closest(".carousel-item").index();0!==this._wrap(this.center)-e&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(e)}}},{key:"_handleIndicatorClick",value:function(t){t.stopPropagation();var e=b(t.target).closest(".indicator-item");e.length&&this._cycleTo(e.index())}},{key:"_handleResize",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(".carousel-item").first().innerWidth(),this.imageHeight=this.$el.find(".carousel-item.active").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:"_setCarouselHeight",value:function(t){var i=this,e=this.$el.find(".carousel-item.active").length?this.$el.find(".carousel-item.active").first():this.$el.find(".carousel-item").first(),n=e.find("img").first();if(n.length)if(n[0].complete){var s=n.height();if(0<s)this.$el.css("height",s+"px");else{var o=n[0].naturalWidth,a=n[0].naturalHeight,r=this.$el.width()/o*a;this.$el.css("height",r+"px")}}else n.one("load",function(t,e){i.$el.css("height",t.offsetHeight+"px")});else if(!t){var l=e.height();this.$el.css("height",l+"px")}}},{key:"_xpos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientX:t.clientX}},{key:"_ypos",value:function(t){return t.targetTouches&&1<=t.targetTouches.length?t.targetTouches[0].clientY:t.clientY}},{key:"_wrap",value:function(t){return t>=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:"_track",value:function(){var t,e,i,n;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:"_autoScroll",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,2<(e=this.amplitude*Math.exp(-t/this.options.duration))||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:"_scroll",value:function(t){var e=this;this.$el.hasClass("scrolling")||this.el.classList.add("scrolling"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){e.$el.removeClass("scrolling")},this.options.duration);var i,n,s,o,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center,p=1/this.options.numVisible;if(this.offset="number"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(s=(n=this.offset-this.center*this.dim)<0?1:-1)*n*2/this.dim,i=this.count>>1,this.options.fullWidth?(l="translateX(0)",u=1):(l="translateX("+(this.el.clientWidth-this.itemWidth)/2+"px) ",l+="translateY("+(this.el.clientHeight-this.itemHeight)/2+"px)",u=1-p*o),this.showIndicators){var v=this.center%this.count,f=this.$indicators.find(".indicator-item.active");f.index()!==v&&(f.removeClass("active"),this.$indicators.find(".indicator-item").eq(v)[0].classList.add("active"))}if(!this.noWrap||0<=this.center&&this.center<this.count){r=this.images[this._wrap(this.center)],b(r).hasClass("active")||(this.$el.find(".carousel-item").removeClass("active"),r.classList.add("active"));var m=l+" translateX("+-n/2+"px) translateX("+s*this.options.shift*o*a+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(r,u,0,m)}for(a=1;a<=i;++a){if(this.options.fullWidth?(h=this.options.dist,d=a===i&&n<0?1-o:1):(h=this.options.dist*(2*a+o*s),d=1-p*(2*a+o*s)),!this.noWrap||this.center+a<this.count){r=this.images[this._wrap(this.center+a)];var g=l+" translateX("+(this.options.shift+(this.dim*a-n)/2)+"px) translateZ("+h+"px)";this._updateItemStyle(r,d,-a,g)}if(this.options.fullWidth?(h=this.options.dist,d=a===i&&0<n?1-o:1):(h=this.options.dist*(2*a-o*s),d=1-p*(2*a-o*s)),!this.noWrap||0<=this.center-a){r=this.images[this._wrap(this.center-a)];var _=l+" translateX("+(-this.options.shift+(-this.dim*a-n)/2)+"px) translateZ("+h+"px)";this._updateItemStyle(r,d,-a,_)}}if(!this.noWrap||0<=this.center&&this.center<this.count){r=this.images[this._wrap(this.center)];var y=l+" translateX("+-n/2+"px) translateX("+s*this.options.shift*o+"px) translateZ("+this.options.dist*o+"px)";this._updateItemStyle(r,u,0,y)}var k=this.$el.find(".carousel-item").eq(this._wrap(this.center));c!==this.center&&"function"==typeof this.options.onCycleTo&&this.options.onCycleTo.call(this,k[0],this.dragged),"function"==typeof this.oneTimeCallback&&(this.oneTimeCallback.call(this,k[0],this.dragged),this.oneTimeCallback=null)}},{key:"_updateItemStyle",value:function(t,e,i,n){t.style[this.xform]=n,t.style.zIndex=i,t.style.opacity=e,t.style.visibility="visible"}},{key:"_cycleTo",value:function(t,e){var i=this.center%this.count-t;this.noWrap||(i<0?Math.abs(i+this.count)<Math.abs(i)&&(i+=this.count):0<i&&Math.abs(i-this.count)<i&&(i-=this.count)),this.target=this.dim*Math.round(this.offset/this.dim),i<0?this.target+=this.dim*Math.abs(i):0<i&&(this.target-=this.dim*i),"function"==typeof e&&(this.oneTimeCallback=e),this.offset!==this.target&&(this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound))}},{key:"next",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center+t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"prev",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:"set",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:"init",value:function(t,e){return _get(i.__proto__||Object.getPrototypeOf(i),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:"defaults",get:function(){return e}}]),i}();M.Carousel=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"carousel","M_Carousel")}(cash),function(S){"use strict";var e={onOpen:void 0,onClose:void 0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_TapTarget=i).options=S.extend({},n.defaults,e),i.isOpen=!1,i.$origin=S("#"+i.$el.attr("data-target")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:"_setupEventHandlers",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener("click",this._handleTargetClickBound),this.originEl.addEventListener("click",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener("resize",this._handleThrottledResizeBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("click",this._handleTargetClickBound),this.originEl.removeEventListener("click",this._handleOriginClickBound),window.removeEventListener("resize",this._handleThrottledResizeBound)}},{key:"_handleTargetClick",value:function(t){this.open()}},{key:"_handleOriginClick",value:function(t){this.close()}},{key:"_handleResize",value:function(t){this._calculatePositioning()}},{key:"_handleDocumentClick",value:function(t){S(t.target).closest(".tap-target-wrapper").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:"_setup",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=S(this.wrapper).find(".tap-target-wave")[0],this.originEl=S(this.wrapper).find(".tap-target-origin")[0],this.contentEl=this.$el.find(".tap-target-content")[0],S(this.wrapper).hasClass(".tap-target-wrapper")||(this.wrapper=document.createElement("div"),this.wrapper.classList.add("tap-target-wrapper"),this.$el.before(S(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement("div"),this.contentEl.classList.add("tap-target-content"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement("div"),this.waveEl.classList.add("tap-target-wave"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass("tap-target-origin"),this.originEl.removeAttr("id"),this.originEl.removeAttr("style"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:"_calculatePositioning",value:function(){var t="fixed"===this.$origin.css("position");if(!t)for(var e=this.$origin.parents(),i=0;i<e.length&&!(t="fixed"==S(e[i]).css("position"));i++);var n=this.$origin.outerWidth(),s=this.$origin.outerHeight(),o=t?this.$origin.offset().top-M.getDocumentScrollTop():this.$origin.offset().top,a=t?this.$origin.offset().left-M.getDocumentScrollLeft():this.$origin.offset().left,r=window.innerWidth,l=window.innerHeight,h=r/2,d=l/2,u=a<=h,c=h<a,p=o<=d,v=d<o,f=.25*r<=a&&a<=.75*r,m=this.$el.outerWidth(),g=this.$el.outerHeight(),_=o+s/2-g/2,y=a+n/2-m/2,k=t?"fixed":"absolute",b=f?m:m/2+n,w=g/2,C=p?g/2:0,E=u&&!f?m/2-n:0,O=n,x=v?"bottom":"top",L=2*n,T=L,$=g/2-T/2,B=m/2-L/2,D={};D.top=p?_+"px":"",D.right=c?r-y-m+"px":"",D.bottom=v?l-_-g+"px":"",D.left=u?y+"px":"",D.position=k,S(this.wrapper).css(D),S(this.contentEl).css({width:b+"px",height:w+"px",top:C+"px",right:"0px",bottom:"0px",left:E+"px",padding:O+"px",verticalAlign:x}),S(this.waveEl).css({top:$+"px",left:B+"px",width:L+"px",height:T+"px"})}},{key:"open",value:function(){this.isOpen||("function"==typeof this.options.onOpen&&this.options.onOpen.call(this,this.$origin[0]),this.isOpen=!0,this.wrapper.classList.add("open"),document.body.addEventListener("click",this._handleDocumentClickBound,!0),document.body.addEventListener("touchend",this._handleDocumentClickBound))}},{key:"close",value:function(){this.isOpen&&("function"==typeof this.options.onClose&&this.options.onClose.call(this,this.$origin[0]),this.isOpen=!1,this.wrapper.classList.remove("open"),document.body.removeEventListener("click",this._handleDocumentClickBound,!0),document.body.removeEventListener("touchend",this._handleDocumentClickBound))}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_TapTarget}},{key:"defaults",get:function(){return e}}]),n}();M.TapTarget=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"tapTarget","M_TapTarget")}(cash),function(d){"use strict";var e={classes:"",dropdownOptions:{}},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return i.$el.hasClass("browser-default")?_possibleConstructorReturn(i):((i.el.M_FormSelect=i).options=d.extend({},n.defaults,e),i.isMultiple=i.$el.prop("multiple"),i.el.tabIndex=-1,i._keysSelected={},i._valueDict={},i._setupDropdown(),i._setupEventHandlers(),i)}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeDropdown(),this.el.M_FormSelect=void 0}},{key:"_setupEventHandlers",value:function(){var e=this;this._handleSelectChangeBound=this._handleSelectChange.bind(this),this._handleOptionClickBound=this._handleOptionClick.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),d(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.addEventListener("click",e._handleOptionClickBound)}),this.el.addEventListener("change",this._handleSelectChangeBound),this.input.addEventListener("click",this._handleInputClickBound)}},{key:"_removeEventHandlers",value:function(){var e=this;d(this.dropdownOptions).find("li:not(.optgroup)").each(function(t){t.removeEventListener("click",e._handleOptionClickBound)}),this.el.removeEventListener("change",this._handleSelectChangeBound),this.input.removeEventListener("click",this._handleInputClickBound)}},{key:"_handleSelectChange",value:function(t){this._setValueToInput()}},{key:"_handleOptionClick",value:function(t){t.preventDefault();var e=d(t.target).closest("li")[0],i=e.id;if(!d(e).hasClass("disabled")&&!d(e).hasClass("optgroup")&&i.length){var n=!0;if(this.isMultiple){var s=d(this.dropdownOptions).find("li.disabled.selected");s.length&&(s.removeClass("selected"),s.find('input[type="checkbox"]').prop("checked",!1),this._toggleEntryFromArray(s[0].id)),n=this._toggleEntryFromArray(i)}else d(this.dropdownOptions).find("li").removeClass("selected"),d(e).toggleClass("selected",n);d(this._valueDict[i].el).prop("selected")!==n&&(d(this._valueDict[i].el).prop("selected",n),this.$el.trigger("change"))}t.stopPropagation()}},{key:"_handleInputClick",value:function(){this.dropdown&&this.dropdown.isOpen&&(this._setValueToInput(),this._setSelectedStates())}},{key:"_setupDropdown",value:function(){var n=this;this.wrapper=document.createElement("div"),d(this.wrapper).addClass("select-wrapper "+this.options.classes),this.$el.before(d(this.wrapper)),this.wrapper.appendChild(this.el),this.el.disabled&&this.wrapper.classList.add("disabled"),this.$selectOptions=this.$el.children("option, optgroup"),this.dropdownOptions=document.createElement("ul"),this.dropdownOptions.id="select-options-"+M.guid(),d(this.dropdownOptions).addClass("dropdown-content select-dropdown "+(this.isMultiple?"multiple-select-dropdown":"")),this.$selectOptions.length&&this.$selectOptions.each(function(t){if(d(t).is("option")){var e=void 0;e=n.isMultiple?n._appendOptionWithIcon(n.$el,t,"multiple"):n._appendOptionWithIcon(n.$el,t),n._addOptionToValueDict(t,e)}else if(d(t).is("optgroup")){var i=d(t).children("option");d(n.dropdownOptions).append(d('<li class="optgroup"><span>'+t.getAttribute("label")+"</span></li>")[0]),i.each(function(t){var e=n._appendOptionWithIcon(n.$el,t,"optgroup-option");n._addOptionToValueDict(t,e)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement("input"),d(this.input).addClass("select-dropdown dropdown-trigger"),this.input.setAttribute("type","text"),this.input.setAttribute("readonly","true"),this.input.setAttribute("data-target",this.dropdownOptions.id),this.el.disabled&&d(this.input).prop("disabled","true"),this.$el.before(this.input),this._setValueToInput();var t=d('<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');if(this.$el.before(t[0]),!this.el.disabled){var e=d.extend({},this.options.dropdownOptions);e.onOpenEnd=function(t){var e=d(n.dropdownOptions).find(".selected").first();if(e.length&&(M.keyDown=!0,n.dropdown.focusedIndex=e.index(),n.dropdown._focusFocusedItem(),M.keyDown=!1,n.dropdown.isScrollable)){var i=e[0].getBoundingClientRect().top-n.dropdownOptions.getBoundingClientRect().top;i-=n.dropdownOptions.clientHeight/2,n.dropdownOptions.scrollTop=i}},this.isMultiple&&(e.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,e)}this._setSelectedStates()}},{key:"_addOptionToValueDict",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:"_removeDropdown",value:function(){d(this.wrapper).find(".caret").remove(),d(this.input).remove(),d(this.dropdownOptions).remove(),d(this.wrapper).before(this.$el),d(this.wrapper).remove()}},{key:"_appendOptionWithIcon",value:function(t,e,i){var n=e.disabled?"disabled ":"",s="optgroup-option"===i?"optgroup-option ":"",o=this.isMultiple?'<label><input type="checkbox"'+n+'"/><span>'+e.innerHTML+"</span></label>":e.innerHTML,a=d("<li></li>"),r=d("<span></span>");r.html(o),a.addClass(n+" "+s),a.append(r);var l=e.getAttribute("data-icon");if(l){var h=d('<img alt="" src="'+l+'">');a.prepend(h)}return d(this.dropdownOptions).append(a[0]),a[0]}},{key:"_toggleEntryFromArray",value:function(t){var e=!this._keysSelected.hasOwnProperty(t),i=d(this._valueDict[t].optionEl);return e?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass("selected",e),i.find('input[type="checkbox"]').prop("checked",e),i.prop("selected",e),e}},{key:"_setValueToInput",value:function(){var i=[];if(this.$el.find("option").each(function(t){if(d(t).prop("selected")){var e=d(t).text();i.push(e)}}),!i.length){var t=this.$el.find("option:disabled").eq(0);t.length&&""===t[0].value&&i.push(t.text())}this.input.value=i.join(", ")}},{key:"_setSelectedStates",value:function(){for(var t in this._keysSelected={},this._valueDict){var e=this._valueDict[t],i=d(e.el).prop("selected");d(e.optionEl).find('input[type="checkbox"]').prop("checked",i),i?(this._activateOption(d(this.dropdownOptions),d(e.optionEl)),this._keysSelected[t]=!0):d(e.optionEl).removeClass("selected")}}},{key:"_activateOption",value:function(t,e){e&&(this.isMultiple||t.find("li.selected").removeClass("selected"),d(e).addClass("selected"))}},{key:"getSelectedValues",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_FormSelect}},{key:"defaults",get:function(){return e}}]),n}();M.FormSelect=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"formSelect","M_FormSelect")}(cash),function(s,e){"use strict";var i={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Range=i).options=s.extend({},n.defaults,e),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:"destroy",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:"_setupEventHandlers",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener("change",this._handleRangeChangeBound),this.el.addEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.addEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.addEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.addEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_removeEventHandlers",value:function(){this.el.removeEventListener("change",this._handleRangeChangeBound),this.el.removeEventListener("mousedown",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("touchstart",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener("input",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mousemove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("touchmove",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener("mouseup",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("touchend",this._handleRangeMouseupTouchendBound),this.el.removeEventListener("blur",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("mouseout",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener("touchleave",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:"_handleRangeChange",value:function(){s(this.value).html(this.$el.val()),s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px")}},{key:"_handleRangeMousedownTouchstart",value:function(t){if(s(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass("active"),s(this.thumb).hasClass("active")||this._showRangeBubble(),"input"!==t.type){var e=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",e+"px")}}},{key:"_handleRangeInputMousemoveTouchmove",value:function(){if(this._mousedown){s(this.thumb).hasClass("active")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass("active").css("left",t+"px"),s(this.value).html(this.$el.val())}}},{key:"_handleRangeMouseupTouchend",value:function(){this._mousedown=!1,this.$el.removeClass("active")}},{key:"_handleRangeBlurMouseoutTouchleave",value:function(){if(!this._mousedown){var t=7+parseInt(this.$el.css("padding-left"))+"px";s(this.thumb).hasClass("active")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:"easeOutQuad",marginLeft:t,duration:100})),s(this.thumb).removeClass("active")}}},{key:"_setupThumb",value:function(){this.thumb=document.createElement("span"),this.value=document.createElement("span"),s(this.thumb).addClass("thumb"),s(this.value).addClass("value"),s(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:"_removeThumb",value:function(){s(this.thumb).remove()}},{key:"_showRangeBubble",value:function(){var t=-7+parseInt(s(this.thumb).parent().css("padding-left"))+"px";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:t,duration:300,easing:"easeOutQuint"})}},{key:"_calcRangeOffset",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr("max"))||100,i=parseFloat(this.$el.attr("min"))||0;return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:"init",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),"init",this).call(this,this,t,e)}},{key:"getInstance",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:"defaults",get:function(){return i}}]),n}();M.Range=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,"range","M_Range"),t.init(s("input[type=range]"))}(cash,M.anime);
\ No newline at end of file
diff --git a/gracedb/static/js/timeline.js b/gracedb/static/js/timeline.js
deleted file mode 100644
index 30f530e60..000000000
--- a/gracedb/static/js/timeline.js
+++ /dev/null
@@ -1,47 +0,0 @@
-var tl;
-
-var eventSource = new Timeline.DefaultEventSource();
-
-function onLoad() {
-  var bandInfos = [
-    Timeline.createBandInfo({
-        eventSource:    eventSource,
-        //date:           "Sat May 20 1961 00:00:00 GMT-0600",
-        width:          "70%", 
-        intervalUnit:   Timeline.DateTime.HOUR, 
-        intervalPixels: 100
-    }),
-    Timeline.createBandInfo({
-        eventSource:    eventSource,
-        //date:           "Sat May 20 1961 00:00:00 GMT-0600",
-        width:          "15%", 
-        intervalUnit:   Timeline.DateTime.DAY, 
-        intervalPixels: 100,
-        overview:       true
-    }),
-    Timeline.createBandInfo({
-        eventSource:    eventSource,
-        //date:           "Sat May 20 1961 00:00:00 GMT-0600",
-        width:          "15%", 
-        intervalUnit:   Timeline.DateTime.MONTH, 
-        intervalPixels: 200,
-        overview:       true
-    })
-  ];
-  bandInfos[1].syncWith = 0;
-  bandInfos[1].highlight = true;
-  bandInfos[2].syncWith = 1;
-  bandInfos[2].highlight = true;
-  tl = Timeline.create(document.getElementById("tl"), bandInfos);
-  Timeline.loadJSON("/gracedb/events/timeline",
-                    function(json, url) { eventSource.loadJSON(json, url); });
-}
-var resizeTimerID = null;
-function onResize() {
-    if (resizeTimerID == null) {
-        resizeTimerID = window.setTimeout(function() {
-            resizeTimerID = null;
-            tl.layout();
-        }, 500);
-    }
-}
diff --git a/gracedb/templates/alerts/create_contact.html b/gracedb/templates/alerts/create_contact.html
index 82d981573..efb7750f0 100644
--- a/gracedb/templates/alerts/create_contact.html
+++ b/gracedb/templates/alerts/create_contact.html
@@ -3,12 +3,11 @@
 
 {% block headcontents %}
     {{ block.super }}
-    <link rel="stylesheet" href="{% static "jquery-ui/themes/base/jquery-ui.min.css" %}" />
+    <link rel="stylesheet" href="https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css" />
 {% endblock %}
 
 {% block jscript %}
-<script src="{% static "jquery/dist/jquery.min.js" %}"></script>
-<script src="{% static "jquery-ui/jquery-ui.min.js" %}"></script>
+<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js" integrity="sha256-AlTido85uXPlSyyaZNsjJXeCs07eSv3r43kyCVc8ChI=" crossorigin="anonymous"></script>
 <script type="text/javascript">
 $(document).ready(function() {
     $("#tabs").toggle();
@@ -36,7 +35,7 @@ $(document).ready(function() {
 </ul>
 </div>
 
-<div id="tabs" style="min-width: 300px; max-width: 400px; display: none;">
+<div id="tabs" style="min-width: 300px; max-width: 800px; display: none;">
   <ul>
     {% for form in forms %}
     <li><a href="#tab-{{ forloop.counter }}">{{ form.key|title }} Notification</a></li>
diff --git a/gracedb/templates/alerts/create_notification.html b/gracedb/templates/alerts/create_notification.html
index a1d30fd3f..c7a490d7c 100644
--- a/gracedb/templates/alerts/create_notification.html
+++ b/gracedb/templates/alerts/create_notification.html
@@ -3,12 +3,11 @@
 
 {% block headcontents %}
     {{ block.super }}
-    <link rel="stylesheet" href="{% static "jquery-ui/themes/base/jquery-ui.min.css" %}" />
+    <link rel="stylesheet" href="https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css" />
 {% endblock %}
 
 {% block jscript %}
-<script src="{% static "jquery/dist/jquery.min.js" %}"></script>
-<script src="{% static "jquery-ui/jquery-ui.min.js" %}"></script>
+<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js" integrity="sha256-AlTido85uXPlSyyaZNsjJXeCs07eSv3r43kyCVc8ChI=" crossorigin="anonymous"></script>
 <script type="text/javascript">
 $(document).ready(function() {
     $("#tabs").toggle();
diff --git a/gracedb/templates/gracedb/reports.html b/gracedb/templates/gracedb/reports.html
index c6af6a5b7..47f201f85 100644
--- a/gracedb/templates/gracedb/reports.html
+++ b/gracedb/templates/gracedb/reports.html
@@ -25,7 +25,10 @@
     <button class="nav-link active" id="latency-tab" data-toggle="tab" data-target="#latency" type="button" role="tab" aria-controls="latency" aria-selected="true">Event Latency</button>
   </li>
   <li class="nav-item" role="presentation">
-    <button class="nav-link" id="tta-tab" data-toggle="tab" data-target="#tta" type="button" role="tab" aria-controls="tta" aria-selected="false">Time-to-Alert</button>
+    <button class="nav-link" id="tta-tab" data-toggle="tab" data-target="#tta" type="button" role="tab" aria-controls="tta" aria-selected="false">Event Time-to-Alert</button>
+  </li>
+  <li class="nav-item" role="presentation">
+    <button class="nav-link" id="uta-tab" data-toggle="tab" data-target="#uta" type="button" role="tab" aria-controls="uta" aria-selected="false">Upload Time-to-Alert</button>
   </li>
 </ul>
 
@@ -74,8 +77,8 @@
   <div class="tab-pane fade" id="tta" role="tabpanel" aria-labelledby="tta-tab">
     <br>
     <p width='90%'>
-    The below chart shows the time-to-alert superevents currently in GraceDB within
-    the specified time range. Time-to-alert (in seconds) is calculated by subtracting
+    The below chart shows the event time-to-alert of superevents currently in GraceDB within
+    the specified time range. Event time-to-alert (in seconds) is calculated by subtracting
     the <b>time of the astrophysical phenomenon</b>
     (<span class="text-monospace">t<sub>0</sub></span> of the superevent) from the
     <b>time when the <span class="text-monospace">GCN_PRELIM_SENT</span> label was applied.</b>
@@ -83,6 +86,11 @@
     estimate. Identify the Superevent ID by hovering over the data point.
     </p>
     <p width='90%'>
+    Event time-to-alert is a measure of the duration of the total end-to-end alert process,
+    which includes data acquisition, calibration, distribution, pipeline analysis, and 
+    follow-up.
+    </p>
+    <p width='90%'>
     A single data-point at zero indicates that no superevents were labelled
     <span class="text-monospace">GCN_PRELIM_SENT</span> within the specified time window.
     </p>
@@ -92,7 +100,7 @@
 
         <table class="table-hover table-condensed table-resp-gracedb shadow p-3 mb-5 rounded" style="text-align:center; width:auto; margin-left: auto; margin-right: auto;">
           <thead>
-            <td> Median Time-to-Alert (s) </td><td> 95th Percentile (s)</td>
+            <td> Median Event Time-to-Alert (s) </td><td> 95th Percentile (s)</td>
            </thead>
            <tr>
             <td>{{tta.tta_stats.med|floatformat:1}}</td><td>{{tta.tta_stats.nfp|floatformat:1}}</td>
@@ -101,6 +109,42 @@
         </table>
 
   </div>
+
+  <div class="tab-pane fade" id="uta" role="tabpanel" aria-labelledby="uta-tab">
+    <br>
+    <p width='90%'>
+    The below chart shows the upload time-to-alert of superevents currently in GraceDB within
+    the specified time range. Upload time-to-alert (in seconds) is calculated by subtracting
+    the <b>time of superevent's first GW event upload to GraceDB</b>
+    (<span class="text-monospace">t<sub>0</sub></span> of the superevent) from the
+    <b>time when the <span class="text-monospace">GCN_PRELIM_SENT</span> label was applied.</b>
+    The actual receipt time of the alert by observing partners likely differs from this
+    estimate. Identify the Superevent ID by hovering over the data point.
+    </p>
+    <p width='90%'>
+    Upload time-to-alert is a measure of the duration of the follow-up process
+    after the first event is uploaded to GraceDB, and does not include data acquisition,
+    distribution, calibration, or analysis time.
+    </p>
+    <p width='90%'>
+    A single data-point at zero indicates that no superevents were labelled
+    <span class="text-monospace">GCN_PRELIM_SENT</span> within the specified time window.
+    </p>
+    {% autoescape off %}
+    {{ tta.uta_plot_div }}
+    {% endautoescape %}
+
+        <table class="table-hover table-condensed table-resp-gracedb shadow p-3 mb-5 rounded" style="text-align:center; width:auto; margin-left: auto; margin-right: auto;">
+          <thead>
+            <td> Median Upload Time-to-Alert (s) </td><td> 95th Percentile (s)</td>
+           </thead>
+           <tr>
+            <td>{{tta.uta_stats.med|floatformat:1}}</td><td>{{tta.uta_stats.nfp|floatformat:1}}</td>
+          </tr>
+
+        </table>
+
+  </div>
 </div>
 
 {% endblock %}
-- 
GitLab