").append(le.parseHTML(e)).find(o):e)}).complete(i&&function(e,t){a.each(i,r||[e.responseText,t,e])}),this},le.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){le.fn[t]=function(e){return this.on(t,e)}}),le.each(["get","post"],function(e,n){le[n]=function(e,i,o,r){return le.isFunction(i)&&(r=r||o,o=i,i=t),le.ajax({url:e,type:n,dataType:r,data:i,success:o})}}),le.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At,type:"GET",isLocal:It.test(Dt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":le.parseJSON,"text xml":le.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?M(M(e,le.ajaxSettings),t):M(le.ajaxSettings,e)},ajaxPrefilter:D(Rt),ajaxTransport:D(Bt),ajax:function(e,n){function i(e,n,i,o){var r,d,y,b,x,k=n;2!==w&&(w=2,l&&clearTimeout(l),u=t,a=o||"",C.readyState=e>0?4:0,i&&(b=L(p,C,i)),e>=200&&300>e||304===e?(p.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(le.lastModified[s]=x),x=C.getResponseHeader("etag"),x&&(le.etag[s]=x)),204===e?(r=!0,k="nocontent"):304===e?(r=!0,k="notmodified"):(r=P(p,b),k=r.state,d=r.data,y=r.error,r=!y)):(y=k,(e||!k)&&(k="error",0>e&&(e=0))),C.status=e,C.statusText=(n||k)+"",r?m.resolveWith(h,[d,k,C]):m.rejectWith(h,[C,k,y]),C.statusCode(v),v=t,c&&f.trigger(r?"ajaxSuccess":"ajaxError",[C,p,r?d:y]),g.fireWith(h,[C,k]),c&&(f.trigger("ajaxComplete",[C,p]),--le.active||le.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var o,r,s,a,l,c,u,d,p=le.ajaxSetup({},n),h=p.context||p,f=p.context&&(h.nodeType||h.jquery)?le(h):le.event,m=le.Deferred(),g=le.Callbacks("once memory"),v=p.statusCode||{},y={},b={},w=0,x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!d)for(d={};t=Ot.exec(a);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return w||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||x;return u&&u.abort(t),i(0,t),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||At)+"").replace(Pt,"").replace(jt,Dt[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=le.trim(p.dataType||"*").toLowerCase().match(ue)||[""],null==p.crossDomain&&(o=zt.exec(p.url.toLowerCase()),p.crossDomain=!(!o||o[1]===Dt[1]&&o[2]===Dt[2]&&(o[3]||("http:"===o[1]?80:443))==(Dt[3]||("http:"===Dt[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=le.param(p.data,p.traditional)),A(Rt,p,n,C),2===w)return C;c=p.global,c&&0===le.active++&&le.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ht.test(p.type),s=p.url,p.hasContent||(p.data&&(s=p.url+=(Lt.test(s)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Ft.test(s)?s.replace(Ft,"$1_="+Mt++):s+(Lt.test(s)?"&":"?")+"_="+Mt++)),p.ifModified&&(le.lastModified[s]&&C.setRequestHeader("If-Modified-Since",le.lastModified[s]),le.etag[s]&&C.setRequestHeader("If-None-Match",le.etag[s])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qt+"; q=0.01":""):p.accepts["*"]);for(r in p.headers)C.setRequestHeader(r,p.headers[r]);if(p.beforeSend&&(p.beforeSend.call(h,C,p)===!1||2===w))return C.abort();x="abort";for(r in{success:1,error:1,complete:1})C[r](p[r]);if(u=A(Bt,p,n,C)){C.readyState=1,c&&f.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){C.abort("timeout")},p.timeout));try{w=1,u.send(y,i)}catch(k){if(!(2>w))throw k;i(-1,k)}}else i(-1,"No Transport");return C},getScript:function(e,n){return le.get(e,t,n,"script")},getJSON:function(e,t,n){return le.get(e,t,n,"json")}}),le.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return le.globalEval(e),e}}}),le.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),le.ajaxTransport("script",function(e){if(e.crossDomain){var n,i=Q.head||le("head")[0]||Q.documentElement;return{send:function(t,o){n=Q.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||o(200,"success"))},i.insertBefore(n,i.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xt=[],Yt=/(=)\?(?=&|$)|\?\?/;le.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||le.expando+"_"+Mt++;return this[e]=!0,e}}),le.ajaxPrefilter("json jsonp",function(n,i,o){var r,s,a,l=n.jsonp!==!1&&(Yt.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(r=n.jsonpCallback=le.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Yt,"$1"+r):n.jsonp!==!1&&(n.url+=(Lt.test(n.url)?"&":"?")+n.jsonp+"="+r),n.converters["script json"]=function(){return a||le.error(r+" was not called"),a[0]},n.dataTypes[0]="json",s=e[r],e[r]=function(){a=arguments},o.always(function(){e[r]=s,n[r]&&(n.jsonpCallback=i.jsonpCallback,Xt.push(r)),a&&le.isFunction(s)&&s(a[0]),a=s=t}),"script"):void 0});var Qt,Kt,Gt=0,Vt=e.ActiveXObject&&function(){var e;for(e in Qt)Qt[e](t,!0)};le.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&F()||O()}:F,Kt=le.ajaxSettings.xhr(),le.support.cors=!!Kt&&"withCredentials"in Kt,Kt=le.support.ajax=!!Kt,Kt&&le.ajaxTransport(function(n){if(!n.crossDomain||le.support.cors){var i;return{send:function(o,r){var s,a,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(a in n.xhrFields)l[a]=n.xhrFields[a];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");try{for(a in o)l.setRequestHeader(a,o[a])}catch(c){}l.send(n.hasContent&&n.data||null),i=function(e,o){var a,c,u,d;try{if(i&&(o||4===l.readyState))if(i=t,s&&(l.onreadystatechange=le.noop,Vt&&delete Qt[s]),o)4!==l.readyState&&l.abort();else{d={},a=l.status,c=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(d.text=l.responseText);try{u=l.statusText}catch(p){u=""}a||!n.isLocal||n.crossDomain?1223===a&&(a=204):a=d.text?200:404}}catch(h){o||r(-1,h)}d&&r(a,u,d,c)},n.async?4===l.readyState?setTimeout(i):(s=++Gt,Vt&&(Qt||(Qt={},le(e).unload(Vt)),Qt[s]=i),l.onreadystatechange=i):i()},abort:function(){i&&i(t,!0)}}}});var Jt,Zt,en=/^(?:toggle|show|hide)$/,tn=new RegExp("^(?:([+-])=|)("+ce+")([a-z%]*)$","i"),nn=/queueHooks$/,on=[W],rn={"*":[function(e,t){var n,i,o=this.createTween(e,t),r=tn.exec(t),s=o.cur(),a=+s||0,l=1,c=20;if(r){if(n=+r[2],i=r[3]||(le.cssNumber[e]?"":"px"),"px"!==i&&a){a=le.css(o.elem,e,!0)||n||1;do l=l||".5",a/=l,le.style(o.elem,e,a+i);while(l!==(l=o.cur()/s)&&1!==l&&--c)}o.unit=i,o.start=a,o.end=r[1]?a+(r[1]+1)*n:n}return o}]};le.Animation=le.extend(j,{tweener:function(e,t){le.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,o=e.length;o>i;i++)n=e[i],rn[n]=rn[n]||[],rn[n].unshift(t)},prefilter:function(e,t){t?on.unshift(e):on.push(e)}}),le.Tween=R,R.prototype={constructor:R,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(le.cssNumber[n]?"":"px")},cur:function(){var e=R.propHooks[this.prop];return e&&e.get?e.get(this):R.propHooks._default.get(this)},run:function(e){var t,n=R.propHooks[this.prop];return this.pos=t=this.options.duration?le.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):R.propHooks._default.set(this),this}},R.prototype.init.prototype=R.prototype,R.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=le.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){le.fx.step[e.prop]?le.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[le.cssProps[e.prop]]||le.cssHooks[e.prop])?le.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},R.propHooks.scrollTop=R.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},le.each(["toggle","show","hide"],function(e,t){var n=le.fn[t];le.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(B(t,!0),e,i,o)}}),le.fn.extend({fadeTo:function(e,t,n,i){return this.filter(C).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=le.isEmptyObject(e),r=le.speed(t,n,i),s=function(){var t=j(this,le.extend({},e),r);s.finish=function(){t.stop(!0)},(o||le._data(this,"finish"))&&t.stop(!0)};return s.finish=s,o||r.queue===!1?this.each(s):this.queue(r.queue,s)},stop:function(e,n,i){var o=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",r=le.timers,s=le._data(this);if(n)s[n]&&s[n].stop&&o(s[n]);else for(n in s)s[n]&&s[n].stop&&nn.test(n)&&o(s[n]);for(n=r.length;n--;)r[n].elem!==this||null!=e&&r[n].queue!==e||(r[n].anim.stop(i),t=!1,r.splice(n,1));(t||!i)&&le.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=le._data(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=le.timers,s=i?i.length:0;for(n.finish=!0,le.queue(this,e,[]),o&&o.cur&&o.cur.finish&&o.cur.finish.call(this),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;s>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),le.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){le.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),le.speed=function(e,t,n){var i=e&&"object"==typeof e?le.extend({},e):{complete:n||!n&&t||le.isFunction(e)&&e,duration:e,easing:n&&t||t&&!le.isFunction(t)&&t};return i.duration=le.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in le.fx.speeds?le.fx.speeds[i.duration]:le.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){le.isFunction(i.old)&&i.old.call(this),i.queue&&le.dequeue(this,i.queue)},i},le.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},le.timers=[],le.fx=R.prototype.init,le.fx.tick=function(){var e,n=le.timers,i=0;for(Jt=le.now();i
-1,d={},p={};u?(p=s.position(),o=p.top,r=p.left):(o=parseFloat(l)||0,r=parseFloat(c)||0),le.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(d.top=t.top-a.top+o),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):s.css(d)}},le.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===le.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),le.nodeName(e[0],"html")||(n=e.offset()),n.top+=le.css(e[0],"borderTopWidth",!0),n.left+=le.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-le.css(i,"marginTop",!0),left:t.left-n.left-le.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Q.documentElement;e&&!le.nodeName(e,"html")&&"static"===le.css(e,"position");)e=e.offsetParent;return e||Q.documentElement})}}),le.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var i=/Y/.test(n);le.fn[e]=function(o){return le.access(this,function(e,o,r){var s=q(e);return r===t?s?n in s?s[n]:s.document.documentElement[o]:e[o]:void(s?s.scrollTo(i?le(s).scrollLeft():r,i?r:le(s).scrollTop()):e[o]=r)},e,o,arguments.length,null)}}),le.each({Height:"height",Width:"width"},function(e,n){le.each({padding:"inner"+e,content:n,"":"outer"+e},function(i,o){le.fn[o]=function(o,r){var s=arguments.length&&(i||"boolean"!=typeof o),a=i||(o===!0||r===!0?"margin":"border");return le.access(this,function(n,i,o){var r;return le.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(r=n.documentElement,Math.max(n.body["scroll"+e],r["scroll"+e],n.body["offset"+e],r["offset"+e],r["client"+e])):o===t?le.css(n,i,a):le.style(n,i,o,a)},n,s?o:t,s,null)}})}),e.jQuery=e.$=le,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return le})}(window),!function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e,t=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in n)if(void 0!==t.style[e])return n[e]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t,n=e(document).height(),i=this.$window.scrollTop(),o=this.$element.offset(),r=this.options.offset,s=r.bottom,a=r.top,l="affix affix-top affix-bottom";"object"!=typeof r&&(s=a=r),"function"==typeof a&&(a=r.top()),"function"==typeof s&&(s=r.bottom()),t=null!=this.unpin&&i+this.unpin<=o.top?!1:null!=s&&o.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=i?"top":!1,this.affixed!==t&&(this.affixed=t,this.unpin="bottom"==t?o.top-i:null,this.$element.removeClass(l).addClass("affix"+(t?"-"+t:"")))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var i=e(this),o=i.data("affix"),r="object"==typeof n&&n;o||i.data("affix",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),!function(e){"use strict";function t(){e(i).each(function(){n(e(this)).removeClass("open")})}function n(t){var n,i=t.attr("data-target");return i||(i=t.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),n=i&&e(i),n&&n.length||(n=t.parent()),n}var i="[data-toggle=dropdown]",o=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};o.prototype={constructor:o,toggle:function(i){var o,r,s=e(this);if(!s.is(".disabled, :disabled"))return o=n(s),r=o.hasClass("open"),t(),r||o.toggleClass("open"),s.focus(),!1},keydown:function(t){var o,r,s,a,l;if(/(38|40|27)/.test(t.keyCode)&&(o=e(this),t.preventDefault(),t.stopPropagation(),!o.is(".disabled, :disabled"))){if(s=n(o),a=s.hasClass("open"),!a||a&&27==t.keyCode)return 27==t.which&&s.find(i).focus(),o.click();r=e("[role=menu] li:not(.divider):visible a",s),r.length&&(l=r.index(r.filter(":focus")),
38==t.keyCode&&l>0&&l--,40==t.keyCode&&l .accordion-group > .in"),i&&i.length){if(o=i.data("collapse"),o&&o.transitioning)return;i.collapse("hide"),o||i.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])}},hide:function(){var t;!this.transitioning&&this.$element.hasClass("in")&&(t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0))},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[null!==e?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,i){var o=this,r=function(){"show"==n.type&&o.reset(),o.transitioning=0,o.$element.trigger(i)};this.$element.trigger(n),n.isDefaultPrevented()||(this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,r):r())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var i=e(this),o=i.data("collapse"),r=e.extend({},e.fn.collapse.defaults,i.data(),"object"==typeof n&&n);o||i.data("collapse",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n,i=e(this),o=i.attr("data-target")||t.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),r=e(o).data("collapse")?"toggle":i.data();i[e(o).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(o).collapse(r)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")}))},hide:function(t){t&&t.preventDefault();t=e.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]===e.target||t.$element.has(e.target).length||t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){27==t.which&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;if(this.$backdrop=e('').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var i=e(this),o=i.data("modal"),r=e.extend({},e.fn.modal.defaults,i.data(),"object"==typeof n&&n);o||i.data("modal",o=new t(this,r)),"string"==typeof n?o[n]():r.show&&o.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),i=n.attr("href"),o=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),r=o.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},o.data(),n.data());t.preventDefault(),o.modal(r).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,i){var o,r,s,a,l;for(this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.enabled=!0,s=this.options.trigger.split(" "),l=s.length;l--;)a=s[l],"click"==a?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):"manual"!=a&&(o="hover"==a?"mouseenter":"focus",r="hover"==a?"mouseleave":"blur",this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n,i=e.fn[this.type].defaults,o={};return this._options&&e.each(this._options,function(e,t){i[e]!=t&&(o[e]=t)},this),n=e(t.currentTarget)[this.type](o).data(this.type),n.options.delay&&n.options.delay.show?(clearTimeout(this.timeout),n.hoverState="in",void(this.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show))):n.show()},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),n.options.delay&&n.options.delay.hide?(n.hoverState="out",void(this.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide))):n.hide()},show:function(){var t,n,i,o,r,s,a=e.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(a),a.isDefaultPrevented())return;switch(t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),i=t[0].offsetWidth,o=t[0].offsetHeight,r){case"bottom":s={top:n.top+n.height,left:n.left+n.width/2-i/2};break;case"top":s={top:n.top-o,left:n.left+n.width/2-i/2};break;case"left":s={top:n.top+n.height/2-o/2,left:n.left-i};break;case"right":s={top:n.top+n.height/2-o/2,left:n.left+n.width}}this.applyPlacement(s,r),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n,i,o,r,s=this.tip(),a=s[0].offsetWidth,l=s[0].offsetHeight;s.offset(e).addClass(t).addClass("in"),n=s[0].offsetWidth,i=s[0].offsetHeight,"top"==t&&i!=l&&(e.top=e.top+l-i,r=!0),"bottom"==t||"top"==t?(o=0,e.left<0&&(o=-2*e.left,e.left=0,s.offset(e),n=s[0].offsetWidth,i=s[0].offsetHeight),this.replaceArrow(o-a+n,n,"left")):this.replaceArrow(i-l,i,"top"),r&&s.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function t(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var n=this.tip(),i=e.Event("hide");return this.$element.trigger(i),i.isDefaultPrevented()?void 0:(n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?t():n.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var i=e(this),o=i.data("tooltip"),r="object"==typeof n&&n;o||i.data("tooltip",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=("function"==typeof n.content?n.content.call(t[0]):n.content)||t.attr("data-content")},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var i=e(this),o=i.data("popover"),r="object"==typeof n&&n;o||i.data("popover",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:''}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){"use strict";function t(t,n){var i,o=e.proxy(this.process,this),r=e(e(t).is("body")?window:t);this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=r.on("scroll.scroll-spy.data-api",o),this.selector=(this.options.target||(i=e(t).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t,n=this;this.offsets=e([]),this.targets=e([]),t=this.$body.find(this.selector).map(function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#\w/.test(i)&&e(i);return o&&o.length&&[[o.position().top+(!e.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),i]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},process:function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(t>=i)return s!=(e=r.last()[0])&&this.activate(e);for(e=o.length;e--;)s!=r[e]&&t>=o[e]&&(!o[e+1]||t<=o[e+1])&&this.activate(r[e])},activate:function(t){var n,i;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),i=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(i).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var i=e(this),o=i.data("scrollspy"),r="object"==typeof n&&n;o||i.data("scrollspy",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t,n,i,o=this.element,r=o.closest("ul:not(.dropdown-menu)"),s=o.attr("data-target");s||(s=o.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),o.parent("li").hasClass("active")||(t=r.find(".active:last a")[0],i=e.Event("show",{relatedTarget:t}),o.trigger(i),i.isDefaultPrevented()||(n=e(s),this.activate(o.parent("li"),r),this.activate(n,n.parent(),function(){o.trigger({type:"shown",relatedTarget:t})})))},activate:function(t,n,i){function o(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}var r=n.find("> .active"),s=i&&e.support.transition&&r.hasClass("fade");s?r.one(e.support.transition.end,o):o(),r.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var i=e(this),o=i.data("tab");o||i.data("tab",o=new t(this)),"string"==typeof n&&o[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,i){return t=e(n.options.item).attr("data-value",i),t.find("a").html(n.highlighter(i)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),i=n.next();i.length||(i=e(this.$menu.find("li")[0])),i.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var i=e(this),o=i.data("typeahead"),r="object"==typeof n&&n;o||i.data("typeahead",o=new t(this,r)),"string"==typeof n&&o[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);n.data("typeahead")||n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="lightbox"]',"click.dismiss.lightbox",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".lightbox-body").load(this.options.remote)};t.prototype=e.extend({},e.fn.modal.Constructor.prototype),t.prototype.constructor=t,t.prototype.enforceFocus=function(){var t=this;e(document).on("focusin.lightbox",function(e){t.$element[0]===e.target||t.$element.has(e.target).length||t.$element.focus()})},t.prototype.show=function(){var t=this,n=e.Event("show");this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.preloadSize(function(){t.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})}))},t.prototype.hide=function(t){t&&t.preventDefault();t=e.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.lightbox"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},t.prototype.escape=function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.lightbox",function(t){27==t.which&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.lightbox")},t.prototype.preloadSize=function(t){var n=e.Callbacks();t&&n.add(t);var i,o,r,s,a,l,c,u,d,p,h=this;i=e(window).height(),o=e(window).width(),r=parseInt(h.$element.find(".lightbox-content").css("padding-top"),10),s=parseInt(h.$element.find(".lightbox-content").css("padding-bottom"),10),a=parseInt(h.$element.find(".lightbox-content").css("padding-left"),10),l=parseInt(h.$element.find(".lightbox-content").css("padding-right"),10),c=h.$element.find(".lightbox-content").find("img:first"),u=new Image,u.onload=function(){u.width+a+l>=o&&(d=u.width,p=u.height,u.width=o-a-l,u.height=p/d*u.width),u.height+r+s>=i&&(d=u.width,p=u.height,u.height=i-r-s,u.width=d/p*u.height),h.$element.css({position:"fixed",width:u.width+a+l,height:u.height+r+s,top:i/2-(u.height+r+s)/2,left:"50%","margin-left":-1*(u.width+a+l)/2}),h.$element.find(".lightbox-content").css({width:u.width,height:u.height}),n.fire()},u.src=c.attr("src")};var n=e.fn.lightbox;e.fn.lightbox=function(n){return this.each(function(){var i=e(this),o=i.data("lightbox"),r=e.extend({},e.fn.lightbox.defaults,i.data(),"object"==typeof n&&n);o||i.data("lightbox",o=new t(this,r)),"string"==typeof n?o[n]():r.show&&o.show()})},e.fn.lightbox.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.lightbox.Constructor=t,e.fn.lightbox.noConflict=function(){return e.fn.lightbox=n,this},e(document).on("click.lightbox.data-api",'[data-toggle="lightbox"]',function(t){var n=e(this),i=n.attr("href"),o=e(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),r=o.data("lightbox")?"toggle":e.extend({remote:!/#/.test(i)&&i},o.data(),n.data());t.preventDefault(),o.lightbox(r).one("hide",function(){n.focus()})})}(window.jQuery),function(e,t){function n(e){for(var t,n=e.split(/\s+/),i=[],o=0;t=n[o];o++)t=t[0].toUpperCase(),i.push(t);return i}function i(t){return t.id&&e('label[for="'+t.id+'"]').val()||t.name}function o(n,r,s){return s||(s=0),r.each(function(){var r,a,l=e(this),c=this,u=this.nodeName.toLowerCase();switch("label"==u&&l.find("input, textarea, select").length&&(r=l.text(),l=l.children().first(),c=l.get(0),u=c.nodeName.toLowerCase()),u){case"menu":a={name:l.attr("label"),items:{}},s=o(a.items,l.children(),s);break;case"a":case"button":a={name:l.text(),disabled:!!l.attr("disabled"),callback:function(){return function(){l.click()}}()};break;case"menuitem":case"command":switch(l.attr("type")){case t:case"command":case"menuitem":a={name:l.attr("label"),disabled:!!l.attr("disabled"),callback:function(){return function(){l.click()}}()};break;case"checkbox":a={type:"checkbox",disabled:!!l.attr("disabled"),name:l.attr("label"),selected:!!l.attr("checked")};break;case"radio":a={type:"radio",disabled:!!l.attr("disabled"),name:l.attr("label"),radio:l.attr("radiogroup"),value:l.attr("id"),selected:!!l.attr("checked")};break;default:a=t}break;case"hr":a="-------";break;case"input":switch(l.attr("type")){case"text":a={type:"text",name:r||i(c),disabled:!!l.attr("disabled"),value:l.val()};break;case"checkbox":a={type:"checkbox",name:r||i(c),disabled:!!l.attr("disabled"),selected:!!l.attr("checked")};break;case"radio":a={type:"radio",name:r||i(c),disabled:!!l.attr("disabled"),radio:!!l.attr("name"),value:l.val(),selected:!!l.attr("checked")};break;default:a=t}break;case"select":a={type:"select",name:r||i(c),disabled:!!l.attr("disabled"),selected:l.val(),options:{}},l.children().each(function(){a.options[this.value]=e(this).text()});break;case"textarea":a={type:"textarea",name:r||i(c),disabled:!!l.attr("disabled"),value:l.val()};break;case"label":break;default:a={type:"html",html:l.clone(!0)}}a&&(s++,n["key"+s]=a)}),s}if(e.support.htmlMenuitem="HTMLMenuItemElement"in window,e.support.htmlCommand="HTMLCommandElement"in window,e.support.eventSelectstart="onselectstart"in document.documentElement,!e.ui||!e.ui.widget){var r=e.cleanData;e.cleanData=function(t){for(var n,i=0;null!=(n=t[i]);i++)try{e(n).triggerHandler("remove")}catch(o){}r(t)}}var s=null,a=!1,l=e(window),c=0,u={},d={},p={},h={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:200,reposition:!0,determinePosition:function(t){if(e.ui&&e.ui.position)t.css("display","block").position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css("display","none");else{var n=this.offset();n.top+=this.outerHeight(),n.left+=this.outerWidth()/2-t.outerWidth()/2,t.css(n)}},position:function(e,t,n){var i;if(!t&&!n)return void e.determinePosition.call(this,e.$menu);i="maintain"===t&&"maintain"===n?e.$menu.position():{top:n,left:t};var o=l.scrollTop()+l.height(),r=l.scrollLeft()+l.width(),s=e.$menu.height(),a=e.$menu.width();i.top+s>o&&(i.top-=s),i.left+a>r&&(i.left-=a),e.$menu.css(i)},positionSubmenu:function(t){if(e.ui&&e.ui.position)t.css("display","block").position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var n={top:0,left:this.outerWidth()};t.css(n)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{show:e.noop,hide:e.noop},callback:null,items:{}},f={timer:null,pageX:null,pageY:null},m=function(e){for(var t=0,n=e;;)if(t=Math.max(t,parseInt(n.css("z-index"),10)||0),n=n.parent(),!n||!n.length||"html body".indexOf(n.prop("nodeName").toLowerCase())>-1)break;return t},g={abortevent:function(e){e.preventDefault(),e.stopImmediatePropagation()},contextmenu:function(t){var n=e(this);if(t.preventDefault(),t.stopImmediatePropagation(),!("right"!=t.data.trigger&&t.originalEvent||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled"))){if(s=n,t.data.build){var i=t.data.build(s,t);if(i===!1)return;if(t.data=e.extend(!0,{},h,t.data,i||{}),!t.data.items||e.isEmptyObject(t.data.items))throw window.console&&(console.error||console.log)("No items specified to show in contextMenu"),new Error("No Items specified");t.data.$trigger=s,v.create(t.data)}v.show.call(n,t.data,t.pageX,t.pageY)}},click:function(t){t.preventDefault(),t.stopImmediatePropagation(),e(this).trigger(e.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))},mousedown:function(t){var n=e(this);s&&s.length&&!s.is(n)&&s.data("contextMenu").$menu.trigger("contextmenu:hide"),2==t.button&&(s=n.data("contextMenuActive",!0))},mouseup:function(t){var n=e(this);n.data("contextMenuActive")&&s&&s.length&&s.is(n)&&!n.hasClass("context-menu-disabled")&&(t.preventDefault(),t.stopImmediatePropagation(),s=n,n.trigger(e.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))),n.removeData("contextMenuActive")},mouseenter:function(t){var n=e(this),i=e(t.relatedTarget),o=e(document);i.is(".context-menu-list")||i.closest(".context-menu-list").length||s&&s.length||(f.pageX=t.pageX,f.pageY=t.pageY,f.data=t.data,o.on("mousemove.contextMenuShow",g.mousemove),f.timer=setTimeout(function(){f.timer=null,o.off("mousemove.contextMenuShow"),s=n,n.trigger(e.Event("contextmenu",{data:f.data,pageX:f.pageX,pageY:f.pageY}))},t.data.delay))},mousemove:function(e){f.pageX=e.pageX,f.pageY=e.pageY},mouseleave:function(t){var n=e(t.relatedTarget);if(!n.is(".context-menu-list")&&!n.closest(".context-menu-list").length){try{clearTimeout(f.timer)}catch(t){}f.timer=null}},layerClick:function(t){var n,i,o=e(this),r=o.data("contextMenuRoot"),s=t.button,a=t.pageX,c=t.pageY;t.preventDefault(),t.stopImmediatePropagation(),setTimeout(function(){var o,u="left"==r.trigger&&0===s||"right"==r.trigger&&2===s;if(document.elementFromPoint&&(r.$layer.hide(),n=document.elementFromPoint(a-l.scrollLeft(),c-l.scrollTop()),r.$layer.show()),r.reposition&&u)if(document.elementFromPoint){if(r.$trigger.is(n)||r.$trigger.has(n).length)return void r.position.call(r.$trigger,r,a,c)}else if(i=r.$trigger.offset(),o=e(window),i.top+=o.scrollTop(),i.top<=t.pageY&&(i.left+=o.scrollLeft(),i.left<=t.pageX&&(i.bottom=i.top+r.$trigger.outerHeight(),i.bottom>=t.pageY&&(i.right=i.left+r.$trigger.outerWidth(),i.right>=t.pageX))))return void r.position.call(r.$trigger,r,a,c);n&&u&&r.$trigger.one("contextmenu:hidden",function(){e(n).contextMenu({x:a,
y:c})}),r.$menu.trigger("contextmenu:hide")},50)},keyStop:function(e,t){t.isInput||e.preventDefault(),e.stopPropagation()},key:function(e){var t=s.data("contextMenu")||{};switch(e.keyCode){case 9:case 38:if(g.keyStop(e,t),t.isInput){if(9==e.keyCode&&e.shiftKey)return e.preventDefault(),t.$selected&&t.$selected.find("input, textarea, select").blur(),void t.$menu.trigger("prevcommand");if(38==e.keyCode&&"checkbox"==t.$selected.find("input, textarea, select").prop("type"))return void e.preventDefault()}else if(9!=e.keyCode||e.shiftKey)return void t.$menu.trigger("prevcommand");case 40:if(g.keyStop(e,t),!t.isInput)return void t.$menu.trigger("nextcommand");if(9==e.keyCode)return e.preventDefault(),t.$selected&&t.$selected.find("input, textarea, select").blur(),void t.$menu.trigger("nextcommand");if(40==e.keyCode&&"checkbox"==t.$selected.find("input, textarea, select").prop("type"))return void e.preventDefault();break;case 37:if(g.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;if(!t.$selected.parent().hasClass("context-menu-root")){var n=t.$selected.parent().parent();return t.$selected.trigger("contextmenu:blur"),void(t.$selected=n)}break;case 39:if(g.keyStop(e,t),t.isInput||!t.$selected||!t.$selected.length)break;var i=t.$selected.data("contextMenu")||{};if(i.$menu&&t.$selected.hasClass("context-menu-submenu"))return t.$selected=null,i.$selected=null,void i.$menu.trigger("nextcommand");break;case 35:case 36:return t.$selected&&t.$selected.find("input, textarea, select").length?void 0:((t.$selected&&t.$selected.parent()||t.$menu).children(":not(.disabled, .not-selectable)")[36==e.keyCode?"first":"last"]().trigger("contextmenu:focus"),void e.preventDefault());case 13:if(g.keyStop(e,t),t.isInput){if(t.$selected&&!t.$selected.is("textarea, select"))return void e.preventDefault();break}return void(t.$selected&&t.$selected.trigger("mouseup"));case 32:case 33:case 34:return void g.keyStop(e,t);case 27:return g.keyStop(e,t),void t.$menu.trigger("contextmenu:hide");default:var o=String.fromCharCode(e.keyCode).toUpperCase();if(t.accesskeys[o])return void t.accesskeys[o].$node.trigger(t.accesskeys[o].$menu?"contextmenu:focus":"mouseup")}e.stopPropagation(),t.$selected&&t.$selected.trigger(e)},prevItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{};if(n.$selected){var i=n.$selected;n=n.$selected.parent().data("contextMenu")||{},n.$selected=i}for(var o=n.$menu.children(),r=n.$selected&&n.$selected.prev().length?n.$selected.prev():o.last(),s=r;r.hasClass("disabled")||r.hasClass("not-selectable");)if(r=r.prev().length?r.prev():o.last(),r.is(s))return;n.$selected&&g.itemMouseleave.call(n.$selected.get(0),t),g.itemMouseenter.call(r.get(0),t);var a=r.find("input, textarea, select");a.length&&a.focus()},nextItem:function(t){t.stopPropagation();var n=e(this).data("contextMenu")||{};if(n.$selected){var i=n.$selected;n=n.$selected.parent().data("contextMenu")||{},n.$selected=i}for(var o=n.$menu.children(),r=n.$selected&&n.$selected.next().length?n.$selected.next():o.first(),s=r;r.hasClass("disabled")||r.hasClass("not-selectable");)if(r=r.next().length?r.next():o.first(),r.is(s))return;n.$selected&&g.itemMouseleave.call(n.$selected.get(0),t),g.itemMouseenter.call(r.get(0),t);var a=r.find("input, textarea, select");a.length&&a.focus()},focusInput:function(t){var n=e(this).closest(".context-menu-item"),i=n.data(),o=i.contextMenu,r=i.contextMenuRoot;r.$selected=o.$selected=n,r.isInput=o.isInput=!0},blurInput:function(t){var n=e(this).closest(".context-menu-item"),i=n.data(),o=i.contextMenu,r=i.contextMenuRoot;r.isInput=o.isInput=!1},menuMouseenter:function(t){var n=e(this).data().contextMenuRoot;n.hovering=!0},menuMouseleave:function(t){var n=e(this).data().contextMenuRoot;n.$layer&&n.$layer.is(t.relatedTarget)&&(n.hovering=!1)},itemMouseenter:function(t){var n=e(this),i=n.data(),o=i.contextMenu,r=i.contextMenuRoot;return r.hovering=!0,t&&r.$layer&&r.$layer.is(t.relatedTarget)&&(t.preventDefault(),t.stopImmediatePropagation()),(o.$menu?o:r).$menu.children(".hover").trigger("contextmenu:blur"),n.hasClass("disabled")||n.hasClass("not-selectable")?void(o.$selected=null):void n.trigger("contextmenu:focus")},itemMouseleave:function(t){var n=e(this),i=n.data(),o=i.contextMenu,r=i.contextMenuRoot;return r!==o&&r.$layer&&r.$layer.is(t.relatedTarget)?(r.$selected&&r.$selected.trigger("contextmenu:blur"),t.preventDefault(),t.stopImmediatePropagation(),void(r.$selected=o.$selected=o.$node)):void n.trigger("contextmenu:blur")},itemClick:function(t){var n,i=e(this),o=i.data(),r=o.contextMenu,s=o.contextMenuRoot,a=o.contextMenuKey;if(r.items[a]&&!i.is(".disabled, .context-menu-submenu, .context-menu-separator, .not-selectable")){if(t.preventDefault(),t.stopImmediatePropagation(),e.isFunction(s.callbacks[a])&&Object.prototype.hasOwnProperty.call(s.callbacks,a))n=s.callbacks[a];else{if(!e.isFunction(s.callback))return;n=s.callback}n.call(s.$trigger,a,s)!==!1?s.$menu.trigger("contextmenu:hide"):s.$menu.parent().length&&v.update.call(s.$trigger,s)}},inputClick:function(e){e.stopImmediatePropagation()},hideMenu:function(t,n){var i=e(this).data("contextMenuRoot");v.hide.call(i.$trigger,i,n&&n.force)},focusItem:function(t){t.stopPropagation();var n=e(this),i=n.data(),o=i.contextMenu,r=i.contextMenuRoot;n.addClass("hover").siblings(".hover").trigger("contextmenu:blur"),o.$selected=r.$selected=n,o.$node&&r.positionSubmenu.call(o.$node,o.$menu)},blurItem:function(t){t.stopPropagation();{var n=e(this),i=n.data(),o=i.contextMenu;i.contextMenuRoot}n.removeClass("hover"),o.$selected=null}},v={show:function(t,n,i){var o=e(this),r={};return e("#context-menu-layer").trigger("mousedown"),t.$trigger=o,t.events.show.call(o,t)===!1?void(s=null):(v.update.call(o,t),t.position.call(o,t,n,i),t.zIndex&&(r.zIndex=m(o)+t.zIndex),v.layer.call(t.$menu,t,r.zIndex),t.$menu.find("ul").css("zIndex",r.zIndex+1),t.$menu.css(r)[t.animation.show](t.animation.duration,function(){o.trigger("contextmenu:visible")}),o.data("contextMenu",t).addClass("context-menu-active"),e(document).off("keydown.contextMenu").on("keydown.contextMenu",g.key),void(t.autoHide&&e(document).on("mousemove.contextMenuAutoHide",function(e){var n=o.offset();n.right=n.left+o.outerWidth(),n.bottom=n.top+o.outerHeight(),!t.$layer||t.hovering||e.pageX>=n.left&&e.pageX<=n.right&&e.pageY>=n.top&&e.pageY<=n.bottom||t.$menu.trigger("contextmenu:hide")})))},hide:function(n,i){var o=e(this);if(n||(n=o.data("contextMenu")||{}),i||!n.events||n.events.hide.call(o,n)!==!1){if(o.removeData("contextMenu").removeClass("context-menu-active"),n.$layer){setTimeout(function(e){return function(){e.remove()}}(n.$layer),10);try{delete n.$layer}catch(r){n.$layer=null}}s=null,n.$menu.find(".hover").trigger("contextmenu:blur"),n.$selected=null,e(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),n.$menu&&n.$menu[n.animation.hide](n.animation.duration,function(){n.build&&(n.$menu.remove(),e.each(n,function(e,i){switch(e){case"ns":case"selector":case"build":case"trigger":return!0;default:n[e]=t;try{delete n[e]}catch(o){}return!0}})),setTimeout(function(){o.trigger("contextmenu:hidden")},10)})}},create:function(i,o){o===t&&(o=i),i.$menu=e('').addClass(i.className||"").data({contextMenu:i,contextMenuRoot:o}),e.each(["callbacks","commands","inputs"],function(e,t){i[t]={},o[t]||(o[t]={})}),o.accesskeys||(o.accesskeys={}),e.each(i.items,function(t,r){var s=e('').addClass(r.className||""),a=null,l=null;if(s.on("click",e.noop),r.$node=s.data({contextMenu:i,contextMenuRoot:o,contextMenuKey:t}),r.accesskey)for(var c,u=n(r.accesskey),d=0;c=u[d];d++)if(!o.accesskeys[c]){o.accesskeys[c]=r,r._name=r.name.replace(new RegExp("("+c+")","i"),'');break}if("string"==typeof r)s.addClass("context-menu-separator not-selectable");else if(r.type&&p[r.type])p[r.type].call(s,r,i,o),e.each([i,o],function(n,i){i.commands[t]=r,e.isFunction(r.callback)&&(i.callbacks[t]=r.callback)});else{switch("html"==r.type?s.addClass("context-menu-html not-selectable"):r.type?(a=e("").appendTo(s),e("").html(r._name||r.name).appendTo(a),s.addClass("context-menu-input"),i.hasTypes=!0,e.each([i,o],function(e,n){n.commands[t]=r,n.inputs[t]=r})):r.items&&(r.type="sub"),r.type){case"text":l=e('').attr("name","context-menu-input-"+t).val(r.value||"").appendTo(a);break;case"textarea":l=e('').attr("name","context-menu-input-"+t).val(r.value||"").appendTo(a),r.height&&l.height(r.height);break;case"checkbox":l=e('').attr("name","context-menu-input-"+t).val(r.value||"").prop("checked",!!r.selected).prependTo(a);break;case"radio":l=e('').attr("name","context-menu-input-"+r.radio).val(r.value||"").prop("checked",!!r.selected).prependTo(a);break;case"select":l=e('