text: /*!
   * jQuery UI Widget 1.8.21
   *
   * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
   * Dual licensed under the MIT or GPL Version 2 licenses.
   * http://jquery.org/license
   *
   * http://docs.jquery.com/UI/Widget
   */
  (function(e,t){if(e.cleanData){var n=e.cleanData;e.cleanData=function(t){for(var r=0,i;(i=t[r])!=null;r++)try{e(i).triggerHandler("remove")}catch(s){}n(t)}}else{var r=e.fn.remove;e.fn.remove=function(t,n){return this.each(function(){return n||(!t||e.filter(t,[this]).length)&&e("*",this).add([this]).each(function(){try{e(this).triggerHandler("remove")}catch(t){}}),r.call(e(this),t,n)})}}e.widget=function(t,n,r){var i=t.split(".")[0],s;t=t.split(".")[1],s=i+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][s]=function(n){return!!e.data(n,t)},e[i]=e[i]||{},e[i][t]=function(e,t){arguments.length&&this._createWidget(e,t)};var o=new n;o.options=e.extend(!0,{},o.options),e[i][t].prototype=e.extend(!0,o,{namespace:i,widgetName:t,widgetEventPrefix:e[i][t].prototype.widgetEventPrefix||t,widgetBaseClass:s},r),e.widget.bridge(t,e[i][t])},e.widget.bridge=function(n,r){e.fn[n]=function(i){var s=typeof i=="string",o=Array.prototype.slice.call(arguments,1),u=this;return i=!s&&o.length?e.extend.apply(null,[!0,i].concat(o)):i,s&&i.charAt(0)==="_"?u:(s?this.each(function(){var r=e.data(this,n),s=r&&e.isFunction(r[i])?r[i].apply(r,o):r;if(s!==r&&s!==t)return u=s,!1}):this.each(function(){var t=e.data(this,n);t?t.option(i||{})._init():e.data(this,n,new r(i,this))}),u)}},e.Widget=function(e,t){arguments.length&&this._createWidget(e,t)},e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(t,n){e.data(n,this.widgetName,this),this.element=e(n),this.options=e.extend(!0,{},this.options,this._getCreateOptions(),t);var r=this;this.element.bind("remove."+this.widgetName,function(){r.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(n,r){var i=n;if(arguments.length===0)return e.extend({},this.options);if(typeof n=="string"){if(r===t)return this.options[n];i={},i[n]=r}return this._setOptions(i),this},_setOptions:function(t){var n=this;return e.each(t,function(e,t){n._setOption(e,t)}),this},_setOption:function(e,t){return this.options[e]=t,e==="disabled"&&this.widget()[t?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",t),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(t,n,r){var i,s,o=this.options[t];r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;if(s)for(i in s)i in n||(n[i]=s[i]);return this.element.trigger(n,r),!(e.isFunction(o)&&o.call(this.element[0],n,r)===!1||n.isDefaultPrevented())}}})(jQuery);
  
  /*!
   * Marco Polo v1.8.1
   *
   * A jQuery autocomplete plugin for the discerning developer.
   *
   * https://github.com/jstayton/jquery-marcopolo
   *
   * Copyright 2014 by Justin Stayton
   * Licensed MIT
   */
  (function(e){"use strict";typeof define=="function"&&define.amd?define(["jquery"],e):e(jQuery)})(function(e,t){"use strict";var n={};e.widget("mp.marcoPolo",{options:{cache:!0,compare:!1,data:{},delay:250,formatData:null,formatError:function(){return"<em>Your search could not be completed at this time.</em>"},formatItem:function(e){return e.title||e.name},formatMinChars:function(e){return"<em>Your search must be at least <strong>"+e+"</strong> characters.</em>"},formatNoResults:function(e){return"<em>No results for <strong>"+e+"</strong>.</em>"},hideOnSelect:!0,highlight:!0,label:null,minChars:1,onBlur:null,onChange:null,onError:null,onFocus:null,onMinChars:null,onNoResults:null,onRequestBefore:null,onRequestAfter:null,onResults:null,onSelect:function(e){this.val(e.title||e.name)},param:"q",required:!1,selectable:"*",selected:null,submitOnEnter:!1,url:null},keys:{DOWN:40,END:35,ENTER:13,ESC:27,HOME:36,TAB:9,UP:38},_create:function(){var t=this,n;t.$input=n=t.element.addClass("mp_input"),t.inputName="mp_"+(n.attr("name")||e.now()),t.$list=e('<ol class="mp_list" />').attr({"aria-atomic":"true","aria-busy":"false","aria-live":"polite",id:t.inputName+"_list",role:"listbox"}).hide().insertAfter(t.$input),t.inputOriginals={"aria-activedescendant":n.attr("aria-activedescendant"),"aria-autocomplete":n.attr("aria-autocomplete"),"aria-expanded":n.attr("aria-expanded"),"aria-labelledby":n.attr("aria-labelledby"),"aria-owns":n.attr("aria-owns"),"aria-required":n.attr("aria-required"),autocomplete:n.attr("autocomplete"),role:n.attr("role")},n.attr({"aria-autocomplete":"list","aria-owns":t.$list.attr("id"),autocomplete:"off",role:"combobox"}),t.ajax=null,t.ajaxAborted=!1,t.documentMouseup=null,t.focusPseudo=!1,t.focusReal=!1,t.mousedown=!1,t.selectedData=null,t.selectedMouseup=!1,t.timer=null,t.value=t.$input.val(),t._bindInput()._bindList()._bindDocument(),t._initSelected()._initOptions()},_setOption:function(t,n){e.Widget.prototype._setOption.apply(this,arguments),this._initOptions(t,n)},_initOptions:function(n,r){var i=this,s=n===t,o={};return s?o=i.options:o[n]=r,e.each(o,function(t,n){switch(t){case"label":i.options.label=e(n).addClass("mp_label"),i.options.label.attr("id")?i.removeLabelId=!1:(i.removeLabelId=!0,i.options.label.attr("id",i.inputName+"_label")),i._toggleLabel(),i.$input.attr("aria-labelledby",i.options.label.attr("id"));break;case"required":i.$input.attr("aria-required",n);break;case"selected":s&&n&&i.select(n,null,!0);break;case"url":n||(i.options.url=i.$input.closest("form").attr("action"))}}),i},change:function(e,t){var n=this;if(e===n.value)return;e!==n.$input.val()&&n.$input.val(e),n.selectedData=null,n.value=e,n._trigger("change",[e]),t!==!0&&(n.focusPseudo?n._cancelPendingRequest()._hideAndEmptyList():n._toggleLabel())},search:function(e){var n=this.$input;e!==t&&n.val(e),n.focus()},select:function(e,t,n){var r=this,i=r.$input,s=r.options.hideOnSelect;s&&r._hideList();if(!e)return r.change("");r.selectedData=e,r._trigger("select",[e,t,!!n]),i.val()!==r.value&&(r.value=i.val(),r.focusPseudo||r._toggleLabel(),r._hideAndEmptyList())},_initSelected:function(){var e=this,t=e.$input,n=t.data("selected"),r=t.val();return n?e.select(n,null,!0):r&&e.select(r,null,!0),e},selected:function(){return this.selectedData},destroy:function(){var n=this,r=n.options,i=n.$input;n.$list.remove(),e.each(n.inputOriginals,function(e,n){n===t?i.removeAttr(e):i.attr(e,n)}),i.removeClass("mp_input"),r.label&&(r.label.removeClass("mp_label"),n.removeLabelId&&r.label.removeAttr("id")),e(document).unbind("mouseup.marcoPolo",n.documentMouseup),e.Widget.prototype.destroy.apply(n,arguments)},list:function(){return this.$list},_bindInput:function(){var t=this,n=t.$input,r=t.$list;return n.bind("focus.marcoPolo",function(){if(t.focusReal)return;t.focusPseudo=!0,t.focusReal=!0,t._toggleLabel(),t.selectedMouseup?t.selectedMouseup=!1:(t._trigger("focus"),t._request(n.val()))}).bind("keydown.marcoPolo",function(n){var i=e();switch(n.which){case t.keys.UP:n.preventDefault(),t._showList()._highlightPrev();break;case t.keys.DOWN:n.preventDefault(),t._showList()._highlightNext();break;case t.keys.HOME:t._showList()._highlightFirst();break;case t.keys.END:t._showList()._highlightLast();break;case t.keys.ENTER:if(!r.is(":visible")){t.options.submitOnEnter||n.preventDefault();return}i=t._highlighted(),i.length&&t.select(i.data("marcoPolo"),i),(!t.options.submitOnEnter||i.length)&&n.preventDefault();break;case t.keys.TAB:if(!r.is(":visible"))return;i=t._highlighted(),i.length&&t.select(i.data("marcoPolo"),i);break;case t.keys.ESC:t._cancelPendingRequest()._hideList()}}).bind("keyup.marcoPolo",function(){n.val()!==t.value&&t._request(n.val())}).bind("blur.marcoPolo",function(){t.focusReal=!1,setTimeout(function(){t.mousedown||t._dismiss()},1)}),t},_bindList:function(){var t=this;return t.$list.bind("mousedown.marcoPolo",function(){t.mousedown=!0}).delegate("li.mp_selectable","mouseover",function(){t._addHighlight(e(this))}).delegate("li.mp_selectable","mouseout",function(){t._removeHighlight(e(this))}).delegate("li.mp_selectable","mouseup",function(){var n=e(this);t.select(n.data("marcoPolo"),n),t.selectedMouseup=!0,t.$input.focus()}),t},_bindDocument:function(){var t=this;return e(document).bind("mouseup.marcoPolo",t.documentMouseup=function(){t.mousedown=!1,!t.focusReal&&t.$list.is(":visible")&&t._dismiss()}),t},_toggleLabel:function(){var e=this,t=e.options.label;return t&&t.length&&(e.focusPseudo||e.$input.val()?t.hide():t.show()),e},_firstSelectableItem:function(){return this.$list.children("li.mp_selectable:visible:first")},_lastSelectableItem:function(){return this.$list.children("li.mp_selectable:visible:last")},_highlighted:function(){return this.$list.children("li.mp_highlighted")},_removeHighlight:function(e){return e.removeClass("mp_highlighted").attr("aria-selected","false").removeAttr("id"),this.$input.removeAttr("aria-activedescendant"),this},_addHighlight:function(e){return this._removeHighlight(this._highlighted()),e.addClass("mp_highlighted").attr({"aria-selected":"true",id:this.inputName+"_highlighted"}),this.$input.attr("aria-activedescendant",e.attr("id")),this},_highlightFirst:function(){return this._addHighlight(this._firstSelectableItem()),this},_highlightLast:function(){return this._addHighlight(this._lastSelectableItem()),this},_highlightPrev:function(){var e=this._highlighted(),t=e.prevAll("li.mp_selectable:visible:first");return t.length||(t=this._lastSelectableItem()),this._addHighlight(t),this},_highlightNext:function(){var e=this._highlighted(),t=e.nextAll("li.mp_selectable:visible:first");return t.length||(t=this._firstSelectableItem()),this._addHighlight(t),this},_showList:function(){return this.$list.children().length&&(this.$list.show(),this.$input.attr("aria-expanded","true")),this},_hideList:function(){return this.$list.hide(),this.$input.removeAttr("aria-activedescendant").removeAttr("aria-expanded"),this},_emptyList:function(){return this.$list.empty(),this.$input.removeAttr("aria-activedescendant"),this},_hideAndEmptyList:function(){return this.$list.hide().empty(),this.$input.removeAttr("aria-activedescendant").removeAttr("aria-expanded"),this},_buildNoResultsList:function(t){var n=this,r=n.$input,i=n.$list,s=n.options,o=e('<li class="mp_no_results" role="alert" />'),u;return u=s.formatNoResults&&s.formatNoResults.call(r,t,o),u&&o.html(u),n._trigger("noResults",[t,o]),u?(o.appendTo(i),n._showList()):n._hideList(),n},_buildResultsList:function(t,n){var r=this,i=r.$input,s=r.$list,o=r.options,u=r.selectedData,a=o.compare&&u,f,l,c=!1,h,p=e(),d;for(var v=0,m=n.length;v<m;v++)h=n[v],p=e('<li class="mp_item" />'),d=o.formatItem.call(i,h,p),p.data("marcoPolo",h),p.html(d).appendTo(s),a&&o.highlight&&(o.compare===!0?(f=h,l=u):(f=h[o.compare],l=u[o.compare]),f===l&&(r._addHighlight(p),a=!1,c=!0));return s.children(o.selectable).addClass("mp_selectable").attr({"aria-selected":"false",role:"option"}),r._trigger("results",[n]),r._showList(),!c&&o.highlight&&r._highlightFirst(),r},_buildSuccessList:function(t,n){var r=this,i=r.$input,s=r.options;return r._emptyList(),s.formatData&&(n=s.formatData.call(i,n)),!n||n.length===0||e.isEmptyObject(n)?r._buildNoResultsList(t):r._buildResultsList(t,n),r},_buildErrorList:function(t,n,r){var i=this,s=i.$input,o=i.$list,u=i.options,a=e('<li class="mp_error" role="alert" />'),f;return i._emptyList(),f=u.formatError&&u.formatError.call(s,a,t,n,r),f&&a.html(f),i._trigger("error",[a,t,n,r]),f?(a.appendTo(o),i._showList()):i._hideList(),i},_buildMinCharsList:function(t){var n=this,r=n.$input,i=n.$list,s=n.options,o=e('<li class="mp_min_chars" role="alert" />'),u;return t.length?(n._emptyList(),u=s.formatMinChars&&s.formatMinChars.call(r,s.minChars,o),u&&o.html(u),n._trigger("minChars",[s.minChars,o]),u?(o.appendTo(i),n._showList()):n._hideList(),n):(n._hideAndEmptyList(),n)},_cancelPendingRequest:function(){var e=this;return e.ajax?(e.ajaxAborted=!0,e.ajax.abort()):e.ajaxAborted=!1,clearTimeout(e.timer),e},_request:function(t){var r=this,i=r.$input,s=r.$list,o=r.options;return r._cancelPendingRequest(),r.change(t,!0),r.timer=setTimeout(function(){var u={},a={},f={},l,c=e();if(t.length<o.minChars)return r._buildMinCharsList(t),r;u=e.isFunction(o.data)?o.data.call(r.$input,t):o.data,a[o.param]=t,f=e.extend({},u,a),l=o.url+(o.url.indexOf("?")===-1?"?":"&")+e.param(f),o.cache&&n[l]?r._buildSuccessList(t,n[l]):(r._trigger("requestBefore"),c=i.parent().addClass("mp_busy"),s.attr("aria-busy","true"),r.ajax=e.ajax({url:o.url,dataType:"json",data:f,success:function(e){r._buildSuccessList(t,e),o.cache&&(n[l]=e)},error:function(e,t,n){r.ajaxAborted||r._buildErrorList(e,t,n)},complete:function(e,t){r.ajax=null,r.ajaxAborted=!1,c.removeClass("mp_busy"),s.attr("aria-busy","false"),r._trigger("requestAfter",[e,t])}}))},o.delay),r},_dismiss:function(){var e=this,t=e.options;return e.focusPseudo=!1,e._cancelPendingRequest()._hideAndEmptyList(),t.required&&!e.selectedData&&e.change("",!0),e._toggleLabel()._trigger("blur"),e},_trigger:function(t,n){var r=this,i="on"+t.charAt(0).toUpperCase()+t.slice(1),s=r.widgetEventPrefix.toLowerCase()+t.toLowerCase(),o=e.isArray(n)?n:[],u=r.options[i];return r.element.trigger(s,o),u&&u.apply(r.element,o)}})});