/*
 * jQuery Once v2.0.2 - http://github.com/robloach/jquery-once
 * @license MIT, GPL-2.0
 *   http://opensource.org/licenses/MIT
 *   http://opensource.org/licenses/GPL-2.0
 */
(function(a){if(typeof exports==="object"){a(require("jquery"))}else{if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}}(function(b){var a=function(c){c=c||"once";if(typeof c!=="string"){throw new Error("The jQuery Once id parameter must be a string")}return c};b.fn.once=function(d){var c="jquery-once-"+a(d);return this.filter(function(){return b(this).data(c)!==true}).data(c,true)};b.fn.removeOnce=function(c){return this.findOnce(c).removeData("jquery-once-"+a(c))};b.fn.findOnce=function(d){var c="jquery-once-"+a(d);return this.filter(function(){return b(this).data(c)===true})}}));
/*
 * jQuery Form Plugin
 * version: 3.51.0-2014.06.20
 * Requires jQuery v1.5 or later
 * Copyright (c) 2014 M. Alsup
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Project repository: https://github.com/malsup/form
 * Dual licensed under the MIT and GPL licenses.
 * https://github.com/malsup/form#copyright-and-license
 */
(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a((typeof(jQuery)!="undefined")?jQuery:window.Zepto)}}(function(f){var c={};c.fileapi=f("<input type='file'/>").get(0).files!==undefined;c.formdata=window.FormData!==undefined;var e=!!f.fn.prop;f.fn.attr2=function(){if(!e){return this.attr.apply(this,arguments)}var g=this.prop.apply(this,arguments);if((g&&g.jquery)||typeof g==="string"){return g}return this.attr.apply(this,arguments)};f.fn.ajaxSubmit=function(j){if(!this.length){d("ajaxSubmit: skipping submit process - no element selected");return this}var i,C,m,o=this;if(typeof j=="function"){j={success:j}}else{if(j===undefined){j={}}}i=j.type||this.attr2("method");C=j.url||this.attr2("action");m=(typeof C==="string")?f.trim(C):"";m=m||window.location.href||"";if(m){m=(m.match(/^([^#]+)/)||[])[1]}j=f.extend(true,{url:m,success:f.ajaxSettings.success,type:i||f.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},j);var u={};this.trigger("form-pre-serialize",[this,j,u]);if(u.veto){d("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(j.beforeSerialize&&j.beforeSerialize(this,j)===false){d("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var n=j.traditional;if(n===undefined){n=f.ajaxSettings.traditional}var s=[];var E,F=this.formToArray(j.semantic,s);if(j.data){j.extraData=j.data;E=f.param(j.data,n)}if(j.beforeSubmit&&j.beforeSubmit(F,this,j)===false){d("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[F,this,j,u]);if(u.veto){d("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var y=f.param(F,n);if(E){y=(y?(y+"&"+E):E)}if(j.type.toUpperCase()=="GET"){j.url+=(j.url.indexOf("?")>=0?"&":"?")+y;j.data=null}else{j.data=y}var H=[];if(j.resetForm){H.push(function(){o.resetForm()})}if(j.clearForm){H.push(function(){o.clearForm(j.includeHidden)})}if(!j.dataType&&j.target){var l=j.success||function(){};H.push(function(q){var k=j.replaceTarget?"replaceWith":"html";f(j.target)[k](q).each(l,arguments)})}else{if(j.success){H.push(j.success)}}j.success=function(K,q,L){var J=j.context||this;for(var I=0,k=H.length;I<k;I++){H[I].apply(J,[K,q,L||o,o])}};if(j.error){var z=j.error;j.error=function(J,k,q){var I=j.context||this;z.apply(I,[J,k,q,o])}}if(j.complete){var h=j.complete;j.complete=function(I,k){var q=j.context||this;h.apply(q,[I,k,o])}}var D=f("input[type=file]:enabled",this).filter(function(){return f(this).val()!==""});var p=D.length>0;var B="multipart/form-data";var x=(o.attr("enctype")==B||o.attr("encoding")==B);var w=c.fileapi&&c.formdata;d("fileAPI :"+w);var r=(p||x)&&!w;var v;if(j.iframe!==false&&(j.iframe||r)){if(j.closeKeepAlive){f.get(j.closeKeepAlive,function(){v=G(F)})}else{v=G(F)}}else{if((p||x)&&w){v=t(F)}else{v=f.ajax(j)}}o.removeData("jqxhr").data("jqxhr",v);for(var A=0;A<s.length;A++){s[A]=null}this.trigger("form-submit-notify",[this,j]);return this;function g(K){var L=f.param(K,j.traditional).split("&");var q=L.length;var k=[];var J,I;for(J=0;J<q;J++){L[J]=L[J].replace(/\+/g," ");I=L[J].split("=");k.push([decodeURIComponent(I[0]),decodeURIComponent(I[1])])}return k}function t(q){var k=new FormData();for(var I=0;I<q.length;I++){k.append(q[I].name,q[I].value)}if(j.extraData){var L=g(j.extraData);for(I=0;I<L.length;I++){if(L[I]){k.append(L[I][0],L[I][1])}}}j.data=null;var K=f.extend(true,{},f.ajaxSettings,j,{contentType:false,processData:false,cache:false,type:i||"POST"});if(j.uploadProgress){K.xhr=function(){var M=f.ajaxSettings.xhr();if(M.upload){M.upload.addEventListener("progress",function(Q){var P=0;var N=Q.loaded||Q.position;var O=Q.total;if(Q.lengthComputable){P=Math.ceil(N/O*100)}j.uploadProgress(Q,N,O,P)},false)}return M}}K.data=null;var J=K.beforeSend;K.beforeSend=function(N,M){if(j.formData){M.data=j.formData}else{M.data=k}if(J){J.call(this,N,M)}};return f.ajax(K)}function G(af){var L=o[0],K,ab,V,ad,Y,N,Q,O,P,Z,ac,T;var ai=f.Deferred();ai.abort=function(aj){O.abort(aj)};if(af){for(ab=0;ab<s.length;ab++){K=f(s[ab]);if(e){K.prop("disabled",false)}else{K.removeAttr("disabled")}}}V=f.extend(true,{},f.ajaxSettings,j);V.context=V.context||V;Y="jqFormIO"+(new Date().getTime());if(V.iframeTarget){N=f(V.iframeTarget);Z=N.attr2("name");if(!Z){N.attr2("name",Y)}else{Y=Z}}else{N=f('<iframe name="'+Y+'" src="'+V.iframeSrc+'" />');N.css({position:"absolute",top:"-1000px",left:"-1000px"})}Q=N[0];O={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(aj){var ak=(aj==="timeout"?"timeout":"aborted");d("aborting upload... "+ak);this.aborted=1;try{if(Q.contentWindow.document.execCommand){Q.contentWindow.document.execCommand("Stop")}}catch(al){}N.attr("src",V.iframeSrc);O.error=ak;if(V.error){V.error.call(V.context,O,ak,aj)}if(ad){f.event.trigger("ajaxError",[O,V,ak])}if(V.complete){V.complete.call(V.context,O,ak)}}};ad=V.global;if(ad&&0===f.active++){f.event.trigger("ajaxStart")}if(ad){f.event.trigger("ajaxSend",[O,V])}if(V.beforeSend&&V.beforeSend.call(V.context,O,V)===false){if(V.global){f.active--}ai.reject();return ai}if(O.aborted){ai.reject();return ai}P=L.clk;if(P){Z=P.name;if(Z&&!P.disabled){V.extraData=V.extraData||{};V.extraData[Z]=P.value;if(P.type=="image"){V.extraData[Z+".x"]=L.clk_x;V.extraData[Z+".y"]=L.clk_y}}}var U=1;var R=2;function S(al){var ak=null;try{if(al.contentWindow){ak=al.contentWindow.document}}catch(aj){d("cannot get iframe.contentWindow document: "+aj)}if(ak){return ak}try{ak=al.contentDocument?al.contentDocument:al.document}catch(aj){d("cannot get iframe.contentDocument: "+aj);ak=al.document}return ak}var J=f("meta[name=csrf-token]").attr("content");var I=f("meta[name=csrf-param]").attr("content");if(I&&J){V.extraData=V.extraData||{};V.extraData[I]=J}function aa(){var ar=o.attr2("target"),an=o.attr2("action"),al="multipart/form-data",ao=o.attr("enctype")||o.attr("encoding")||al;L.setAttribute("target",Y);if(!i||/post/i.test(i)){L.setAttribute("method","POST")}if(an!=V.url){L.setAttribute("action",V.url)}if(!V.skipEncodingOverride&&(!i||/post/i.test(i))){o.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(V.timeout){T=setTimeout(function(){ac=true;X(U)},V.timeout)}function ap(){try{var at=S(Q).readyState;d("state = "+at);if(at&&at.toLowerCase()=="uninitialized"){setTimeout(ap,50)}}catch(au){d("Server abort: ",au," (",au.name,")");X(R);if(T){clearTimeout(T)}T=undefined}}var aq=[];try{if(V.extraData){for(var ak in V.extraData){if(V.extraData.hasOwnProperty(ak)){if(f.isPlainObject(V.extraData[ak])&&V.extraData[ak].hasOwnProperty("name")&&V.extraData[ak].hasOwnProperty("value")){aq.push(f('<input type="hidden" name="'+V.extraData[ak].name+'">').val(V.extraData[ak].value).appendTo(L)[0])}else{aq.push(f('<input type="hidden" name="'+ak+'">').val(V.extraData[ak]).appendTo(L)[0])}}}}if(!V.iframeTarget){N.appendTo("body")}if(Q.attachEvent){Q.attachEvent("onload",X)}else{Q.addEventListener("load",X,false)}setTimeout(ap,15);try{L.submit()}catch(am){var aj=document.createElement("form").submit;aj.apply(L)}}finally{L.setAttribute("action",an);L.setAttribute("enctype",ao);if(ar){L.setAttribute("target",ar)}else{o.removeAttr("target")}f(aq).remove()}}if(V.forceSync){aa()}else{setTimeout(aa,10)}var ag,ah,ae=50,M;function X(ap){if(O.aborted||M){return}ah=S(Q);if(!ah){d("cannot access response document");ap=R}if(ap===U&&O){O.abort("timeout");ai.reject(O,"timeout");return}else{if(ap==R&&O){O.abort("server abort");ai.reject(O,"error","server abort");return}}if(!ah||ah.location.href==V.iframeSrc){if(!ac){return}}if(Q.detachEvent){Q.detachEvent("onload",X)}else{Q.removeEventListener("load",X,false)}var an="success",ar;try{if(ac){throw"timeout"}var am=V.dataType=="xml"||ah.XMLDocument||f.isXMLDoc(ah);d("isXml="+am);if(!am&&window.opera&&(ah.body===null||!ah.body.innerHTML)){if(--ae){d("requeing onLoad callback, DOM not available");setTimeout(X,250);return}}var at=ah.body?ah.body:ah.documentElement;O.responseText=at?at.innerHTML:null;O.responseXML=ah.XMLDocument?ah.XMLDocument:ah;if(am){V.dataType="xml"}O.getResponseHeader=function(aw){var av={"content-type":V.dataType};return av[aw.toLowerCase()]};if(at){O.status=Number(at.getAttribute("status"))||O.status;O.statusText=at.getAttribute("statusText")||O.statusText}var aj=(V.dataType||"").toLowerCase();var aq=/(json|script|text)/.test(aj);if(aq||V.textarea){var ao=ah.getElementsByTagName("textarea")[0];if(ao){O.responseText=ao.value;O.status=Number(ao.getAttribute("status"))||O.status;O.statusText=ao.getAttribute("statusText")||O.statusText}else{if(aq){var ak=ah.getElementsByTagName("pre")[0];var au=ah.getElementsByTagName("body")[0];if(ak){O.responseText=ak.textContent?ak.textContent:ak.innerText}else{if(au){O.responseText=au.textContent?au.textContent:au.innerText}}}}}else{if(aj=="xml"&&!O.responseXML&&O.responseText){O.responseXML=W(O.responseText)}}try{ag=k(O,aj,V)}catch(al){an="parsererror";O.error=ar=(al||an)}}catch(al){d("error caught: ",al);an="error";O.error=ar=(al||an)}if(O.aborted){d("upload aborted");an=null}if(O.status){an=(O.status>=200&&O.status<300||O.status===304)?"success":"error"}if(an==="success"){if(V.success){V.success.call(V.context,ag,"success",O)}ai.resolve(O.responseText,"success",O);if(ad){f.event.trigger("ajaxSuccess",[O,V])}}else{if(an){if(ar===undefined){ar=O.statusText}if(V.error){V.error.call(V.context,O,an,ar)}ai.reject(O,"error",ar);if(ad){f.event.trigger("ajaxError",[O,V,ar])}}}if(ad){f.event.trigger("ajaxComplete",[O,V])}if(ad&&!--f.active){f.event.trigger("ajaxStop")}if(V.complete){V.complete.call(V.context,O,an)}M=true;if(V.timeout){clearTimeout(T)}setTimeout(function(){if(!V.iframeTarget){N.remove()}else{N.attr("src",V.iframeSrc)}O.responseXML=null},100)}var W=f.parseXML||function(aj,ak){if(window.ActiveXObject){ak=new ActiveXObject("Microsoft.XMLDOM");ak.async="false";ak.loadXML(aj)}else{ak=(new DOMParser()).parseFromString(aj,"text/xml")}return(ak&&ak.documentElement&&ak.documentElement.nodeName!="parsererror")?ak:null};var q=f.parseJSON||function(aj){return window["eval"]("("+aj+")")};var k=function(ao,am,al){var ak=ao.getResponseHeader("content-type")||"",aj=am==="xml"||!am&&ak.indexOf("xml")>=0,an=aj?ao.responseXML:ao.responseText;if(aj&&an.documentElement.nodeName==="parsererror"){if(f.error){f.error("parsererror")}}if(al&&al.dataFilter){an=al.dataFilter(an,am)}if(typeof an==="string"){if(am==="json"||!am&&ak.indexOf("json")>=0){an=q(an)}else{if(am==="script"||!am&&ak.indexOf("javascript")>=0){f.globalEval(an)}}}return an};return ai}};f.fn.ajaxForm=function(g){g=g||{};g.delegation=g.delegation&&f.isFunction(f.fn.on);if(!g.delegation&&this.length===0){var h={s:this.selector,c:this.context};if(!f.isReady&&h.s){d("DOM not ready, queuing ajaxForm");f(function(){f(h.s,h.c).ajaxForm(g)});return this}d("terminating; zero elements found by selector"+(f.isReady?"":" (DOM not ready)"));return this}if(g.delegation){f(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,g,b).on("click.form-plugin",this.selector,g,a);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",g,b).bind("click.form-plugin",g,a)};function b(h){var g=h.data;if(!h.isDefaultPrevented()){h.preventDefault();f(h.target).ajaxSubmit(g)}}function a(k){var j=k.target;var h=f(j);if(!(h.is("[type=submit],[type=image]"))){var g=h.closest("[type=submit]");if(g.length===0){return}j=g[0]}var i=this;i.clk=j;if(j.type=="image"){if(k.offsetX!==undefined){i.clk_x=k.offsetX;i.clk_y=k.offsetY}else{if(typeof f.fn.offset=="function"){var l=h.offset();i.clk_x=k.pageX-l.left;i.clk_y=k.pageY-l.top}else{i.clk_x=k.pageX-j.offsetLeft;i.clk_y=k.pageY-j.offsetTop}}}setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}f.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};f.fn.formToArray=function(x,g){var w=[];if(this.length===0){return w}var l=this[0];var z=this.attr("id");var q=x?l.getElementsByTagName("*"):l.elements;var A;if(q&&!/MSIE [678]/.test(navigator.userAgent)){q=f(q).get()}if(z){A=f(':input[form="'+z+'"]').get();if(A.length){q=(q||[]).concat(A)}}if(!q||!q.length){return w}var r,p,o,y,m,t,k;for(r=0,t=q.length;r<t;r++){m=q[r];o=m.name;if(!o||m.disabled){continue}if(x&&l.clk&&m.type=="image"){if(l.clk==m){w.push({name:o,value:f(m).val(),type:m.type});w.push({name:o+".x",value:l.clk_x},{name:o+".y",value:l.clk_y})}continue}y=f.fieldValue(m,true);if(y&&y.constructor==Array){if(g){g.push(m)}for(p=0,k=y.length;p<k;p++){w.push({name:o,value:y[p]})}}else{if(c.fileapi&&m.type=="file"){if(g){g.push(m)}var h=m.files;if(h.length){for(p=0;p<h.length;p++){w.push({name:o,value:h[p],type:m.type})}}else{w.push({name:o,value:"",type:m.type})}}else{if(y!==null&&typeof y!="undefined"){if(g){g.push(m)}w.push({name:o,value:y,type:m.type,required:m.required})}}}}if(!x&&l.clk){var s=f(l.clk),u=s[0];o=u.name;if(o&&!u.disabled&&u.type=="image"){w.push({name:o,value:s.val()});w.push({name:o+".x",value:l.clk_x},{name:o+".y",value:l.clk_y})}}return w};f.fn.formSerialize=function(g){return f.param(this.formToArray(g))};f.fn.fieldSerialize=function(h){var g=[];this.each(function(){var m=this.name;if(!m){return}var k=f.fieldValue(this,h);if(k&&k.constructor==Array){for(var l=0,j=k.length;l<j;l++){g.push({name:m,value:k[l]})}}else{if(k!==null&&typeof k!="undefined"){g.push({name:this.name,value:k})}}});return f.param(g)};f.fn.fieldValue=function(m){for(var l=[],j=0,g=this.length;j<g;j++){var k=this[j];var h=f.fieldValue(k,m);if(h===null||typeof h=="undefined"||(h.constructor==Array&&!h.length)){continue}if(h.constructor==Array){f.merge(l,h)}else{l.push(h)}}return l};f.fieldValue=function(g,o){var j=g.name,u=g.type,w=g.tagName.toLowerCase();if(o===undefined){o=true}if(o&&(!j||g.disabled||u=="reset"||u=="button"||(u=="checkbox"||u=="radio")&&!g.checked||(u=="submit"||u=="image")&&g.form&&g.form.clk!=g||w=="select"&&g.selectedIndex==-1)){return null}if(w=="select"){var p=g.selectedIndex;if(p<0){return null}var r=[],h=g.options;var l=(u=="select-one");var q=(l?p+1:h.length);for(var k=(l?p:0);k<q;k++){var m=h[k];if(m.selected){var s=m.value;if(!s){s=(m.attributes&&m.attributes.value&&!(m.attributes.value.specified))?m.text:m.value}if(l){return s}r.push(s)}}return r}return f(g).val()};f.fn.clearForm=function(g){return this.each(function(){f("input,select,textarea",this).clearFields(g)})};f.fn.clearFields=f.fn.clearInputs=function(g){var h=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var j=this.type,i=this.tagName.toLowerCase();if(h.test(j)||i=="textarea"){this.value=""}else{if(j=="checkbox"||j=="radio"){this.checked=false}else{if(i=="select"){this.selectedIndex=-1}else{if(j=="file"){if(/MSIE/.test(navigator.userAgent)){f(this).replaceWith(f(this).clone(true))}else{f(this).val("")}}else{if(g){if((g===true&&/hidden/.test(j))||(typeof g=="string"&&f(this).is(g))){this.value=""}}}}}}})};f.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};f.fn.enable=function(g){if(g===undefined){g=true}return this.each(function(){this.disabled=!g})};f.fn.selected=function(g){if(g===undefined){g=true}return this.each(function(){var h=this.type;if(h=="checkbox"||h=="radio"){this.checked=g}else{if(this.tagName.toLowerCase()=="option"){var i=f(this).parent("select");if(g&&i[0]&&i[0].type=="select-one"){i.find("option").selected(false)}this.selected=g}}})};f.fn.ajaxSubmit.debug=false;function d(){if(!f.fn.ajaxSubmit.debug){return}var g="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(g)}else{if(window.opera&&window.opera.postError){window.opera.postError(g)}}}}));(function(a){a.widget("ech.notify",{options:{speed:500,expires:5000,stack:"below",custom:false,queue:false},_create:function(){var b=this;this.templates={};this.keys=[];this.element.addClass("ui-notify").children().addClass("ui-notify-message ui-notify-message-style").each(function(d){var c=this.id||d;b.keys.push(c);b.templates[c]=a(this).removeAttr("id").wrap("<div></div>").parent().html()}).end().empty().show()},create:function(c,e,d){if(typeof c==="object"){d=e;e=c;c=null}var b=this.templates[c||this.keys[0]];if(d&&d.custom){b=a(b).removeClass("ui-notify-message-style").wrap("<div></div>").parent().html()}this.openNotifications=this.openNotifications||0;return new a.ech.notify.instance(this)._create(e,a.extend({},this.options,d),b)}});a.extend(a.ech.notify,{instance:function(b){this.__super=b;this.isOpen=false}});a.extend(a.ech.notify.instance.prototype,{_create:function(h,e,g){this.options=e;var d=this,f=g.replace(/#(?:\{|%7B)(.*?)(?:\}|%7D)/g,function(i,j){return(j in h)?h[j]:""}),c=(this.element=a(f)),b=c.find(".ui-notify-close");if(typeof this.options.click==="function"){c.addClass("ui-notify-click").bind("click",function(i){d._trigger("click",i,d)})}if(b.length){b.bind("click",function(){d.close();return false})}this.__super.element.queue("notify",function(){d.open();if(typeof e.expires==="number"&&e.expires>0){setTimeout(a.proxy(d.close,d),e.expires)}});if(!this.options.queue||this.__super.openNotifications<=this.options.queue-1){this.__super.element.dequeue("notify")}return this},close:function(){var b=this.options.speed;this.element.fadeTo(b,0).slideUp(b,a.proxy(function(){this._trigger("close");this.isOpen=false;this.element.remove();this.__super.openNotifications-=1;this.__super.element.dequeue("notify")},this));return this},open:function(){if(this.isOpen||this._trigger("beforeopen")===false){return this}var b=this;this.__super.openNotifications+=1;this.element[this.options.stack==="above"?"prependTo":"appendTo"](this.__super.element).css({display:"none",opacity:""}).fadeIn(this.options.speed,function(){b._trigger("open");b.isOpen=true});return this},widget:function(){return this.element},_trigger:function(c,d,b){return this.__super._trigger.call(this,c,d,b)}})})(jQuery);
/*
 * Select2 4.0.0
 * https://select2.github.io
 *
 * Released under the MIT license
 * https://github.com/select2/select2/blob/master/LICENSE.md
 */
(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof exports==="object"){a(require("jquery"))}else{a(jQuery)}}}(function(c){var b=(function(){if(c&&c.fn&&c.fn.select2&&c.fn.select2.amd){var d=c.fn.select2.amd}var d;(function(){if(!d||!d.requirejs){if(!d){d={}}else{e=d}var f,e,g;(function(l){var o,h,s,t,k={},j={},z={},w={},r=Object.prototype.hasOwnProperty,p=[].slice,q=/\.js$/;function A(B,C){return r.call(B,C)}function u(E,C){var M,I,G,J,N,F,P,Q,L,K,H,O=C&&C.split("/"),D=z.map,B=(D&&D["*"])||{};if(E&&E.charAt(0)==="."){if(C){O=O.slice(0,O.length-1);E=E.split("/");N=E.length-1;if(z.nodeIdCompat&&q.test(E[N])){E[N]=E[N].replace(q,"")}E=O.concat(E);for(L=0;L<E.length;L+=1){H=E[L];if(H==="."){E.splice(L,1);L-=1}else{if(H===".."){if(L===1&&(E[2]===".."||E[0]==="..")){break}else{if(L>0){E.splice(L-1,2);L-=2}}}}}E=E.join("/")}else{if(E.indexOf("./")===0){E=E.substring(2)}}}if((O||B)&&D){M=E.split("/");for(L=M.length;L>0;L-=1){I=M.slice(0,L).join("/");if(O){for(K=O.length;K>0;K-=1){G=D[O.slice(0,K).join("/")];if(G){G=G[I];if(G){J=G;F=L;break}}}}if(J){break}if(!P&&B&&B[I]){P=B[I];Q=L}}if(!J&&P){J=P;F=Q}if(J){M.splice(0,F,J);E=M.join("/")}}return E}function y(B,C){return function(){return h.apply(l,p.call(arguments,0).concat([B,C]))}}function v(B){return function(C){return u(C,B)}}function m(B){return function(C){k[B]=C}}function n(C){if(A(j,C)){var B=j[C];delete j[C];w[C]=true;o.apply(l,B)}if(!A(k,C)&&!A(w,C)){throw new Error("No "+C)}return k[C]}function x(C){var D,B=C?C.indexOf("!"):-1;if(B>-1){D=C.substring(0,B);C=C.substring(B+1,C.length)}return[D,C]}s=function(C,B){var D,F=x(C),E=F[0];C=F[1];if(E){E=u(E,B);D=n(E)}if(E){if(D&&D.normalize){C=D.normalize(C,v(B))}else{C=u(C,B)}}else{C=u(C,B);F=x(C);E=F[0];C=F[1];if(E){D=n(E)}}return{f:E?E+"!"+C:C,n:C,pr:E,p:D}};function i(B){return function(){return(z&&z.config&&z.config[B])||{}}}t={require:function(B){return y(B)},exports:function(B){var C=k[B];if(typeof C!=="undefined"){return C}else{return(k[B]={})}},module:function(B){return{id:B,uri:"",exports:k[B],config:i(B)}}};o=function(C,M,L,K){var F,J,G,B,E,H=[],D=typeof L,I;K=K||C;if(D==="undefined"||D==="function"){M=!M.length&&L.length?["require","exports","module"]:M;for(E=0;E<M.length;E+=1){B=s(M[E],K);J=B.f;if(J==="require"){H[E]=t.require(C)}else{if(J==="exports"){H[E]=t.exports(C);I=true}else{if(J==="module"){F=H[E]=t.module(C)}else{if(A(k,J)||A(j,J)||A(w,J)){H[E]=n(J)}else{if(B.p){B.p.load(B.n,y(K,true),m(J),{});H[E]=k[J]}else{throw new Error(C+" missing "+J)}}}}}}G=L?L.apply(k[C],H):undefined;if(C){if(F&&F.exports!==l&&F.exports!==k[C]){k[C]=F.exports}else{if(G!==l||!I){k[C]=G}}}}else{if(C){k[C]=L}}};f=e=h=function(E,F,B,C,D){if(typeof E==="string"){if(t[E]){return t[E](F)}return n(s(E,F).f)}else{if(!E.splice){z=E;if(z.deps){h(z.deps,z.callback)}if(!F){return}if(F.splice){E=F;F=B;B=null}else{E=l}}}F=F||function(){};if(typeof B==="function"){B=C;C=D}if(C){o(l,E,F,B)}else{setTimeout(function(){o(l,E,F,B)},4)}return h};h.config=function(B){return h(B)};f._defined=k;g=function(B,C,D){if(!C.splice){D=C;C=[]}if(!A(k,B)&&!A(j,B)){j[B]=[B,C,D]}};g.amd={jQuery:true}}());d.requirejs=f;d.require=e;d.define=g}}());d.define("almond",function(){});d.define("jquery",[],function(){var e=c||$;if(e==null&&console&&console.error){console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page.")}return e});d.define("select2/utils",["jquery"],function(h){var g={};g.Extend=function(m,j){var k={}.hasOwnProperty;function i(){this.constructor=m}for(var l in j){if(k.call(j,l)){m[l]=j[l]}}i.prototype=j.prototype;m.prototype=new i();m.__super__=j.prototype;return m};function f(n){var l=n.prototype;var k=[];for(var j in l){var i=l[j];if(typeof i!=="function"){continue}if(j==="constructor"){continue}k.push(j)}return k}g.Decorate=function(q,p){var o=f(p);var n=f(q);function t(){var u=Array.prototype.unshift;var v=p.prototype.constructor.length;var m=q.prototype.constructor;if(v>0){u.call(arguments,q.prototype.constructor);m=p.prototype.constructor}m.apply(this,arguments)}p.displayName=q.displayName;function i(){this.constructor=t}t.prototype=new i();for(var l=0;l<n.length;l++){var j=n[l];t.prototype[j]=q.prototype[j]}var s=function(m){var u=function(){};if(m in t.prototype){u=t.prototype[m]}var v=p.prototype[m];return function(){var w=Array.prototype.unshift;w.call(arguments,u);return v.apply(this,arguments)}};for(var r=0;r<o.length;r++){var k=o[r];t.prototype[k]=s(k)}return t};var e=function(){this.listeners={}};e.prototype.on=function(i,j){this.listeners=this.listeners||{};if(i in this.listeners){this.listeners[i].push(j)}else{this.listeners[i]=[j]}};e.prototype.trigger=function(i){var j=Array.prototype.slice;this.listeners=this.listeners||{};if(i in this.listeners){this.invoke(this.listeners[i],j.call(arguments,1))}if("*" in this.listeners){this.invoke(this.listeners["*"],arguments)}};e.prototype.invoke=function(l,m){for(var k=0,j=l.length;k<j;k++){l[k].apply(this,m)}};g.Observable=e;g.generateChars=function(m){var l="";for(var k=0;k<m;k++){var j=Math.floor(Math.random()*36);l+=j.toString(36)}return l};g.bind=function(j,i){return function(){j.apply(i,arguments)}};g._convertData=function(o){for(var n in o){var m=n.split("-");var i=o;if(m.length===1){continue}for(var j=0;j<m.length;j++){var l=m[j];l=l.substring(0,1).toLowerCase()+l.substring(1);if(!(l in i)){i[l]={}}if(j==m.length-1){i[l]=o[n]}i=i[l]}delete o[n]}return o};g.hasScroll=function(k,m){var l=h(m);var j=m.style.overflowX;var i=m.style.overflowY;if(j===i&&(i==="hidden"||i==="visible")){return false}if(j==="scroll"||i==="scroll"){return true}return(l.innerHeight()<m.scrollHeight||l.innerWidth()<m.scrollWidth)};g.escapeMarkup=function(i){var j={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};if(typeof i!=="string"){return i}return String(i).replace(/[&<>"'\/\\]/g,function(k){return j[k]})};g.appendMany=function(i,k){if(h.fn.jquery.substr(0,3)==="1.7"){var j=h();h.map(k,function(l){j=j.add(l)});k=j}i.append(k)};return g});d.define("select2/results",["jquery","./utils"],function(g,f){function e(h,i,j){this.$element=h;this.data=j;this.options=i;e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.render=function(){var h=g('<ul class="select2-results__options" role="tree"></ul>');if(this.options.get("multiple")){h.attr("aria-multiselectable","true")}this.$results=h;return h};e.prototype.clear=function(){this.$results.empty()};e.prototype.displayMessage=function(k){var h=this.options.get("escapeMarkup");this.clear();this.hideLoading();var i=g('<li role="treeitem" class="select2-results__option"></li>');var j=this.options.get("translations").get(k.message);i.append(h(j(k.args)));this.$results.append(i)};e.prototype.append=function(j){this.hideLoading();var h=[];if(j.results==null||j.results.length===0){if(this.$results.children().length===0){this.trigger("results:message",{message:"noResults"})}return}j.results=this.sort(j.results);for(var l=0;l<j.results.length;l++){var i=j.results[l];var k=this.option(i);h.push(k)}this.$results.append(h)};e.prototype.position=function(h,i){var j=i.find(".select2-results");j.append(h)};e.prototype.sort=function(h){var i=this.options.get("sorter");return i(h)};e.prototype.setClasses=function(){var h=this;this.data.current(function(l){var j=g.map(l,function(m){return m.id.toString()});var i=h.$results.find(".select2-results__option[aria-selected]");i.each(function(){var n=g(this);var m=g.data(this,"data");var o=""+m.id;if((m.element!=null&&m.element.selected)||(m.element==null&&g.inArray(o,j)>-1)){n.attr("aria-selected","true")}else{n.attr("aria-selected","false")}});var k=i.filter("[aria-selected=true]");if(k.length>0){k.first().trigger("mouseenter")}else{i.first().trigger("mouseenter")}})};e.prototype.showLoading=function(j){this.hideLoading();var i=this.options.get("translations").get("searching");var k={disabled:true,loading:true,text:i(j)};var h=this.option(k);h.className+=" loading-results";this.$results.prepend(h)};e.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};e.prototype.option=function(l){var m=document.createElement("li");m.className="select2-results__option";var t={role:"treeitem","aria-selected":"false"};if(l.disabled){delete t["aria-selected"];t["aria-disabled"]="true"}if(l.id==null){delete t["aria-selected"]}if(l._resultId!=null){m.id=l._resultId}if(l.title){m.title=l.title}if(l.children){t.role="group";t["aria-label"]=l.text;delete t["aria-selected"]}for(var n in t){var k=t[n];m.setAttribute(n,k)}if(l.children){var h=g(m);var r=document.createElement("strong");r.className="select2-results__group";var q=g(r);this.template(l,r);var s=[];for(var p=0;p<l.children.length;p++){var j=l.children[p];var i=this.option(j);s.push(i)}var o=g("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});o.append(s);h.append(r);h.append(o)}else{this.template(l,m)}g.data(m,"data",l);return m};e.prototype.bind=function(h,j){var i=this;var k=h.id+"-results";this.$results.attr("id",k);h.on("results:all",function(l){i.clear();i.append(l.data);if(h.isOpen()){i.setClasses()}});h.on("results:append",function(l){i.append(l.data);if(h.isOpen()){i.setClasses()}});h.on("query",function(l){i.showLoading(l)});h.on("select",function(){if(!h.isOpen()){return}i.setClasses()});h.on("unselect",function(){if(!h.isOpen()){return}i.setClasses()});h.on("open",function(){i.$results.attr("aria-expanded","true");i.$results.attr("aria-hidden","false");i.setClasses();i.ensureHighlightVisible()});h.on("close",function(){i.$results.attr("aria-expanded","false");i.$results.attr("aria-hidden","true");i.$results.removeAttr("aria-activedescendant")});h.on("results:toggle",function(){var l=i.getHighlightedResults();if(l.length===0){return}l.trigger("mouseup")});h.on("results:select",function(){var l=i.getHighlightedResults();if(l.length===0){return}var m=l.data("data");if(l.attr("aria-selected")=="true"){i.trigger("close")}else{i.trigger("select",{data:m})}});h.on("results:previous",function(){var n=i.getHighlightedResults();var m=i.$results.find("[aria-selected]");var p=m.index(n);if(p===0){return}var l=p-1;if(n.length===0){l=0}var o=m.eq(l);o.trigger("mouseenter");var s=i.$results.offset().top;var r=o.offset().top;var q=i.$results.scrollTop()+(r-s);if(l===0){i.$results.scrollTop(0)}else{if(r-s<0){i.$results.scrollTop(q)}}});h.on("results:next",function(){var n=i.getHighlightedResults();var m=i.$results.find("[aria-selected]");var p=m.index(n);var l=p+1;if(l>=m.length){return}var o=m.eq(l);o.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(false);var r=o.offset().top+o.outerHeight(false);var q=i.$results.scrollTop()+r-s;if(l===0){i.$results.scrollTop(0)}else{if(r>s){i.$results.scrollTop(q)}}});h.on("results:focus",function(l){l.element.addClass("select2-results__option--highlighted")});h.on("results:message",function(l){i.displayMessage(l)});if(g.fn.mousewheel){this.$results.on("mousewheel",function(o){var n=i.$results.scrollTop();var l=(i.$results.get(0).scrollHeight-i.$results.scrollTop()+o.deltaY);var p=o.deltaY>0&&n-o.deltaY<=0;var m=o.deltaY<0&&l<=i.$results.height();if(p){i.$results.scrollTop(0);o.preventDefault();o.stopPropagation()}else{if(m){i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height());o.preventDefault();o.stopPropagation()}}})}this.$results.on("mouseup",".select2-results__option[aria-selected]",function(l){var n=g(this);var m=n.data("data");if(n.attr("aria-selected")==="true"){if(i.options.get("multiple")){i.trigger("unselect",{originalEvent:l,data:m})}else{i.trigger("close")}return}i.trigger("select",{originalEvent:l,data:m})});this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(l){var m=g(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted");i.trigger("results:focus",{data:m,element:g(this)})})};e.prototype.getHighlightedResults=function(){var h=this.$results.find(".select2-results__option--highlighted");return h};e.prototype.destroy=function(){this.$results.remove()};e.prototype.ensureHighlightVisible=function(){var i=this.getHighlightedResults();if(i.length===0){return}var h=this.$results.find("[aria-selected]");var j=h.index(i);var m=this.$results.offset().top;var l=i.offset().top;var k=this.$results.scrollTop()+(l-m);var n=l-m;k-=i.outerHeight(false)*2;if(j<=2){this.$results.scrollTop(0)}else{if(n>this.$results.outerHeight()||n<0){this.$results.scrollTop(k)}}};e.prototype.template=function(i,j){var k=this.options.get("templateResult");var h=this.options.get("escapeMarkup");var l=k(i);if(l==null){j.style.display="none"}else{if(typeof l==="string"){j.innerHTML=h(l)}else{g(j).append(l)}}};return e});d.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e});d.define("select2/selection/base",["jquery","../utils","../keys"],function(h,g,e){function f(i,j){this.$element=i;this.options=j;f.__super__.constructor.call(this)}g.Extend(f,g.Observable);f.prototype.render=function(){var i=h('<span class="select2-selection" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"></span>');this._tabindex=0;if(this.$element.data("old-tabindex")!=null){this._tabindex=this.$element.data("old-tabindex")}else{if(this.$element.attr("tabindex")!=null){this._tabindex=this.$element.attr("tabindex")}}i.attr("title",this.$element.attr("title"));i.attr("tabindex",this._tabindex);this.$selection=i;return i};f.prototype.bind=function(i,l){var k=this;var m=i.id+"-container";var j=i.id+"-results";this.container=i;this.$selection.on("focus",function(n){k.trigger("focus",n)});this.$selection.on("blur",function(n){k.trigger("blur",n)});this.$selection.on("keydown",function(n){k.trigger("keypress",n);if(n.which===e.SPACE){n.preventDefault()}});i.on("results:focus",function(n){k.$selection.attr("aria-activedescendant",n.data._resultId)});i.on("selection:update",function(n){k.update(n.data)});i.on("open",function(){k.$selection.attr("aria-expanded","true");k.$selection.attr("aria-owns",j);k._attachCloseHandler(i)});i.on("close",function(){k.$selection.attr("aria-expanded","false");k.$selection.removeAttr("aria-activedescendant");k.$selection.removeAttr("aria-owns");k.$selection.focus();k._detachCloseHandler(i)});i.on("enable",function(){k.$selection.attr("tabindex",k._tabindex)});i.on("disable",function(){k.$selection.attr("tabindex","-1")})};f.prototype._attachCloseHandler=function(i){var j=this;h(document.body).on("mousedown.select2."+i.id,function(n){var k=h(n.target);var l=k.closest(".select2");var m=h(".select2.select2-container--open");m.each(function(){var p=h(this);if(this==l[0]){return}var o=p.data("element");o.select2("close")})})};f.prototype._detachCloseHandler=function(i){h(document.body).off("mousedown.select2."+i.id)};f.prototype.position=function(i,k){var j=k.find(".selection");j.append(i)};f.prototype.destroy=function(){this._detachCloseHandler(this.container)};f.prototype.update=function(i){throw new Error("The `update` method must be defined in child classes.")};return f});d.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(h,f,g,e){function i(){i.__super__.constructor.apply(this,arguments)}g.Extend(i,f);i.prototype.render=function(){var j=i.__super__.render.call(this);j.addClass("select2-selection--single");j.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>');return j};i.prototype.bind=function(j,l){var k=this;i.__super__.bind.apply(this,arguments);var m=j.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",m);this.$selection.attr("aria-labelledby",m);this.$selection.on("mousedown",function(n){if(n.which!==1){return}k.trigger("toggle",{originalEvent:n})});this.$selection.on("focus",function(n){});this.$selection.on("blur",function(n){});j.on("selection:update",function(n){k.update(n.data)})};i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()};i.prototype.display=function(l){var k=this.options.get("templateSelection");var j=this.options.get("escapeMarkup");return j(k(l))};i.prototype.selectionContainer=function(){return h("<span></span>")};i.prototype.update=function(l){if(l.length===0){this.clear();return}var j=l[0];var k=this.display(j);var m=this.$selection.find(".select2-selection__rendered");m.empty().append(k);m.prop("title",j.title||j.text)};return i});d.define("select2/selection/multiple",["jquery","./base","../utils"],function(h,e,g){function f(i,j){f.__super__.constructor.apply(this,arguments)}g.Extend(f,e);f.prototype.render=function(){var i=f.__super__.render.call(this);i.addClass("select2-selection--multiple");i.html('<ul class="select2-selection__rendered"></ul>');return i};f.prototype.bind=function(i,k){var j=this;f.__super__.bind.apply(this,arguments);this.$selection.on("click",function(l){j.trigger("toggle",{originalEvent:l})});this.$selection.on("click",".select2-selection__choice__remove",function(m){var n=h(this);var l=n.parent();var o=l.data("data");j.trigger("unselect",{originalEvent:m,data:o})})};f.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()};f.prototype.display=function(k){var j=this.options.get("templateSelection");var i=this.options.get("escapeMarkup");return i(j(k))};f.prototype.selectionContainer=function(){var i=h('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return i};f.prototype.update=function(m){this.clear();if(m.length===0){return}var j=[];for(var o=0;o<m.length;o++){var k=m[o];var l=this.display(k);var i=this.selectionContainer();i.append(l);i.prop("title",k.title||k.text);i.data("data",k);j.push(i)}var n=this.$selection.find(".select2-selection__rendered");g.appendMany(n,j)};return f});d.define("select2/selection/placeholder",["../utils"],function(f){function e(i,g,h){this.placeholder=this.normalizePlaceholder(h.get("placeholder"));i.call(this,g,h)}e.prototype.normalizePlaceholder=function(g,h){if(typeof h==="string"){h={id:"",text:h}}return h};e.prototype.createPlaceholder=function(h,i){var g=this.selectionContainer();g.html(this.display(i));g.addClass("select2-selection__placeholder").removeClass("select2-selection__choice");return g};e.prototype.update=function(k,j){var h=(j.length==1&&j[0].id!=this.placeholder.id);var i=j.length>1;if(i||h){return k.call(this,j)}this.clear();var g=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(g)};return e});d.define("select2/selection/allowClear",["jquery","../keys"],function(f,e){function g(){}g.prototype.bind=function(j,h,k){var i=this;j.call(this,h,k);if(this.placeholder==null){if(this.options.get("debug")&&window.console&&console.error){console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option.")}}this.$selection.on("mousedown",".select2-selection__clear",function(l){i._handleClear(l)});h.on("keypress",function(l){i._handleKeyboardClear(l,h)})};g.prototype._handleClear=function(i,h){if(this.options.get("disabled")){return}var l=this.$selection.find(".select2-selection__clear");if(l.length===0){return}h.stopPropagation();var k=l.data("data");for(var m=0;m<k.length;m++){var j={data:k[m]};this.trigger("unselect",j);if(j.prevented){return}}this.$element.val(this.placeholder.id).trigger("change");this.trigger("toggle")};g.prototype._handleKeyboardClear=function(j,i,h){if(h.isOpen()){return}if(i.which==e.DELETE||i.which==e.BACKSPACE){this._handleClear(i)}};g.prototype.update=function(j,i){j.call(this,i);if(this.$selection.find(".select2-selection__placeholder").length>0||i.length===0){return}var h=f('<span class="select2-selection__clear">&times;</span>');h.data("data",i);this.$selection.find(".select2-selection__rendered").prepend(h)};return g});d.define("select2/selection/search",["jquery","../utils","../keys"],function(h,g,e){function f(k,i,j){k.call(this,i,j)}f.prototype.render=function(j){var i=h('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></li>');this.$searchContainer=i;this.$search=i.find("input");var k=j.call(this);return k};f.prototype.bind=function(k,i,l){var j=this;k.call(this,i,l);i.on("open",function(){j.$search.attr("tabindex",0);j.$search.focus()});i.on("close",function(){j.$search.attr("tabindex",-1);j.$search.val("");j.$search.focus()});i.on("enable",function(){j.$search.prop("disabled",false)});i.on("disable",function(){j.$search.prop("disabled",true)});this.$selection.on("focusin",".select2-search--inline",function(m){j.trigger("focus",m)});this.$selection.on("focusout",".select2-search--inline",function(m){j.trigger("blur",m)});this.$selection.on("keydown",".select2-search--inline",function(m){m.stopPropagation();j.trigger("keypress",m);j._keyUpPrevented=m.isDefaultPrevented();var o=m.which;if(o===e.BACKSPACE&&j.$search.val()===""){var n=j.$searchContainer.prev(".select2-selection__choice");if(n.length>0){var p=n.data("data");j.searchRemoveChoice(p);m.preventDefault()}}});this.$selection.on("input",".select2-search--inline",function(m){j.$selection.off("keyup.search")});this.$selection.on("keyup.search input",".select2-search--inline",function(m){j.handleSearch(m)})};f.prototype.createPlaceholder=function(i,j){this.$search.attr("placeholder",j.text)};f.prototype.update=function(j,i){this.$search.attr("placeholder","");j.call(this,i);this.$selection.find(".select2-selection__rendered").append(this.$searchContainer);this.resizeSearch()};f.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var i=this.$search.val();this.trigger("query",{term:i})}this._keyUpPrevented=false};f.prototype.searchRemoveChoice=function(j,i){this.trigger("unselect",{data:i});this.trigger("open");this.$search.val(i.text+" ")};f.prototype.resizeSearch=function(){this.$search.css("width","25px");var i="";if(this.$search.attr("placeholder")!==""){i=this.$selection.find(".select2-selection__rendered").innerWidth()}else{var j=this.$search.val().length+1;i=(j*0.75)+"em"}this.$search.css("width",i)};return f});d.define("select2/selection/eventRelay",["jquery"],function(e){function f(){}f.prototype.bind=function(k,g,l){var h=this;var i=["open","opening","close","closing","select","selecting","unselect","unselecting"];var j=["opening","closing","selecting","unselecting"];k.call(this,g,l);g.on("*",function(n,o){if(e.inArray(n,i)===-1){return}o=o||{};var m=e.Event("select2:"+n,{params:o});h.$element.trigger(m);if(e.inArray(n,j)===-1){return}o.prevented=m.isDefaultPrevented()})};return f});d.define("select2/translation",["jquery","require"],function(g,f){function e(h){this.dict=h||{}}e.prototype.all=function(){return this.dict};e.prototype.get=function(h){return this.dict[h]};e.prototype.extend=function(h){this.dict=g.extend({},h.all(),this.dict)};e._cache={};e.loadPath=function(i){if(!(i in e._cache)){var h=f(i);e._cache[i]=h}return new e(e._cache[i])};return e});d.define("select2/diacritics",[],function(){var e={"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03C9":"\u03C9","\u03C2":"\u03C3"};return e});d.define("select2/data/base",["../utils"],function(f){function e(g,h){e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.current=function(g){throw new Error("The `current` method must be defined in child classes.")};e.prototype.query=function(g,h){throw new Error("The `query` method must be defined in child classes.")};e.prototype.bind=function(g,h){};e.prototype.destroy=function(){};e.prototype.generateResultId=function(g,h){var i=g.id+"-result-";i+=f.generateChars(4);if(h.id!=null){i+="-"+h.id.toString()}else{i+="-"+f.generateChars(4)}return i};return e});d.define("select2/data/select",["./base","../utils","jquery"],function(e,h,g){function f(i,j){this.$element=i;this.options=j;f.__super__.constructor.call(this)}h.Extend(f,e);f.prototype.current=function(k){var j=[];var i=this;this.$element.find(":selected").each(function(){var m=g(this);var l=i.item(m);j.push(l)});k(j)};f.prototype.select=function(j){var i=this;j.selected=true;if(g(j.element).is("option")){j.element.selected=true;this.$element.trigger("change");return}if(this.$element.prop("multiple")){this.current(function(l){var n=[];j=[j];j.push.apply(j,l);for(var m=0;m<j.length;m++){var o=j[m].id;if(g.inArray(o,n)===-1){n.push(o)}}i.$element.val(n);i.$element.trigger("change")})}else{var k=j.id;this.$element.val(k);this.$element.trigger("change")}};f.prototype.unselect=function(j){var i=this;if(!this.$element.prop("multiple")){return}j.selected=false;if(g(j.element).is("option")){j.element.selected=false;this.$element.trigger("change");return}this.current(function(k){var m=[];for(var l=0;l<k.length;l++){var n=k[l].id;if(n!==j.id&&g.inArray(n,m)===-1){m.push(n)}}i.$element.val(m);i.$element.trigger("change")})};f.prototype.bind=function(i,k){var j=this;this.container=i;i.on("select",function(l){j.select(l.data)});i.on("unselect",function(l){j.unselect(l.data)})};f.prototype.destroy=function(){this.$element.find("*").each(function(){g.removeData(this,"data")})};f.prototype.query=function(l,m){var k=[];var j=this;var i=this.$element.children();i.each(function(){var p=g(this);if(!p.is("option")&&!p.is("optgroup")){return}var n=j.item(p);var o=j.matches(l,n);if(o!==null){k.push(o)}});m({results:k})};f.prototype.addOptions=function(i){h.appendMany(this.$element,i)};f.prototype.option=function(j){var i;if(j.children){i=document.createElement("optgroup");i.label=j.text}else{i=document.createElement("option");if(i.textContent!==undefined){i.textContent=j.text}else{i.innerText=j.text}}if(j.id){i.value=j.id}if(j.disabled){i.disabled=true}if(j.selected){i.selected=true}if(j.title){i.title=j.title}var k=g(i);var l=this._normalizeItem(j);l.element=i;g.data(i,"data",l);return k};f.prototype.item=function(m){var l={};l=g.data(m[0],"data");if(l!=null){return l}if(m.is("option")){l={id:m.val(),text:m.text(),disabled:m.prop("disabled"),selected:m.prop("selected"),title:m.prop("title")}}else{if(m.is("optgroup")){l={text:m.prop("label"),children:[],title:m.prop("title")};var i=m.children("option");var j=[];for(var o=0;o<i.length;o++){var k=g(i[o]);var n=this.item(k);j.push(n)}l.children=j}}l=this._normalizeItem(l);l.element=m[0];g.data(m[0],"data",l);return l};f.prototype._normalizeItem=function(i){if(!g.isPlainObject(i)){i={id:i,text:i}}i=g.extend({},{text:""},i);var j={selected:false,disabled:false};if(i.id!=null){i.id=i.id.toString()}if(i.text!=null){i.text=i.text.toString()}if(i._resultId==null&&i.id&&this.container!=null){i._resultId=this.generateResultId(this.container,i)}return g.extend({},j,i)};f.prototype.matches=function(k,i){var j=this.options.get("matcher");return j(k,i)};return f});d.define("select2/data/array",["./select","../utils","jquery"],function(e,g,f){function h(i,j){var k=j.get("data")||[];h.__super__.constructor.call(this,i,j);this.addOptions(this.convertToOptions(k))}g.Extend(h,e);h.prototype.select=function(i){var j=this.$element.find("option").filter(function(k,l){return l.value==i.id.toString()});if(j.length===0){j=this.option(i);this.addOptions(j)}h.__super__.select.call(this,i)};h.prototype.convertToOptions=function(k){var u=this;var n=this.$element.find("option");var j=n.map(function(){return u.item(f(this)).id}).get();var m=[];function r(w){return function(){return f(this).val()==w.id}}for(var q=0;q<k.length;q++){var t=this._normalizeItem(k[q]);if(f.inArray(t.id,j)>=0){var o=n.filter(r(t));var p=this.item(o);var v=f.extend(true,{},p,t);var l=this.option(p);o.replaceWith(l);continue}var i=this.option(t);if(t.children){var s=this.convertToOptions(t.children);g.appendMany(i,s)}m.push(i)}return m};return h});d.define("select2/data/ajax",["./array","../utils","jquery"],function(h,g,f){function e(i,j){this.ajaxOptions=this._applyDefaults(j.get("ajax"));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}h.__super__.constructor.call(this,i,j)}g.Extend(e,h);e.prototype._applyDefaults=function(i){var j={data:function(k){return{q:k.term}},transport:function(n,m,l){var k=f.ajax(n);k.then(m);k.fail(l);return k}};return f.extend({},j,i,true)};e.prototype.processResults=function(i){return i};e.prototype.query=function(m,n){var l=[];var i=this;if(this._request!=null){if(f.isFunction(this._request.abort)){this._request.abort()}this._request=null}var j=f.extend({type:"GET"},this.ajaxOptions);if(typeof j.url==="function"){j.url=j.url(m)}if(typeof j.data==="function"){j.data=j.data(m)}function k(){var o=j.transport(j,function(q){var p=i.processResults(q,m);if(i.options.get("debug")&&window.console&&console.error){if(!p||!p.results||!f.isArray(p.results)){console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")}}n(p)},function(){});i._request=o}if(this.ajaxOptions.delay&&m.term!==""){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}this._queryTimeout=window.setTimeout(k,this.ajaxOptions.delay)}else{k()}};return e});d.define("select2/data/tags",["jquery"],function(f){function e(h,j,m){var n=m.get("tags");var i=m.get("createTag");if(i!==undefined){this.createTag=i}h.call(this,j,m);if(f.isArray(n)){for(var l=0;l<n.length;l++){var o=n[l];var k=this._normalizeItem(o);var g=this.option(k);this.$element.append(g)}}}e.prototype.query=function(h,i,k){var g=this;this._removeOldTags();if(i.term==null||i.page!=null){h.call(this,i,k);return}function j(p,m){var q=p.results;for(var r=0;r<q.length;r++){var s=q[r];var n=(s.children!=null&&!j({results:s.children},true));var o=s.text===i.term;if(o||n){if(m){return false}p.data=q;k(p);return}}if(m){return true}var t=g.createTag(i);if(t!=null){var l=g.option(t);l.attr("data-select2-tag",true);g.addOptions([l]);g.insertTag(q,t)}p.results=q;k(p)}h.call(this,i,j)};e.prototype.createTag=function(h,i){var g=f.trim(i.term);if(g===""){return null}return{id:g,text:g}};e.prototype.insertTag=function(h,i,g){i.unshift(g)};e.prototype._removeOldTags=function(i){var h=this._lastTag;var g=this.$element.find("option[data-select2-tag]");g.each(function(){if(this.selected){return}f(this).remove()})};return e});d.define("select2/data/tokenizer",["jquery"],function(f){function e(j,g,h){var i=h.get("tokenizer");if(i!==undefined){this.tokenizer=i}j.call(this,g,h)}e.prototype.bind=function(h,g,i){h.call(this,g,i);this.$search=g.dropdown.$search||g.selection.$search||i.find(".select2-search__field")};e.prototype.query=function(i,j,l){var h=this;function g(m){h.select(m)}j.term=j.term||"";var k=this.tokenizer(j,this.options,g);if(k.term!==j.term){if(this.$search.length){this.$search.val(k.term);this.$search.focus()}j.term=k.term}i.call(this,j,l)};e.prototype.tokenizer=function(o,j,s,r){var k=s.get("tokenSeparators")||[];var h=j.term;var m=0;var n=this.createTag||function(i){return{id:i.term,text:i.term}};while(m<h.length){var q=h[m];if(f.inArray(q,k)===-1){m++;continue}var g=h.substr(0,m);var p=f.extend({},j,{term:g});var l=n(p);r(l);h=h.substr(m+1)||"";m=0}return{term:h}};return e});d.define("select2/data/minimumInputLength",[],function(){function e(h,g,f){this.minimumInputLength=f.get("minimumInputLength");h.call(this,g,f)}e.prototype.query=function(f,g,h){g.term=g.term||"";if(g.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:g.term,params:g}});return}f.call(this,g,h)};return e});d.define("select2/data/maximumInputLength",[],function(){function e(h,g,f){this.maximumInputLength=f.get("maximumInputLength");h.call(this,g,f)}e.prototype.query=function(f,g,h){g.term=g.term||"";if(this.maximumInputLength>0&&g.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:g.term,params:g}});return}f.call(this,g,h)};return e});d.define("select2/data/maximumSelectionLength",[],function(){function e(h,g,f){this.maximumSelectionLength=f.get("maximumSelectionLength");h.call(this,g,f)}e.prototype.query=function(g,h,i){var f=this;this.current(function(j){var k=j!=null?j.length:0;if(f.maximumSelectionLength>0&&k>=f.maximumSelectionLength){f.trigger("results:message",{message:"maximumSelected",args:{maximum:f.maximumSelectionLength}});return}g.call(f,h,i)})};return e});d.define("select2/dropdown",["jquery","./utils"],function(g,f){function e(h,i){this.$element=h;this.options=i;e.__super__.constructor.call(this)}f.Extend(e,f.Observable);e.prototype.render=function(){var h=g('<span class="select2-dropdown"><span class="select2-results"></span></span>');h.attr("dir",this.options.get("dir"));this.$dropdown=h;return h};e.prototype.position=function(h,i){};e.prototype.destroy=function(){this.$dropdown.remove()};return e});d.define("select2/dropdown/search",["jquery","../utils"],function(g,f){function e(){}e.prototype.render=function(i){var j=i.call(this);var h=g('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');this.$searchContainer=h;this.$search=h.find("input");j.prepend(h);return j};e.prototype.bind=function(j,h,k){var i=this;j.call(this,h,k);this.$search.on("keydown",function(l){i.trigger("keypress",l);i._keyUpPrevented=l.isDefaultPrevented()});this.$search.on("input",function(l){g(this).off("keyup")});this.$search.on("keyup input",function(l){i.handleSearch(l)});h.on("open",function(){i.$search.attr("tabindex",0);i.$search.focus();window.setTimeout(function(){i.$search.focus()},0)});h.on("close",function(){i.$search.attr("tabindex",-1);i.$search.val("")});h.on("results:all",function(m){if(m.query.term==null||m.query.term===""){var l=i.showSearch(m);if(l){i.$searchContainer.removeClass("select2-search--hide")}else{i.$searchContainer.addClass("select2-search--hide")}}})};e.prototype.handleSearch=function(h){if(!this._keyUpPrevented){var i=this.$search.val();this.trigger("query",{term:i})}this._keyUpPrevented=false};e.prototype.showSearch=function(h,i){return true};return e});d.define("select2/dropdown/hidePlaceholder",[],function(){function e(h,f,g,i){this.placeholder=this.normalizePlaceholder(g.get("placeholder"));h.call(this,f,g,i)}e.prototype.append=function(g,f){f.results=this.removePlaceholder(f.results);g.call(this,f)};e.prototype.normalizePlaceholder=function(f,g){if(typeof g==="string"){g={id:"",text:g}}return g};e.prototype.removePlaceholder=function(f,i){var h=i.slice(0);for(var j=i.length-1;j>=0;j--){var g=i[j];if(this.placeholder.id===g.id){h.splice(j,1)}}return h};return e});d.define("select2/dropdown/infiniteScroll",["jquery"],function(f){function e(i,g,h,j){this.lastParams={};i.call(this,g,h,j);this.$loadingMore=this.createLoadingMore();this.loading=false}e.prototype.append=function(h,g){this.$loadingMore.remove();this.loading=false;h.call(this,g);if(this.showLoadingMore(g)){this.$results.append(this.$loadingMore)}};e.prototype.bind=function(i,g,j){var h=this;i.call(this,g,j);g.on("query",function(k){h.lastParams=k;h.loading=true});g.on("query:append",function(k){h.lastParams=k;h.loading=true});this.$results.on("scroll",function(){var m=f.contains(document.documentElement,h.$loadingMore[0]);if(h.loading||!m){return}var l=h.$results.offset().top+h.$results.outerHeight(false);var k=h.$loadingMore.offset().top+h.$loadingMore.outerHeight(false);if(l+50>=k){h.loadMore()}})};e.prototype.loadMore=function(){this.loading=true;var g=f.extend({},{page:1},this.lastParams);g.page++;this.trigger("query:append",g)};e.prototype.showLoadingMore=function(g,h){return h.pagination&&h.pagination.more};e.prototype.createLoadingMore=function(){var h=f('<li class="option load-more" role="treeitem"></li>');var g=this.options.get("translations").get("loadingMore");h.html(g(this.lastParams));return h};return e});d.define("select2/dropdown/attachBody",["jquery","../utils"],function(g,f){function e(j,h,i){this.$dropdownParent=i.get("dropdownParent")||document.body;j.call(this,h,i)}e.prototype.bind=function(k,h,l){var j=this;var i=false;k.call(this,h,l);h.on("open",function(){j._showDropdown();j._attachPositioningHandler(h);if(!i){i=true;h.on("results:all",function(){j._positionDropdown();j._resizeDropdown()});h.on("results:append",function(){j._positionDropdown();j._resizeDropdown()})}});h.on("close",function(){j._hideDropdown();j._detachPositioningHandler(h)});this.$dropdownContainer.on("mousedown",function(m){m.stopPropagation()})};e.prototype.position=function(h,i,j){i.attr("class",j.attr("class"));i.removeClass("select2");i.addClass("select2-container--open");i.css({position:"absolute",top:-999999});this.$container=j};e.prototype.render=function(h){var j=g("<span></span>");var i=h.call(this);j.append(i);this.$dropdownContainer=j;return j};e.prototype._hideDropdown=function(h){this.$dropdownContainer.detach()};e.prototype._attachPositioningHandler=function(h){var i=this;var k="scroll.select2."+h.id;var m="resize.select2."+h.id;var l="orientationchange.select2."+h.id;var j=this.$container.parents().filter(f.hasScroll);j.each(function(){g(this).data("select2-scroll-position",{x:g(this).scrollLeft(),y:g(this).scrollTop()})});j.on(k,function(o){var n=g(this).data("select2-scroll-position");g(this).scrollTop(n.y)});g(window).on(k+" "+m+" "+l,function(n){i._positionDropdown();i._resizeDropdown()})};e.prototype._detachPositioningHandler=function(h){var j="scroll.select2."+h.id;var l="resize.select2."+h.id;var k="orientationchange.select2."+h.id;var i=this.$container.parents().filter(f.hasScroll);i.off(j);g(window).off(j+" "+l+" "+k)};e.prototype._positionDropdown=function(){var j=g(window);var s=this.$dropdown.hasClass("select2-dropdown--above");var i=this.$dropdown.hasClass("select2-dropdown--below");var q=null;var l=this.$container.position();var k=this.$container.offset();k.bottom=k.top+this.$container.outerHeight(false);var h={height:this.$container.outerHeight(false)};h.top=k.top;h.bottom=k.top+h.height;var r={height:this.$dropdown.outerHeight(false)};var o={top:j.scrollTop(),bottom:j.scrollTop()+j.height()};var n=o.top<(k.top-r.height);var p=o.bottom>(k.bottom+r.height);var m={left:k.left,top:h.bottom};if(!s&&!i){q="below"}if(!p&&n&&!s){q="above"}else{if(!n&&p&&s){q="below"}}if(q=="above"||(s&&q!=="below")){m.top=h.top-r.height}if(q!=null){this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+q);this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+q)}this.$dropdownContainer.css(m)};e.prototype._resizeDropdown=function(){this.$dropdownContainer.width();var h={width:this.$container.outerWidth(false)+"px"};if(this.options.get("dropdownAutoWidth")){h.minWidth=h.width;h.width="auto"}this.$dropdown.css(h)};e.prototype._showDropdown=function(h){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return e});d.define("select2/dropdown/minimumResultsForSearch",[],function(){function f(i){var h=0;for(var j=0;j<i.length;j++){var g=i[j];if(g.children){h+=f(g.children)}else{h++}}return h}function e(i,g,h,j){this.minimumResultsForSearch=h.get("minimumResultsForSearch");if(this.minimumResultsForSearch<0){this.minimumResultsForSearch=Infinity}i.call(this,g,h,j)}e.prototype.showSearch=function(g,h){if(f(h.data.results)<this.minimumResultsForSearch){return false}return g.call(this,h)};return e});d.define("select2/dropdown/selectOnClose",[],function(){function e(){}e.prototype.bind=function(h,f,i){var g=this;h.call(this,f,i);f.on("close",function(){g._handleSelectOnClose()})};e.prototype._handleSelectOnClose=function(){var f=this.getHighlightedResults();if(f.length<1){return}this.trigger("select",{data:f.data("data")})};return e});d.define("select2/dropdown/closeOnSelect",[],function(){function e(){}e.prototype.bind=function(h,f,i){var g=this;h.call(this,f,i);f.on("select",function(j){g._selectTriggered(j)});f.on("unselect",function(j){g._selectTriggered(j)})};e.prototype._selectTriggered=function(h,g){var f=g.originalEvent;if(f&&f.ctrlKey){return}this.trigger("close")};return e});d.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var g=e.input.length-e.maximum;var f="Please delete "+g+" character";if(g!=1){f+="s"}return f},inputTooShort:function(e){var g=e.minimum-e.input.length;var f="Please enter "+g+" or more characters";return f},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var f="You can only select "+e.maximum+" item";if(e.maximum!=1){f+="s"}return f},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}});d.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(g,k,E,o,t,G,j,C,F,e,u,I,B,s,f,x,h,D,H,w,A,m,q,z,r,v,l,i,y){function p(){this.reset()}p.prototype.apply=function(Z){Z=g.extend({},this.defaults,Z);if(Z.dataAdapter==null){if(Z.ajax!=null){Z.dataAdapter=f}else{if(Z.data!=null){Z.dataAdapter=s}else{Z.dataAdapter=B}}if(Z.minimumInputLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,D)}if(Z.maximumInputLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,H)}if(Z.maximumSelectionLength>0){Z.dataAdapter=e.Decorate(Z.dataAdapter,w)}if(Z.tags){Z.dataAdapter=e.Decorate(Z.dataAdapter,x)}if(Z.tokenSeparators!=null||Z.tokenizer!=null){Z.dataAdapter=e.Decorate(Z.dataAdapter,h)}if(Z.query!=null){var R=k(Z.amdBase+"compat/query");Z.dataAdapter=e.Decorate(Z.dataAdapter,R)}if(Z.initSelection!=null){var Y=k(Z.amdBase+"compat/initSelection");Z.dataAdapter=e.Decorate(Z.dataAdapter,Y)}}if(Z.resultsAdapter==null){Z.resultsAdapter=E;if(Z.ajax!=null){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,z)}if(Z.placeholder!=null){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,q)}if(Z.selectOnClose){Z.resultsAdapter=e.Decorate(Z.resultsAdapter,l)}}if(Z.dropdownAdapter==null){if(Z.multiple){Z.dropdownAdapter=A}else{var L=e.Decorate(A,m);Z.dropdownAdapter=L}if(Z.minimumResultsForSearch!==0){Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,v)}if(Z.closeOnSelect){Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,i)}if(Z.dropdownCssClass!=null||Z.dropdownCss!=null||Z.adaptDropdownCssClass!=null){var K=k(Z.amdBase+"compat/dropdownCss");Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,K)}Z.dropdownAdapter=e.Decorate(Z.dropdownAdapter,r)}if(Z.selectionAdapter==null){if(Z.multiple){Z.selectionAdapter=t}else{Z.selectionAdapter=o}if(Z.placeholder!=null){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,G)}if(Z.allowClear){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,j)}if(Z.multiple){Z.selectionAdapter=e.Decorate(Z.selectionAdapter,C)}if(Z.containerCssClass!=null||Z.containerCss!=null||Z.adaptContainerCssClass!=null){var T=k(Z.amdBase+"compat/containerCss");Z.selectionAdapter=e.Decorate(Z.selectionAdapter,T)}Z.selectionAdapter=e.Decorate(Z.selectionAdapter,F)}if(typeof Z.language==="string"){if(Z.language.indexOf("-")>0){var O=Z.language.split("-");var Q=O[0];Z.language=[Z.language,Q]}else{Z.language=[Z.language]}}if(g.isArray(Z.language)){var N=new u();Z.language.push("en");var W=Z.language;for(var M=0;M<W.length;M++){var J=W[M];var P={};try{P=u.loadPath(J)}catch(S){try{J=this.defaults.amdLanguageBase+J;P=u.loadPath(J)}catch(V){if(Z.debug&&window.console&&console.warn){console.warn('Select2: The language file for "'+J+'" could not be automatically loaded. A fallback will be used instead.')}continue}}N.extend(P)}Z.translations=N}else{var U=u.loadPath(this.defaults.amdLanguageBase+"en");var X=new u(Z.language);X.extend(U);Z.translations=X}return Z};p.prototype.reset=function(){function K(M){function L(N){return I[N]||N}return M.replace(/[^\u0000-\u007E]/g,L)}function J(Q,P){if(g.trim(Q.term)===""){return P}if(P.children&&P.children.length>0){var L=g.extend(true,{},P);for(var S=P.children.length-1;S>=0;S--){var R=P.children[S];var O=J(Q,R);if(O==null){L.children.splice(S,1)}}if(L.children.length>0){return L}return J(Q,L)}var N=K(P.text).toUpperCase();var M=K(Q.term).toUpperCase();if(N.indexOf(M)>-1){return P}return null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:e.escapeMarkup,language:y,matcher:J,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,sorter:function(L){return L},templateResult:function(L){return L.text},templateSelection:function(L){return L.text},theme:"default",width:"resolve"}};p.prototype.set=function(K,M){var J=g.camelCase(K);var L={};L[J]=M;var N=e._convertData(L);g.extend(this.defaults,N)};var n=new p();return n});d.define("select2/options",["require","jquery","./defaults","./utils"],function(f,h,i,g){function e(l,j){this.options=l;if(j!=null){this.fromElement(j)}this.options=i.apply(this.options);if(j&&j.is("input")){var k=f(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=g.Decorate(this.options.dataAdapter,k)}}e.prototype.fromElement=function(j){var l=["select2"];if(this.options.multiple==null){this.options.multiple=j.prop("multiple")}if(this.options.disabled==null){this.options.disabled=j.prop("disabled")}if(this.options.language==null){if(j.prop("lang")){this.options.language=j.prop("lang").toLowerCase()}else{if(j.closest("[lang]").prop("lang")){this.options.language=j.closest("[lang]").prop("lang")}}}if(this.options.dir==null){if(j.prop("dir")){this.options.dir=j.prop("dir")}else{if(j.closest("[dir]").prop("dir")){this.options.dir=j.closest("[dir]").prop("dir")}else{this.options.dir="ltr"}}}j.prop("disabled",this.options.disabled);j.prop("multiple",this.options.multiple);if(j.data("select2Tags")){if(this.options.debug&&window.console&&console.warn){console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.')}j.data("data",j.data("select2Tags"));j.data("tags",true)}if(j.data("ajaxUrl")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.")}j.attr("ajax--url",j.data("ajaxUrl"));j.data("ajax--url",j.data("ajaxUrl"))}var n={};if(h.fn.jquery&&h.fn.jquery.substr(0,2)=="1."&&j[0].dataset){n=h.extend(true,{},j[0].dataset,j.data())}else{n=j.data()}var m=h.extend(true,{},n);m=g._convertData(m);for(var k in m){if(h.inArray(k,l)>-1){continue}if(h.isPlainObject(this.options[k])){h.extend(this.options[k],m[k])}else{this.options[k]=m[k]}}return this};e.prototype.get=function(j){return this.options[j]};e.prototype.set=function(j,k){this.options[j]=k};return e});d.define("select2/core",["jquery","./options","./utils","./keys"],function(i,g,h,e){var f=function(o,r){if(o.data("select2")!=null){o.data("select2").destroy()}this.$element=o;this.id=this._generateId(o);r=r||{};this.options=new g(r,o);f.__super__.constructor.call(this);var m=o.attr("tabindex")||0;o.data("old-tabindex",m);o.attr("tabindex","-1");var l=this.options.get("dataAdapter");this.dataAdapter=new l(o,this.options);var q=this.render();this._placeContainer(q);var n=this.options.get("selectionAdapter");this.selection=new n(o,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,q);var j=this.options.get("dropdownAdapter");this.dropdown=new j(o,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,q);var k=this.options.get("resultsAdapter");this.results=new k(o,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var p=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(s){p.trigger("selection:update",{data:s})});o.addClass("select2-hidden-accessible");o.attr("aria-hidden","true");this._syncAttributes();o.data("select2",this)};h.Extend(f,h.Observable);f.prototype._generateId=function(j){var k="";if(j.attr("id")!=null){k=j.attr("id")}else{if(j.attr("name")!=null){k=j.attr("name")+"-"+h.generateChars(2)}else{k=h.generateChars(4)}}k="select2-"+k;return k};f.prototype._placeContainer=function(k){k.insertAfter(this.$element);var j=this._resolveWidth(this.$element,this.options.get("width"));if(j!=null){k.css("width",j)}};f.prototype._resolveWidth=function(u,j){var s=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(j=="resolve"){var n=this._resolveWidth(u,"style");if(n!=null){return n}return this._resolveWidth(u,"element")}if(j=="element"){var r=u.outerWidth(false);if(r<=0){return"auto"}return r+"px"}if(j=="style"){var k=u.attr("style");if(typeof(k)!=="string"){return null}var t=k.split(";");for(var o=0,m=t.length;o<m;o=o+1){var q=t[o].replace(/\s/g,"");var p=q.match(s);if(p!==null&&p.length>=1){return p[1]}}return null}return j};f.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};f.prototype._registerDomEvents=function(){var k=this;this.$element.on("change.select2",function(){k.dataAdapter.current(function(l){k.trigger("selection:update",{data:l})})});this._sync=h.bind(this._syncAttributes,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent("onpropertychange",this._sync)}var j=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(j!=null){this._observer=new j(function(l){i.each(l,k._sync)});this._observer.observe(this.$element[0],{attributes:true,subtree:false})}else{if(this.$element[0].addEventListener){this.$element[0].addEventListener("DOMAttrModified",k._sync,false)}}};f.prototype._registerDataEvents=function(){var j=this;this.dataAdapter.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerSelectionEvents=function(){var j=this;var k=["toggle"];this.selection.on("toggle",function(){j.toggleDropdown()});this.selection.on("*",function(l,m){if(i.inArray(l,k)!==-1){return}j.trigger(l,m)})};f.prototype._registerDropdownEvents=function(){var j=this;this.dropdown.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerResultsEvents=function(){var j=this;this.results.on("*",function(k,l){j.trigger(k,l)})};f.prototype._registerEvents=function(){var j=this;this.on("open",function(){j.$container.addClass("select2-container--open")});this.on("close",function(){j.$container.removeClass("select2-container--open")});this.on("enable",function(){j.$container.removeClass("select2-container--disabled")});this.on("disable",function(){j.$container.addClass("select2-container--disabled")});this.on("focus",function(){j.$container.addClass("select2-container--focus")});this.on("blur",function(){j.$container.removeClass("select2-container--focus")});this.on("query",function(k){if(!j.isOpen()){j.trigger("open")}this.dataAdapter.query(k,function(l){j.trigger("results:all",{data:l,query:k})})});this.on("query:append",function(k){this.dataAdapter.query(k,function(l){j.trigger("results:append",{data:l,query:k})})});this.on("keypress",function(k){var l=k.which;if(j.isOpen()){if(l===e.ENTER){j.trigger("results:select");k.preventDefault()}else{if((l===e.SPACE&&k.ctrlKey)){j.trigger("results:toggle");k.preventDefault()}else{if(l===e.UP){j.trigger("results:previous");k.preventDefault()}else{if(l===e.DOWN){j.trigger("results:next");k.preventDefault()}else{if(l===e.ESC||l===e.TAB){j.close();k.preventDefault()}}}}}}else{if(l===e.ENTER||l===e.SPACE||((l===e.DOWN||l===e.UP)&&k.altKey)){j.open();k.preventDefault()}}})};f.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled"));if(this.options.get("disabled")){if(this.isOpen()){this.close()}this.trigger("disable")}else{this.trigger("enable")}};f.prototype.trigger=function(m,l){var n=f.__super__.trigger;var o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(m in o){var k=o[m];var j={prevented:false,name:m,args:l};n.call(this,k,j);if(j.prevented){l.prevented=true;return}}n.call(this,m,l)};f.prototype.toggleDropdown=function(){if(this.options.get("disabled")){return}if(this.isOpen()){this.close()}else{this.open()}};f.prototype.open=function(){if(this.isOpen()){return}this.trigger("query",{});this.trigger("open")};f.prototype.close=function(){if(!this.isOpen()){return}this.trigger("close")};f.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")};f.prototype.enable=function(j){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.')}if(j==null||j.length===0){j=[true]}var k=!j[0];this.$element.prop("disabled",k)};f.prototype.data=function(){if(this.options.get("debug")&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.')}var j=[];this.dataAdapter.current(function(k){j=k});return j};f.prototype.val=function(k){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.')}if(k==null||k.length===0){return this.$element.val()}var j=k[0];if(i.isArray(j)){j=i.map(j,function(l){return l.toString()})}this.$element.val(j).trigger("change")};f.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent("onpropertychange",this._sync)}if(this._observer!=null){this._observer.disconnect();this._observer=null}else{if(this.$element[0].removeEventListener){this.$element[0].removeEventListener("DOMAttrModified",this._sync,false)}}this._sync=null;this.$element.off(".select2");this.$element.attr("tabindex",this.$element.data("old-tabindex"));this.$element.removeClass("select2-hidden-accessible");this.$element.attr("aria-hidden","false");this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null};f.prototype.render=function(){var j=i('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');j.attr("dir",this.options.get("dir"));this.$container=j;this.$container.addClass("select2-container--"+this.options.get("theme"));j.data("element",this.$element);return j};return f});d.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(h,g,e,i){g("jquery.mousewheel");if(h.fn.select2==null){var f=["open","close","destroy"];h.fn.select2=function(m){m=m||{};if(typeof m==="object"){this.each(function(){var o=h.extend({},m,true);var n=new e(h(this),o)});return this}else{if(typeof m==="string"){var j=this.data("select2");if(j==null&&window.console&&console.error){console.error("The select2('"+m+"') method was called on an element that is not using Select2.")}var l=Array.prototype.slice.call(arguments,1);var k=j[m](l);if(h.inArray(m,f)>-1){return this}return k}else{throw new Error("Invalid arguments for Select2: "+m)}}}}if(h.fn.select2.defaults==null){h.fn.select2.defaults=i}return e});d.define("jquery.mousewheel",["jquery"],function(e){return e});return{define:d.define,require:d.require}}());var a=b.require("jquery.select2");c.fn.select2.amd=b;return a}));
/* Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd){var a=jQuery.fn.select2.amd}return a.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(c){var b=c.input.length-c.maximum,d="Please delete "+b+" character";return b!=1&&(d+="s"),d},inputTooShort:function(c){var b=c.minimum-c.input.length,d="Please enter "+b+" or more characters";return d},loadingMore:function(){return"Loading more results…"},maximumSelected:function(c){var b="You can only select "+c.maximum+" item";return c.maximum!=1&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:a.define,require:a.require}})();!function(d,c){"object"==typeof exports&&"undefined"!=typeof module?module.exports=c():"function"==typeof define&&define.amd?define(c):d.moment=c()}(this,function(){function dx(){return a3.apply(null,arguments)}function dw(b){a3=b}function dv(b){return"[object Array]"===Object.prototype.toString.call(b)}function du(b){return b instanceof Date||"[object Date]"===Object.prototype.toString.call(b)}function dt(f,e){var h,g=[];for(h=0;h<f.length;++h){g.push(e(f[h],h))}return g}function dr(d,c){return Object.prototype.hasOwnProperty.call(d,c)}function dp(e,d){for(var f in d){dr(d,f)&&(e[f]=d[f])}return dr(d,"toString")&&(e.toString=d.toString),dr(d,"valueOf")&&(e.valueOf=d.valueOf),e}function dn(f,e,h,g){return eE(f,e,h,g,!0).utc()}function dl(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function dj(b){return null==b._pf&&(b._pf=dl()),b._pf}function dh(d){if(null==d._isValid){var c=dj(d);d._isValid=!isNaN(d._d.getTime())&&c.overflow<0&&!c.empty&&!c.invalidMonth&&!c.nullInput&&!c.invalidFormat&&!c.userInvalidated,d._strict&&(d._isValid=d._isValid&&0===c.charsLeftOver&&0===c.unusedTokens.length&&void 0===c.bigHour)}return d._isValid}function dg(d){var c=dn(0/0);return null!=d?dp(dj(c),d):dj(c).userInvalidated=!0,c}function df(g,f){var j,i,h;if("undefined"!=typeof f._isAMomentObject&&(g._isAMomentObject=f._isAMomentObject),"undefined"!=typeof f._i&&(g._i=f._i),"undefined"!=typeof f._f&&(g._f=f._f),"undefined"!=typeof f._l&&(g._l=f._l),"undefined"!=typeof f._strict&&(g._strict=f._strict),"undefined"!=typeof f._tzm&&(g._tzm=f._tzm),"undefined"!=typeof f._isUTC&&(g._isUTC=f._isUTC),"undefined"!=typeof f._offset&&(g._offset=f._offset),"undefined"!=typeof f._pf&&(g._pf=dj(f)),"undefined"!=typeof f._locale&&(g._locale=f._locale),av.length>0){for(j in av){i=av[j],h=f[i],"undefined"!=typeof h&&(g[i]=h)}}return g}function c9(a){df(this,a),this._d=new Date(+a._d),e2===!1&&(e2=!0,dx.updateOffset(this),e2=!1)}function c8(b){return b instanceof c9||null!=b&&null!=b._isAMomentObject}function c7(e){var d=+e,f=0;return 0!==d&&isFinite(d)&&(f=d>=0?Math.floor(d):Math.ceil(d)),f}function c5(i,h,n){var m,l=Math.min(i.length,h.length),k=Math.abs(i.length-h.length),j=0;for(m=0;l>m;m++){(n&&i[m]!==h[m]||!n&&c7(i[m])!==c7(h[m]))&&j++}return j+k}function c4(){}function c2(b){return b?b.toLowerCase().replace("_","-"):b}function c0(h){for(var g,l,k,j,i=0;i<h.length;){for(j=c2(h[i]).split("-"),g=j.length,l=c2(h[i+1]),l=l?l.split("-"):null;g>0;){if(k=cY(j.slice(0,g).join("-"))){return k}if(l&&l.length>=g&&c5(j,l,!0)>=g-1){break}g--}i++}return null}function cY(e){var d=null;if(!eM[e]&&"undefined"!=typeof module&&module&&module.exports){try{d=aM._abbr,require("./locale/"+e),cX(d)}catch(f){}}return eM[e]}function cX(e,d){var f;return e&&(f="undefined"==typeof d?cV(e):cW(e,d),f&&(aM=f)),aM._abbr}function cW(d,c){return null!==c?(c.abbr=d,eM[d]||(eM[d]=new c4),eM[d].set(c),cX(d),eM[d]):(delete eM[d],null)}function cV(d){var c;if(d&&d._locale&&d._locale._abbr&&(d=d._locale._abbr),!d){return aM}if(!dv(d)){if(c=cY(d)){return c}d=[d]}return c0(d)}function cU(e,d){var f=e.toLowerCase();ep[f]=ep[f+"s"]=ep[d]=e}function cS(b){return"string"==typeof b?ep[b]||ep[b.toLowerCase()]:void 0}function eo(f){var e,h,g={};for(h in f){dr(f,h)&&(e=cS(h),e&&(g[e]=f[h]))}return g}function el(a,d){return function(b){return null!=b?(eh(this,a,b),dx.updateOffset(this,d),this):ej(this,a)}}function ej(d,c){return d._d["get"+(d._isUTC?"UTC":"")+c]()}function eh(e,d,f){return e._d["set"+(e._isUTC?"UTC":"")+d](f)}function eg(e,d){var f;if("object"==typeof e){for(f in e){this.set(f,e[f])}}else{if(e=cS(e),"function"==typeof this[e]){return this[e](d)}}return this}function ef(g,f,j){for(var i=""+Math.abs(g),h=g>=0;i.length<f;){i="0"+i}return(h?j?"+":"":"-")+i}function d8(g,f,j,i){var h=i;"string"==typeof i&&(h=function(){return this[i]()}),g&&(b9[g]=h),f&&(b9[f[0]]=function(){return ef(h.apply(this,arguments),f[1],f[2])}),j&&(b9[j]=function(){return this.localeData().ordinal(h.apply(this,arguments),g)})}function d6(b){return b.match(/\[[\s\S]/)?b.replace(/^\[|\]$/g,""):b.replace(/\\/g,"")}function d5(f){var e,h,g=f.match(dz);for(e=0,h=g.length;h>e;e++){b9[g[e]]?g[e]=b9[g[e]]:g[e]=d6(g[e])}return function(b){var a="";for(e=0;h>e;e++){a+=g[e] instanceof Function?g[e].call(b,f):g[e]}return a}}function d3(d,c){return d.isValid()?(c=d1(c,d.localeData()),cv[c]||(cv[c]=d5(c)),cv[c](d)):d.localeData().invalidDate()}function d1(f,e){function h(b){return e.longDateFormat(b)||b}var g=5;for(cM.lastIndex=0;g>=0&&cM.test(f);){f=f.replace(cM,h),cM.lastIndex=0,g-=1}return f}function dZ(e,d,f){aq[e]="function"==typeof d?d:function(b){return b&&f?f:d}}function dY(d,c){return dr(aq,d)?aq[d](c._strict,c._locale):new RegExp(dX(d))}function dX(b){return b.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(g,f,j,i,h){return f||j||i||h}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function dW(f,e){var h,g=e;for("string"==typeof f&&(f=[f]),"number"==typeof e&&(g=function(b,d){d[e]=c7(b)}),h=0;h<f.length;h++){eG[f[h]]=g}}function dV(d,c){dW(d,function(b,h,g,f){g._w=g._w||{},c(b,g._w,g,f)})}function dU(e,d,f){null!=d&&dr(eG,e)&&eG[e](d,f._a,f,e)}function dS(d,c){return new Date(Date.UTC(d,c+1,0)).getUTCDate()}function dR(b){return this._months[b.month()]}function dP(b){return this._monthsShort[b.month()]}function dN(h,g,l){var k,j,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),k=0;12>k;k++){if(j=dn([2000,k]),l&&!this._longMonthsParse[k]&&(this._longMonthsParse[k]=new RegExp("^"+this.months(j,"").replace(".","")+"$","i"),this._shortMonthsParse[k]=new RegExp("^"+this.monthsShort(j,"").replace(".","")+"$","i")),l||this._monthsParse[k]||(i="^"+this.months(j,"")+"|^"+this.monthsShort(j,""),this._monthsParse[k]=new RegExp(i.replace(".",""),"i")),l&&"MMMM"===g&&this._longMonthsParse[k].test(h)){return k}if(l&&"MMM"===g&&this._shortMonthsParse[k].test(h)){return k}if(!l&&this._monthsParse[k].test(h)){return k}}}function dL(e,d){var f;return"string"==typeof d&&(d=e.localeData().monthsParse(d),"number"!=typeof d)?e:(f=Math.min(e.date(),dS(e.year(),d)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](d,f),e)}function dK(a){return null!=a?(dL(this,a),dx.updateOffset(this,!0),this):ej(this,"Month")}function dJ(){return dS(this.year(),this.month())}function dI(e){var d,f=e._a;return f&&-2===dj(e).overflow&&(d=f[dk]<0||f[dk]>11?dk:f[cH]<1||f[cH]>dS(f[d2],f[dk])?cH:f[cq]<0||f[cq]>24||24===f[cq]&&(0!==f[b2]||0!==f[bH]||0!==f[bq])?cq:f[b2]<0||f[b2]>59?b2:f[bH]<0||f[bH]>59?bH:f[bq]<0||f[bq]>999?bq:-1,dj(e)._overflowDayOfYear&&(d2>d||d>cH)&&(d=cH),dj(e).overflow=d),e}function dH(a){dx.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function eK(f,e){var h=!0,g=f+"\n"+(new Error).stack;return dp(function(){return h&&(dH(g),h=!1),e.apply(this,arguments)},e)}function dA(d,c){aw[d]||(dH(c),aw[d]=!0)}function eJ(g){var f,j,i=g._i,h=e3.exec(i);if(h){for(dj(g).iso=!0,f=0,j=eN.length;j>f;f++){if(eN[f][1].exec(i)){g._f=eN[f][0]+(h[6]||" ");break}}for(f=0,j=er.length;j>f;f++){if(er[f][1].exec(i)){g._f+=er[f][0];break}}i.match(cm)&&(g._f+="Z"),bD(g)}else{g._isValid=!1}}function d9(a){var d=dB.exec(a._i);return null!==d?void (a._d=new Date(+d[1])):(eJ(a),void (a._isValid===!1&&(delete a._isValid,dx.createFromInputFallback(a))))}function ds(j,i,p,o,n,m,l){var k=new Date(j,i,p,o,n,m,l);return 1970>j&&k.setFullYear(j),k}function cK(d){var c=new Date(Date.UTC.apply(null,arguments));return 1970>d&&c.setUTCFullYear(d),c}function ct(b){return b7(b)?366:365}function b7(b){return b%4===0&&b%100!==0||b%400===0}function bM(){return b7(this.year())}function bv(h,g,l){var k,j=l-g,i=l-h.day();return i>j&&(i-=7),j-7>i&&(i+=7),k=b5(h).add(i,"d"),{week:Math.ceil(k.dayOfYear()/7),year:k.year()}}function a9(b){return bv(b,this._week.dow,this._week.doy).week}function aS(){return this._week.dow}function aB(){return this._week.doy}function ag(d){var c=this.localeData().week(this);return null==d?c:this.add(7*(d-c),"d")}function eS(d){var c=bv(this,1,4).week;return null==d?c:this.add(7*(d-c),"d")}function ew(j,i,p,o,n){var m,l,k=cK(j,0,1).getUTCDay();return k=0===k?7:k,p=null!=p?p:n,m=n-k+(k>o?7:0)-(n>k?7:0),l=7*(i-1)+(p-n)+m+1,{year:l>0?j:j-1,dayOfYear:l>0?l:ct(j-1)+l}}function dG(d){var c=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/86400000)+1;return null==d?c:this.add(d-c,"d")}function cT(e,d,f){return null!=e?e:null!=d?d:f}function cB(d){var c=new Date;return d._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function ck(h){var g,l,k,j,i=[];if(!h._d){for(k=cB(h),h._w&&null==h._a[cH]&&null==h._a[dk]&&bU(h),h._dayOfYear&&(j=cT(h._a[d2],k[d2]),h._dayOfYear>ct(j)&&(dj(h)._overflowDayOfYear=!0),l=cK(j,0,h._dayOfYear),h._a[dk]=l.getUTCMonth(),h._a[cH]=l.getUTCDate()),g=0;3>g&&null==h._a[g];++g){h._a[g]=i[g]=k[g]}for(;7>g;g++){h._a[g]=i[g]=null==h._a[g]?2===g?1:0:h._a[g]}24===h._a[cq]&&0===h._a[b2]&&0===h._a[bH]&&0===h._a[bq]&&(h._nextDay=!0,h._a[cq]=0),h._d=(h._useUTC?cK:ds).apply(null,i),null!=h._tzm&&h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),h._nextDay&&(h._a[cq]=24)}}function bU(j){var i,p,o,n,m,l,k;i=j._w,null!=i.GG||null!=i.W||null!=i.E?(m=1,l=4,p=cT(i.GG,j._a[d2],bv(b5(),1,4).year),o=cT(i.W,1),n=cT(i.E,1)):(m=j._locale._week.dow,l=j._locale._week.doy,p=cT(i.gg,j._a[d2],bv(b5(),m,l).year),o=cT(i.w,1),null!=i.d?(n=i.d,m>n&&++o):n=null!=i.e?i.e+m:m),k=ew(p,o,n,l,m),j._a[d2]=k.year,j._dayOfYear=k.dayOfYear}function bD(r){if(r._f===dx.ISO_8601){return void eJ(r)}r._a=[],dj(r).empty=!0;var q,p,o,n,m,l=""+r._i,j=l.length,a=0;for(o=d1(r._f,r._locale).match(dz)||[],q=0;q<o.length;q++){n=o[q],p=(l.match(dY(n,r))||[])[0],p&&(m=l.substr(0,l.indexOf(p)),m.length>0&&dj(r).unusedInput.push(m),l=l.slice(l.indexOf(p)+p.length),a+=p.length),b9[n]?(p?dj(r).empty=!1:dj(r).unusedTokens.push(n),dU(n,p,r)):r._strict&&!p&&dj(r).unusedTokens.push(n)}dj(r).charsLeftOver=j-a,l.length>0&&dj(r).unusedInput.push(l),dj(r).bigHour===!0&&r._a[cq]<=12&&r._a[cq]>0&&(dj(r).bigHour=void 0),r._a[cq]=bm(r._locale,r._a[cq],r._meridiem),ck(r),dI(r)}function bm(f,e,h){var g;return null==h?e:null!=f.meridiemHour?f.meridiemHour(e,h):null!=f.isPM?(g=f.isPM(h),g&&12>e&&(e+=12),g||12!==e||(e=0),e):e}function a0(h){var g,l,k,j,i;if(0===h._f.length){return dj(h).invalidFormat=!0,void (h._d=new Date(0/0))}for(j=0;j<h._f.length;j++){i=0,g=df({},h),null!=h._useUTC&&(g._useUTC=h._useUTC),g._f=h._f[j],bD(g),dh(g)&&(i+=dj(g).charsLeftOver,i+=10*dj(g).unusedTokens.length,dj(g).score=i,(null==k||k>i)&&(k=i,l=g))}dp(h,l||g)}function aJ(d){if(!d._d){var c=eo(d._i);d._a=[c.year,c.month,c.day||c.date,c.hour,c.minute,c.second,c.millisecond],ck(d)}}function ao(d){var c,h=d._i,g=d._f;return d._locale=d._locale||cV(d._l),null===h||void 0===g&&""===h?dg({nullInput:!0}):("string"==typeof h&&(d._i=h=d._locale.preparse(h)),c8(h)?new c9(dI(h)):(dv(g)?a0(d):g?bD(d):du(h)?d._d=h:e0(d),c=new c9(dI(d)),c._nextDay&&(c.add(1,"d"),c._nextDay=void 0),c))}function e0(a){var c=a._i;void 0===c?a._d=new Date:du(c)?a._d=new Date(+c):"string"==typeof c?d9(a):dv(c)?(a._a=dt(c.slice(0),function(b){return parseInt(b,10)}),ck(a)):"object"==typeof c?aJ(a):"number"==typeof c?a._d=new Date(c):dx.createFromInputFallback(a)}function eE(h,g,l,k,j){var i={};return"boolean"==typeof l&&(k=l,l=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=j,i._l=l,i._i=h,i._f=g,i._strict=k,ao(i)}function b5(f,e,h,g){return eE(f,e,h,g,!1)}function bK(f,c){var h,g;if(1===c.length&&dv(c[0])&&(c=c[0]),!c.length){return b5()}for(h=c[0],g=1;g<c.length;++g){c[g][f](h)&&(h=c[g])}return h}function bt(){var b=[].slice.call(arguments,0);return bK("isBefore",b)}function a7(){var b=[].slice.call(arguments,0);return bK("isAfter",b)}function aQ(v){var u=eo(v),t=u.year||0,s=u.quarter||0,r=u.month||0,q=u.week||0,p=u.day||0,o=u.hour||0,n=u.minute||0,m=u.second||0,l=u.millisecond||0;this._milliseconds=+l+1000*m+60000*n+3600000*o,this._days=+p+7*q,this._months=+r+3*s+12*t,this._data={},this._locale=cV(),this._bubble()}function az(b){return b instanceof aQ}function e6(d,c){d8(d,0,0,function(){var b=this.utcOffset(),e="+";return 0>b&&(b=-b,e="-"),e+ef(~~(b/60),2)+c+ef(~~b%60,2)})}function eQ(g){var f=(g||"").match(cm)||[],j=f[f.length-1]||[],i=(j+"").match(by)||["-",0,0],h=+(60*i[1])+c7(i[2]);return"+"===i[0]?h:-h}function eu(a,h){var g,d;return h._isUTC?(g=h.clone(),d=(c8(a)||du(a)?+a:+b5(a))-+g,g._d.setTime(+g._d+d),dx.updateOffset(g,!1),g):b5(a).local();return h._isUTC?b5(a).zone(h._offset||0):b5(a).local()}function dE(b){return 15*-Math.round(b._d.getTimezoneOffset()/15)}function cQ(a,h){var g,f=this._offset||0;return null!=a?("string"==typeof a&&(a=eQ(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&h&&(g=dE(this)),this._offset=a,this._isUTC=!0,null!=g&&this.add(g,"m"),f!==a&&(!h||this._changeInProgress?eq(this,dT(a-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,dx.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?f:dE(this)}function cz(d,c){return null!=d?("string"!=typeof d&&(d=-d),this.utcOffset(d,c),this):-this.utcOffset()}function ci(b){return this.utcOffset(0,b)}function bS(b){return this._isUTC&&(this.utcOffset(0,b),this._isUTC=!1,b&&this.subtract(dE(this),"m")),this}function bB(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(eQ(this._i)),this}function bk(b){return b=b?b5(b).utcOffset():0,(this.utcOffset()-b)%60===0}function aY(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function aH(){if(this._a){var b=this._isUTC?dn(this._a):b5(this._a);return this.isValid()&&c5(this._a,b.toArray())>0}return !1}function am(){return !this._isUTC}function eY(){return this._isUTC}function eC(){return this._isUTC&&0===this._offset}function dT(i,f){var n,m,l,k=i,j=null;return az(i)?k={ms:i._milliseconds,d:i._days,M:i._months}:"number"==typeof i?(k={},f?k[f]=i:k.milliseconds=i):(j=bh.exec(i))?(n="-"===j[1]?-1:1,k={y:0,d:c7(j[cH])*n,h:c7(j[cq])*n,m:c7(j[b2])*n,s:c7(j[bH])*n,ms:c7(j[bq])*n}):(j=aV.exec(i))?(n="-"===j[1]?-1:1,k={y:c6(j[2],n),M:c6(j[3],n),d:c6(j[4],n),h:c6(j[5],n),m:c6(j[6],n),s:c6(j[7],n),w:c6(j[8],n)}):null==k?k={}:"object"==typeof k&&("from" in k||"to" in k)&&(l=co(b5(k.from),b5(k.to)),k={},k.ms=l.milliseconds,k.M=l.months),m=new aQ(k),az(i)&&dr(i,"_locale")&&(m._locale=i._locale),m}function c6(e,d){var f=e&&parseFloat(e.replace(",","."));return(isNaN(f)?0:f)*d}function cF(e,d){var f={milliseconds:0,months:0};return f.months=d.month()-e.month()+12*(d.year()-e.year()),e.clone().add(f.months,"M").isAfter(d)&&--f.months,f.milliseconds=+d-+e.clone().add(f.months,"M"),f}function co(e,d){var f;return d=eu(d,e),e.isBefore(d)?f=cF(e,d):(f=cF(d,e),f.milliseconds=-f.milliseconds,f.months=-f.months),f}function bY(d,c){return function(h,g){var b,a;return null===g||isNaN(+g)||(dA(c,"moment()."+c+"(period, number) is deprecated. Please use moment()."+c+"(number, period)."),a=h,h=g,g=a),h="string"==typeof h?+h:h,b=dT(h,g),eq(this,b,d),this}}function eq(a,n,m,l){var k=n._milliseconds,j=n._days,i=n._months;l=null==l?!0:l,k&&a._d.setTime(+a._d+k*m),j&&eh(a,"Date",ej(a,"Date")+j*m),i&&dL(a,ej(a,"Month")+i*m),l&&dx.updateOffset(a,j||i)}function at(g){var f=g||b5(),j=eu(f,this).startOf("day"),i=this.diff(j,"days",!0),h=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(h,this,b5(f)))}function eI(){return new c9(this)}function d7(e,d){var f;return d=cS("undefined"!=typeof d?d:"millisecond"),"millisecond"===d?(e=c8(e)?e:b5(e),+this>+e):(f=c8(e)?+e:+b5(e),f<+this.clone().startOf(d))}function dq(e,d){var f;return d=cS("undefined"!=typeof d?d:"millisecond"),"millisecond"===d?(e=c8(e)?e:b5(e),+e>+this):(f=c8(e)?+e:+b5(e),+this.clone().endOf(d)<f)}function cJ(e,d,f){return this.isAfter(e,f)&&this.isBefore(d,f)}function cs(e,d){var f;return d=cS(d||"millisecond"),"millisecond"===d?(e=c8(e)?e:b5(e),+this===+e):(f=+b5(e),+this.clone().startOf(d)<=f&&f<=+this.clone().endOf(d))}function b6(b){return 0>b?Math.ceil(b):Math.floor(b)}function bL(i,h,n){var m,l,k=eu(i,this),j=60000*(k.utcOffset()-this.utcOffset());return h=cS(h),"year"===h||"month"===h||"quarter"===h?(l=bu(this,k),"quarter"===h?l/=3:"year"===h&&(l/=12)):(m=this-k,l="second"===h?m/1000:"minute"===h?m/60000:"hour"===h?m/3600000:"day"===h?(m-j)/86400000:"week"===h?(m-j)/604800000:m),n?l:b6(l)}function bu(h,g){var l,k,j=12*(g.year()-h.year())+(g.month()-h.month()),i=h.clone().add(j,"months");return 0>g-i?(l=h.clone().add(j-1,"months"),k=(g-i)/(i-l)):(l=h.clone().add(j+1,"months"),k=(g-i)/(l-i)),-(j+k)}function a8(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function aR(){var b=this.clone().utc();return 0<b.year()&&b.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():d3(b,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):d3(b,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function aA(a){var d=d3(this,a||dx.defaultFormat);return this.localeData().postformat(d)}function af(d,c){return this.isValid()?dT({to:this,from:d}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function eR(b){return this.from(b5(),b)}function ev(d,c){return this.isValid()?dT({from:this,to:d}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function dF(b){return this.to(b5(),b)}function cR(d){var c;return void 0===d?this._locale._abbr:(c=cV(d),null!=c&&(this._locale=c),this)}function cA(){return this._locale}function cj(b){switch(b=cS(b)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===b&&this.weekday(0),"isoWeek"===b&&this.isoWeekday(1),"quarter"===b&&this.month(3*Math.floor(this.month()/3)),this}function bT(b){return b=cS(b),void 0===b||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")}function bC(){return +this._d-60000*(this._offset||0)}function bl(){return Math.floor(+this/1000)}function aZ(){return this._offset?new Date(+this):this._d}function aI(){var b=this;return[b.year(),b.month(),b.date(),b.hour(),b.minute(),b.second(),b.millisecond()]}function an(){return dh(this)}function eZ(){return dp({},dj(this))}function eD(){return dj(this).overflow}function b3(d,c){d8(0,[d,d.length],0,c)}function bI(e,d,f){return bv(b5([e,11,31+d-f]),d,f).week}function br(d){var c=bv(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==d?c:this.add(d-c,"y")}function a5(d){var c=bv(this,1,4).year;return null==d?c:this.add(d-c,"y")}function aO(){return bI(this.year(),1,4)}function ax(){var b=this.localeData()._week;return bI(this.year(),b.dow,b.doy)}function e4(b){return null==b?Math.ceil((this.month()+1)/3):this.month(3*(b-1)+this.month()%3)}function eO(d,c){if("string"==typeof d){if(isNaN(d)){if(d=c.weekdaysParse(d),"number"!=typeof d){return null}}else{d=parseInt(d,10)}}return d}function es(b){return this._weekdays[b.day()]}function dC(b){return this._weekdaysShort[b.day()]}function cO(b){return this._weekdaysMin[b.day()]}function cx(f){var e,h,g;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++){if(this._weekdaysParse[e]||(h=b5([2000,1]).day(e),g="^"+this.weekdays(h,"")+"|^"+this.weekdaysShort(h,"")+"|^"+this.weekdaysMin(h,""),this._weekdaysParse[e]=new RegExp(g.replace(".",""),"i")),this._weekdaysParse[e].test(f)){return e}}}function cg(d){var c=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=d?(d=eO(d,this.localeData()),this.add(d-c,"d")):c}function bQ(d){var c=(this.day()+7-this.localeData()._week.dow)%7;return null==d?c:this.add(d-c,"d")}function bz(b){return null==b?this.day()||7:this.day(this.day()%7?b:b-7)}function bi(d,c){d8(d,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),c)})}function aW(d,c){return c._meridiemParse}function aF(b){return"p"===(b+"").toLowerCase().charAt(0)}function ak(e,d,f){return e>11?f?"pm":"PM":f?"am":"AM"}function eW(b){d8(0,[b,3],0,"millisecond")}function eA(){return this._isUTC?"UTC":""}function dQ(){return this._isUTC?"Coordinated Universal Time":""}function c3(b){return b5(1000*b)}function cE(){return b5.apply(null,arguments).parseZone()}function cn(f,e,h){var g=this._calendar[f];return"function"==typeof g?g.call(e,h):g}function bX(d){var c=this._longDateFormat[d];return !c&&this._longDateFormat[d.toUpperCase()]&&(c=this._longDateFormat[d.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(b){return b.slice(1)}),this._longDateFormat[d]=c),c}function en(){return this._invalidDate}function ar(b){return this._ordinal.replace("%d",b)}function eH(b){return b}function d4(g,f,j,i){var h=this._relativeTime[j];return"function"==typeof h?h(g,f,j,i):h.replace(/%d/i,g)}function dm(e,d){var f=this._relativeTime[e>0?"future":"past"];return"function"==typeof f?f(d):f.replace(/%s/i,d)}function cI(e){var d,f;for(f in e){d=e[f],"function"==typeof d?this[f]=d:this["_"+f]=d}this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function cr(h,g,l,k){var j=cV(),i=dn().set(k,g);return j[l](i,h)}function b4(i,h,n,m,l){if("number"==typeof i&&(h=i,i=void 0),i=i||"",null!=h){return cr(i,h,n,l)}var k,j=[];for(k=0;m>k;k++){j[k]=cr(i,k,n,l)}return j}function bJ(d,c){return b4(d,c,"months",12,"month")}function bs(d,c){return b4(d,c,"monthsShort",12,"month")}function a6(d,c){return b4(d,c,"weekdays",7,"day")}function aP(d,c){return b4(d,c,"weekdaysShort",7,"day")}function ay(d,c){return b4(d,c,"weekdaysMin",7,"day")}function e5(){var b=this._data;return this._milliseconds=aC(this._milliseconds),this._days=aC(this._days),this._months=aC(this._months),b.milliseconds=aC(b.milliseconds),b.seconds=aC(b.seconds),b.minutes=aC(b.minutes),b.hours=aC(b.hours),b.months=aC(b.months),b.years=aC(b.years),this}function eP(g,f,j,i){var h=dT(f,j);return g._milliseconds+=i*h._milliseconds,g._days+=i*h._days,g._months+=i*h._months,g._bubble()}function et(d,c){return eP(this,d,c,1)}function dD(d,c){return eP(this,d,c,-1)}function cP(){var j,i,p,o=this._milliseconds,n=this._days,m=this._months,l=this._data,k=0;return l.milliseconds=o%1000,j=b6(o/1000),l.seconds=j%60,i=b6(j/60),l.minutes=i%60,p=b6(i/60),l.hours=p%24,n+=b6(p/24),k=b6(cy(n)),n-=b6(ch(k)),m+=b6(n/30),n%=30,k+=b6(m/12),m%=12,l.days=n,l.months=m,l.years=k,this}function cy(b){return 400*b/146097}function ch(b){return 146097*b/400}function bR(f){var e,h,g=this._milliseconds;if(f=cS(f),"month"===f||"year"===f){return e=this._days+g/86400000,h=this._months+12*cy(e),"month"===f?h:h/12}switch(e=this._days+Math.round(ch(this._months/12)),f){case"week":return e/7+g/604800000;case"day":return e+g/86400000;case"hour":return 24*e+g/3600000;case"minute":return 1440*e+g/60000;case"second":return 86400*e+g/1000;case"millisecond":return Math.floor(86400000*e)+g;default:throw new Error("Unknown unit "+f)}}function bA(){return this._milliseconds+86400000*this._days+this._months%12*2592000000+31536000000*c7(this._months/12)}function bj(b){return function(){return this.as(b)}}function aX(b){return b=cS(b),this[b+"s"]()}function aG(b){return function(){return this._data[b]}}function al(){return b6(this.days()/7)}function eX(g,f,j,i,h){return h.relativeTime(f||1,!!j,g,i)}function eB(v,u,t){var s=dT(v).abs(),r=b0(s.as("s")),q=b0(s.as("m")),p=b0(s.as("h")),o=b0(s.as("d")),n=b0(s.as("M")),m=b0(s.as("y")),l=r<bF.s&&["s",r]||1===q&&["m"]||q<bF.m&&["mm",q]||1===p&&["h"]||p<bF.h&&["hh",p]||1===o&&["d"]||o<bF.d&&["dd",o]||1===n&&["M"]||n<bF.M&&["MM",n]||1===m&&["y"]||["yy",m];return l[2]=u,l[3]=+v>0,l[4]=t,eX.apply(null,l)}function b1(d,c){return void 0===bF[d]?!1:void 0===c?bF[d]:(bF[d]=c,!0)}function bG(e){var d=this.localeData(),f=eB(this,!e,d);return e&&(f=d.pastFuture(+this,f)),d.postformat(f)}function bp(){var i=bo(this.years()),h=bo(this.months()),n=bo(this.days()),m=bo(this.hours()),l=bo(this.minutes()),k=bo(this.seconds()+this.milliseconds()/1000),j=this.asSeconds();return j?(0>j?"-":"")+"P"+(i?i+"Y":"")+(h?h+"M":"")+(n?n+"D":"")+(m||l||k?"T":"")+(m?m+"H":"")+(l?l+"M":"")+(k?k+"S":""):"P0D"}var a3,aM,av=dx.momentProperties=[],e2=!1,eM={},ep={},dz=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,cM=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,cv={},b9={},bO=/\d/,bx=/\d\d/,bg=/\d{3}/,aU=/\d{4}/,aD=/[+-]?\d{6}/,ai=/\d\d?/,eU=/\d{1,3}/,ey=/\d{1,4}/,dO=/[+-]?\d{1,6}/,c1=/\d+/,cD=/[+-]?\d+/,cm=/Z|[+-]\d\d:?\d\d/gi,bW=/[+-]?\d+(\.\d{1,3})?/,ek=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,aq={},eG={},d2=0,dk=1,cH=2,cq=3,b2=4,bH=5,bq=6;d8("M",["MM",2],"Mo",function(){return this.month()+1}),d8("MMM",0,0,function(b){return this.localeData().monthsShort(this,b)}),d8("MMMM",0,0,function(b){return this.localeData().months(this,b)}),cU("month","M"),dZ("M",ai),dZ("MM",ai,bx),dZ("MMM",ek),dZ("MMMM",ek),dW(["M","MM"],function(d,c){c[dk]=c7(d)-1}),dW(["MMM","MMMM"],function(g,f,j,i){var h=j._locale.monthsParse(g,i,j._strict);null!=h?f[dk]=h:dj(j).invalidMonth=g});var a4="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),aN="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),aw={};dx.suppressDeprecationWarnings=!1;var e3=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,eN=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],er=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],dB=/^\/?Date\((\-?\d+)/i;dx.createFromInputFallback=eK("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(b){b._d=new Date(b._i+(b._useUTC?" UTC":""))}),d8(0,["YY",2],0,function(){return this.year()%100}),d8(0,["YYYY",4],0,"year"),d8(0,["YYYYY",5],0,"year"),d8(0,["YYYYYY",6,!0],0,"year"),cU("year","y"),dZ("Y",cD),dZ("YY",ai,bx),dZ("YYYY",ey,aU),dZ("YYYYY",dO,aD),dZ("YYYYYY",dO,aD),dW(["YYYY","YYYYY","YYYYYY"],d2),dW("YY",function(a,d){d[d2]=dx.parseTwoDigitYear(a)}),dx.parseTwoDigitYear=function(b){return c7(b)+(c7(b)>68?1900:2000)};var cN=el("FullYear",!1);d8("w",["ww",2],"wo","week"),d8("W",["WW",2],"Wo","isoWeek"),cU("week","w"),cU("isoWeek","W"),dZ("w",ai),dZ("ww",ai,bx),dZ("W",ai),dZ("WW",ai,bx),dV(["w","ww","W","WW"],function(f,e,h,g){e[g.substr(0,1)]=c7(f)});var cw={dow:0,doy:6};d8("DDD",["DDDD",3],"DDDo","dayOfYear"),cU("dayOfYear","DDD"),dZ("DDD",eU),dZ("DDDD",bg),dW(["DDD","DDDD"],function(e,d,f){f._dayOfYear=c7(e)}),dx.ISO_8601=function(){};var cf=eK("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var b=b5.apply(null,arguments);return this>b?this:b}),bP=eK("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var b=b5.apply(null,arguments);return b>this?this:b});e6("Z",":"),e6("ZZ",""),dZ("Z",cm),dZ("ZZ",cm),dW(["Z","ZZ"],function(e,d,f){f._useUTC=!0,f._tzm=eQ(e)});var by=/([\+\-]|\d\d)/gi;dx.updateOffset=function(){};var bh=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,aV=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;dT.fn=aQ.prototype;var aE=bY(1,"add"),aj=bY(-1,"subtract");dx.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var eV=eK("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return void 0===b?this.localeData():this.locale(b)});d8(0,["gg",2],0,function(){return this.weekYear()%100}),d8(0,["GG",2],0,function(){return this.isoWeekYear()%100}),b3("gggg","weekYear"),b3("ggggg","weekYear"),b3("GGGG","isoWeekYear"),b3("GGGGG","isoWeekYear"),cU("weekYear","gg"),cU("isoWeekYear","GG"),dZ("G",cD),dZ("g",cD),dZ("GG",ai,bx),dZ("gg",ai,bx),dZ("GGGG",ey,aU),dZ("gggg",ey,aU),dZ("GGGGG",dO,aD),dZ("ggggg",dO,aD),dV(["gggg","ggggg","GGGG","GGGGG"],function(f,e,h,g){e[g.substr(0,2)]=c7(f)}),dV(["gg","GG"],function(a,h,g,f){h[f]=dx.parseTwoDigitYear(a)}),d8("Q",0,0,"quarter"),cU("quarter","Q"),dZ("Q",bO),dW("Q",function(d,c){c[dk]=3*(c7(d)-1)}),d8("D",["DD",2],"Do","date"),cU("date","D"),dZ("D",ai),dZ("DD",ai,bx),dZ("Do",function(d,c){return d?c._ordinalParse:c._ordinalParseLenient}),dW(["D","DD"],cH),dW("Do",function(d,c){c[cH]=c7(d.match(ai)[0],10)});var ez=el("Date",!0);d8("d",0,"do","day"),d8("dd",0,0,function(b){return this.localeData().weekdaysMin(this,b)}),d8("ddd",0,0,function(b){return this.localeData().weekdaysShort(this,b)}),d8("dddd",0,0,function(b){return this.localeData().weekdays(this,b)}),d8("e",0,0,"weekday"),d8("E",0,0,"isoWeekday"),cU("day","d"),cU("weekday","e"),cU("isoWeekday","E"),dZ("d",ai),dZ("e",ai),dZ("E",ai),dZ("dd",ek),dZ("ddd",ek),dZ("dddd",ek),dV(["dd","ddd","dddd"],function(f,e,h){var g=h._locale.weekdaysParse(f);null!=g?e.d=g:dj(h).invalidWeekday=f}),dV(["d","e","E"],function(f,e,h,g){e[g]=c7(f)});var bZ="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bE="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),bn="Su_Mo_Tu_We_Th_Fr_Sa".split("_");d8("H",["HH",2],0,"hour"),d8("h",["hh",2],0,function(){return this.hours()%12||12}),bi("a",!0),bi("A",!1),cU("hour","h"),dZ("a",aW),dZ("A",aW),dZ("H",ai),dZ("h",ai),dZ("HH",ai,bx),dZ("hh",ai,bx),dW(["H","HH"],cq),dW(["a","A"],function(e,d,f){f._isPm=f._locale.isPM(e),f._meridiem=e}),dW(["h","hh"],function(e,d,f){d[cq]=c7(e),dj(f).bigHour=!0});var a1=/[ap]\.?m?\.?/i,aK=el("Hours",!0);d8("m",["mm",2],0,"minute"),cU("minute","m"),dZ("m",ai),dZ("mm",ai,bx),dW(["m","mm"],b2);var au=el("Minutes",!1);d8("s",["ss",2],0,"second"),cU("second","s"),dZ("s",ai),dZ("ss",ai,bx),dW(["s","ss"],bH);var e1=el("Seconds",!1);d8("S",0,0,function(){return ~~(this.millisecond()/100)}),d8(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),eW("SSS"),eW("SSSS"),cU("millisecond","ms"),dZ("S",eU,bO),dZ("SS",eU,bx),dZ("SSS",eU,bg),dZ("SSSS",c1),dW(["S","SS","SSS","SSSS"],function(d,c){c[bq]=c7(1000*("0."+d))});var eL=el("Milliseconds",!1);d8("z",0,0,"zoneAbbr"),d8("zz",0,0,"zoneName");var em=c9.prototype;em.add=aE,em.calendar=at,em.clone=eI,em.diff=bL,em.endOf=bT,em.format=aA,em.from=af,em.fromNow=eR,em.to=ev,em.toNow=dF,em.get=eg,em.invalidAt=eD,em.isAfter=d7,em.isBefore=dq,em.isBetween=cJ,em.isSame=cs,em.isValid=an,em.lang=eV,em.locale=cR,em.localeData=cA,em.max=bP,em.min=cf,em.parsingFlags=eZ,em.set=eg,em.startOf=cj,em.subtract=aj,em.toArray=aI,em.toDate=aZ,em.toISOString=aR,em.toJSON=aR,em.toString=a8,em.unix=bl,em.valueOf=bC,em.year=cN,em.isLeapYear=bM,em.weekYear=br,em.isoWeekYear=a5,em.quarter=em.quarters=e4,em.month=dK,em.daysInMonth=dJ,em.week=em.weeks=ag,em.isoWeek=em.isoWeeks=eS,em.weeksInYear=ax,em.isoWeeksInYear=aO,em.date=ez,em.day=em.days=cg,em.weekday=bQ,em.isoWeekday=bz,em.dayOfYear=dG,em.hour=em.hours=aK,em.minute=em.minutes=au,em.second=em.seconds=e1,em.millisecond=em.milliseconds=eL,em.utcOffset=cQ,em.utc=ci,em.local=bS,em.parseZone=bB,em.hasAlignedHourOffset=bk,em.isDST=aY,em.isDSTShifted=aH,em.isLocal=am,em.isUtcOffset=eY,em.isUtc=eC,em.isUTC=eC,em.zoneAbbr=eA,em.zoneName=dQ,em.dates=eK("dates accessor is deprecated. Use date instead.",ez),em.months=eK("months accessor is deprecated. Use month instead",dK),em.years=eK("years accessor is deprecated. Use year instead",cN),em.zone=eK("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",cz);var dy=em,cL={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},cu={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},b8="Invalid date",bN="%d",bw=/\d{1,2}/,bf={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},aT=c4.prototype;aT._calendar=cL,aT.calendar=cn,aT._longDateFormat=cu,aT.longDateFormat=bX,aT._invalidDate=b8,aT.invalidDate=en,aT._ordinal=bN,aT.ordinal=ar,aT._ordinalParse=bw,aT.preparse=eH,aT.postformat=eH,aT._relativeTime=bf,aT.relativeTime=d4,aT.pastFuture=dm,aT.set=cI,aT.months=dR,aT._months=a4,aT.monthsShort=dP,aT._monthsShort=aN,aT.monthsParse=dN,aT.week=a9,aT._week=cw,aT.firstDayOfYear=aB,aT.firstDayOfWeek=aS,aT.weekdays=es,aT._weekdays=bZ,aT.weekdaysMin=cO,aT._weekdaysMin=bn,aT.weekdaysShort=dC,aT._weekdaysShort=bE,aT.weekdaysParse=cx,aT.isPM=aF,aT._meridiemParse=a1,aT.meridiem=ak,cX("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var d=e%10,f=1===c7(e%100/10)?"th":1===d?"st":2===d?"nd":3===d?"rd":"th";return e+f}}),dx.lang=eK("moment.lang is deprecated. Use moment.locale instead.",cX),dx.langData=eK("moment.langData is deprecated. Use moment.localeData instead.",cV);var aC=Math.abs,ah=bj("ms"),eT=bj("s"),ex=bj("m"),dM=bj("h"),cZ=bj("d"),cC=bj("w"),cl=bj("M"),bV=bj("y"),ei=aG("milliseconds"),ap=aG("seconds"),eF=aG("minutes"),d0=aG("hours"),di=aG("days"),cG=aG("months"),cp=aG("years"),b0=Math.round,bF={s:45,m:45,h:22,d:26,M:11},bo=Math.abs,a2=aQ.prototype;a2.abs=e5,a2.add=et,a2.subtract=dD,a2.as=bR,a2.asMilliseconds=ah,a2.asSeconds=eT,a2.asMinutes=ex,a2.asHours=dM,a2.asDays=cZ,a2.asWeeks=cC,a2.asMonths=cl,a2.asYears=bV,a2.valueOf=bA,a2._bubble=cP,a2.get=aX,a2.milliseconds=ei,a2.seconds=ap,a2.minutes=eF,a2.hours=d0,a2.days=di,a2.weeks=al,a2.months=cG,a2.years=cp,a2.humanize=bG,a2.toISOString=bp,a2.toString=bp,a2.toJSON=bp,a2.locale=cR,a2.localeData=cA,a2.toIsoString=eK("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bp),a2.lang=eV,d8("X",0,0,"unix"),d8("x",0,0,"valueOf"),dZ("x",cD),dZ("X",bW),dW("X",function(e,d,f){f._d=new Date(1000*parseFloat(e,10))}),dW("x",function(e,d,f){f._d=new Date(c7(e))}),dx.version="2.10.3",dw(b5),dx.fn=dy,dx.min=bt,dx.max=a7,dx.utc=dn,dx.unix=c3,dx.months=bJ,dx.isDate=du,dx.locale=cX,dx.invalid=dg,dx.duration=dT,dx.isMoment=c8,dx.weekdays=a6,dx.parseZone=cE,dx.localeData=cV,dx.isDuration=az,dx.monthsShort=bs,dx.weekdaysMin=ay,dx.defineLocale=cW,dx.weekdaysShort=aP,dx.normalizeUnits=cS,dx.relativeTimeThreshold=b1;var aL=dx;return aL});(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?a(require("../moment")):typeof define==="function"&&define.amd?define(["moment"],a):a(b.moment)}(this,function(b){var a=b.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var c=e%10,d=(~~(e%100/10)===1)?"th":(c===1)?"st":(c===2)?"nd":(c===3)?"rd":"th";return e+d},week:{dow:1,doy:4}});return a}));
/* version : 4.14.30
 =========================================================
 bootstrap-datetimejs
 https://github.com/Eonasdan/bootstrap-datetimepicker
 Copyright (c) 2015 Jonathan Peterson
 =========================================================
 */
!function(b){if("function"==typeof define&&define.amd){define(["jquery","moment"],b)}else{if("object"==typeof exports){b(require("jquery"),require("moment"))}else{if("undefined"==typeof jQuery){throw"bootstrap-datetimepicker requires jQuery to be loaded first"}if("undefined"==typeof moment){throw"bootstrap-datetimepicker requires Moment.js to be loaded first"}b(jQuery,moment)}}}(function(e,d){if(!d){throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first")}var f=function(bc,bb){var a9,a8,a7,a6,a5,a4={},a3=d().startOf("d"),a2=a3.clone(),a1=!0,a0=!1,aZ=!1,aY=0,aX=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],aW=["days","months","years","decades"],aV=["top","bottom","auto"],aU=["left","right","auto"],aT=["default","top","bottom"],aS={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t","delete":46,46:"delete"},aR={},aQ=function(c){if("string"!=typeof c||c.length>1){throw new TypeError("isEnabled expects a single character string parameter")}switch(c){case"y":return -1!==a7.indexOf("Y");case"M":return -1!==a7.indexOf("M");case"d":return -1!==a7.toLowerCase().indexOf("d");case"h":case"H":return -1!==a7.toLowerCase().indexOf("h");case"m":return -1!==a7.indexOf("m");case"s":return -1!==a7.indexOf("s");default:return !1}},aO=function(){return aQ("h")||aQ("m")||aQ("s")},aN=function(){return aQ("y")||aQ("M")||aQ("d")},aD=function(){var g=e("<thead>").append(e("<tr>").append(e("<th>").addClass("prev").attr("data-action","previous").append(e("<span>").addClass(bb.icons.previous))).append(e("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",bb.calendarWeeks?"6":"5")).append(e("<th>").addClass("next").attr("data-action","next").append(e("<span>").addClass(bb.icons.next)))),h=e("<tbody>").append(e("<tr>").append(e("<td>").attr("colspan",bb.calendarWeeks?"8":"7")));return[e("<div>").addClass("datepicker-days").append(e("<table>").addClass("table-condensed").append(g).append(e("<tbody>"))),e("<div>").addClass("datepicker-months").append(e("<table>").addClass("table-condensed").append(g.clone()).append(h.clone())),e("<div>").addClass("datepicker-years").append(e("<table>").addClass("table-condensed").append(g.clone()).append(h.clone())),e("<div>").addClass("datepicker-decades").append(e("<table>").addClass("table-condensed").append(g.clone()).append(h.clone()))]},aC=function(){var g=e("<tr>"),i=e("<tr>"),h=e("<tr>");return aQ("h")&&(g.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:"Increment Hour"}).addClass("btn").attr("data-action","incrementHours").append(e("<span>").addClass(bb.icons.up)))),i.append(e("<td>").append(e("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:"Pick Hour"}).attr("data-action","showHours"))),h.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Hour"}).addClass("btn").attr("data-action","decrementHours").append(e("<span>").addClass(bb.icons.down))))),aQ("m")&&(aQ("h")&&(g.append(e("<td>").addClass("separator")),i.append(e("<td>").addClass("separator").html(":")),h.append(e("<td>").addClass("separator"))),g.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:"Increment Minute"}).addClass("btn").attr("data-action","incrementMinutes").append(e("<span>").addClass(bb.icons.up)))),i.append(e("<td>").append(e("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:"Pick Minute"}).attr("data-action","showMinutes"))),h.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Minute"}).addClass("btn").attr("data-action","decrementMinutes").append(e("<span>").addClass(bb.icons.down))))),aQ("s")&&(aQ("m")&&(g.append(e("<td>").addClass("separator")),i.append(e("<td>").addClass("separator").html(":")),h.append(e("<td>").addClass("separator"))),g.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:"Increment Second"}).addClass("btn").attr("data-action","incrementSeconds").append(e("<span>").addClass(bb.icons.up)))),i.append(e("<td>").append(e("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:"Pick Second"}).attr("data-action","showSeconds"))),h.append(e("<td>").append(e("<a>").attr({href:"#",tabindex:"-1",title:"Decrement Second"}).addClass("btn").attr("data-action","decrementSeconds").append(e("<span>").addClass(bb.icons.down))))),a8||(g.append(e("<td>").addClass("separator")),i.append(e("<td>").append(e("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:"Toggle Period"}))),h.append(e("<td>").addClass("separator"))),e("<div>").addClass("timepicker-picker").append(e("<table>").addClass("table-condensed").append([g,i,h]))},aB=function(){var g=e("<div>").addClass("timepicker-hours").append(e("<table>").addClass("table-condensed")),j=e("<div>").addClass("timepicker-minutes").append(e("<table>").addClass("table-condensed")),i=e("<div>").addClass("timepicker-seconds").append(e("<table>").addClass("table-condensed")),h=[aC()];return aQ("h")&&h.push(g),aQ("m")&&h.push(j),aQ("s")&&h.push(i),h},aA=function(){var c=[];return bb.showTodayButton&&c.push(e("<td>").append(e("<a>").attr({"data-action":"today",title:"Go to today"}).append(e("<span>").addClass(bb.icons.today)))),!bb.sideBySide&&aN()&&aO()&&c.push(e("<td>").append(e("<a>").attr({"data-action":"togglePicker",title:"Select Time"}).append(e("<span>").addClass(bb.icons.time)))),bb.showClear&&c.push(e("<td>").append(e("<a>").attr({"data-action":"clear",title:"Clear selection"}).append(e("<span>").addClass(bb.icons.clear)))),bb.showClose&&c.push(e("<td>").append(e("<a>").attr({"data-action":"close",title:"Close the picker"}).append(e("<span>").addClass(bb.icons.close)))),e("<table>").addClass("table-condensed").append(e("<tbody>").append(e("<tr>").append(c)))},az=function(){var i=e("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),m=e("<div>").addClass("datepicker").append(aD()),l=e("<div>").addClass("timepicker").append(aB()),k=e("<ul>").addClass("list-unstyled"),j=e("<li>").addClass("picker-switch"+(bb.collapse?" accordion-toggle":"")).append(aA());return bb.inline&&i.removeClass("dropdown-menu"),a8&&i.addClass("usetwentyfour"),aQ("s")&&!a8&&i.addClass("wider"),bb.sideBySide&&aN()&&aO()?(i.addClass("timepicker-sbs"),i.append(e("<div>").addClass("row").append(m.addClass("col-sm-6")).append(l.addClass("col-sm-6"))),i.append(j),i):("top"===bb.toolbarPlacement&&k.append(j),aN()&&k.append(e("<li>").addClass(bb.collapse&&aO()?"collapse in":"").append(m)),"default"===bb.toolbarPlacement&&k.append(j),aO()&&k.append(e("<li>").addClass(bb.collapse&&aN()?"collapse":"").append(l)),"bottom"===bb.toolbarPlacement&&k.append(j),i.append(k))},ay=function(){var c,g={};return c=bc.is("input")||bb.inline?bc.data():bc.find("input").data(),c.dateOptions&&c.dateOptions instanceof Object&&(g=e.extend(!0,g,c.dateOptions)),e.each(bb,function(h){var i="date"+h.charAt(0).toUpperCase()+h.slice(1);void 0!==c[i]&&(g[h]=c[i])}),g},ax=function(){var c,l=(a0||bc).position(),k=(a0||bc).offset(),j=bb.widgetPositioning.vertical,i=bb.widgetPositioning.horizontal;if(bb.widgetParent){c=bb.widgetParent.append(aZ)}else{if(bc.is("input")){c=bc.after(aZ).parent()}else{if(bb.inline){return void (c=bc.append(aZ))}c=bc,bc.children().first().after(aZ)}}if("auto"===j&&(j=k.top+1.5*aZ.height()>=e(window).height()+e(window).scrollTop()&&aZ.height()+bc.outerHeight()<k.top?"top":"bottom"),"auto"===i&&(i=c.width()<k.left+aZ.outerWidth()/2&&k.left+aZ.outerWidth()>e(window).width()?"right":"left"),"top"===j?aZ.addClass("top").removeClass("bottom"):aZ.addClass("bottom").removeClass("top"),"right"===i?aZ.addClass("pull-right"):aZ.removeClass("pull-right"),"relative"!==c.css("position")&&(c=c.parents().filter(function(){return"relative"===e(this).css("position")}).first()),0===c.length){throw new Error("datetimepicker component should be placed within a relative positioned container")}aZ.css({top:"top"===j?"auto":l.top+bc.outerHeight(),bottom:"top"===j?l.top+bc.outerHeight():"auto",left:"left"===i?c===bc?0:l.left:"auto",right:"left"===i?"auto":c.outerWidth()-bc.outerWidth()-(c===bc?0:l.left)})},aw=function(c){"dp.change"===c.type&&(c.date&&c.date.isSame(c.oldDate)||!c.date&&!c.oldDate)||bc.trigger(c)},av=function(c){"y"===c&&(c="YYYY"),aw({type:"dp.update",change:c,viewDate:a2.clone()})},au=function(c){aZ&&(c&&(a5=Math.max(aY,Math.min(3,a5+c))),aZ.find(".datepicker > div").hide().filter(".datepicker-"+aX[a5].clsName).show())},at=function(){var g=e("<tr>"),h=a2.clone().startOf("w").startOf("d");for(bb.calendarWeeks===!0&&g.append(e("<th>").addClass("cw").text("#"));h.isBefore(a2.clone().endOf("w"));){g.append(e("<th>").addClass("dow").text(h.format("dd"))),h.add(1,"d")}aZ.find(".datepicker-days thead").append(g)},ar=function(c){return bb.disabledDates[c.format("YYYY-MM-DD")]===!0},aq=function(c){return bb.enabledDates[c.format("YYYY-MM-DD")]===!0},ap=function(c){return bb.disabledHours[c.format("H")]===!0},ao=function(c){return bb.enabledHours[c.format("H")]===!0},an=function(g,i){if(!g.isValid()){return !1}if(bb.disabledDates&&"d"===i&&ar(g)){return !1}if(bb.enabledDates&&"d"===i&&!aq(g)){return !1}if(bb.minDate&&g.isBefore(bb.minDate,i)){return !1}if(bb.maxDate&&g.isAfter(bb.maxDate,i)){return !1}if(bb.daysOfWeekDisabled&&"d"===i&&-1!==bb.daysOfWeekDisabled.indexOf(g.day())){return !1}if(bb.disabledHours&&("h"===i||"m"===i||"s"===i)&&ap(g)){return !1}if(bb.enabledHours&&("h"===i||"m"===i||"s"===i)&&!ao(g)){return !1}if(bb.disabledTimeIntervals&&("h"===i||"m"===i||"s"===i)){var h=!1;if(e.each(bb.disabledTimeIntervals,function(){return g.isBetween(this[0],this[1])?(h=!0,!1):void 0}),h){return !1}}return !0},am=function(){for(var g=[],h=a2.clone().startOf("y").startOf("d");h.isSame(a2,"y");){g.push(e("<span>").attr("data-action","selectMonth").addClass("month").text(h.format("MMM"))),h.add(1,"M")}aZ.find(".datepicker-months td").empty().append(g)},al=function(){var g=aZ.find(".datepicker-months"),i=g.find("th"),h=g.find("tbody").find("span");i.eq(0).find("span").attr("title","Previous Year"),i.eq(1).attr("title","Select Year"),i.eq(2).find("span").attr("title","Next Year"),g.find(".disabled").removeClass("disabled"),an(a2.clone().subtract(1,"y"),"y")||i.eq(0).addClass("disabled"),i.eq(1).text(a2.year()),an(a2.clone().add(1,"y"),"y")||i.eq(2).addClass("disabled"),h.removeClass("active"),a3.isSame(a2,"y")&&!a1&&h.eq(a3.month()).addClass("active"),h.each(function(c){an(a2.clone().month(c),"M")||e(this).addClass("disabled")})},ak=function(){var h=aZ.find(".datepicker-years"),g=h.find("th"),k=a2.clone().subtract(5,"y"),j=a2.clone().add(6,"y"),i="";for(g.eq(0).find("span").attr("title","Previous Decade"),g.eq(1).attr("title","Select Decade"),g.eq(2).find("span").attr("title","Next Decade"),h.find(".disabled").removeClass("disabled"),bb.minDate&&bb.minDate.isAfter(k,"y")&&g.eq(0).addClass("disabled"),g.eq(1).text(k.year()+"-"+j.year()),bb.maxDate&&bb.maxDate.isBefore(j,"y")&&g.eq(2).addClass("disabled");!k.isAfter(j,"y");){i+='<span data-action="selectYear" class="year'+(k.isSame(a3,"y")&&!a1?" active":"")+(an(k,"y")?"":" disabled")+'">'+k.year()+"</span>",k.add(1,"y")}h.find("td").html(i)},aj=function(){var h=aZ.find(".datepicker-decades"),l=h.find("th"),k=d(a2.isBefore(d({y:1999}))?{y:1899}:{y:1999}),j=k.clone().add(100,"y"),i="";for(l.eq(0).find("span").attr("title","Previous Century"),l.eq(2).find("span").attr("title","Next Century"),h.find(".disabled").removeClass("disabled"),(k.isSame(d({y:1900}))||bb.minDate&&bb.minDate.isAfter(k,"y"))&&l.eq(0).addClass("disabled"),l.eq(1).text(k.year()+"-"+j.year()),(k.isSame(d({y:2000}))||bb.maxDate&&bb.maxDate.isBefore(j,"y"))&&l.eq(2).addClass("disabled");!k.isAfter(j,"y");){i+='<span data-action="selectDecade" class="decade'+(k.isSame(a3,"y")?" active":"")+(an(k,"y")?"":" disabled")+'" data-selection="'+(k.year()+6)+'">'+(k.year()+1)+" - "+(k.year()+12)+"</span>",k.add(12,"y")}i+="<span></span><span></span><span></span>",h.find("td").html(i)},ai=function(){var q,p,o,n,m=aZ.find(".datepicker-days"),l=m.find("th"),k=[];if(aN()){for(l.eq(0).find("span").attr("title","Previous Month"),l.eq(1).attr("title","Select Month"),l.eq(2).find("span").attr("title","Next Month"),m.find(".disabled").removeClass("disabled"),l.eq(1).text(a2.format(bb.dayViewHeaderFormat)),an(a2.clone().subtract(1,"M"),"M")||l.eq(0).addClass("disabled"),an(a2.clone().add(1,"M"),"M")||l.eq(2).addClass("disabled"),q=a2.clone().startOf("M").startOf("w").startOf("d"),n=0;42>n;n++){0===q.weekday()&&(p=e("<tr>"),bb.calendarWeeks&&p.append('<td class="cw">'+q.week()+"</td>"),k.push(p)),o="",q.isBefore(a2,"M")&&(o+=" old"),q.isAfter(a2,"M")&&(o+=" new"),q.isSame(a3,"d")&&!a1&&(o+=" active"),an(q,"d")||(o+=" disabled"),q.isSame(d(),"d")&&(o+=" today"),(0===q.day()||6===q.day())&&(o+=" weekend"),p.append('<td data-action="selectDay" data-day="'+q.format("L")+'" class="day'+o+'">'+q.date()+"</td>"),q.add(1,"d")}m.find("tbody").empty().append(k),al(),ak(),aj()}},ah=function(){var g=aZ.find(".timepicker-hours table"),j=a2.clone().startOf("d"),i=[],h=e("<tr>");for(a2.hour()>11&&!a8&&j.hour(12);j.isSame(a2,"d")&&(a8||a2.hour()<12&&j.hour()<12||a2.hour()>11);){j.hour()%4===0&&(h=e("<tr>"),i.push(h)),h.append('<td data-action="selectHour" class="hour'+(an(j,"h")?"":" disabled")+'">'+j.format(a8?"HH":"hh")+"</td>"),j.add(1,"h")}g.empty().append(i)},ag=function(){for(var h=aZ.find(".timepicker-minutes table"),l=a2.clone().startOf("h"),k=[],j=e("<tr>"),i=1===bb.stepping?5:bb.stepping;a2.isSame(l,"h");){l.minute()%(4*i)===0&&(j=e("<tr>"),k.push(j)),j.append('<td data-action="selectMinute" class="minute'+(an(l,"m")?"":" disabled")+'">'+l.format("mm")+"</td>"),l.add(i,"m")}h.empty().append(k)},ae=function(){for(var g=aZ.find(".timepicker-seconds table"),j=a2.clone().startOf("m"),i=[],h=e("<tr>");a2.isSame(j,"m");){j.second()%20===0&&(h=e("<tr>"),i.push(h)),h.append('<td data-action="selectSecond" class="second'+(an(j,"s")?"":" disabled")+'">'+j.format("ss")+"</td>"),j.add(5,"s")}g.empty().append(i)},ad=function(){var h,g,i=aZ.find(".timepicker span[data-time-component]");a8||(h=aZ.find(".timepicker [data-action=togglePeriod]"),g=a3.clone().add(a3.hours()>=12?-12:12,"h"),h.text(a3.format("A")),an(g,"h")?h.removeClass("disabled"):h.addClass("disabled")),i.filter("[data-time-component=hours]").text(a3.format(a8?"HH":"hh")),i.filter("[data-time-component=minutes]").text(a3.format("mm")),i.filter("[data-time-component=seconds]").text(a3.format("ss")),ah(),ag(),ae()},ab=function(){aZ&&(ai(),ad())},aJ=function(g){var c=a1?null:a3;return g?(g=g.clone().locale(bb.locale),1!==bb.stepping&&g.minutes(Math.round(g.minutes()/bb.stepping)*bb.stepping%60).seconds(0),void (an(g)?(a3=g,a2=a3.clone(),a9.val(a3.format(a7)),bc.data("date",a3.format(a7)),a1=!1,ab(),aw({type:"dp.change",date:a3.clone(),oldDate:c})):(bb.keepInvalid||a9.val(a1?"":a3.format(a7)),aw({type:"dp.error",date:g})))):(a1=!0,a9.val(""),bc.data("date",""),aw({type:"dp.change",date:!1,oldDate:c}),void ab())},be=function(){var c=!1;return aZ?(aZ.find(".collapse").each(function(){var g=e(this).data("collapse");return g&&g.transitioning?(c=!0,!1):!0}),c?a4:(a0&&a0.hasClass("btn")&&a0.toggleClass("active"),aZ.hide(),e(window).off("resize",ax),aZ.off("click","[data-action]"),aZ.off("mousedown",!1),aZ.remove(),aZ=!1,aw({type:"dp.hide",date:a3.clone()}),a4)):a4},aE=function(){aJ(null)},bd={next:function(){var c=aX[a5].navFnc;a2.add(aX[a5].navStep,c),ai(),av(c)},previous:function(){var c=aX[a5].navFnc;a2.subtract(aX[a5].navStep,c),ai(),av(c)},pickerSwitch:function(){au(1)},selectMonth:function(g){var h=e(g.target).closest("tbody").find("span").index(e(g.target));a2.month(h),a5===aY?(aJ(a3.clone().year(a2.year()).month(a2.month())),bb.inline||be()):(au(-1),ai()),av("M")},selectYear:function(g){var h=parseInt(e(g.target).text(),10)||0;a2.year(h),a5===aY?(aJ(a3.clone().year(a2.year())),bb.inline||be()):(au(-1),ai()),av("YYYY")},selectDecade:function(g){var h=parseInt(e(g.target).data("selection"),10)||0;a2.year(h),a5===aY?(aJ(a3.clone().year(a2.year())),bb.inline||be()):(au(-1),ai()),av("YYYY")},selectDay:function(g){var h=a2.clone();e(g.target).is(".old")&&h.subtract(1,"M"),e(g.target).is(".new")&&h.add(1,"M"),aJ(h.date(parseInt(e(g.target).text(),10))),aO()||bb.keepOpen||bb.inline||be()},incrementHours:function(){var c=a3.clone().add(1,"h");an(c,"h")&&aJ(c)},incrementMinutes:function(){var c=a3.clone().add(bb.stepping,"m");an(c,"m")&&aJ(c)},incrementSeconds:function(){var c=a3.clone().add(1,"s");an(c,"s")&&aJ(c)},decrementHours:function(){var c=a3.clone().subtract(1,"h");an(c,"h")&&aJ(c)},decrementMinutes:function(){var c=a3.clone().subtract(bb.stepping,"m");an(c,"m")&&aJ(c)},decrementSeconds:function(){var c=a3.clone().subtract(1,"s");an(c,"s")&&aJ(c)},togglePeriod:function(){aJ(a3.clone().add(a3.hours()>=12?-12:12,"h"))},togglePicker:function(i){var n,m=e(i.target),l=m.closest("ul"),k=l.find(".in"),j=l.find(".collapse:not(.in)");if(k&&k.length){if(n=k.data("collapse"),n&&n.transitioning){return}k.collapse?(k.collapse("hide"),j.collapse("show")):(k.removeClass("in"),j.addClass("in")),m.is("span")?m.toggleClass(bb.icons.time+" "+bb.icons.date):m.find("span").toggleClass(bb.icons.time+" "+bb.icons.date)}},showPicker:function(){aZ.find(".timepicker > div:not(.timepicker-picker)").hide(),aZ.find(".timepicker .timepicker-picker").show()},showHours:function(){aZ.find(".timepicker .timepicker-picker").hide(),aZ.find(".timepicker .timepicker-hours").show()},showMinutes:function(){aZ.find(".timepicker .timepicker-picker").hide(),aZ.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){aZ.find(".timepicker .timepicker-picker").hide(),aZ.find(".timepicker .timepicker-seconds").show()},selectHour:function(g){var h=parseInt(e(g.target).text(),10);a8||(a3.hours()>=12?12!==h&&(h+=12):12===h&&(h=0)),aJ(a3.clone().hours(h)),bd.showPicker.call(a4)},selectMinute:function(c){aJ(a3.clone().minutes(parseInt(e(c.target).text(),10))),bd.showPicker.call(a4)},selectSecond:function(c){aJ(a3.clone().seconds(parseInt(e(c.target).text(),10))),bd.showPicker.call(a4)},clear:aE,today:function(){an(d(),"d")&&aJ(d())},close:be},aK=function(c){return e(c.currentTarget).is(".disabled")?!1:(bd[e(c.currentTarget).data("action")].apply(a4,arguments),!1)},aF=function(){var h,g={year:function(c){return c.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(c){return c.date(1).hours(0).seconds(0).minutes(0)},day:function(c){return c.hours(0).seconds(0).minutes(0)},hour:function(c){return c.seconds(0).minutes(0)},minute:function(c){return c.seconds(0)}};return a9.prop("disabled")||!bb.ignoreReadonly&&a9.prop("readonly")||aZ?a4:(void 0!==a9.val()&&0!==a9.val().trim().length?aJ(aL(a9.val().trim())):bb.useCurrent&&a1&&(a9.is("input")&&0===a9.val().trim().length||bb.inline)&&(h=d(),"string"==typeof bb.useCurrent&&(h=g[bb.useCurrent](h)),aJ(h)),aZ=az(),at(),am(),aZ.find(".timepicker-hours").hide(),aZ.find(".timepicker-minutes").hide(),aZ.find(".timepicker-seconds").hide(),ab(),au(),e(window).on("resize",ax),aZ.on("click","[data-action]",aK),aZ.on("mousedown",!1),a0&&a0.hasClass("btn")&&a0.toggleClass("active"),aZ.show(),ax(),bb.focusOnShow&&!a9.is(":focus")&&a9.focus(),aw({type:"dp.show"}),a4)},a=function(){return aZ?be():aF()},aL=function(c){return c=d.isMoment(c)||c instanceof Date?d(c):d(c,a6,bb.useStrict),c.locale(bb.locale),c},aG=function(u){var t,s,r,q,p=null,o=[],n={},m=u.which,j="p";aR[m]=j;for(t in aR){aR.hasOwnProperty(t)&&aR[t]===j&&(o.push(t),parseInt(t,10)!==m&&(n[t]=!0))}for(t in bb.keyBinds){if(bb.keyBinds.hasOwnProperty(t)&&"function"==typeof bb.keyBinds[t]&&(r=t.split(" "),r.length===o.length&&aS[m]===r[r.length-1])){for(q=!0,s=r.length-2;s>=0;s--){if(!(aS[r[s]] in n)){q=!1;break}}if(q){p=bb.keyBinds[t];break}}}p&&(p.call(a4,aZ),u.stopPropagation(),u.preventDefault())},b=function(c){aR[c.which]="r",c.stopPropagation(),c.preventDefault()},aM=function(g){var i=e(g.target).val().trim(),h=i?aL(i):null;return aJ(h),g.stopImmediatePropagation(),!1},aH=function(){a9.on({change:aM,blur:bb.debug?"":be,keydown:aG,keyup:b,focus:bb.allowInputToggle?aF:""}),bc.is("input")?a9.on({focus:aF}):a0&&(a0.on("click",a),a0.on("mousedown",!1))},ac=function(){a9.off({change:aM,blur:be,keydown:aG,keyup:b,focus:bb.allowInputToggle?be:""}),bc.is("input")?a9.off({focus:aF}):a0&&(a0.off("click",a),a0.off("mousedown",!1))},aP=function(g){var h={};return e.each(g,function(){var c=aL(this);c.isValid()&&(h[c.format("YYYY-MM-DD")]=!0)}),Object.keys(h).length?h:!1},aI=function(g){var h={};return e.each(g,function(){h[this]=!0}),Object.keys(h).length?h:!1},af=function(){var c=bb.format||"L LT";a7=c.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(h){var g=a3.localeData().longDateFormat(h)||h;return g.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(i){return a3.localeData().longDateFormat(i)||i})}),a6=bb.extraFormats?bb.extraFormats.slice():[],a6.indexOf(c)<0&&a6.indexOf(a7)<0&&a6.push(a7),a8=a7.toLowerCase().indexOf("a")<1&&a7.replace(/\[.*?\]/g,"").indexOf("h")<1,aQ("y")&&(aY=2),aQ("M")&&(aY=1),aQ("d")&&(aY=0),a5=Math.max(aY,a5),a1||aJ(a3)};if(a4.destroy=function(){be(),ac(),bc.removeData("DateTimePicker"),bc.removeData("date")},a4.toggle=a,a4.show=aF,a4.hide=be,a4.disable=function(){return be(),a0&&a0.hasClass("btn")&&a0.addClass("disabled"),a9.prop("disabled",!0),a4},a4.enable=function(){return a0&&a0.hasClass("btn")&&a0.removeClass("disabled"),a9.prop("disabled",!1),a4},a4.ignoreReadonly=function(c){if(0===arguments.length){return bb.ignoreReadonly}if("boolean"!=typeof c){throw new TypeError("ignoreReadonly () expects a boolean parameter")}return bb.ignoreReadonly=c,a4},a4.options=function(c){if(0===arguments.length){return e.extend(!0,{},bb)}if(!(c instanceof Object)){throw new TypeError("options() options parameter should be an object")}return e.extend(!0,bb,c),e.each(bb,function(h,g){if(void 0===a4[h]){throw new TypeError("option "+h+" is not recognized!")}a4[h](g)}),a4},a4.date=function(c){if(0===arguments.length){return a1?null:a3.clone()}if(!(null===c||"string"==typeof c||d.isMoment(c)||c instanceof Date)){throw new TypeError("date() parameter must be one of [null, string, moment or Date]")}return aJ(null===c?null:aL(c)),a4},a4.format=function(c){if(0===arguments.length){return bb.format}if("string"!=typeof c&&("boolean"!=typeof c||c!==!1)){throw new TypeError("format() expects a sting or boolean:false parameter "+c)}return bb.format=c,a7&&af(),a4},a4.dayViewHeaderFormat=function(c){if(0===arguments.length){return bb.dayViewHeaderFormat}if("string"!=typeof c){throw new TypeError("dayViewHeaderFormat() expects a string parameter")}return bb.dayViewHeaderFormat=c,a4},a4.extraFormats=function(c){if(0===arguments.length){return bb.extraFormats}if(c!==!1&&!(c instanceof Array)){throw new TypeError("extraFormats() expects an array or false parameter")}return bb.extraFormats=c,a6&&af(),a4},a4.disabledDates=function(c){if(0===arguments.length){return bb.disabledDates?e.extend({},bb.disabledDates):bb.disabledDates}if(!c){return bb.disabledDates=!1,ab(),a4}if(!(c instanceof Array)){throw new TypeError("disabledDates() expects an array parameter")}return bb.disabledDates=aP(c),bb.enabledDates=!1,ab(),a4},a4.enabledDates=function(c){if(0===arguments.length){return bb.enabledDates?e.extend({},bb.enabledDates):bb.enabledDates}if(!c){return bb.enabledDates=!1,ab(),a4}if(!(c instanceof Array)){throw new TypeError("enabledDates() expects an array parameter")}return bb.enabledDates=aP(c),bb.disabledDates=!1,ab(),a4},a4.daysOfWeekDisabled=function(g){if(0===arguments.length){return bb.daysOfWeekDisabled.splice(0)}if("boolean"==typeof g&&!g){return bb.daysOfWeekDisabled=!1,ab(),a4}if(!(g instanceof Array)){throw new TypeError("daysOfWeekDisabled() expects an array parameter")}if(bb.daysOfWeekDisabled=g.reduce(function(i,h){return h=parseInt(h,10),h>6||0>h||isNaN(h)?i:(-1===i.indexOf(h)&&i.push(h),i)},[]).sort(),bb.useCurrent&&!bb.keepInvalid){for(var c=0;!an(a3,"d");){if(a3.add(1,"d"),7===c){throw"Tried 7 times to find a valid date"}c++}aJ(a3)}return ab(),a4},a4.maxDate=function(g){if(0===arguments.length){return bb.maxDate?bb.maxDate.clone():bb.maxDate}if("boolean"==typeof g&&g===!1){return bb.maxDate=!1,ab(),a4}"string"==typeof g&&("now"===g||"moment"===g)&&(g=d());var h=aL(g);if(!h.isValid()){throw new TypeError("maxDate() Could not parse date parameter: "+g)}if(bb.minDate&&h.isBefore(bb.minDate)){throw new TypeError("maxDate() date parameter is before options.minDate: "+h.format(a7))}return bb.maxDate=h,bb.useCurrent&&!bb.keepInvalid&&a3.isAfter(g)&&aJ(bb.maxDate),a2.isAfter(h)&&(a2=h.clone()),ab(),a4},a4.minDate=function(g){if(0===arguments.length){return bb.minDate?bb.minDate.clone():bb.minDate}if("boolean"==typeof g&&g===!1){return bb.minDate=!1,ab(),a4}"string"==typeof g&&("now"===g||"moment"===g)&&(g=d());var h=aL(g);if(!h.isValid()){throw new TypeError("minDate() Could not parse date parameter: "+g)}if(bb.maxDate&&h.isAfter(bb.maxDate)){throw new TypeError("minDate() date parameter is after options.maxDate: "+h.format(a7))}return bb.minDate=h,bb.useCurrent&&!bb.keepInvalid&&a3.isBefore(g)&&aJ(bb.minDate),a2.isBefore(h)&&(a2=h.clone()),ab(),a4},a4.defaultDate=function(g){if(0===arguments.length){return bb.defaultDate?bb.defaultDate.clone():bb.defaultDate}if(!g){return bb.defaultDate=!1,a4}"string"==typeof g&&("now"===g||"moment"===g)&&(g=d());var h=aL(g);if(!h.isValid()){throw new TypeError("defaultDate() Could not parse date parameter: "+g)}if(!an(h)){throw new TypeError("defaultDate() date passed is invalid according to component setup validations")}return bb.defaultDate=h,(bb.defaultDate&&bb.inline||""===a9.val().trim()&&void 0===a9.attr("placeholder"))&&aJ(bb.defaultDate),a4},a4.locale=function(c){if(0===arguments.length){return bb.locale}if(!d.localeData(c)){throw new TypeError("locale() locale "+c+" is not loaded from moment locales!")}return bb.locale=c,a3.locale(bb.locale),a2.locale(bb.locale),a7&&af(),aZ&&(be(),aF()),a4},a4.stepping=function(c){return 0===arguments.length?bb.stepping:(c=parseInt(c,10),(isNaN(c)||1>c)&&(c=1),bb.stepping=c,a4)},a4.useCurrent=function(g){var c=["year","month","day","hour","minute"];if(0===arguments.length){return bb.useCurrent}if("boolean"!=typeof g&&"string"!=typeof g){throw new TypeError("useCurrent() expects a boolean or string parameter")}if("string"==typeof g&&-1===c.indexOf(g.toLowerCase())){throw new TypeError("useCurrent() expects a string parameter of "+c.join(", "))}return bb.useCurrent=g,a4},a4.collapse=function(c){if(0===arguments.length){return bb.collapse}if("boolean"!=typeof c){throw new TypeError("collapse() expects a boolean parameter")}return bb.collapse===c?a4:(bb.collapse=c,aZ&&(be(),aF()),a4)},a4.icons=function(c){if(0===arguments.length){return e.extend({},bb.icons)}if(!(c instanceof Object)){throw new TypeError("icons() expects parameter to be an Object")}return e.extend(bb.icons,c),aZ&&(be(),aF()),a4},a4.useStrict=function(c){if(0===arguments.length){return bb.useStrict}if("boolean"!=typeof c){throw new TypeError("useStrict() expects a boolean parameter")}return bb.useStrict=c,a4},a4.sideBySide=function(c){if(0===arguments.length){return bb.sideBySide}if("boolean"!=typeof c){throw new TypeError("sideBySide() expects a boolean parameter")}return bb.sideBySide=c,aZ&&(be(),aF()),a4},a4.viewMode=function(c){if(0===arguments.length){return bb.viewMode}if("string"!=typeof c){throw new TypeError("viewMode() expects a string parameter")}if(-1===aW.indexOf(c)){throw new TypeError("viewMode() parameter must be one of ("+aW.join(", ")+") value")}return bb.viewMode=c,a5=Math.max(aW.indexOf(c),aY),au(),a4},a4.toolbarPlacement=function(c){if(0===arguments.length){return bb.toolbarPlacement}if("string"!=typeof c){throw new TypeError("toolbarPlacement() expects a string parameter")}if(-1===aT.indexOf(c)){throw new TypeError("toolbarPlacement() parameter must be one of ("+aT.join(", ")+") value")}return bb.toolbarPlacement=c,aZ&&(be(),aF()),a4},a4.widgetPositioning=function(c){if(0===arguments.length){return e.extend({},bb.widgetPositioning)}if("[object Object]"!=={}.toString.call(c)){throw new TypeError("widgetPositioning() expects an object variable")}if(c.horizontal){if("string"!=typeof c.horizontal){throw new TypeError("widgetPositioning() horizontal variable must be a string")}if(c.horizontal=c.horizontal.toLowerCase(),-1===aU.indexOf(c.horizontal)){throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+aU.join(", ")+")")}bb.widgetPositioning.horizontal=c.horizontal}if(c.vertical){if("string"!=typeof c.vertical){throw new TypeError("widgetPositioning() vertical variable must be a string")}if(c.vertical=c.vertical.toLowerCase(),-1===aV.indexOf(c.vertical)){throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+aV.join(", ")+")")}bb.widgetPositioning.vertical=c.vertical}return ab(),a4},a4.calendarWeeks=function(c){if(0===arguments.length){return bb.calendarWeeks}if("boolean"!=typeof c){throw new TypeError("calendarWeeks() expects parameter to be a boolean value")}return bb.calendarWeeks=c,ab(),a4},a4.showTodayButton=function(c){if(0===arguments.length){return bb.showTodayButton}if("boolean"!=typeof c){throw new TypeError("showTodayButton() expects a boolean parameter")}return bb.showTodayButton=c,aZ&&(be(),aF()),a4},a4.showClear=function(c){if(0===arguments.length){return bb.showClear}if("boolean"!=typeof c){throw new TypeError("showClear() expects a boolean parameter")}return bb.showClear=c,aZ&&(be(),aF()),a4},a4.widgetParent=function(c){if(0===arguments.length){return bb.widgetParent}if("string"==typeof c&&(c=e(c)),null!==c&&"string"!=typeof c&&!(c instanceof e)){throw new TypeError("widgetParent() expects a string or a jQuery object parameter")}return bb.widgetParent=c,aZ&&(be(),aF()),a4},a4.keepOpen=function(c){if(0===arguments.length){return bb.keepOpen}if("boolean"!=typeof c){throw new TypeError("keepOpen() expects a boolean parameter")}return bb.keepOpen=c,a4},a4.focusOnShow=function(c){if(0===arguments.length){return bb.focusOnShow}if("boolean"!=typeof c){throw new TypeError("focusOnShow() expects a boolean parameter")}return bb.focusOnShow=c,a4},a4.inline=function(c){if(0===arguments.length){return bb.inline}if("boolean"!=typeof c){throw new TypeError("inline() expects a boolean parameter")}return bb.inline=c,a4},a4.clear=function(){return aE(),a4},a4.keyBinds=function(c){return bb.keyBinds=c,a4},a4.debug=function(c){if("boolean"!=typeof c){throw new TypeError("debug() expects a boolean parameter")}return bb.debug=c,a4},a4.allowInputToggle=function(c){if(0===arguments.length){return bb.allowInputToggle}if("boolean"!=typeof c){throw new TypeError("allowInputToggle() expects a boolean parameter")}return bb.allowInputToggle=c,a4},a4.showClose=function(c){if(0===arguments.length){return bb.showClose}if("boolean"!=typeof c){throw new TypeError("showClose() expects a boolean parameter")}return bb.showClose=c,a4},a4.keepInvalid=function(c){if(0===arguments.length){return bb.keepInvalid}if("boolean"!=typeof c){throw new TypeError("keepInvalid() expects a boolean parameter")}return bb.keepInvalid=c,a4},a4.datepickerInput=function(c){if(0===arguments.length){return bb.datepickerInput}if("string"!=typeof c){throw new TypeError("datepickerInput() expects a string parameter")}return bb.datepickerInput=c,a4},a4.disabledTimeIntervals=function(c){if(0===arguments.length){return bb.disabledTimeIntervals?e.extend({},bb.disabledTimeIntervals):bb.disabledTimeIntervals}if(!c){return bb.disabledTimeIntervals=!1,ab(),a4}if(!(c instanceof Array)){throw new TypeError("disabledTimeIntervals() expects an array parameter")}return bb.disabledTimeIntervals=c,ab(),a4},a4.disabledHours=function(g){if(0===arguments.length){return bb.disabledHours?e.extend({},bb.disabledHours):bb.disabledHours}if(!g){return bb.disabledHours=!1,ab(),a4}if(!(g instanceof Array)){throw new TypeError("disabledHours() expects an array parameter")}if(bb.disabledHours=aI(g),bb.enabledHours=!1,bb.useCurrent&&!bb.keepInvalid){for(var h=0;!an(a3,"h");){if(a3.add(1,"h"),24===h){throw"Tried 24 times to find a valid date"}h++}aJ(a3)}return ab(),a4},a4.enabledHours=function(g){if(0===arguments.length){return bb.enabledHours?e.extend({},bb.enabledHours):bb.enabledHours}if(!g){return bb.enabledHours=!1,ab(),a4}if(!(g instanceof Array)){throw new TypeError("enabledHours() expects an array parameter")}if(bb.enabledHours=aI(g),bb.disabledHours=!1,bb.useCurrent&&!bb.keepInvalid){for(var h=0;!an(a3,"h");){if(a3.add(1,"h"),24===h){throw"Tried 24 times to find a valid date"}h++}aJ(a3)}return ab(),a4},a4.viewDate=function(c){if(0===arguments.length){return a2.clone()}if(!c){return a2=a3.clone(),a4}if(!("string"==typeof c||d.isMoment(c)||c instanceof Date)){throw new TypeError("viewDate() parameter must be one of [string, moment or Date]")}return a2=aL(c),av(),a4},bc.is("input")){a9=bc}else{if(a9=bc.find(bb.datepickerInput),0===a9.size()){a9=bc.find("input")}else{if(!a9.is("input")){throw new Error('CSS class "'+bb.datepickerInput+'" cannot be applied to non input element')}}}if(bc.hasClass("input-group")&&(a0=0===bc.find(".datepickerbutton").size()?bc.find('[class^="input-group-"]'):bc.find(".datepickerbutton")),!bb.inline&&!a9.is("input")){throw new Error("Could not initialize DateTimePicker without an input element")}return e.extend(!0,bb,ay()),a4.options(bb),af(),aH(),a9.prop("disabled")&&a4.disable(),a9.is("input")&&0!==a9.val().trim().length?aJ(aL(a9.val().trim())):bb.defaultDate&&void 0===a9.attr("placeholder")&&aJ(bb.defaultDate),bb.inline&&aF(),a4};e.fn.datetimepicker=function(a){return this.each(function(){var b=e(this);b.data("DateTimePicker")||(a=e.extend(!0,{},e.fn.datetimepicker.defaults,a),b.data("DateTimePicker",f(b,a)))})},e.fn.datetimepicker.defaults={format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:d.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")?this.date(g.clone().subtract(7,"d")):this.date(g.clone().add(1,"m"))}},down:function(b){if(!b){return void this.show()}var g=this.date()||d();b.find(".datepicker").is(":visible")?this.date(g.clone().add(7,"d")):this.date(g.clone().subtract(1,"m"))},"control up":function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")?this.date(g.clone().subtract(1,"y")):this.date(g.clone().add(1,"h"))}},"control down":function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")?this.date(g.clone().add(1,"y")):this.date(g.clone().subtract(1,"h"))}},left:function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")&&this.date(g.clone().subtract(1,"d"))}},right:function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")&&this.date(g.clone().add(1,"d"))}},pageUp:function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")&&this.date(g.clone().subtract(1,"M"))}},pageDown:function(b){if(b){var g=this.date()||d();b.find(".datepicker").is(":visible")&&this.date(g.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(b){b.find(".timepicker").is(":visible")&&b.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(d())},"delete":function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}});(function(a){vac_templater.serial=vac_templater.serial||0;vac_templater.overlay_handlers=vac_templater.overlay_handlers||[];vac_templater.attach_behaviors=function(b){b=b||document;a.each(vac_templater.behaviors,function(){if(a.isFunction(this.attach)){this.attach(b)}})};vac_templater.detach_behaviors=function(b){b=b||document;a.each(vac_templater.behaviors,function(){if(a.isFunction(this.detach)){this.detach(b)}})};vac_templater.execute_commands=function(b,e,c){e=e||this;c=a.extend({},vac_templater.commands,c);b.sort(function(h,g){return h.weight-g.weight});var f=false;for(var d in b){if(b[d]["cmd"]&&b[d]["args"]&&c[b[d]["cmd"]]){f=c[b[d]["cmd"]].apply(e,b[d]["args"])||f}}return f};vac_templater.ready=function(e,b,c){function d(i,f,g,h){if((typeof(f)=="function")&&(f()===false)){window.setTimeout(function(){d(i,f,g,h)},100)}else{if(vac_templater.client.browser.ie>=1&&vac_templater.client.browser.ie<=9){i(a(document))}else{i(h)}if(typeof(g)=="function"){vac_templater.unload(g(h))}}}if(!vac_templater.behaviors.ready){vac_templater.behaviors.ready={callbacks:[],attach:function(f){a(document).ready(function(){var h=vac_templater.behaviors.ready.callbacks;delete vac_templater.behaviors.ready;for(var g=0;g<h.length;g++){d(h[g]["callback"],h[g]["is_ready"],h[g]["unloader"],f)}})}}}vac_templater.behaviors.ready.callbacks.push({callback:e,is_ready:b,unloader:c})};vac_templater.unload=function(b){if(!vac_templater.behaviors.unload){vac_templater.behaviors.unload={callbacks:[],attach:function(c){},detach:function(d){for(var c=0;c<vac_templater.behaviors.unload.callbacks.length;c++){var e=vac_templater.behaviors.unload.callbacks[c];if(e(d)){vac_templater.behaviors.unload.callbacks.splice(c,1);c--}}if(vac_templater.behaviors.unload.callbacks.length===0){delete vac_templater.behaviors.unload}}}}vac_templater.behaviors.unload.callbacks.push(b)};vac_templater.modal={open:function(b){vac_templater.modal.close_all();a("#overlay").append(b);vac_templater.attach_behaviors(b.show());b.on("hidden.bs.modal",function(){vac_templater.detach_behaviors(this);a(this).remove()});b.modal("show")},close_all:function(){a("#overlay .modal").modal("hide")}};vac_templater.register_overlay_handler=function(c,b){vac_templater.overlay_handlers[c]=b};vac_templater.close_all_overlays=function(){for(var b in vac_templater.overlay_handlers){(vac_templater.overlay_handlers[b])()}};a.fn.toggleAttr=function(d,c,b){var e=c;if(a(this).attr(d)==c){e=b}return a(this).attr(d,e)};a(document).ready(function(){vac_templater.register_overlay_handler("notifications",vac_templater.notifications.close_all);vac_templater.register_overlay_handler("modals",function(){vac_templater.modal.close_all()});vac_templater.register_overlay_handler("tooltips",function(){a('[data-toggle="tooltip"]').tooltip("hide")});vac_templater.register_overlay_handler("popovers",function(){a('[data-toggle="popover"]').popover("hide")});vac_templater.register_overlay_handler("dropdowns",function(){a(".dropdown, .dropup").removeClass("open")});vac_templater.register_overlay_handler("btn-groups",function(){a(".btn-group").removeClass("open")});vac_templater.attach_behaviors(this);a("#floating-notifications-container").notify({speed:300,expires:7000,stack:"above"});if(vac_templater.client.system.ipad||vac_templater.client.system.iphone){a("body").on("touchstart.dropdown",".dropdown-menu",function(b){b.stopPropagation()})}})})(jQuery);(function(b){var a=[];vac_templater.notifications=vac_templater.notifications||{};vac_templater.notifications.notify=function(e,f,d,c){c=(typeof(c)!="undefined")?c:"cool";if((c=="cool")||(c=="floating")){vac_templater.notifications[c](e,f,d)}else{vac_templater.notifications.inline(e,f,d,c)}};vac_templater.notifications.inline=function(f,g,d,c){var e=b('<div class="notification inline-notification '+f+'"><a class="close" href="#">&times;</a><p>'+g+"</p></div>");b(c).append(e);vac_templater.attach_behaviors(e);if(d){setTimeout(function(){b("a.close",e).click()},d)}b("a.close",e).click(function(){b(this).parent().slideUp("fast",function(){b(this).remove()});return false})};vac_templater.notifications.floating=function(e,g,d){var c={type:e,text:g};var f=b("#floating-notifications-container").notify("create","default-template",c,{expires:(typeof(d)!="undefined")?d:7000,click:function(i,h){if(i.metaKey){vac_templater.notifications.close_all()}}});vac_templater.attach_behaviors(f.element);a.push(f)};vac_templater.notifications.cool=function(e,f,c){b("#overlay .cool-notification").remove();var d=b('<div class="'+e+' notification cool-notification"><p>'+f+"</p></div>");b("#overlay").append(d);vac_templater.attach_behaviors(d);b(d).css("bottom",-b(d).outerHeight()).animate({bottom:"0"},500);if(c){setTimeout(function(){b(d).click()},c)}b(d).click(function(){b(this).animate({bottom:-b(this).outerHeight()},500,"linear",function(){b(this).remove()})})};vac_templater.notifications.close_all=function(){for(var c=0;c<a.length;c++){a[c].close()}a=[];b("#overlay .cool-notification").click();b(".inline-notifications-container .inline-notification .close").click()}})(jQuery);(function(b){var a=[];vac_templater.ajax=vac_templater.ajax||{};b.ajaxSetup({cache:false,traditional:true});vac_templater.ajax.call=function(c){c.type=c.type||"POST";c.category=c.category||null;c.context=c.context||b(document);c.element=c.element||null;c.data=c.data||{};c.commands=c.commands||{};c.before_send=c.before_send||null;c.complete=c.complete||null;c.success=c.success||null;c.error=c.error||null;b.ajax({url:c.url,data:c.data,type:c.type,dataType:"json",beforeSend:function(f,e){var d=true;f.vac_templater={weight:100};if(c.before_send){d=c.before_send(f,e)}if(d&&c.element){b(c.element).addClass("ajaxing")}return d},complete:c.complete,success:function(e,d,g){b(c.element).removeClass("ajaxing");var f=vac_templater.execute_commands(e,c.context,c.commands);if(c.success){c.success(e,d,g,f)}},error:function(f,d,e){if(!f.vac_templater.is_aborted(d)){vac_templater.notifications.notify("error",gettext("We are sorry, but the request couldn't be processed. Please, try again later."))}if(!f.vac_templater.aborted_by_same_category){b(c.element).removeClass("ajaxing")}if(c.error){c.error(f,d)}}})};b(document).ajaxSend(function(g,j,f){function c(k){var m=document.location.host;var n=document.location.protocol;var l="//"+m;var i=n+l;return(k==i||k.slice(0,i.length+1)==i+"/")||(k==l||k.slice(0,l.length+1)==l+"/")||!(/^(\/\/|http:|https:).*/.test(k))}function e(i){return(/^(GET|HEAD|OPTIONS|TRACE)$/.test(i))}var h={id:vac_templater.serial++,weight:100};b.extend(h,j.vac_templater||{});j.vac_templater=h;j.vac_templater.category=f.category||f.url;j.vac_templater.is_aborted=function(i){return(j.aborted||(i=="abort")||(i=="aborted"))};j.vac_templater.aborted_by_same_category=false;for(var d=0;d<a.length;d++){if((a[d].vac_templater.weight>0)&&(a[d].vac_templater.weight<=j.vac_templater.weight)){if(j.vac_templater.category==a[d].vac_templater.category){a[d].vac_templater.aborted_by_same_category=true}a[d].abort()}}a.push(j);b("body").addClass("ajaxing");if(!e(f.type)&&c(f.url)){j.setRequestHeader("X-CSRFToken",vac_templater.csrf_token)}});b(document).ajaxComplete(function(e,f,d){for(var c=0;c<a.length;c++){if(a[c].vac_templater.id===f.vac_templater.id){a.splice(c,1);break}}if(a.length===0){b("body").removeClass("ajaxing")}})})(jQuery);(function(a){vac_templater.behaviors=vac_templater.behaviors||{};vac_templater.behaviors.form={attach:function(c){function b(d,e){a(d).find("input[name=_iframe_upload]").remove().end().find(":input").removeAttr("disabled").end().find("input[type=submit], button[type=submit]").removeClass("ajaxing").end().removeClass("ajaxing");if(!e){a(d).stop(true,true).css("opacity",1)}}a("form.ajax",c).once("ajax-form").each(function(){var e=this;var d={url:a(this).attr("action"),data:{csrfmiddlewaretoken:vac_templater.csrf_token},beforeSerialize:function(g,f){if(f.iframe){a(g).append('<input type="hidden" name="_iframe_upload" value="1"/>')}},beforeSubmit:function(f,h,g){vac_templater.notifications.close_all();a(h).find(":input").attr("disabled",true).end().find("input[type=submit], button[type=submit]").addClass("ajaxing").end().addClass("ajaxing").animate({opacity:0.2},200)},success:function(g,f,j,h){var i=vac_templater.execute_commands(g,h,{});b(h,i)},error:function(g,f){if((typeof g.vac_templater=="undefined")||(!g.vac_templater.is_aborted())){vac_templater.notifications.notify("error",gettext("We are sorry, but the request couldn't be processed. Please, try again later."))}if((typeof g.vac_templater=="undefined")||(!g.vac_templater.aborted_by_same_category)){b(e,false)}},type:(a(this).attr("method")||"POST").toUpperCase(),dataType:"json",iframe:false};a(e).ajaxForm(d)})}};vac_templater.behaviors.link={attach:function(b){a("a.ajax",b).once("ajax-link").click(function(e){if(a(this).is(":not(.disabled)")){var c=a(this).attr("href");var d=(a(this).data("method")||"GET").toUpperCase();vac_templater.ajax.call({url:c,type:d,element:this});e.preventDefault()}})}};vac_templater.behaviors.confirm={attach:function(b){a("a.confirm",b).once("confirm").each(function(){a(this).bind("click.confirm",function(f){target=a(this);if(!target.data("confirmed")){var h=target.data("title")||gettext("Are you sure?");var g=target.data("text")||gettext("This action can't be undone.");var d=target.data("cancel-button")||gettext("Cancel");var e=target.data("confirm-button")||gettext("Yes");vac_templater.modal.open(a('<div class="modal fade" role="dialog">  <div class="modal-dialog" role="document">    <div class="modal-content">      <div class="modal-header">        <h3>'+h+'</h3>      </div>      <div class="modal-body">'+g+'</div>      <div class="modal-footer">        <a href="#" class="btn" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i> '+d+'</a>        <a href="#" class="btn btn-danger btn-confirm" data-dismiss="modal"><i class="glyphicon glyphicon-ok glyphicon-white"></i> '+e+"</a>      </div>    </div>  </div></div>").find(".btn-confirm").click(function(i){i.preventDefault();target.data("confirmed",true).click()}).end());f.stopImmediatePropagation();f.preventDefault()}else{target.data("confirmed",false)}});var c=a._data(this,"events");if(typeof c!="undefined"){if(c.click.length>1){c.click.unshift(c.click.pop())}}else{a(this).unbind("click.confirm")}})}};vac_templater.behaviors.bootstrap={attach:function(b){a('[data-toggle="popover"]',b).popover({trigger:"hover",delay:{show:500,hide:100}});a('[data-toggle="tooltip"]',b).tooltip()}};vac_templater.behaviors.select2={attach:function(b){a("select",b).select2({width:"resolve",language:{errorLoading:function(){return gettext("The results could not be loaded.")},inputTooLong:function(d){var e=d.input.length-d.maximum;var c=ngettext("Please delete %s character","Please delete %s characters",e);return interpolate(c,[e])},inputTooShort:function(d){var e=d.minimum-d.input.length;var c=ngettext("Please enter %s more character","Please enter %s more characters",e);return interpolate(c,[e])},loadingMore:function(){return gettext("Loading more results...")},maximumSelected:function(d){var c=ngettext("You can only select %s item","You can only select %s items",d.maximum);return interpolate(c,[d.maximum])},noResults:function(){return gettext("No results found")},searching:function(){return gettext("Searching...")}}})}};(function(){var g=76;var d=60;function c(h){a(h).css({top:a("#content").offset().top,left:a("#content").offset().left,position:"fixed"})}function f(j){var i=a(j).find("li.more");if(i.length>0){var k=a(j).parent().find("> .collapsed");a(k).fadeOut().data({is_visible:false});var h=a(j).find(".nav li").length;var l=Math.round((a(j).innerHeight()-80)/g);if(l<2){l=2}if(h>l){b(j,k,h-l)}else{e(j,k,l-h)}a(i).toggle(a(k).find(".nav li").length>0)}}function b(m,p,q){if((q>1)||(a(p).find(".nav li").length>0)){var k=a(m).find(".nav li");var o=a(p).find(".nav");for(var l=k.length-2,h=0;h<q;l--,h++){a(o).prepend(k[l])}}}function e(o,p,q){if(a(p).find(".nav li").length-q===1){q+=1}var k=a(p).find(".nav li");var m=a(o).find("li.more");for(var l=0,h=0;h<q;l++,h++){m.before(k[l])}}vac_templater.behaviors.fixed_sidebar={attach:function(h){a(".sidebar",h).once("sidebar").each(function(){var i=this;a(i).after('<div class="collapsed">  <div class="arrow"></div>  <ul class="nav nav-pills"></ul></div>');c(i);f(i);a(i).find("li.more a").bind("click",function(j){j.preventDefault();var l=a(this).parents(".sidebar").parent().find("> .collapsed");if(a(l).find(".nav li").length>0){if(a(l).data("is_visible")!==undefined&&a(l).data("is_visible")){a(l).data({is_visible:false});a(l).fadeOut()}else{a(l).data({is_visible:true});var k=a(this).find(".glyphicon").offset();a(l).css({top:k.top-15-window.scrollY+"px",left:k.left+d+"px"}).fadeIn()}}});if(a("body").once("sidebar").length>0){a(window).resize(function(){var j=a(".sidebar",h);if(j.length>0){c(j);f(j)}})}})}}})();(function(){var b={a:"ddd",A:"dddd",b:"MMM",B:"MMMM",d:"DD",e:"D",F:"YYYY-MM-DD",H:"HH",I:"hh",j:"DDDD",k:"H",l:"h",m:"MM",M:"mm",p:"A",S:"ss",u:"E",w:"d",W:"WW",y:"YY",Y:"YYYY",z:"ZZ",Z:"z","%":"%"};var d=vac_templater.datetime_format.replace(new RegExp(Object.keys(b).map(function(e){return"%"+e}).join("|"),"g"),function c(e){return b[e.substring(1)]});vac_templater.behaviors.datetime_input={attach:function(e){a(".datetime-input").datetimepicker({format:d})}}})();vac_templater.behaviors.repeatable_field={attach:function(b){a(".repeatable-field").once("repeatable-field").each(function(){var c=this;var d=a('<button type="button" class="form-control btn btn-default"><i class="glyphicon glyphicon-plus"></i></button>').click(function(){var h=a(c).find(':input:not("button"):last');var i=h.attr("id").match(/(.*)_(\d+)$/);var f=i[1]+"_"+(parseInt(i[2])+1);var e=h.attr("name").match(/(.*)_(\d+)$/);var g=e[1]+"_"+(parseInt(e[2])+1);var j=h.clone().val(null).attr("id",f).attr("name",g);h.after(j)});a(this).append(d)})}}})(jQuery);(function(a){vac_templater.commands=vac_templater.commands||{};vac_templater.commands.redirect=function(b){window.location=b;return true};vac_templater.commands.check_version=function(b){if((b.js.major!=vac_templater.version.js.major)||(b.css.major!=vac_templater.version.css.major)){window.location.reload();return true}};vac_templater.commands.set_content=function(b){vac_templater.detach_behaviors("#content");a("#content").html(b);vac_templater.attach_behaviors("#content")};vac_templater.commands.download=function(b){window.location=b};vac_templater.commands.alert=function(b){alert(b)};(function(){var c=null;var e=null;function b(f,g){c=setTimeout(function(){vac_templater.ajax.call({type:"GET",url:f,error:function(i,h){if(!i.vac_templater.is_aborted(h)){b(f,g)}}})},g)}function d(f,i,h,g){if(i>0){e=setTimeout(function(){var j=parseFloat(a(f).attr("data-value"))+h;if(j<=(f).attr("data-max")){a(f).attr("data-value",j).css("width",j+"%");d(f,i-1,h,g)}},g)}}vac_templater.commands.show_progress=function(g,f,i,j){var h=a('<div class="modal fade" id="progress-modal" data-url="'+g+'">  <div class="modal-dialog">    <div class="modal-content">      <div class="modal-header">        <h3>'+j+'</h3>      </div>      <div class="modal-body">        <div class="progress progress-striped active" style="display: none;">          <div class="progress-bar" data-max="0" data-value="0" style="width: 0%;"></div>        </div>        <p class="pull-right"><i class="glyphicon glyphicon-warning-sign"></i> '+gettext("Please, be patient. <strong>Do not close or reload the page!</strong>")+'</p>      </div>      <div class="modal-footer">        <a href="#" class="btn btn-danger"><i class="glyphicon glyphicon-remove glyphicon-white"></i> '+gettext("Abort")+"</a>      </div>    </div>  </div></div>");a(".modal-footer .btn",h).click(function(){clearInterval(c);clearInterval(e);vac_templater.ajax.call({url:f,type:"POST",element:this});return false});vac_templater.modal.open(h);b(g,i)};vac_templater.commands.update_progress=function(i,h){modal=a("#progress-modal");if(modal.length>0){if(i){a(modal).find(".progress").show();var g=a(modal).find(".progress-bar");var j=i-a(g).attr("data-max");if(j>0){a(g).attr("data-max",i);var f=Math.ceil(h/100);d(g,f,j/f,100)}}b(a(modal).attr("data-url"),h)}};vac_templater.commands.hide_progress=function(){modal=a("#progress-modal");if(modal.length>0){a(modal).modal("hide")}}})();vac_templater.commands.modal=function(c){a(c).filter("script").appendTo("body");var b=a(c).filter(".modal");if(b.length==1){vac_templater.modal.open(b)}};vac_templater.commands.close_modal=function(){vac_templater.modal.close_all()};vac_templater.commands.notify=function(c){if(c.length>0){var b=a(".inline-notifications-container").last().html("");var d=function(g){return((g.tags.indexOf("inline")!=-1)&&(a(b).length>0))};var e=a.grep(c,d);a.each(e,function(){vac_templater.notifications.notify(this.type,this.message,null,b)});var f=a.grep(c,d,true);a.each(f,function(){var g=null;if((this.type!="error")){g=5000+100*this.message.length}vac_templater.notifications.notify(this.type,this.message,g,(f.length>1)?"floating":"cool")})}}})(jQuery);(function(a){vac_templater.partials=vac_templater.partials||{registry:{}};vac_templater.partials.ready=function(d,c){if(d in vac_templater.partials.registry){var b=vac_templater.partials.registry[d](c);vac_templater.ready(b.callback,b.ready,b.unloader)}}})(jQuery);(function(a){vac_templater.partials.registry["vcl-deploy-page"]=function(b){return{callback:function(c){a("#modify-settings input",c).keypress(function(d){if(d.which==13){d.preventDefault();d.stopPropagation();a('button[value="deploy"]',c).click()}})}}}})(jQuery);(function(a){vac_templater.partials.registry["vcl-history-page"]=function(b){return{callback:function(c){(function(f){function g(i){var h={};a('.collection-filter form :input:not("button")',f).each(function(){if(a(this).val()){h[a(this).attr("name")]=a(this).val()}});return a.extend(h,i||{})}function e(h){return a.extend({items_per_page:a(".collection-items-per-page li.active",f).attr("data-collection-items-per-page"),sort_criteria:a(".collection-sort li.active",f).attr("data-sort-criteria"),sort_direction:a(".collection-sort li.active",f).attr("data-sort-direction")},h||{})}function d(j,i,h){params=a.extend({page:j},i,h);return b.browse_url+"?"+a.param(params)}a(".collection-filter form",f).submit(function(){window.location.href=d(1,g(),e());return false});a(".collection-sort li",f).click(function(){var h={};if(a(this).hasClass("active")){h.sort_direction=(a(this).attr("data-sort-direction")=="asc")?"desc":"asc"}else{h.sort_criteria=a(this).attr("data-sort-criteria")}window.location.href=d(1,g(),e(h));return false});a(".collection-items-per-page li",f).click(function(){window.location.href=d(1,g(),e({items_per_page:a(this).attr("data-collection-items-per-page")}));return false});a(".collection-pager li:not(.disabled)",f).click(function(){window.location.href=d(a(this).attr("data-page"),g(),e());return false});a(".deployments a.filter",f).click(function(){var h={};h[a(this).attr("data-field")]=a(this).attr("data-value");a(this).attr("href",d(1,h,e()))})})(a(c).find(".deployments-browser"))}}}})(jQuery);