hanayo/static/dist.min.js
2019-02-24 00:21:25 +00:00

45 lines
370 KiB
JavaScript
Raw Blame History

/*!
* You are currently viewing the Ripple JavaScript source code.
* Just so you know: if you want to see the source of the Ripple Frontend
* (Hanayo), you can do so at https://github.com/osuYozora/hanayo
* Un-minified version of this file as a whole is not available, however
* its dependencies (jquery, timeago, semantic...) are open source, and ripple's
* custom JS is available at /static/ripple.js.
*/
/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */
function closeClosestMessage(){$(this).closest(".message").fadeOut(300,function(){$(this).remove()})}function showMessage(e,t){var n=$('<div class="ui '+e+' message hidden"><i class="close icon"></i>'+T(t)+"</div>");n.find(".close.icon").click(closeClosestMessage),$("#messages-container").append(n),n.slideDown(300)}function api(e,t,n,i,o){"function"==typeof t&&(n=t,t=null),"boolean"==typeof i&&(o=i,i=void 0);var r="An error occurred while contacting the Ripple API. Please report this to a Ripple developer.";$.ajax({method:o?"POST":"GET",dataType:"json",url:hanayoConf.baseAPI+"/api/v1/"+e,data:o?JSON.stringify(t):t,contentType:o?"application/json; charset=utf-8":"",success:function(e){if(200!=e.code){if(e.code>=400&&e.code<500&&"function"==typeof i)return void i(e);console.warn(e),showMessage("error",r)}n(e)},error:function(e,t,n){return e.status>=400&&e.status<500&&"function"==typeof i?void i(e.responseJSON):(console.warn(e,t,n),void showMessage("error",r))}})}function escapeHTML(e){return String(e).replace(/[&<>"'\/]/g,function(e){return entityMap[e]})}function setupSimplepag(e){var t=$(".simplepag");t.find(".left.floated .item").click(function(){return!$(this).hasClass("disabled")&&(page--,void e())}),t.find(".right.floated .item").click(function(){return!$(this).hasClass("disabled")&&(page++,void e())})}function disableSimplepagButtons(e){var t=$(".simplepag");page<=1?t.find(".left.floated .item").addClass("disabled"):t.find(".left.floated .item").removeClass("disabled"),e?t.find(".right.floated .item").addClass("disabled"):t.find(".right.floated .item").removeClass("disabled")}function addCommas(e){e+="",x=e.split("."),x1=x[0],x2=x.length>1?"."+x[1]:"";for(var t=/(\d+)(\d{3})/;t.test(x1);)x1=x1.replace(t,"$1,$2");return x1+x2}function getScoreMods(e,t){var n=[];return 512==(512&e)&&(e&=-65),16384==(16384&e)&&(e&=-33),modsString.forEach(function(t,i){var o=1<<i;(e&o)>0&&n.push(t)}),n.length>0?(t?"":"+ ")+n.join(", "):t?T("None"):""}function timeFormat(e){var t=Math.floor(e/3600);e%=3600;var n=Math.floor(e/60),i=e%60,o="";return t>0?(o+=t+":",n<10&&(o+="0"),o+=n+":"):o+=n+":",i<10&&(o+="0"),o+=i}function query(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),i=n.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function formToObject(e){var t=e.find("input, textarea, select"),n={};return t.each(function(e,t){if(t=$(t),void 0!==t.attr("name")){var i,o=t.attr("name").split(".");switch(t.attr("type")){case"checkbox":i=t.is(":checked");break;default:switch(t.data("cast")){case"int":i=+t.val();break;default:i=t.val()}}n=modifyObjectDynamically(n,o,i)}}),n}function modifyObjectDynamically(e,t,n){return 1===t.length?e[t[0]]=n:t.length>1&&("object"!=typeof e[t[0]]&&(e[t[0]]={}),e[t[0]]=modifyObjectDynamically(e[t[0]],t.slice(1),n)),e}function T(e,t){return"undefined"!=typeof t&&"undefined"!=typeof t.count&&$.inArray(hanayoConf.language,langWhitelist)===-1&&1!==t.count&&(e=keyPlurals[e]),i18next.t(e,t)}function privilegesToString(e){var t=[];return apiPrivileges.forEach(function(n,i){0!=(e&1<<i+1)&&t.push(n)}),t.join(", ")}!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t){t=t||te;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function i(e){var t=!!e&&"length"in e&&e.length,n=he.type(e);return"function"!==n&&!he.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t,n){return he.isFunction(t)?he.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?he.grep(e,function(e){return e===t!==n}):"string"!=typeof t?he.grep(e,function(e){return ae.call(t,e)>-1!==n}):Te.test(t)?he.filter(t,e,n):(t=he.filter(t,e),he.grep(e,function(e){return ae.call(t,e)>-1!==n&&1===e.nodeType}))}function r(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t={};return he.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function s(e){return e}function l(e){throw e}function c(e,t,n){var i;try{e&&he.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&he.isFunction(i=e.then)?i.call(e,t,n):t.call(void 0,e)}catch(e){n.call(void 0,e)}}function u(){te.removeEventListener("DOMContentLoaded",u),e.removeEventListener("load",u),he.ready()}function d(){this.expando=he.expando+d.uid++}function f(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Me.test(e)?JSON.parse(e):e)}function p(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Ie,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n=f(n)}catch(e){}Ne.set(e,t,n)}else n=void 0;return n}function h(e,t,n,i){var o,r=1,a=20,s=i?function(){return i.cur()}:function(){return he.css(e,t,"")},l=s(),c=n&&n[3]||(he.cssNumber[t]?"":"px"),u=(he.cssNumber[t]||"px"!==c&&+l)&&$e.exec(he.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do r=r||".5",u/=r,he.style(e,t,u+c);while(r!==(r=s()/l)&&1!==r&&--a)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}function g(e){var t,n=e.ownerDocument,i=e.nodeName,o=We[i];return o?o:(t=n.body.appendChild(n.createElement(i)),o=he.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),We[i]=o,o)}function m(e,t){for(var n,i,o=[],r=0,a=e.length;r<a;r++)i=e[r],i.style&&(n=i.style.display,t?("none"===n&&(o[r]=qe.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&Ue(i)&&(o[r]=g(i))):"none"!==n&&(o[r]="none",qe.set(i,"display",n)));for(r=0;r<a;r++)null!=o[r]&&(e[r].style.display=o[r]);return e}function v(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&he.nodeName(e,t)?he.merge([e],n):n}function b(e,t){for(var n=0,i=e.length;n<i;n++)qe.set(e[n],"globalEval",!t||qe.get(t[n],"globalEval"))}function y(e,t,n,i,o){for(var r,a,s,l,c,u,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p<h;p++)if(r=e[p],r||0===r)if("object"===he.type(r))he.merge(f,r.nodeType?[r]:r);else if(Qe.test(r)){for(a=a||d.appendChild(t.createElement("div")),s=(_e.exec(r)||["",""])[1].toLowerCase(),l=Xe[s]||Xe._default,a.innerHTML=l[1]+he.htmlPrefilter(r)+l[2],u=l[0];u--;)a=a.lastChild;he.merge(f,a.childNodes),a=d.firstChild,a.textContent=""}else f.push(t.createTextNode(r));for(d.textContent="",p=0;r=f[p++];)if(i&&he.inArray(r,i)>-1)o&&o.push(r);else if(c=he.contains(r.ownerDocument,r),a=v(d.appendChild(r),"script"),c&&b(a),n)for(u=0;r=a[u++];)Ke.test(r.type||"")&&n.push(r);return d}function x(){return!0}function w(){return!1}function C(){try{return te.activeElement}catch(e){}}function k(e,t,n,i,o,r){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)k(e,s,n,i,t[s],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),o===!1)o=w;else if(!o)return e;return 1===r&&(a=o,o=function(e){return he().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=he.guid++)),e.each(function(){he.event.add(this,t,o,i,n)})}function T(e,t){return he.nodeName(e,"table")&&he.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function S(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function A(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){var n,i,o,r,a,s,l,c;if(1===t.nodeType){if(qe.hasData(e)&&(r=qe.access(e),a=qe.set(t,r),c=r.events)){delete a.handle,a.events={};for(o in c)for(n=0,i=c[o].length;n<i;n++)he.event.add(t,o,c[o][n])}Ne.hasData(e)&&(s=Ne.access(e),l=he.extend({},s),Ne.set(t,l))}}function j(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Be.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function R(e,t,i,o){t=oe.apply([],t);var r,a,s,l,c,u,d=0,f=e.length,p=f-1,h=t[0],g=he.isFunction(h);if(g||f>1&&"string"==typeof h&&!fe.checkClone&&nt.test(h))return e.each(function(n){var r=e.eq(n);g&&(t[0]=h.call(this,n,r.html())),R(r,t,i,o)});if(f&&(r=y(t,e[0].ownerDocument,!1,e,o),a=r.firstChild,1===r.childNodes.length&&(r=a),a||o)){for(s=he.map(v(r,"script"),S),l=s.length;d<f;d++)c=r,d!==p&&(c=he.clone(c,!0,!0),l&&he.merge(s,v(c,"script"))),i.call(e[d],c,d);if(l)for(u=s[s.length-1].ownerDocument,he.map(s,A),d=0;d<l;d++)c=s[d],Ke.test(c.type||"")&&!qe.access(c,"globalEval")&&he.contains(u,c)&&(c.src?he._evalUrl&&he._evalUrl(c.src):n(c.textContent.replace(ot,""),u))}return e}function D(e,t,n){for(var i,o=t?he.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||he.cleanData(v(i)),i.parentNode&&(n&&he.contains(i.ownerDocument,i)&&b(v(i,"script")),i.parentNode.removeChild(i));return e}function O(e,t,n){var i,o,r,a,s=e.style;return n=n||st(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||he.contains(e.ownerDocument,e)||(a=he.style(e,t)),!fe.pixelMarginRight()&&at.test(a)&&rt.test(t)&&(i=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=o,s.maxWidth=r)),void 0!==a?a+"":a}function P(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function F(e){if(e in ft)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=dt.length;n--;)if(e=dt[n]+t,e in ft)return e}function L(e,t,n){var i=$e.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function q(e,t,n,i,o){var r,a=0;for(r=n===(i?"border":"content")?4:"width"===t?1:0;r<4;r+=2)"margin"===n&&(a+=he.css(e,n+ze[r],!0,o)),i?("content"===n&&(a-=he.css(e,"padding"+ze[r],!0,o)),"margin"!==n&&(a-=he.css(e,"border"+ze[r]+"Width",!0,o))):(a+=he.css(e,"padding"+ze[r],!0,o),"padding"!==n&&(a+=he.css(e,"border"+ze[r]+"Width",!0,o)));return a}function N(e,t,n){var i,o=!0,r=st(e),a="border-box"===he.css(e,"boxSizing",!1,r);if(e.getClientRects().length&&(i=e.getBoundingClientRect()[t]),i<=0||null==i){if(i=O(e,t,r),(i<0||null==i)&&(i=e.style[t]),at.test(i))return i;o=a&&(fe.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+q(e,t,n||(a?"border":"content"),o,r)+"px"}function M(e,t,n,i,o){return new M.prototype.init(e,t,n,i,o)}function I(){ht&&(e.requestAnimationFrame(I),he.fx.tick())}function H(){return e.setTimeout(function(){pt=void 0}),pt=he.now()}function $(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)n=ze[i],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function z(e,t,n){for(var i,o=(W.tweeners[t]||[]).concat(W.tweeners["*"]),r=0,a=o.length;r<a;r++)if(i=o[r].call(n,t,e))return i}function U(e,t,n){var i,o,r,a,s,l,c,u,d="width"in t||"height"in t,f=this,p={},h=e.style,g=e.nodeType&&Ue(e),v=qe.get(e,"fxshow");n.queue||(a=he._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,he.queue(e,"fx").length||a.empty.fire()})}));for(i in t)if(o=t[i],gt.test(o)){if(delete t[i],r=r||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!v||void 0===v[i])continue;g=!0}p[i]=v&&v[i]||he.style(e,i)}if(l=!he.isEmptyObject(t),l||!he.isEmptyObject(p)){d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=v&&v.display,null==c&&(c=qe.get(e,"display")),u=he.css(e,"display"),"none"===u&&(c?u=c:(m([e],!0),c=e.style.display||c,u=he.css(e,"display"),m([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===he.css(e,"float")&&(l||(f.done(function(){h.display=c}),null==c&&(u=h.display,c="none"===u?"":u)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1;for(i in p)l||(v?"hidden"in v&&(g=v.hidden):v=qe.access(e,"fxshow",{display:c}),r&&(v.hidden=!g),g&&m([e],!0),f.done(function(){g||m([e]),qe.remove(e,"fxshow");for(i in p)he.style(e,i,p[i])})),l=z(g?v[i]:0,i,f),i in v||(v[i]=l.start,g&&(l.end=l.start,l.start=0))}}function V(e,t){var n,i,o,r,a;for(n in e)if(i=he.camelCase(n),o=t[i],r=e[n],he.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),a=he.cssHooks[i],a&&"expand"in a){r=a.expand(r),delete e[i];for(n in r)n in e||(e[n]=r[n],t[n]=o)}else t[i]=o}function W(e,t,n){var i,o,r=0,a=W.prefilters.length,s=he.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=pt||H(),n=Math.max(0,c.startTime+c.duration-t),i=n/c.duration||0,r=1-i,a=0,l=c.tweens.length;a<l;a++)c.tweens[a].run(r);return s.notifyWith(e,[c,r,n]),r<1&&l?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:he.extend({},t),opts:he.extend(!0,{specialEasing:{},easing:he.easing._default},n),originalProperties:t,originalOptions:n,startTime:pt||H(),duration:n.duration,tweens:[],createTween:function(t,n){var i=he.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(V(u,c.opts.specialEasing);r<a;r++)if(i=W.prefilters[r].call(c,e,u,c.opts))return he.isFunction(i.stop)&&(he._queueHooks(c.elem,c.opts.queue).stop=he.proxy(i.stop,i)),i;return he.map(u,z,c),he.isFunction(c.opts.start)&&c.opts.start.call(e,c),he.fx.timer(he.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function B(e){var t=e.match(De)||[];return t.join(" ")}function _(e){return e.getAttribute&&e.getAttribute("class")||""}function K(e,t,n,i){var o;if(he.isArray(t))he.each(t,function(t,o){n||At.test(e)?i(e,o):K(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)});else if(n||"object"!==he.type(t))i(e,t);else for(o in t)K(e+"["+o+"]",t[o],n,i)}function X(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(De)||[];if(he.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Q(e,t,n,i){function o(s){var l;return r[s]=!0,he.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||r[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),o(c),!1)}),l}var r={},a=e===It;return o(t.dataTypes[0])||!r["*"]&&o("*")}function J(e,t){var n,i,o=he.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&he.extend(!0,e,i),e}function G(e,t,n){for(var i,o,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in s)if(s[o]&&s[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}a||(a=o)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]}function Y(e,t,n,i){var o,r,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(r=u.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(a=c[l+" "+r]||c["* "+r],!a)for(o in c)if(s=o.split(" "),s[1]===r&&(a=c[l+" "+s[0]]||c["* "+s[0]])){a===!0?a=c[o]:c[o]!==!0&&(r=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function Z(e){return he.isWindow(e)?e:9===e.nodeType&&e.defaultView}var ee=[],te=e.document,ne=Object.getPrototypeOf,ie=ee.slice,oe=ee.concat,re=ee.push,ae=ee.indexOf,se={},le=se.toString,ce=se.hasOwnProperty,ue=ce.toString,de=ue.call(Object),fe={},pe="3.1.1",he=function(e,t){return new he.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,me=/^-ms-/,ve=/-([a-z])/g,be=function(e,t){return t.toUpperCase()};he.fn=he.prototype={jquery:pe,constructor:he,length:0,toArray:function(){return ie.call(this)},get:function(e){return null==e?ie.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=he.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return he.each(this,e)},map:function(e){return this.pushStack(he.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:re,sort:ee.sort,splice:ee.splice},he.extend=he.fn.extend=function(){var e,t,n,i,o,r,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||he.isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],i=e[t],a!==i&&(c&&i&&(he.isPlainObject(i)||(o=he.isArray(i)))?(o?(o=!1,r=n&&he.isArray(n)?n:[]):r=n&&he.isPlainObject(n)?n:{},a[t]=he.extend(c,r,i)):void 0!==i&&(a[t]=i));return a},he.extend({expando:"jQuery"+(pe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===he.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=he.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==le.call(e)||(t=ne(e))&&(n=ce.call(t,"constructor")&&t.constructor,"function"!=typeof n||ue.call(n)!==de))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?se[le.call(e)]||"object":typeof e},globalEval:function(e){n(e)},camelCase:function(e){return e.replace(me,"ms-").replace(ve,be)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,o=0;if(i(e))for(n=e.length;o<n&&t.call(e[o],o,e[o])!==!1;o++);else for(o in e)if(t.call(e[o],o,e[o])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?he.merge(n,"string"==typeof e?[e]:e):re.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ae.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i,o=[],r=0,a=e.length,s=!n;r<a;r++)i=!t(e[r],r),i!==s&&o.push(e[r]);return o},map:function(e,t,n){var o,r,a=0,s=[];if(i(e))for(o=e.length;a<o;a++)r=t(e[a],a,n),null!=r&&s.push(r);else for(a in e)r=t(e[a],a,n),null!=r&&s.push(r);return oe.apply([],s)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(n=e[t],t=e,e=n),he.isFunction(e))return i=ie.call(arguments,2),o=function(){return e.apply(t||this,i.concat(ie.call(arguments)))},o.guid=e.guid=e.guid||he.guid++,o},now:Date.now,support:fe}),"function"==typeof Symbol&&(he.fn[Symbol.iterator]=ee[Symbol.iterator]),he.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){se["[object "+t+"]"]=t.toLowerCase()});var ye=function(e){function t(e,t,n,i){var o,r,a,s,l,c,u,f=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!i&&((t?t.ownerDocument||t:z)!==F&&P(t),t=t||F,q)){if(11!==h&&(l=ve.exec(e)))if(o=l[1]){if(9===h){if(!(a=t.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(f&&(a=f.getElementById(o))&&H(t,a)&&a.id===o)return n.push(a),n}else{if(l[2])return Y.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&C.getElementsByClassName&&t.getElementsByClassName)return Y.apply(n,t.getElementsByClassName(o)),n}if(C.qsa&&!_[e+" "]&&(!N||!N.test(e))){if(1!==h)f=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(we,Ce):t.setAttribute("id",s=$),c=A(e),r=c.length;r--;)c[r]="#"+s+" "+p(c[r]);u=c.join(","),f=be.test(e)&&d(t.parentNode)||t}if(u)try{return Y.apply(n,f.querySelectorAll(u)),n}catch(e){}finally{s===$&&t.removeAttribute("id")}}}return j(e.replace(se,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[$]=!0,e}function o(e){var t=F.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)k.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Te(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function d(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,o=t.next,r=o||i,a=n&&"parentNode"===r,s=V++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,l){var c,u,d,f=[U,s];if(l){for(;t=t[i];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||a)if(d=t[$]||(t[$]={}),u=d[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[r])&&c[0]===U&&c[1]===s)return f[2]=c[2];if(u[r]=f,f[2]=e(t,n,l))return!0}return!1}}function g(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var o=0,r=n.length;o<r;o++)t(e,n[o],i);return i}function v(e,t,n,i,o){for(var r,a=[],s=0,l=e.length,c=null!=t;s<l;s++)(r=e[s])&&(n&&!n(r,i,o)||(a.push(r),c&&t.push(s)));return a}function b(e,t,n,o,r,a){return o&&!o[$]&&(o=b(o)),r&&!r[$]&&(r=b(r,a)),i(function(i,a,s,l){var c,u,d,f=[],p=[],h=a.length,g=i||m(t||"*",s.nodeType?[s]:s,[]),b=!e||!i&&t?g:v(g,f,e,s,l),y=n?r||(i?e:h||o)?[]:a:b;if(n&&n(b,y,s,l),o)for(c=v(y,p),o(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[p[u]]=!(b[p[u]]=d));if(i){if(r||e){if(r){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(b[u]=d);r(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=r?ee(i,d):f[u])>-1&&(i[c]=!(a[c]=d))}}else y=v(y===a?y.splice(h,y.length):y),r?r(null,a,y,l):Y.apply(a,y)})}function y(e){for(var t,n,i,o=e.length,r=k.relative[e[0].type],a=r||k.relative[" "],s=r?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return ee(t,e)>-1},a,!0),u=[function(e,n,i){var o=!r&&(i||n!==R)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,o}];s<o;s++)if(n=k.relative[e[s].type])u=[h(g(u),n)];else{if(n=k.filter[e[s].type].apply(null,e[s].matches),n[$]){for(i=++s;i<o&&!k.relative[e[i].type];i++);return b(s>1&&g(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s<i&&y(e.slice(s,i)),i<o&&y(e=e.slice(i)),i<o&&p(e))}u.push(n)}return g(u)}function x(e,n){var o=n.length>0,r=e.length>0,a=function(i,a,s,l,c){var u,d,f,p=0,h="0",g=i&&[],m=[],b=R,y=i||r&&k.find.TAG("*",c),x=U+=null==b?1:Math.random()||.1,w=y.length;for(c&&(R=a===F||a||c);h!==w&&null!=(u=y[h]);h++){if(r&&u){for(d=0,a||u.ownerDocument===F||(P(u),s=!q);f=e[d++];)if(f(u,a||F,s)){l.push(u);break}c&&(U=x)}o&&((u=!f&&u)&&p--,i&&g.push(u))}if(p+=h,o&&h!==p){for(d=0;f=n[d++];)f(g,m,a,s);if(i){if(p>0)for(;h--;)g[h]||m[h]||(m[h]=J.call(l));m=v(m)}Y.apply(l,m),c&&!i&&m.length>0&&p+n.length>1&&t.uniqueSort(l)}return c&&(U=x,R=b),g};return o?i(a):a}var w,C,k,T,S,A,E,j,R,D,O,P,F,L,q,N,M,I,H,$="sizzle"+1*new Date,z=e.document,U=0,V=0,W=n(),B=n(),_=n(),K=function(e,t){return e===t&&(O=!0),0},X={}.hasOwnProperty,Q=[],J=Q.pop,G=Q.push,Y=Q.push,Z=Q.slice,ee=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",re=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),se=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),le=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(re),fe=new RegExp("^"+ie+"$"),pe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Ce=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ke=function(){P()},Te=h(function(e){return e.disabled===!0&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Y.apply(Q=Z.call(z.childNodes),z.childNodes),Q[z.childNodes.length].nodeType}catch(e){Y={apply:Q.length?function(e,t){G.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}C=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},P=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:z;return i!==F&&9===i.nodeType&&i.documentElement?(F=i,L=F.documentElement,q=!S(F),z!==F&&(n=F.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ke,!1):n.attachEvent&&n.attachEvent("onunload",ke)),C.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=o(function(e){return e.appendChild(F.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=me.test(F.getElementsByClassName),C.getById=o(function(e){return L.appendChild(e).id=$,!F.getElementsByName||!F.getElementsByName($).length}),C.getById?(k.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}},k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n?[n]:[]}}):(k.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n,i,o,r=t.getElementById(e);if(r){if(n=r.getAttributeNode("id"),n&&n.value===e)return[r];for(o=t.getElementsByName(e),i=0;r=o[i++];)if(n=r.getAttributeNode("id"),n&&n.value===e)return[r]}return[]}}),k.find.TAG=C.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):C.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},k.find.CLASS=C.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&q)return t.getElementsByClassName(e)},M=[],N=[],(C.qsa=me.test(F.querySelectorAll))&&(o(function(e){L.appendChild(e).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&N.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||N.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+$+"-]").length||N.push("~="),e.querySelectorAll(":checked").length||N.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||N.push(".#.+[+~]")}),o(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=F.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&N.push("name"+ne+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&N.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&N.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),N.push(",.*:")})),(C.matchesSelector=me.test(I=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&o(function(e){C.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),M.push("!=",re)}),N=N.length&&new RegExp(N.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(L.compareDocumentPosition),H=t||me.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},K=t?function(e,t){if(e===t)return O=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!C.sortDetached&&t.compareDocumentPosition(e)===n?e===F||e.ownerDocument===z&&H(z,e)?-1:t===F||t.ownerDocument===z&&H(z,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return O=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,s=[e],l=[t];if(!o||!r)return e===F?-1:t===F?1:o?-1:r?1:D?ee(D,e)-ee(D,t):0;if(o===r)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===z?-1:l[i]===z?1:0},F):F},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==F&&P(e),n=n.replace(ue,"='$1']"),C.matchesSelector&&q&&!_[n+" "]&&(!M||!M.test(n))&&(!N||!N.test(n)))try{var i=I.call(e,n);if(i||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,F,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==F&&P(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==F&&P(e);var n=k.attrHandle[t.toLowerCase()],i=n&&X.call(k.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==i?i:C.attributes||!q?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(we,Ce)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(O=!C.detectDuplicates,D=!C.sortStable&&e.slice(0),e.sort(K),O){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return D=null,e},T=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=T(t);return n},k=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4);
},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=A(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(ae," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,h,g=r!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!l&&!s,y=!1;if(m){if(r){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&b){for(f=m,d=f[$]||(f[$]={}),u=d[f.uniqueID]||(d[f.uniqueID]={}),c=u[e]||[],p=c[0]===U&&c[1],y=p&&c[2],f=p&&m.childNodes[p];f=++p&&f&&f[g]||(y=p=0)||h.pop();)if(1===f.nodeType&&++y&&f===t){u[e]=[U,p,y];break}}else if(b&&(f=t,d=f[$]||(f[$]={}),u=d[f.uniqueID]||(d[f.uniqueID]={}),c=u[e]||[],p=c[0]===U&&c[1],y=p),y===!1)for(;(f=++p&&f&&f[g]||(y=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++y||(b&&(d=f[$]||(f[$]={}),u=d[f.uniqueID]||(d[f.uniqueID]={}),u[e]=[U,y]),f!==t)););return y-=o,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(e,n){var o,r=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[$]?r(n):r.length>1?(o=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),a=o.length;a--;)i=ee(e,o[a]),e[i]=!(t[i]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=E(e.replace(se,"$1"));return o[$]?i(function(e,t,n,i){for(var r,a=o(e,null,i,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,xe),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===F.activeElement&&(!F.hasFocus||F.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:c(!1),disabled:c(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=l(w);return f.prototype=k.filters=k.pseudos,k.setFilters=new f,A=t.tokenize=function(e,n){var i,o,r,a,s,l,c,u=B[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=k.preFilter;s;){i&&!(o=le.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),i=!1,(o=ce.exec(s))&&(i=o.shift(),r.push({value:i,type:o[0].replace(se," ")}),s=s.slice(i.length));for(a in k.filter)!(o=pe[a].exec(s))||c[a]&&!(o=c[a](o))||(i=o.shift(),r.push({value:i,type:a,matches:o}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):B(e,l).slice(0)},E=t.compile=function(e,t){var n,i=[],o=[],r=_[e+" "];if(!r){for(t||(t=A(e)),n=t.length;n--;)r=y(t[n]),r[$]?i.push(r):o.push(r);r=_(e,x(o,i)),r.selector=e}return r},j=t.select=function(e,t,n,i){var o,r,a,s,l,c="function"==typeof e&&e,u=!i&&A(e=c.selector||e);if(n=n||[],1===u.length){if(r=u[0]=u[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&9===t.nodeType&&q&&k.relative[r[1].type]){if(t=(k.find.ID(a.matches[0].replace(ye,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=pe.needsContext.test(e)?0:r.length;o--&&(a=r[o],!k.relative[s=a.type]);)if((l=k.find[s])&&(i=l(a.matches[0].replace(ye,xe),be.test(r[0].type)&&d(t.parentNode)||t))){if(r.splice(o,1),e=i.length&&p(r),!e)return Y.apply(n,i),n;break}}return(c||E(e,u))(i,t,!q,n,!t||be.test(e)&&d(t.parentNode)||t),n},C.sortStable=$.split("").sort(K).join("")===$,C.detectDuplicates=!!O,P(),C.sortDetached=o(function(e){return 1&e.compareDocumentPosition(F.createElement("fieldset"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,n){var i;if(!n)return e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);he.find=ye,he.expr=ye.selectors,he.expr[":"]=he.expr.pseudos,he.uniqueSort=he.unique=ye.uniqueSort,he.text=ye.getText,he.isXMLDoc=ye.isXML,he.contains=ye.contains,he.escapeSelector=ye.escape;var xe=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&he(e).is(n))break;i.push(e)}return i},we=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ce=he.expr.match.needsContext,ke=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,Te=/^.[^:#\[\.,]*$/;he.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?he.find.matchesSelector(i,e)?[i]:[]:he.find.matches(e,he.grep(t,function(e){return 1===e.nodeType}))},he.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(he(e).filter(function(){for(t=0;t<i;t++)if(he.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)he.find(e,o[t],n);return i>1?he.uniqueSort(n):n},filter:function(e){return this.pushStack(o(this,e||[],!1))},not:function(e){return this.pushStack(o(this,e||[],!0))},is:function(e){return!!o(this,"string"==typeof e&&Ce.test(e)?he(e):e||[],!1).length}});var Se,Ae=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ee=he.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||Se,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Ae.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof he?t[0]:t,he.merge(this,he.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:te,!0)),ke.test(i[1])&&he.isPlainObject(t))for(i in t)he.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return o=te.getElementById(i[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):he.isFunction(e)?void 0!==n.ready?n.ready(e):e(he):he.makeArray(e,this)};Ee.prototype=he.fn,Se=he(te);var je=/^(?:parents|prev(?:Until|All))/,Re={children:!0,contents:!0,next:!0,prev:!0};he.fn.extend({has:function(e){var t=he(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(he.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,o=this.length,r=[],a="string"!=typeof e&&he(e);if(!Ce.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&he.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?he.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?ae.call(he(e),this[0]):ae.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(he.uniqueSort(he.merge(this.get(),he(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),he.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return e.contentDocument||he.merge([],e.childNodes)}},function(e,t){he.fn[e]=function(n,i){var o=he.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=he.filter(i,o)),this.length>1&&(Re[e]||he.uniqueSort(o),je.test(e)&&o.reverse()),this.pushStack(o)}});var De=/[^\x20\t\r\n\f]+/g;he.Callbacks=function(e){e="string"==typeof e?a(e):he.extend({},e);var t,n,i,o,r=[],s=[],l=-1,c=function(){for(o=e.once,i=t=!0;s.length;l=-1)for(n=s.shift();++l<r.length;)r[l].apply(n[0],n[1])===!1&&e.stopOnFalse&&(l=r.length,n=!1);e.memory||(n=!1),t=!1,o&&(r=n?[]:"")},u={add:function(){return r&&(n&&!t&&(l=r.length-1,s.push(n)),function t(n){he.each(n,function(n,i){he.isFunction(i)?e.unique&&u.has(i)||r.push(i):i&&i.length&&"string"!==he.type(i)&&t(i)})}(arguments),n&&!t&&c()),this},remove:function(){return he.each(arguments,function(e,t){for(var n;(n=he.inArray(t,r,n))>-1;)r.splice(n,1),n<=l&&l--}),this},has:function(e){return e?he.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=s=[],n||t||(r=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},he.extend({Deferred:function(t){var n=[["notify","progress",he.Callbacks("memory"),he.Callbacks("memory"),2],["resolve","done",he.Callbacks("once memory"),he.Callbacks("once memory"),0,"resolved"],["reject","fail",he.Callbacks("once memory"),he.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return he.Deferred(function(t){he.each(n,function(n,i){var o=he.isFunction(e[i[4]])&&e[i[4]];r[i[1]](function(){var e=o&&o.apply(this,arguments);e&&he.isFunction(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(t,i,o){function r(t,n,i,o){return function(){var c=this,u=arguments,d=function(){var e,d;if(!(t<a)){if(e=i.apply(c,u),e===n.promise())throw new TypeError("Thenable self-resolution");d=e&&("object"==typeof e||"function"==typeof e)&&e.then,he.isFunction(d)?o?d.call(e,r(a,n,s,o),r(a,n,l,o)):(a++,d.call(e,r(a,n,s,o),r(a,n,l,o),r(a,n,s,n.notifyWith))):(i!==s&&(c=void 0,u=[e]),(o||n.resolveWith)(c,u))}},f=o?d:function(){try{d()}catch(e){he.Deferred.exceptionHook&&he.Deferred.exceptionHook(e,f.stackTrace),t+1>=a&&(i!==l&&(c=void 0,u=[e]),n.rejectWith(c,u))}};t?f():(he.Deferred.getStackHook&&(f.stackTrace=he.Deferred.getStackHook()),e.setTimeout(f))}}var a=0;return he.Deferred(function(e){n[0][3].add(r(0,e,he.isFunction(o)?o:s,e.notifyWith)),n[1][3].add(r(0,e,he.isFunction(t)?t:s)),n[2][3].add(r(0,e,he.isFunction(i)?i:l))}).promise()},promise:function(e){return null!=e?he.extend(e,o):o}},r={};return he.each(n,function(e,t){var a=t[2],s=t[5];o[t[1]]=a.add,s&&a.add(function(){i=s},n[3-e][2].disable,n[0][2].lock),a.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=a.fireWith}),o.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,i=Array(n),o=ie.call(arguments),r=he.Deferred(),a=function(e){return function(n){i[e]=this,o[e]=arguments.length>1?ie.call(arguments):n,--t||r.resolveWith(i,o)}};if(t<=1&&(c(e,r.done(a(n)).resolve,r.reject),"pending"===r.state()||he.isFunction(o[n]&&o[n].then)))return r.then();for(;n--;)c(o[n],a(n),r.reject);return r.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;he.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Oe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},he.readyException=function(t){e.setTimeout(function(){throw t})};var Pe=he.Deferred();he.fn.ready=function(e){return Pe.then(e).catch(function(e){he.readyException(e)}),this},he.extend({isReady:!1,readyWait:1,holdReady:function(e){e?he.readyWait++:he.ready(!0)},ready:function(e){(e===!0?--he.readyWait:he.isReady)||(he.isReady=!0,e!==!0&&--he.readyWait>0||Pe.resolveWith(te,[he]))}}),he.ready.then=Pe.then,"complete"===te.readyState||"loading"!==te.readyState&&!te.documentElement.doScroll?e.setTimeout(he.ready):(te.addEventListener("DOMContentLoaded",u),e.addEventListener("load",u));var Fe=function(e,t,n,i,o,r,a){var s=0,l=e.length,c=null==n;if("object"===he.type(n)){o=!0;for(s in n)Fe(e,t,s,n[s],!0,r,a)}else if(void 0!==i&&(o=!0,he.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(he(e),n)})),t))for(;s<l;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return o?e:c?t.call(e):l?t(e[0],n):r},Le=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};d.uid=1,d.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Le(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[he.camelCase(t)]=n;else for(i in t)o[he.camelCase(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][he.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){he.isArray(t)?t=t.map(he.camelCase):(t=he.camelCase(t),t=t in i?[t]:t.match(De)||[]),n=t.length;for(;n--;)delete i[t[n]]}(void 0===t||he.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!he.isEmptyObject(t)}};var qe=new d,Ne=new d,Me=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ie=/[A-Z]/g;he.extend({hasData:function(e){return Ne.hasData(e)||qe.hasData(e)},data:function(e,t,n){return Ne.access(e,t,n)},removeData:function(e,t){Ne.remove(e,t)},_data:function(e,t,n){return qe.access(e,t,n)},_removeData:function(e,t){qe.remove(e,t)}}),he.fn.extend({data:function(e,t){var n,i,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=Ne.get(r),1===r.nodeType&&!qe.get(r,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=he.camelCase(i.slice(5)),p(r,i,o[i])));qe.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Ne.set(this,e)}):Fe(this,function(t){var n;if(r&&void 0===t){if(n=Ne.get(r,e),void 0!==n)return n;if(n=p(r,e),void 0!==n)return n}else this.each(function(){Ne.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ne.remove(this,e)})}}),he.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=qe.get(e,t),n&&(!i||he.isArray(n)?i=qe.access(e,t,he.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=he.queue(e,t),i=n.length,o=n.shift(),r=he._queueHooks(e,t),a=function(){he.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return qe.get(e,n)||qe.access(e,n,{empty:he.Callbacks("once memory").add(function(){qe.remove(e,[t+"queue",n])})})}}),he.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?he.queue(this[0],e):void 0===t?this:this.each(function(){var n=he.queue(this,e,t);he._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&he.dequeue(this,e)})},dequeue:function(e){return this.each(function(){he.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=he.Deferred(),r=this,a=this.length,s=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=qe.get(r[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),o.promise(t)}});var He=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,$e=new RegExp("^(?:([+-])=|)("+He+")([a-z%]*)$","i"),ze=["Top","Right","Bottom","Left"],Ue=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&he.contains(e.ownerDocument,e)&&"none"===he.css(e,"display")},Ve=function(e,t,n,i){var o,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];o=n.apply(e,i||[]);for(r in t)e.style[r]=a[r];return o},We={};he.fn.extend({show:function(){return m(this,!0)},hide:function(){return m(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ue(this)?he(this).show():he(this).hide()})}});var Be=/^(?:checkbox|radio)$/i,_e=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ke=/^$|\/(?:java|ecma)script/i,Xe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Qe=/<|&#?\w+;/;!function(){var e=te.createDocumentFragment(),t=e.appendChild(te.createElement("div")),n=te.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),fe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",fe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Je=te.documentElement,Ge=/^key/,Ye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ze=/^([^.]*)(?:\.(.+)|)/;he.event={global:{},add:function(e,t,n,i,o){var r,a,s,l,c,u,d,f,p,h,g,m=qe.get(e);if(m)for(n.handler&&(r=n,n=r.handler,o=r.selector),o&&he.find.matchesSelector(Je,o),n.guid||(n.guid=he.guid++),(l=m.events)||(l=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof he&&he.event.triggered!==t.type?he.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(De)||[""],c=t.length;c--;)s=Ze.exec(t[c])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p&&(d=he.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=he.event.special[p]||{},u=he.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&he.expr.match.needsContext.test(o),namespace:h.join(".")},r),(f=l[p])||(f=l[p]=[],f.delegateCount=0,d.setup&&d.setup.call(e,i,h,a)!==!1||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,u):f.push(u),he.event.global[p]=!0)},remove:function(e,t,n,i,o){var r,a,s,l,c,u,d,f,p,h,g,m=qe.hasData(e)&&qe.get(e);if(m&&(l=m.events)){for(t=(t||"").match(De)||[""],c=t.length;c--;)if(s=Ze.exec(t[c])||[],p=g=s[1],h=(s[2]||"").split(".").sort(),p){for(d=he.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,f=l[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=f.length;r--;)u=f[r],!o&&g!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(f.splice(r,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));a&&!f.length&&(d.teardown&&d.teardown.call(e,h,m.handle)!==!1||he.removeEvent(e,p,m.handle),delete l[p])}else for(p in l)he.event.remove(e,p+t[c],n,i,!0);he.isEmptyObject(l)&&qe.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,r,a,s=he.event.fix(e),l=new Array(arguments.length),c=(qe.get(this,"events")||{})[s.type]||[],u=he.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,s)!==!1){for(a=he.event.handlers.call(this,s,c),t=0;(o=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(r.namespace)||(s.handleObj=r,s.data=r.data,i=((he.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l),void 0!==i&&(s.result=i)===!1&&(s.preventDefault(),s.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,i,o,r,a,s=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||c.disabled!==!0)){for(r=[],a={},n=0;n<l;n++)i=t[n],o=i.selector+" ",void 0===a[o]&&(a[o]=i.needsContext?he(o,this).index(c)>-1:he.find(o,this,null,[c]).length),a[o]&&r.push(i);r.length&&s.push({elem:c,handlers:r})}return c=this,l<t.length&&s.push({elem:c,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(he.Event.prototype,e,{enumerable:!0,configurable:!0,get:he.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[he.expando]?e:new he.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==C()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===C()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&he.nodeName(this,"input"))return this.click(),!1},_default:function(e){return he.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},he.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},he.Event=function(e,t){return this instanceof he.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?x:w,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&he.extend(this,t),this.timeStamp=e&&e.timeStamp||he.now(),void(this[he.expando]=!0)):new he.Event(e,t)},he.Event.prototype={constructor:he.Event,isDefaultPrevented:w,isPropagationStopped:w,isImmediatePropagationStopped:w,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=x,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=x,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=x,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},he.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ge.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ye.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},he.event.addProp),he.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){he.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===i||he.contains(i,o))||(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),he.fn.extend({on:function(e,t,n,i){return k(this,e,t,n,i)},one:function(e,t,n,i){return k(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,he(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=w),this.each(function(){he.event.remove(this,e,n,t)})}});var et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,tt=/<script|<style|<link/i,nt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;he.extend({htmlPrefilter:function(e){return e.replace(et,"<$1></$2>")},clone:function(e,t,n){var i,o,r,a,s=e.cloneNode(!0),l=he.contains(e.ownerDocument,e);if(!(fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||he.isXMLDoc(e)))for(a=v(s),r=v(e),i=0,o=r.length;i<o;i++)j(r[i],a[i]);if(t)if(n)for(r=r||v(e),a=a||v(s),i=0,o=r.length;i<o;i++)E(r[i],a[i]);else E(e,s);return a=v(s,"script"),a.length>0&&b(a,!l&&v(e,"script")),s},cleanData:function(e){for(var t,n,i,o=he.event.special,r=0;void 0!==(n=e[r]);r++)if(Le(n)){if(t=n[qe.expando]){if(t.events)for(i in t.events)o[i]?he.event.remove(n,i):he.removeEvent(n,i,t.handle);n[qe.expando]=void 0}n[Ne.expando]&&(n[Ne.expando]=void 0)}}}),he.fn.extend({detach:function(e){return D(this,e,!0)},remove:function(e){return D(this,e)},text:function(e){return Fe(this,function(e){return void 0===e?he.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return R(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return R(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return R(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return R(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(he.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return he.clone(this,e,t)})},html:function(e){return Fe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tt.test(e)&&!Xe[(_e.exec(e)||["",""])[1].toLowerCase()]){e=he.htmlPrefilter(e);try{for(;n<i;n++)t=this[n]||{},1===t.nodeType&&(he.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return R(this,arguments,function(t){var n=this.parentNode;he.inArray(this,e)<0&&(he.cleanData(v(this)),n&&n.replaceChild(t,this))},e)}}),he.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){he.fn[e]=function(e){for(var n,i=[],o=he(e),r=o.length-1,a=0;a<=r;a++)n=a===r?this:this.clone(!0),he(o[a])[t](n),re.apply(i,n.get());return this.pushStack(i)}});var rt=/^margin/,at=new RegExp("^("+He+")(?!px)[a-z%]+$","i"),st=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)};!function(){function t(){if(s){s.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",Je.appendChild(a);var t=e.getComputedStyle(s);n="1%"!==t.top,r="2px"===t.marginLeft,i="4px"===t.width,s.style.marginRight="50%",o="4px"===t.marginRight,Je.removeChild(a),s=null}}var n,i,o,r,a=te.createElement("div"),s=te.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===s.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(s),he.extend(fe,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return t(),i},pixelMarginRight:function(){return t(),o},reliableMarginLeft:function(){return t(),r}}))}();var lt=/^(none|table(?!-c[ea]).+)/,ct={position:"absolute",visibility:"hidden",display:"block"},ut={letterSpacing:"0",fontWeight:"400"},dt=["Webkit","Moz","ms"],ft=te.createElement("div").style;he.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=O(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=he.camelCase(t),l=e.style;return t=he.cssProps[s]||(he.cssProps[s]=F(s)||s),a=he.cssHooks[t]||he.cssHooks[s],void 0===n?a&&"get"in a&&void 0!==(o=a.get(e,!1,i))?o:l[t]:(r=typeof n,"string"===r&&(o=$e.exec(n))&&o[1]&&(n=h(e,t,o),r="number"),void(null!=n&&n===n&&("number"===r&&(n+=o&&o[3]||(he.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,i))||(l[t]=n))))}},css:function(e,t,n,i){var o,r,a,s=he.camelCase(t);return t=he.cssProps[s]||(he.cssProps[s]=F(s)||s),a=he.cssHooks[t]||he.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=O(e,t,i)),"normal"===o&&t in ut&&(o=ut[t]),""===n||n?(r=parseFloat(o),n===!0||isFinite(r)?r||0:o):o}}),he.each(["height","width"],function(e,t){he.cssHooks[t]={get:function(e,n,i){if(n)return!lt.test(he.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?N(e,t,i):Ve(e,ct,function(){return N(e,t,i)})},set:function(e,n,i){var o,r=i&&st(e),a=i&&q(e,t,i,"border-box"===he.css(e,"boxSizing",!1,r),r);return a&&(o=$e.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=he.css(e,t)),L(e,n,a)}}}),he.cssHooks.marginLeft=P(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(O(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),he.each({margin:"",padding:"",border:"Width"},function(e,t){he.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+ze[i]+t]=r[i]||r[i-2]||r[0];
return o}},rt.test(e)||(he.cssHooks[e+t].set=L)}),he.fn.extend({css:function(e,t){return Fe(this,function(e,t,n){var i,o,r={},a=0;if(he.isArray(t)){for(i=st(e),o=t.length;a<o;a++)r[t[a]]=he.css(e,t[a],!1,i);return r}return void 0!==n?he.style(e,t,n):he.css(e,t)},e,t,arguments.length>1)}}),he.Tween=M,M.prototype={constructor:M,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||he.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(he.cssNumber[n]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,n=M.propHooks[this.prop];return this.options.duration?this.pos=t=he.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=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):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=he.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){he.fx.step[e.prop]?he.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[he.cssProps[e.prop]]&&!he.cssHooks[e.prop]?e.elem[e.prop]=e.now:he.style(e.elem,e.prop,e.now+e.unit)}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},he.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},he.fx=M.prototype.init,he.fx.step={};var pt,ht,gt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;he.Animation=he.extend(W,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return h(n.elem,e,$e.exec(t),n),n}]},tweener:function(e,t){he.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,i=0,o=e.length;i<o;i++)n=e[i],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(t)},prefilters:[U],prefilter:function(e,t){t?W.prefilters.unshift(e):W.prefilters.push(e)}}),he.speed=function(e,t,n){var i=e&&"object"==typeof e?he.extend({},e):{complete:n||!n&&t||he.isFunction(e)&&e,duration:e,easing:n&&t||t&&!he.isFunction(t)&&t};return he.fx.off||te.hidden?i.duration=0:"number"!=typeof i.duration&&(i.duration in he.fx.speeds?i.duration=he.fx.speeds[i.duration]:i.duration=he.fx.speeds._default),null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){he.isFunction(i.old)&&i.old.call(this),i.queue&&he.dequeue(this,i.queue)},i},he.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ue).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=he.isEmptyObject(e),r=he.speed(t,n,i),a=function(){var t=W(this,he.extend({},e),r);(o||qe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||r.queue===!1?this.each(a):this.queue(r.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=he.timers,a=qe.get(this);if(o)a[o]&&a[o].stop&&i(a[o]);else for(o in a)a[o]&&a[o].stop&&mt.test(o)&&i(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));!t&&n||he.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=qe.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=he.timers,a=i?i.length:0;for(n.finish=!0,he.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),he.each(["toggle","show","hide"],function(e,t){var n=he.fn[t];he.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate($(t,!0),e,i,o)}}),he.each({slideDown:$("show"),slideUp:$("hide"),slideToggle:$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){he.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),he.timers=[],he.fx.tick=function(){var e,t=0,n=he.timers;for(pt=he.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||he.fx.stop(),pt=void 0},he.fx.timer=function(e){he.timers.push(e),e()?he.fx.start():he.timers.pop()},he.fx.interval=13,he.fx.start=function(){ht||(ht=e.requestAnimationFrame?e.requestAnimationFrame(I):e.setInterval(he.fx.tick,he.fx.interval))},he.fx.stop=function(){e.cancelAnimationFrame?e.cancelAnimationFrame(ht):e.clearInterval(ht),ht=null},he.fx.speeds={slow:600,fast:200,_default:400},he.fn.delay=function(t,n){return t=he.fx?he.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},function(){var e=te.createElement("input"),t=te.createElement("select"),n=t.appendChild(te.createElement("option"));e.type="checkbox",fe.checkOn=""!==e.value,fe.optSelected=n.selected,e=te.createElement("input"),e.value="t",e.type="radio",fe.radioValue="t"===e.value}();var vt,bt=he.expr.attrHandle;he.fn.extend({attr:function(e,t){return Fe(this,he.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){he.removeAttr(this,e)})}}),he.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof e.getAttribute?he.prop(e,t,n):(1===r&&he.isXMLDoc(e)||(o=he.attrHooks[t.toLowerCase()]||(he.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void he.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=he.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&he.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return t===!1?he.removeAttr(e,n):e.setAttribute(n,n),n}},he.each(he.expr.match.bool.source.match(/\w+/g),function(e,t){var n=bt[t]||he.find.attr;bt[t]=function(e,t,i){var o,r,a=t.toLowerCase();return i||(r=bt[a],bt[a]=o,o=null!=n(e,t,i)?a:null,bt[a]=r),o}});var yt=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;he.fn.extend({prop:function(e,t){return Fe(this,he.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[he.propFix[e]||e]})}}),he.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&he.isXMLDoc(e)||(t=he.propFix[t]||t,o=he.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=he.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),fe.optSelected||(he.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),he.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){he.propFix[this.toLowerCase()]=this}),he.fn.extend({addClass:function(e){var t,n,i,o,r,a,s,l=0;if(he.isFunction(e))return this.each(function(t){he(this).addClass(e.call(this,t,_(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[l++];)if(o=_(n),i=1===n.nodeType&&" "+B(o)+" "){for(a=0;r=t[a++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=B(i),o!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,o,r,a,s,l=0;if(he.isFunction(e))return this.each(function(t){he(this).removeClass(e.call(this,t,_(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[l++];)if(o=_(n),i=1===n.nodeType&&" "+B(o)+" "){for(a=0;r=t[a++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");s=B(i),o!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):he.isFunction(e)?this.each(function(n){he(this).toggleClass(e.call(this,n,_(this),t),t)}):this.each(function(){var t,i,o,r;if("string"===n)for(i=0,o=he(this),r=e.match(De)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=_(this),t&&qe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":qe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+B(_(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;he.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=he.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,he(this).val()):e,null==o?o="":"number"==typeof o?o+="":he.isArray(o)&&(o=he.map(o,function(e){return null==e?"":e+""})),t=he.valHooks[this.type]||he.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=he.valHooks[o.type]||he.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(wt,""):null==n?"":n)):void 0}}),he.extend({valHooks:{option:{get:function(e){var t=he.find.attr(e,"value");return null!=t?t:B(he.text(e))}},select:{get:function(e){var t,n,i,o=e.options,r=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?r+1:o.length;for(i=r<0?l:a?r:0;i<l;i++)if(n=o[i],(n.selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!he.nodeName(n.parentNode,"optgroup"))){if(t=he(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,i,o=e.options,r=he.makeArray(t),a=o.length;a--;)i=o[a],(i.selected=he.inArray(he.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),he.each(["radio","checkbox"],function(){he.valHooks[this]={set:function(e,t){if(he.isArray(t))return e.checked=he.inArray(he(e).val(),t)>-1}},fe.checkOn||(he.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ct=/^(?:focusinfocus|focusoutblur)$/;he.extend(he.event,{trigger:function(t,n,i,o){var r,a,s,l,c,u,d,f=[i||te],p=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(a=s=i=i||te,3!==i.nodeType&&8!==i.nodeType&&!Ct.test(p+he.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,t=t[he.expando]?t:new he.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:he.makeArray(n,[t]),d=he.event.special[p]||{},o||!d.trigger||d.trigger.apply(i,n)!==!1)){if(!o&&!d.noBubble&&!he.isWindow(i)){for(l=d.delegateType||p,Ct.test(l+p)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(i.ownerDocument||te)&&f.push(s.defaultView||s.parentWindow||e)}for(r=0;(a=f[r++])&&!t.isPropagationStopped();)t.type=r>1?l:d.bindType||p,u=(qe.get(a,"events")||{})[t.type]&&qe.get(a,"handle"),u&&u.apply(a,n),u=c&&a[c],u&&u.apply&&Le(a)&&(t.result=u.apply(a,n),t.result===!1&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||d._default&&d._default.apply(f.pop(),n)!==!1||!Le(i)||c&&he.isFunction(i[p])&&!he.isWindow(i)&&(s=i[c],s&&(i[c]=null),he.event.triggered=p,i[p](),he.event.triggered=void 0,s&&(i[c]=s)),t.result}},simulate:function(e,t,n){var i=he.extend(new he.Event,n,{type:e,isSimulated:!0});he.event.trigger(i,null,t)}}),he.fn.extend({trigger:function(e,t){return this.each(function(){he.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return he.event.trigger(e,t,n,!0)}}),he.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){he.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),he.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),fe.focusin="onfocusin"in e,fe.focusin||he.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){he.event.simulate(t,e.target,he.event.fix(e))};he.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=qe.access(i,t);o||i.addEventListener(e,n,!0),qe.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=qe.access(i,t)-1;o?qe.access(i,t,o):(i.removeEventListener(e,n,!0),qe.remove(i,t))}}});var kt=e.location,Tt=he.now(),St=/\?/;he.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||he.error("Invalid XML: "+t),n};var At=/\[\]$/,Et=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;he.param=function(e,t){var n,i=[],o=function(e,t){var n=he.isFunction(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(he.isArray(e)||e.jquery&&!he.isPlainObject(e))he.each(e,function(){o(this.name,this.value)});else for(n in e)K(n,e[n],t,o);return i.join("&")},he.fn.extend({serialize:function(){return he.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=he.prop(this,"elements");return e?he.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!he(this).is(":disabled")&&Rt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=he(this).val();return null==n?null:he.isArray(n)?he.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Dt=/%20/g,Ot=/#.*$/,Pt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qt=/^(?:GET|HEAD)$/,Nt=/^\/\//,Mt={},It={},Ht="*/".concat("*"),$t=te.createElement("a");$t.href=kt.href,he.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt.href,type:"GET",isLocal:Lt.test(kt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":he.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?J(J(e,he.ajaxSettings),t):J(he.ajaxSettings,e)},ajaxPrefilter:X(Mt),ajaxTransport:X(It),ajax:function(t,n){function i(t,n,i,s){var c,f,p,x,w,C=n;u||(u=!0,l&&e.clearTimeout(l),o=void 0,a=s||"",k.readyState=t>0?4:0,c=t>=200&&t<300||304===t,i&&(x=G(h,k,i)),x=Y(h,x,k,c),c?(h.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(he.lastModified[r]=w),w=k.getResponseHeader("etag"),w&&(he.etag[r]=w)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,p=x.error,c=!p)):(p=C,!t&&C||(C="error",t<0&&(t=0))),k.status=t,k.statusText=(n||C)+"",c?v.resolveWith(g,[f,C,k]):v.rejectWith(g,[k,C,p]),k.statusCode(y),y=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[k,h,c?f:p]),b.fireWith(g,[k,C]),d&&(m.trigger("ajaxComplete",[k,h]),--he.active||he.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,r,a,s,l,c,u,d,f,p,h=he.ajaxSetup({},n),g=h.context||h,m=h.context&&(g.nodeType||g.jquery)?he(g):he.event,v=he.Deferred(),b=he.Callbacks("once memory"),y=h.statusCode||{},x={},w={},C="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Ft.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||C;return o&&o.abort(t),i(0,t),this}};if(v.promise(k),h.url=((t||h.url||kt.href)+"").replace(Nt,kt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(De)||[""],null==h.crossDomain){c=te.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=$t.protocol+"//"+$t.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=he.param(h.data,h.traditional)),Q(Mt,h,n,k),u)return k;d=he.event&&h.global,d&&0===he.active++&&he.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!qt.test(h.type),r=h.url.replace(Ot,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Dt,"+")):(p=h.url.slice(r.length),h.data&&(r+=(St.test(r)?"&":"?")+h.data,delete h.data),h.cache===!1&&(r=r.replace(Pt,"$1"),p=(St.test(r)?"&":"?")+"_="+Tt++ +p),h.url=r+p),h.ifModified&&(he.lastModified[r]&&k.setRequestHeader("If-Modified-Since",he.lastModified[r]),he.etag[r]&&k.setRequestHeader("If-None-Match",he.etag[r])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ht+"; q=0.01":""):h.accepts["*"]);for(f in h.headers)k.setRequestHeader(f,h.headers[f]);if(h.beforeSend&&(h.beforeSend.call(g,k,h)===!1||u))return k.abort();if(C="abort",b.add(h.complete),k.done(h.success),k.fail(h.error),o=Q(It,h,n,k)){if(k.readyState=1,d&&m.trigger("ajaxSend",[k,h]),u)return k;h.async&&h.timeout>0&&(l=e.setTimeout(function(){k.abort("timeout")},h.timeout));try{u=!1,o.send(x,i)}catch(e){if(u)throw e;i(-1,e)}}else i(-1,"No Transport");return k},getJSON:function(e,t,n){return he.get(e,t,n,"json")},getScript:function(e,t){return he.get(e,void 0,t,"script")}}),he.each(["get","post"],function(e,t){he[t]=function(e,n,i,o){return he.isFunction(n)&&(o=o||i,i=n,n=void 0),he.ajax(he.extend({url:e,type:t,dataType:o,data:n,success:i},he.isPlainObject(e)&&e))}}),he._evalUrl=function(e){return he.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},he.fn.extend({wrapAll:function(e){var t;return this[0]&&(he.isFunction(e)&&(e=e.call(this[0])),t=he(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return he.isFunction(e)?this.each(function(t){he(this).wrapInner(e.call(this,t))}):this.each(function(){var t=he(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=he.isFunction(e);return this.each(function(n){he(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){he(this).replaceWith(this.childNodes)}),this}}),he.expr.pseudos.hidden=function(e){return!he.expr.pseudos.visible(e)},he.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},he.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var zt={0:200,1223:204},Ut=he.ajaxSettings.xhr();fe.cors=!!Ut&&"withCredentials"in Ut,fe.ajax=Ut=!!Ut,he.ajaxTransport(function(t){var n,i;if(fe.cors||Ut&&!t.crossDomain)return{send:function(o,r){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(a in o)s.setRequestHeader(a,o[a]);n=function(e){return function(){n&&(n=i=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),i=s.onerror=n("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),he.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),he.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return he.globalEval(e),e}}}),he.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),he.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=he("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),te.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Vt=[],Wt=/(=)\?(?=&|$)|\?\?/;he.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||he.expando+"_"+Tt++;return this[e]=!0,e}}),he.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,a,s=t.jsonp!==!1&&(Wt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Wt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=he.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Wt,"$1"+o):t.jsonp!==!1&&(t.url+=(St.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return a||he.error(o+" was not called"),a[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){a=arguments},i.always(function(){void 0===r?he(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,Vt.push(o)),a&&he.isFunction(r)&&r(a[0]),a=r=void 0}),"script"}),fe.createHTMLDocument=function(){var e=te.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),he.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,r;return t||(fe.createHTMLDocument?(t=te.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=te.location.href,t.head.appendChild(i)):t=te),o=ke.exec(e),r=!n&&[],o?[t.createElement(o[1])]:(o=y([e],t,r),r&&r.length&&he(r).remove(),he.merge([],o.childNodes))},he.fn.load=function(e,t,n){var i,o,r,a=this,s=e.indexOf(" ");return s>-1&&(i=B(e.slice(s)),e=e.slice(0,s)),he.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&he.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,a.html(i?he("<div>").append(he.parseHTML(e)).find(i):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},he.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){he.fn[t]=function(e){return this.on(t,e)}}),he.expr.pseudos.animated=function(e){return he.grep(he.timers,function(t){return e===t.elem}).length},he.offset={setOffset:function(e,t,n){var i,o,r,a,s,l,c,u=he.css(e,"position"),d=he(e),f={};"static"===u&&(e.style.position="relative"),s=d.offset(),r=he.css(e,"top"),l=he.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(r+l).indexOf("auto")>-1,c?(i=d.position(),a=i.top,o=i.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),he.isFunction(t)&&(t=t.call(e,n,he.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):d.css(f)}},he.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){he.offset.setOffset(this,e,t)});var t,n,i,o,r=this[0];return r?r.getClientRects().length?(i=r.getBoundingClientRect(),i.width||i.height?(o=r.ownerDocument,n=Z(o),t=o.documentElement,{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===he.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),he.nodeName(e[0],"html")||(i=e.offset()),i={top:i.top+he.css(e[0],"borderTopWidth",!0),left:i.left+he.css(e[0],"borderLeftWidth",!0)}),{top:t.top-i.top-he.css(n,"marginTop",!0),left:t.left-i.left-he.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===he.css(e,"position");)e=e.offsetParent;return e||Je})}}),he.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;he.fn[e]=function(i){return Fe(this,function(e,i,o){var r=Z(e);return void 0===o?r?r[t]:e[i]:void(r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o)},e,i,arguments.length)}}),he.each(["top","left"],function(e,t){he.cssHooks[t]=P(fe.pixelPosition,function(e,n){if(n)return n=O(e,t),at.test(n)?he(e).position()[t]+"px":n})}),he.each({Height:"height",Width:"width"},function(e,t){he.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){he.fn[i]=function(o,r){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(o===!0||r===!0?"margin":"border");return Fe(this,function(t,n,o){var r;return he.isWindow(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?he.css(t,n,s):he.style(t,n,o,s)},t,a?o:void 0,a)}})}),he.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),he.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return he});var Bt=e.jQuery,_t=e.$;return he.noConflict=function(t){return e.$===he&&(e.$=_t),t&&e.jQuery===he&&(e.jQuery=Bt),he},t||(e.jQuery=e.$=he),he}),/**
* Timeago is a jQuery plugin that makes it easy to support automatically
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
*
* @name timeago
* @version 1.5.3
* @requires jQuery v1.2.3+
* @author Ryan McGeary
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
*
* For usage and examples, visit:
* http://timeago.yarp.com/
*
* Copyright (c) 2008-2015, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
*/
function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&"object"==typeof module.exports?require("jquery"):jQuery)}(function(e){function t(){var t=r.settings;if(t.autoDispose&&!e.contains(document.documentElement,this))return e(this).timeago("dispose"),this;var a=n(this);return isNaN(a.datetime)||(0==t.cutoff||Math.abs(o(a.datetime))<t.cutoff?e(this).text(i(a.datetime)):e(this).attr("title").length>0&&e(this).text(e(this).attr("title"))),this}function n(t){if(t=e(t),!t.data("timeago")){t.data("timeago",{datetime:r.datetime(t)});var n=e.trim(t.text());r.settings.localeTitle?t.attr("title",t.data("timeago").datetime.toLocaleString()):!(n.length>0)||r.isTime(t)&&t.attr("title")||t.attr("title",n)}return t.data("timeago")}function i(e){return r.inWords(o(e))}function o(e){return(new Date).getTime()-e.getTime()}e.timeago=function(t){return i(t instanceof Date?t:"string"==typeof t?e.timeago.parse(t):"number"==typeof t?new Date(t):e.timeago.datetime(t))};var r=e.timeago;e.extend(e.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,autoDispose:!0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(t){function n(n,o){var r=e.isFunction(n)?n(o,t):n,a=i.numbers&&i.numbers[o]||o;return r.replace(/%d/i,a)}if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var i=this.settings.strings,o=i.prefixAgo,r=i.suffixAgo;if(this.settings.allowFuture&&t<0&&(o=i.prefixFromNow,r=i.suffixFromNow),!this.settings.allowPast&&t>=0)return this.settings.strings.inPast;var a=Math.abs(t)/1e3,s=a/60,l=s/60,c=l/24,u=c/365,d=a<45&&n(i.seconds,Math.round(a))||a<90&&n(i.minute,1)||s<45&&n(i.minutes,Math.round(s))||s<90&&n(i.hour,1)||l<24&&n(i.hours,Math.round(l))||l<42&&n(i.day,1)||c<30&&n(i.days,Math.round(c))||c<45&&n(i.month,1)||c<365&&n(i.months,Math.round(c/30))||u<1.5&&n(i.year,1)||n(i.years,Math.round(u)),f=i.wordSeparator||"";return void 0===i.wordSeparator&&(f=" "),e.trim([o,d,r].join(f))},parse:function(t){var n=e.trim(t);return n=n.replace(/\.\d+/,""),n=n.replace(/-/,"/").replace(/-/,"/"),n=n.replace(/T/," ").replace(/Z/," UTC"),n=n.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),n=n.replace(/([\+\-]\d\d)$/," $100"),new Date(n)},datetime:function(t){var n=r.isTime(t)?e(t).attr("datetime"):e(t).attr("title");return r.parse(n)},isTime:function(t){return"time"===e(t).get(0).tagName.toLowerCase()}});var a={init:function(){var n=e.proxy(t,this);n();var i=r.settings;i.refreshMillis>0&&(this._timeagoInterval=setInterval(n,i.refreshMillis))},update:function(n){var i=n instanceof Date?n:r.parse(n);e(this).data("timeago",{datetime:i}),r.settings.localeTitle&&e(this).attr("title",i.toLocaleString()),t.apply(this)},updateFromDOM:function(){e(this).data("timeago",{datetime:r.parse(r.isTime(this)?e(this).attr("datetime"):e(this).attr("title"))}),t.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}};e.fn.timeago=function(e,t){var n=e?a[e]:a.init;if(!n)throw new Error("Unknown function name '"+e+"' for timeago");return this.each(function(){n.call(this,t)}),this},document.createElement("abbr"),document.createElement("time")}),/*
* # Semantic UI - 2.2.6
* https://github.com/Semantic-Org/Semantic-UI
* http://www.semantic-ui.com/
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(e,t,n,i){e.site=e.fn.site=function(o){var r,a,s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1),f=e.isPlainObject(o)?e.extend(!0,{},e.site.settings,o):e.extend({},e.site.settings),p=f.namespace,h=f.error,g="module-"+p,m=e(n),v=m,b=this,y=v.data(g);return r={initialize:function(){r.instantiate()},instantiate:function(){r.verbose("Storing instance of site",r),y=r,v.data(g,r)},normalize:function(){r.fix.console(),r.fix.requestAnimationFrame()},fix:{console:function(){r.debug("Normalizing window.console"),console!==i&&console.log!==i||(r.verbose("Console not available, normalizing events"),r.disable.console()),"undefined"!=typeof console.group&&"undefined"!=typeof console.groupEnd&&"undefined"!=typeof console.groupCollapsed||(r.verbose("Console group not available, normalizing events"),t.console.group=function(){},t.console.groupEnd=function(){},t.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(r.verbose("Mark timeline not available, normalizing events"),t.console.markTimeline=function(){})},consoleClear:function(){r.debug("Disabling programmatic console clearing"),t.console.clear=function(){}},requestAnimationFrame:function(){r.debug("Normalizing requestAnimationFrame"),t.requestAnimationFrame===i&&(r.debug("RequestAnimationFrame not available, normalizing event"),t.requestAnimationFrame=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(t){return e.fn[t]!==i&&e.fn[t].settings!==i},enabled:{modules:function(t){var n=[];return t=t||f.modules,e.each(t,function(e,t){r.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(t){var n=[];return t=t||f.modules,e.each(t,function(e,t){r.moduleExists(t)||n.push(t)}),n}},change:{setting:function(t,n,o,a){o="string"==typeof o?"all"===o?f.modules:[o]:o||f.modules,a=a===i||a,e.each(o,function(i,o){var s,l=!r.moduleExists(o)||e.fn[o].settings.namespace||!1;r.moduleExists(o)&&(r.verbose("Changing default setting",t,n,o),e.fn[o].settings[t]=n,a&&l&&(s=e(":data(module-"+l+")"),s.length>0&&(r.verbose("Modifying existing settings",s),s[o]("setting",t,n))))})},settings:function(t,n,o){n="string"==typeof n?[n]:n||f.modules,o=o===i||o,e.each(n,function(n,i){var a;r.moduleExists(i)&&(r.verbose("Changing default setting",t,i),e.extend(!0,e.fn[i].settings,t),o&&p&&(a=e(":data(module-"+p+")"),a.length>0&&(r.verbose("Modifying existing settings",a),a[i]("setting",t))))})}},enable:{console:function(){r.console(!0)},debug:function(e,t){e=e||f.modules,r.debug("Enabling debug for modules",e),r.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||f.modules,r.debug("Enabling verbose debug for modules",e),r.change.setting("verbose",!0,e,t)}},disable:{console:function(){r.console(!1)},debug:function(e,t){e=e||f.modules,r.debug("Disabling debug for modules",e),r.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||f.modules,r.debug("Disabling verbose debug for modules",e),r.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(y.cache.console===i)return void r.error(h.console);r.debug("Restoring console function"),t.console=y.cache.console}else r.debug("Disabling console function"),y.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){r.verbose("Destroying previous site for",v),v.removeData(g)},cache:{},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,r,t);else{if(n===i)return r[t];r[t]=n}},debug:function(){f.debug&&(f.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,f.name+":"),r.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),r.verbose.apply(console,arguments)))},error:function(){r.error=Function.prototype.bind.call(console.error,console,f.name+":"),r.error.apply(console,arguments)},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Element:b,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(r.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,o){var s,l,c,u=y;return n=n||d,o=b||o,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var a=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[a])&&n!=s)u=u[a];else{if(u[a]!==i)return l=u[a],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(l=u[o],!1):(r.error(h.method,t),!1);u=u[o]}})),e.isFunction(l)?c=l.apply(o,n):l!==i&&(c=l),e.isArray(a)?a.push(c):a!==i?a=[a,c]:c!==i&&(a=c),l}},u?(y===i&&r.initialize(),r.invoke(c)):(y!==i&&r.destroy(),r.initialize()),a!==i?a:this},e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}})}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.form=function(t){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u=arguments[1],d="string"==typeof c,f=[].slice.call(arguments,1);return r.each(function(){var p,h,g,m,v,b,y,x,w,C,k,T,S,A,E,j,R,D,O=e(this),P=this,F=[],L=!1;D={initialize:function(){D.get.settings(),d?(R===i&&D.instantiate(),D.invoke(c)):(R!==i&&R.invoke("destroy"),D.verbose("Initializing form validation",O,x),D.bindEvents(),D.set.defaults(),D.instantiate())},instantiate:function(){D.verbose("Storing instance of module",D),R=D,O.data(E,D)},destroy:function(){D.verbose("Destroying previous module",R),D.removeEvents(),O.removeData(E)},refresh:function(){D.verbose("Refreshing selector cache"),p=O.find(k.field),h=O.find(k.group),g=O.find(k.message),m=O.find(k.prompt),v=O.find(k.submit),b=O.find(k.clear),y=O.find(k.reset)},submit:function(){D.verbose("Submitting form",O),O.submit()},attachEvents:function(t,n){n=n||"submit",e(t).on("click"+j,function(e){D[n](),e.preventDefault()})},bindEvents:function(){D.verbose("Attaching form events"),O.on("submit"+j,D.validate.form).on("blur"+j,k.field,D.event.field.blur).on("click"+j,k.submit,D.submit).on("click"+j,k.reset,D.reset).on("click"+j,k.clear,D.clear),x.keyboardShortcuts&&O.on("keydown"+j,k.field,D.event.field.keydown),p.each(function(){var t=e(this),n=t.prop("type"),i=D.get.changeEvent(n,t);e(this).on(i+j,D.event.field.change)})},clear:function(){p.each(function(){var t=e(this),n=t.parent(),i=t.closest(h),o=i.find(k.prompt),r=t.data(C.defaultValue)||"",a=n.is(k.uiCheckbox),s=n.is(k.uiDropdown),l=i.hasClass(T.error);l&&(D.verbose("Resetting error on field",i),i.removeClass(T.error),o.remove()),s?(D.verbose("Resetting dropdown value",n,r),n.dropdown("clear")):a?t.prop("checked",!1):(D.verbose("Resetting field value",t,r),t.val(""))})},reset:function(){p.each(function(){var t=e(this),n=t.parent(),o=t.closest(h),r=o.find(k.prompt),a=t.data(C.defaultValue),s=n.is(k.uiCheckbox),l=n.is(k.uiDropdown),c=o.hasClass(T.error);a!==i&&(c&&(D.verbose("Resetting error on field",o),o.removeClass(T.error),r.remove()),l?(D.verbose("Resetting dropdown value",n,a),n.dropdown("restore defaults")):s?(D.verbose("Resetting checkbox value",n,a),t.prop("checked",a)):(D.verbose("Resetting field value",t,a),t.val(a)))})},is:{bracketedRule:function(e){return e.type&&e.type.match(x.regExp.bracket)},empty:function(e){return!e||0===e.length||(e.is('input[type="checkbox"]')?!e.is(":checked"):D.is.blank(e))},blank:function(t){return""===e.trim(t.val())},valid:function(){var t=!0;return D.verbose("Checking if form is valid"),e.each(w,function(e,n){D.validate.field(n,e)||(t=!1)}),t}},removeEvents:function(){O.off(j),p.off(j),v.off(j),p.off(j)},event:{field:{keydown:function(t){var n=e(this),i=t.which,o=n.is(k.input),r=n.is(k.checkbox),a=n.closest(k.uiDropdown).length>0,s={enter:13,escape:27};i==s.escape&&(D.verbose("Escape key pressed blurring field"),n.blur()),t.ctrlKey||i!=s.enter||!o||a||r||(L||(n.one("keyup"+j,D.event.field.keyup),D.submit(),D.debug("Enter pressed on input submitting form")),L=!0)},keyup:function(){L=!1},blur:function(t){var n=e(this),i=n.closest(h),o=D.get.validation(n);i.hasClass(T.error)?(D.debug("Revalidating field",n,o),o&&D.validate.field(o)):"blur"!=x.on&&"change"!=x.on||o&&D.validate.field(o)},change:function(t){var n=e(this),i=n.closest(h),o=D.get.validation(n);("change"==x.on||i.hasClass(T.error)&&x.revalidate)&&(clearTimeout(D.timer),D.timer=setTimeout(function(){D.debug("Revalidating field",n,D.get.validation(n)),D.validate.field(o)},x.delay))}}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!D.is.bracketedRule(e))&&(e.value!==i?e.value:e.type.match(x.regExp.bracket)[1]+"")},ruleName:function(e){return D.is.bracketedRule(e)?e.type.replace(e.type.match(x.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":D.get.inputEvent()},inputEvent:function(){return n.createElement("input").oninput!==i?"input":n.createElement("input").onpropertychange!==i?"propertychange":"keyup"},prompt:function(e,t){var n,i,o,r=D.get.ruleName(e),a=D.get.ancillaryValue(e),s=e.prompt||x.prompt[r]||x.text.unspecifiedRule,l=s.search("{value}")!==-1,c=s.search("{name}")!==-1;return(c||l)&&(i=D.get.field(t.identifier)),l&&(s=s.replace("{value}",i.val())),c&&(n=i.closest(k.group).find("label").eq(0),o=1==n.length?n.text():i.prop("placeholder")||x.text.unspecifiedField,s=s.replace("{name}",o)),s=s.replace("{identifier}",t.identifier),s=s.replace("{ruleValue}",a),e.prompt||D.verbose("Using default validation prompt for type",s,r),s},settings:function(){if(e.isPlainObject(t)){var n,o=Object.keys(t),r=o.length>0&&t[o[0]].identifier!==i&&t[o[0]].rules!==i;r?(x=e.extend(!0,{},e.fn.form.settings,u),w=e.extend({},e.fn.form.settings.defaults,t),D.error(x.error.oldSyntax,P),D.verbose("Extending settings from legacy parameters",w,x)):(t.fields&&(n=Object.keys(t.fields),("string"==typeof t.fields[n[0]]||e.isArray(t.fields[n[0]]))&&e.each(t.fields,function(n,i){"string"==typeof i&&(i=[i]),t.fields[n]={rules:[]},e.each(i,function(e,i){t.fields[n].rules.push({type:i})})})),x=e.extend(!0,{},e.fn.form.settings,t),w=e.extend({},e.fn.form.settings.defaults,x.fields),D.verbose("Extending settings",w,x))}else x=e.fn.form.settings,w=e.fn.form.settings.defaults,D.verbose("Using default form validation",w,x);A=x.namespace,C=x.metadata,k=x.selector,T=x.className,S=x.error,E="module-"+A,j="."+A,R=O.data(E),D.refresh()},field:function(t){return D.verbose("Finding field with identifier",t),p.filter("#"+t).length>0?p.filter("#"+t):p.filter('[name="'+t+'"]').length>0?p.filter('[name="'+t+'"]'):p.filter('[name="'+t+'[]"]').length>0?p.filter('[name="'+t+'[]"]'):p.filter("[data-"+C.validate+'="'+t+'"]').length>0?p.filter("[data-"+C.validate+'="'+t+'"]'):e("<input/>")},fields:function(t){var n=e();return e.each(t,function(e,t){n=n.add(D.get.field(t))}),n},validation:function(t){var n,i;return!!w&&(e.each(w,function(e,o){i=o.identifier||e,D.get.field(i)[0]==t[0]&&(o.identifier=i,n=o)}),n||!1)},value:function(e){var t,n=[];return n.push(e),t=D.get.values.call(P,n),t[e]},values:function(t){var n=e.isArray(t)?D.get.fields(t):p,i={};return n.each(function(t,n){var o=e(n),r=(o.prop("type"),o.prop("name")),a=o.val(),s=o.is(k.checkbox),l=o.is(k.radio),c=r.indexOf("[]")!==-1,u=!!s&&o.is(":checked");r&&(c?(r=r.replace("[]",""),i[r]||(i[r]=[]),s?u?i[r].push(a||!0):i[r].push(!1):i[r].push(a)):l?u&&(i[r]=a):s?u?i[r]=a||!0:i[r]=!1:i[r]=a)}),i}},has:{field:function(e){return D.verbose("Checking for existence of a field with identifier",e),"string"!=typeof e&&D.error(S.identifier,e),p.filter("#"+e).length>0||p.filter('[name="'+e+'"]').length>0||p.filter("[data-"+C.validate+'="'+e+'"]').length>0}},add:{prompt:function(t,n){var o=D.get.field(t),r=o.closest(h),a=r.children(k.prompt),s=0!==a.length;n="string"==typeof n?[n]:n,D.verbose("Adding field error state",t),r.addClass(T.error),x.inline&&(s||(a=x.templates.prompt(n),a.appendTo(r)),a.html(n[0]),s?D.verbose("Inline errors are disabled, no inline error added",t):x.transition&&e.fn.transition!==i&&O.transition("is supported")?(D.verbose("Displaying error with css transition",x.transition),a.transition(x.transition+" in",x.duration)):(D.verbose("Displaying error with fallback javascript animation"),a.fadeIn(x.duration)))},errors:function(e){D.debug("Adding form error messages",e),D.set.error(),g.html(x.templates.error(e))}},remove:{prompt:function(t){var n=D.get.field(t),o=n.closest(h),r=o.children(k.prompt);o.removeClass(T.error),x.inline&&r.is(":visible")&&(D.verbose("Removing prompt for field",t),x.transition&&e.fn.transition!==i&&O.transition("is supported")?r.transition(x.transition+" out",x.duration,function(){r.remove()}):r.fadeOut(x.duration,function(){r.remove()}))}},set:{success:function(){O.removeClass(T.error).addClass(T.success)},defaults:function(){p.each(function(){var t=e(this),n=t.filter(k.checkbox).length>0,i=n?t.is(":checked"):t.val();t.data(C.defaultValue,i)})},error:function(){O.removeClass(T.success).addClass(T.error)},value:function(e,t){var n={};return n[e]=t,D.set.values.call(P,n)},values:function(t){e.isEmptyObject(t)||e.each(t,function(t,n){var i,o=D.get.field(t),r=o.parent(),a=e.isArray(n),s=r.is(k.uiCheckbox),l=r.is(k.uiDropdown),c=o.is(k.radio)&&s,u=o.length>0;u&&(a&&s?(D.verbose("Selecting multiple",n,o),r.checkbox("uncheck"),e.each(n,function(e,t){i=o.filter('[value="'+t+'"]'),r=i.parent(),i.length>0&&r.checkbox("check")})):c?(D.verbose("Selecting radio value",n,o),o.filter('[value="'+n+'"]').parent(k.uiCheckbox).checkbox("check")):s?(D.verbose("Setting checkbox value",n,r),n===!0?r.checkbox("check"):r.checkbox("uncheck")):l?(D.verbose("Setting dropdown value",n,r),r.dropdown("set selected",n)):(D.verbose("Setting field value",n,o),o.val(n)))})}},validate:{form:function(e,t){var n=D.get.values();if(L)return!1;if(F=[],D.is.valid()){if(D.debug("Form has no validation errors, submitting"),D.set.success(),t!==!0)return x.onSuccess.call(P,e,n)}else if(D.debug("Form has errors"),D.set.error(),x.inline||D.add.errors(F),O.data("moduleApi")!==i&&e.stopImmediatePropagation(),t!==!0)return x.onFailure.call(P,F,n)},field:function(t,n){var o=t.identifier||n,r=D.get.field(o),a=!!t.depends&&D.get.field(t.depends),s=!0,l=[];return t.identifier||(D.debug("Using field name as identifier",o),t.identifier=o),r.prop("disabled")?(D.debug("Field is disabled. Skipping",o),s=!0):t.optional&&D.is.blank(r)?(D.debug("Field is optional and blank. Skipping",o),s=!0):t.depends&&D.is.empty(a)?(D.debug("Field depends on another value that is not present or empty. Skipping",a),s=!0):t.rules!==i&&e.each(t.rules,function(e,n){D.has.field(o)&&!D.validate.rule(t,n)&&(D.debug("Field is invalid",o,n.type),l.push(D.get.prompt(n,t)),s=!1)}),s?(D.remove.prompt(o,l),x.onValid.call(r),!0):(F=F.concat(l),D.add.prompt(o,l),x.onInvalid.call(r,l),!1)},rule:function(t,n){var o=D.get.field(t.identifier),r=(n.type,o.val()),a=D.get.ancillaryValue(n),s=D.get.ruleName(n),l=x.rules[s];return e.isFunction(l)?(r=r===i||""===r||null===r?"":e.trim(r+""),l.call(o,r,a)):void D.error(S.noRule,s)}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,x,t);else{if(n===i)return x[t];x[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,D,t);else{if(n===i)return D[t];D[t]=n}},debug:function(){!x.silent&&x.debug&&(x.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,x.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!x.silent&&x.verbose&&x.debug&&(x.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,x.name+":"),D.verbose.apply(console,arguments)))},error:function(){x.silent||(D.error=Function.prototype.bind.call(console.error,console,x.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;x.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){var t=x.name+":",n=0;s=!1,clearTimeout(D.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,r){var a,s,l,c=R;return n=n||f,r=P||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},D.initialize()}),o!==i?o:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},regExp:{bracket:/\[(.*)\]/i,decimal:/^\d*(\.)\d+/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field"},prompt:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} cannot contain "{ruleValue}"',containExactly:'{name} cannot contain exactly "{ruleValue}"',doesntContain:'{name} must contain "{ruleValue}"',doesntContainExactly:'{name} must contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically."},templates:{error:function(t){var n='<ul class="list">';return e.each(t,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>",e(n)},prompt:function(t){return e("<div/>").addClass("ui basic red pointing prompt label").html(t[0])}},rules:{empty:function(t){return!(t===i||""===t||e.isArray(t)&&0===t.length)},checked:function(){return e(this).filter(":checked").length>0},email:function(t){return e.fn.form.settings.regExp.email.test(t)},url:function(t){return e.fn.form.settings.regExp.url.test(t)},regExp:function(t,n){if(n instanceof RegExp)return t.match(n);var i,o=n.match(e.fn.form.settings.regExp.flags);return o&&(n=o.length>=2?o[1]:n,i=o.length>=3?o[2]:""),t.match(new RegExp(n,i))},integer:function(t,n){var o,r,a,s=e.fn.form.settings.regExp.integer;return n&&["",".."].indexOf(n)===-1&&(n.indexOf("..")==-1?s.test(n)&&(o=r=n-0):(a=n.split("..",2),s.test(a[0])&&(o=a[0]-0),s.test(a[1])&&(r=a[1]-0))),s.test(t)&&(o===i||t>=o)&&(r===i||t<=r)},decimal:function(t){return e.fn.form.settings.regExp.decimal.test(t)},number:function(t){return e.fn.form.settings.regExp.number.test(t)},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,e="string"==typeof e?e.toLowerCase():e,e==t},isExactly:function(e,t){return e==t},not:function(e,t){return e="string"==typeof e?e.toLowerCase():e,t="string"==typeof t?t.toLowerCase():t,e!=t},notExactly:function(e,t){return e!=t},contains:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n,"i"))!==-1},containsExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n))!==-1},doesntContain:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n,"i"))===-1},doesntContainExactly:function(t,n){return n=n.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(n))===-1},minLength:function(e,t){return e!==i&&e.length>=t},length:function(e,t){return e!==i&&e.length>=t},exactLength:function(e,t){return e!==i&&e.length==t},maxLength:function(e,t){return e!==i&&e.length<=t},match:function(t,n){var o;return e(this),e('[data-validate="'+n+'"]').length>0?o=e('[data-validate="'+n+'"]').val():e("#"+n).length>0?o=e("#"+n).val():e('[name="'+n+'"]').length>0?o=e('[name="'+n+'"]').val():e('[name="'+n+'[]"]').length>0&&(o=e('[name="'+n+'[]"]')),o!==i&&t.toString()==o.toString()},different:function(t,n){var o;return e(this),e('[data-validate="'+n+'"]').length>0?o=e('[data-validate="'+n+'"]').val():e("#"+n).length>0?o=e("#"+n).val():e('[name="'+n+'"]').length>0?o=e('[name="'+n+'"]').val():e('[name="'+n+'[]"]').length>0&&(o=e('[name="'+n+'[]"]')),o!==i&&t.toString()!==o.toString()},creditCard:function(t,n){var i,o,r={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},a={},s=!1,l="string"==typeof n&&n.split(",");if("string"==typeof t&&0!==t.length){if(l&&(e.each(l,function(n,i){o=r[i],o&&(a={length:e.inArray(t.length,o.length)!==-1,pattern:t.search(o.pattern)!==-1},a.length&&a.pattern&&(s=!0))}),!s))return!1;if(i={number:e.inArray(t.length,r.unionPay.length)!==-1,pattern:t.search(r.unionPay.pattern)!==-1},i.number&&i.pattern)return!0;for(var c=t.length,u=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],f=0;c--;)f+=d[u][parseInt(t.charAt(c),10)],u^=1;return f%10===0&&f>0}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&e.search(",")===-1:e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?e.search(",")===-1:e.split(",").length<=t)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.accordion=function(n){var o,r=e(this),a=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);return t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},r.each(function(){var d,f,p=e.isPlainObject(n)?e.extend(!0,{},e.fn.accordion.settings,n):e.extend({},e.fn.accordion.settings),h=p.className,g=p.namespace,m=p.selector,v=p.error,b="."+g,y="module-"+g,x=r.selector||"",w=e(this),C=w.find(m.title),k=w.find(m.content),T=this,S=w.data(y);f={initialize:function(){f.debug("Initializing",w),f.bind.events(),p.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){S=f,w.data(y,f)},destroy:function(){f.debug("Destroying previous instance",w),w.off(b).removeData(y)},refresh:function(){C=w.find(m.title),k=w.find(m.content)},observeChanges:function(){"MutationObserver"in t&&(d=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()}),d.observe(T,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",d))},bind:{events:function(){f.debug("Binding delegated events"),w.on(p.on+b,m.trigger,f.event.click)}},event:{click:function(){f.toggle.call(this)}},toggle:function(t){var n=t!==i?"number"==typeof t?C.eq(t):e(t).closest(m.title):e(this).closest(m.title),o=n.next(k),r=o.hasClass(h.animating),a=o.hasClass(h.active),s=a&&!r,l=!a&&r;f.debug("Toggling visibility of content",n),s||l?p.collapsible?f.close.call(n):f.debug("Cannot close accordion content collapsing is disabled"):f.open.call(n)},open:function(t){var n=t!==i?"number"==typeof t?C.eq(t):e(t).closest(m.title):e(this).closest(m.title),o=n.next(k),r=o.hasClass(h.animating),a=o.hasClass(h.active),s=a||r;return s?void f.debug("Accordion already open, skipping",o):(f.debug("Opening accordion content",n),p.onOpening.call(o),p.exclusive&&f.closeOthers.call(n),n.addClass(h.active),o.stop(!0,!0).addClass(h.animating),p.animateChildren&&(e.fn.transition!==i&&w.transition("is supported")?o.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:p.debug,verbose:p.verbose,duration:p.duration}):o.children().stop(!0,!0).animate({opacity:1},p.duration,f.resetOpacity)),void o.slideDown(p.duration,p.easing,function(){o.removeClass(h.animating).addClass(h.active),f.reset.display.call(this),p.onOpen.call(this),p.onChange.call(this)}))},close:function(t){var n=t!==i?"number"==typeof t?C.eq(t):e(t).closest(m.title):e(this).closest(m.title),o=n.next(k),r=o.hasClass(h.animating),a=o.hasClass(h.active),s=!a&&r,l=a&&r;!a&&!s||l||(f.debug("Closing accordion content",o),p.onClosing.call(o),n.removeClass(h.active),o.stop(!0,!0).addClass(h.animating),p.animateChildren&&(e.fn.transition!==i&&w.transition("is supported")?o.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:p.debug,verbose:p.verbose,duration:p.duration}):o.children().stop(!0,!0).animate({opacity:0},p.duration,f.resetOpacity)),o.slideUp(p.duration,p.easing,function(){o.removeClass(h.animating).removeClass(h.active),f.reset.display.call(this),p.onClose.call(this),p.onChange.call(this)}))},closeOthers:function(t){var n,o,r,a=t!==i?C.eq(t):e(this).closest(m.title),s=a.parents(m.content).prev(m.title),l=a.closest(m.accordion),c=m.title+"."+h.active+":visible",u=m.content+"."+h.active+":visible";p.closeNested?(n=l.find(c).not(s),r=n.next(k)):(n=l.find(c).not(s),o=l.find(u).find(c).not(s),n=n.not(o),r=n.next(k)),n.length>0&&(f.debug("Exclusive enabled, closing other content",n),n.removeClass(h.active),r.removeClass(h.animating).stop(!0,!0),p.animateChildren&&(e.fn.transition!==i&&w.transition("is supported")?r.children().transition({animation:"fade out",useFailSafe:!0,debug:p.debug,verbose:p.verbose,duration:p.duration}):r.children().stop(!0,!0).animate({opacity:0},p.duration,f.resetOpacity)),r.slideUp(p.duration,p.easing,function(){e(this).removeClass(h.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];e.isPlainObject(p[t])?e.extend(!0,p[t],n):p[t]=n}},internal:function(t,n){return f.debug("Changing internal",t,n),n===i?f[t]:void(e.isPlainObject(t)?e.extend(!0,f,t):f[t]=n)},debug:function(){!p.silent&&p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){p.silent||(f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;p.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=p.name+":",n=0;a=!1,clearTimeout(f.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",x&&(t+=" '"+x+"'"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,r){var a,s,l,c=S;return n=n||u,r=T||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(f.error(v.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},c?(S===i&&f.initialize(),f.invoke(l)):(S!==i&&S.invoke("destroy"),f.initialize())}),o!==i?o:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onOpen:function(){},onClosing:function(){},
onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.checkbox=function(o){var r,a=e(this),s=a.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return a.each(function(){var a,p,h=e.extend(!0,{},e.fn.checkbox.settings,o),g=h.className,m=h.namespace,v=h.selector,b=h.error,y="."+m,x="module-"+m,w=e(this),C=e(this).children(v.label),k=e(this).children(v.input),T=k[0],S=!1,A=!1,E=w.data(x),j=this;p={initialize:function(){p.verbose("Initializing checkbox",h),p.create.label(),p.bind.events(),p.set.tabbable(),p.hide.input(),p.observeChanges(),p.instantiate(),p.setup()},instantiate:function(){p.verbose("Storing instance of module",p),E=p,w.data(x,p)},destroy:function(){p.verbose("Destroying module"),p.unbind.events(),p.show.input(),w.removeData(x)},fix:{reference:function(){w.is(v.input)&&(p.debug("Behavior called on <input> adjusting invoked element"),w=w.closest(v.checkbox),p.refresh())}},setup:function(){p.set.initialLoad(),p.is.indeterminate()?(p.debug("Initial value is indeterminate"),p.indeterminate()):p.is.checked()?(p.debug("Initial value is checked"),p.check()):(p.debug("Initial value is unchecked"),p.uncheck()),p.remove.initialLoad()},refresh:function(){C=w.children(v.label),k=w.children(v.input),T=k[0]},hide:{input:function(){p.verbose("Modifying <input> z-index to be unselectable"),k.addClass(g.hidden)}},show:{input:function(){p.verbose("Modifying <input> z-index to be selectable"),k.removeClass(g.hidden)}},observeChanges:function(){"MutationObserver"in t&&(a=new MutationObserver(function(e){p.debug("DOM tree modified, updating selector cache"),p.refresh()}),a.observe(j,{childList:!0,subtree:!0}),p.debug("Setting up mutation observer",a))},attachEvents:function(t,n){var i=e(t);n=e.isFunction(p[n])?p[n]:p.toggle,i.length>0?(p.debug("Attaching checkbox events to element",t,n),i.on("click"+y,n)):p.error(b.notFound)},event:{click:function(t){var n=e(t.target);return n.is(v.input)?void p.verbose("Using default check action on initialized checkbox"):n.is(v.link)?void p.debug("Clicking link inside checkbox, skipping toggle"):(p.toggle(),k.focus(),void t.preventDefault())},keydown:function(e){var t=e.which,n={enter:13,space:32,escape:27};t==n.escape?(p.verbose("Escape key pressed blurring field"),k.blur(),A=!0):e.ctrlKey||t!=n.space&&t!=n.enter?A=!1:(p.verbose("Enter/space key pressed, toggling checkbox"),p.toggle(),A=!0)},keyup:function(e){A&&e.preventDefault()}},check:function(){p.should.allowCheck()&&(p.debug("Checking checkbox",k),p.set.checked(),p.should.ignoreCallbacks()||(h.onChecked.call(T),h.onChange.call(T)))},uncheck:function(){p.should.allowUncheck()&&(p.debug("Unchecking checkbox"),p.set.unchecked(),p.should.ignoreCallbacks()||(h.onUnchecked.call(T),h.onChange.call(T)))},indeterminate:function(){return p.should.allowIndeterminate()?void p.debug("Checkbox is already indeterminate"):(p.debug("Making checkbox indeterminate"),p.set.indeterminate(),void(p.should.ignoreCallbacks()||(h.onIndeterminate.call(T),h.onChange.call(T))))},determinate:function(){return p.should.allowDeterminate()?void p.debug("Checkbox is already determinate"):(p.debug("Making checkbox determinate"),p.set.determinate(),void(p.should.ignoreCallbacks()||(h.onDeterminate.call(T),h.onChange.call(T))))},enable:function(){return p.is.enabled()?void p.debug("Checkbox is already enabled"):(p.debug("Enabling checkbox"),p.set.enabled(),h.onEnable.call(T),void h.onEnabled.call(T))},disable:function(){return p.is.disabled()?void p.debug("Checkbox is already disabled"):(p.debug("Disabling checkbox"),p.set.disabled(),h.onDisable.call(T),void h.onDisabled.call(T))},get:{radios:function(){var t=p.get.name();return e('input[name="'+t+'"]').closest(v.checkbox)},otherRadios:function(){return p.get.radios().not(w)},name:function(){return k.attr("name")}},is:{initialLoad:function(){return S},radio:function(){return k.hasClass(g.radio)||"radio"==k.attr("type")},indeterminate:function(){return k.prop("indeterminate")!==i&&k.prop("indeterminate")},checked:function(){return k.prop("checked")!==i&&k.prop("checked")},disabled:function(){return k.prop("disabled")!==i&&k.prop("disabled")},enabled:function(){return!p.is.disabled()},determinate:function(){return!p.is.indeterminate()},unchecked:function(){return!p.is.checked()}},should:{allowCheck:function(){return p.is.determinate()&&p.is.checked()&&!p.should.forceCallbacks()?(p.debug("Should not allow check, checkbox is already checked"),!1):h.beforeChecked.apply(T)!==!1||(p.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return p.is.determinate()&&p.is.unchecked()&&!p.should.forceCallbacks()?(p.debug("Should not allow uncheck, checkbox is already unchecked"),!1):h.beforeUnchecked.apply(T)!==!1||(p.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return p.is.indeterminate()&&!p.should.forceCallbacks()?(p.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):h.beforeIndeterminate.apply(T)!==!1||(p.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return p.is.determinate()&&!p.should.forceCallbacks()?(p.debug("Should not allow determinate, checkbox is already determinate"),!1):h.beforeDeterminate.apply(T)!==!1||(p.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return p.is.initialLoad()&&h.fireOnInit},ignoreCallbacks:function(){return S&&!h.fireOnInit}},can:{change:function(){return!(w.hasClass(g.disabled)||w.hasClass(g.readOnly)||k.prop("disabled")||k.prop("readonly"))},uncheck:function(){return"boolean"==typeof h.uncheckable?h.uncheckable:!p.is.radio()}},set:{initialLoad:function(){S=!0},checked:function(){return p.verbose("Setting class to checked"),w.removeClass(g.indeterminate).addClass(g.checked),p.is.radio()&&p.uncheckOthers(),!p.is.indeterminate()&&p.is.checked()?void p.debug("Input is already checked, skipping input property change"):(p.verbose("Setting state to checked",T),k.prop("indeterminate",!1).prop("checked",!0),void p.trigger.change())},unchecked:function(){return p.verbose("Removing checked class"),w.removeClass(g.indeterminate).removeClass(g.checked),!p.is.indeterminate()&&p.is.unchecked()?void p.debug("Input is already unchecked"):(p.debug("Setting state to unchecked"),k.prop("indeterminate",!1).prop("checked",!1),void p.trigger.change())},indeterminate:function(){return p.verbose("Setting class to indeterminate"),w.addClass(g.indeterminate),p.is.indeterminate()?void p.debug("Input is already indeterminate, skipping input property change"):(p.debug("Setting state to indeterminate"),k.prop("indeterminate",!0),void p.trigger.change())},determinate:function(){return p.verbose("Removing indeterminate class"),w.removeClass(g.indeterminate),p.is.determinate()?void p.debug("Input is already determinate, skipping input property change"):(p.debug("Setting state to determinate"),void k.prop("indeterminate",!1))},disabled:function(){return p.verbose("Setting class to disabled"),w.addClass(g.disabled),p.is.disabled()?void p.debug("Input is already disabled, skipping input property change"):(p.debug("Setting state to disabled"),k.prop("disabled","disabled"),void p.trigger.change())},enabled:function(){return p.verbose("Removing disabled class"),w.removeClass(g.disabled),p.is.enabled()?void p.debug("Input is already enabled, skipping input property change"):(p.debug("Setting state to enabled"),k.prop("disabled",!1),void p.trigger.change())},tabbable:function(){p.verbose("Adding tabindex to checkbox"),k.attr("tabindex")===i&&k.attr("tabindex",0)}},remove:{initialLoad:function(){S=!1}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=k[0];t&&(p.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){k.prevAll(v.label).length>0?(k.prev(v.label).detach().insertAfter(k),p.debug("Moving existing label",C)):p.has.label()||(C=e("<label>").insertAfter(k),p.debug("Creating label",C))}},has:{label:function(){return C.length>0}},bind:{events:function(){p.verbose("Attaching checkbox events"),w.on("click"+y,p.event.click).on("keydown"+y,v.input,p.event.keydown).on("keyup"+y,v.input,p.event.keyup)}},unbind:{events:function(){p.debug("Removing events"),w.off(y)}},uncheckOthers:function(){var e=p.get.otherRadios();p.debug("Unchecking other radios",e),e.removeClass(g.checked)},toggle:function(){return p.can.change()?void(p.is.indeterminate()||p.is.unchecked()?(p.debug("Currently unchecked"),p.check()):p.is.checked()&&p.can.uncheck()&&(p.debug("Currently checked"),p.uncheck())):void(p.is.radio()||p.debug("Checkbox is read-only or disabled, ignoring toggle"))},setting:function(t,n){if(p.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];e.isPlainObject(h[t])?e.extend(!0,h[t],n):h[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},debug:function(){!h.silent&&h.debug&&(h.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,h.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),p.verbose.apply(console,arguments)))},error:function(){h.silent||(p.error=Function.prototype.bind.call(console.error,console,h.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;h.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:j,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var t=h.name+":",n=0;l=!1,clearTimeout(p.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var a,s,l,c=E;return n=n||f,o=j||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(p.error(b.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},d?(E===i&&p.initialize(),p.invoke(u)):(E!==i&&E.invoke("destroy"),p.initialize())}),r!==i?r:this},e.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!1,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dimmer=function(t){var o,r=e(this),a=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);return r.each(function(){var d,f,p,h=e.isPlainObject(t)?e.extend(!0,{},e.fn.dimmer.settings,t):e.extend({},e.fn.dimmer.settings),g=h.selector,m=h.namespace,v=h.className,b=h.error,y="."+m,x="module-"+m,w=r.selector||"",C="ontouchstart"in n.documentElement?"touchstart":"click",k=e(this),T=this,S=k.data(x);p={preinitialize:function(){p.is.dimmer()?(f=k.parent(),d=k):(f=k,d=p.has.dimmer()?h.dimmerName?f.find(g.dimmer).filter("."+h.dimmerName):f.find(g.dimmer):p.create(),p.set.variation())},initialize:function(){p.debug("Initializing dimmer",h),p.bind.events(),p.set.dimmable(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),S=p,k.data(x,S)},destroy:function(){p.verbose("Destroying previous module",d),p.unbind.events(),p.remove.variation(),f.off(y)},bind:{events:function(){"hover"==h.on?f.on("mouseenter"+y,p.show).on("mouseleave"+y,p.hide):"click"==h.on&&f.on(C+y,p.toggle),p.is.page()&&(p.debug("Setting as a page dimmer",f),p.set.pageDimmer()),p.is.closable()&&(p.verbose("Adding dimmer close event",d),f.on(C+y,g.dimmer,p.event.click))}},unbind:{events:function(){k.removeData(x),f.off(y)}},event:{click:function(t){p.verbose("Determining if event occured on dimmer",t),(0===d.find(t.target).length||e(t.target).is(g.content))&&(p.hide(),t.stopImmediatePropagation())}},addContent:function(t){var n=e(t);p.debug("Add content to dimmer",n),n.parent()[0]!==d[0]&&n.detach().appendTo(d)},create:function(){var t=e(h.template.dimmer());return h.dimmerName&&(p.debug("Creating named dimmer",h.dimmerName),t.addClass(h.dimmerName)),t.appendTo(f),t},show:function(t){t=e.isFunction(t)?t:function(){},p.debug("Showing dimmer",d,h),p.is.dimmed()&&!p.is.animating()||!p.is.enabled()?p.debug("Dimmer is already shown or disabled"):(p.animate.show(t),h.onShow.call(T),h.onChange.call(T))},hide:function(t){t=e.isFunction(t)?t:function(){},p.is.dimmed()||p.is.animating()?(p.debug("Hiding dimmer",d),p.animate.hide(t),h.onHide.call(T),h.onChange.call(T)):p.debug("Dimmer is not visible")},toggle:function(){p.verbose("Toggling dimmer visibility",d),p.is.dimmed()?p.hide():p.show()},animate:{show:function(t){t=e.isFunction(t)?t:function(){},h.useCSS&&e.fn.transition!==i&&d.transition("is supported")?("auto"!==h.opacity&&p.set.opacity(),d.transition({animation:h.transition+" in",queue:!1,duration:p.get.duration(),useFailSafe:!0,onStart:function(){p.set.dimmed()},onComplete:function(){p.set.active(),t()}})):(p.verbose("Showing dimmer animation with javascript"),p.set.dimmed(),"auto"==h.opacity&&(h.opacity=.8),d.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(p.get.duration(),h.opacity,function(){d.removeAttr("style"),p.set.active(),t()}))},hide:function(t){t=e.isFunction(t)?t:function(){},h.useCSS&&e.fn.transition!==i&&d.transition("is supported")?(p.verbose("Hiding dimmer with css"),d.transition({animation:h.transition+" out",queue:!1,duration:p.get.duration(),useFailSafe:!0,onStart:function(){p.remove.dimmed()},onComplete:function(){p.remove.active(),t()}})):(p.verbose("Hiding dimmer with javascript"),p.remove.dimmed(),d.stop().fadeOut(p.get.duration(),function(){p.remove.active(),d.removeAttr("style"),t()}))}},get:{dimmer:function(){return d},duration:function(){return"object"==typeof h.duration?p.is.active()?h.duration.hide:h.duration.show:h.duration}},has:{dimmer:function(){return h.dimmerName?k.find(g.dimmer).filter("."+h.dimmerName).length>0:k.find(g.dimmer).length>0}},is:{active:function(){return d.hasClass(v.active)},animating:function(){return d.is(":animated")||d.hasClass(v.animating)},closable:function(){return"auto"==h.closable?"hover"!=h.on:h.closable},dimmer:function(){return k.hasClass(v.dimmer)},dimmable:function(){return k.hasClass(v.dimmable)},dimmed:function(){return f.hasClass(v.dimmed)},disabled:function(){return f.hasClass(v.disabled)},enabled:function(){return!p.is.disabled()},page:function(){return f.is("body")},pageDimmer:function(){return d.hasClass(v.pageDimmer)}},can:{show:function(){return!d.hasClass(v.disabled)}},set:{opacity:function(e){var t=d.css("background-color"),n=t.split(","),i=n&&3==n.length,o=n&&4==n.length;e=0===h.opacity?0:h.opacity||e,i||o?(n[3]=e+")",t=n.join(",")):t="rgba(0, 0, 0, "+e+")",p.debug("Setting opacity to",e),d.css("background-color",t)},active:function(){d.addClass(v.active)},dimmable:function(){f.addClass(v.dimmable)},dimmed:function(){f.addClass(v.dimmed)},pageDimmer:function(){d.addClass(v.pageDimmer)},disabled:function(){d.addClass(v.disabled)},variation:function(e){e=e||h.variation,e&&d.addClass(e)}},remove:{active:function(){d.removeClass(v.active)},dimmed:function(){f.removeClass(v.dimmed)},disabled:function(){d.removeClass(v.disabled)},variation:function(e){e=e||h.variation,e&&d.removeClass(e)}},setting:function(t,n){if(p.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];e.isPlainObject(h[t])?e.extend(!0,h[t],n):h[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},debug:function(){!h.silent&&h.debug&&(h.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,h.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),p.verbose.apply(console,arguments)))},error:function(){h.silent||(p.error=Function.prototype.bind.call(console.error,console,h.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;h.performance&&(t=(new Date).getTime(),i=a||t,n=t-i,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var t=h.name+":",n=0;a=!1,clearTimeout(p.performance.timer),e.each(s,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",w&&(t+=" '"+w+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,n,r){var a,s,l,c=S;return n=n||u,r=T||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(p.error(b.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},p.preinitialize(),c?(S===i&&p.initialize(),p.invoke(l)):(S!==i&&S.invoke("destroy"),p.initialize())}),o!==i?o:this},e.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return e("<div />").attr("class","ui dimmer")}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(o){var r,a=e(this),s=e(n),l=a.selector||"",c="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],f=arguments[0],p="string"==typeof f,h=[].slice.call(arguments,1);return a.each(function(g){var m,v,b,y,x,w,C,k,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.dropdown.settings,o):e.extend({},e.fn.dropdown.settings),S=T.className,A=T.message,E=T.fields,j=T.keys,R=T.metadata,D=T.namespace,O=T.regExp,P=T.selector,F=T.error,L=T.templates,q="."+D,N="module-"+D,M=e(this),I=e(T.context),H=M.find(P.text),$=M.find(P.search),z=M.find(P.sizer),U=M.find(P.input),V=M.find(P.icon),W=M.prev().find(P.text).length>0?M.prev().find(P.text):M.prev(),B=M.children(P.menu),_=B.find(P.item),K=!1,X=!1,Q=!1,J=this,G=M.data(N);k={initialize:function(){k.debug("Initializing dropdown",T),k.is.alreadySetup()?k.setup.reference():(k.setup.layout(),k.refreshData(),k.save.defaults(),k.restore.selected(),k.create.id(),k.bind.events(),k.observeChanges(),k.instantiate())},instantiate:function(){k.verbose("Storing instance of dropdown",k),G=k,M.data(N,k)},destroy:function(){k.verbose("Destroying previous dropdown",M),k.remove.tabbable(),M.off(q).removeData(N),B.off(q),s.off(y),k.disconnect.menuObserver(),k.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(w=new MutationObserver(k.event.select.mutation),C=new MutationObserver(k.event.menu.mutation),k.debug("Setting up mutation observer",w,C),k.observe.select(),k.observe.menu())},disconnect:{menuObserver:function(){C&&C.disconnect()},selectObserver:function(){w&&w.disconnect()}},observe:{select:function(){k.has.input()&&w.observe(U[0],{childList:!0,subtree:!0})},menu:function(){k.has.menu()&&C.observe(B[0],{childList:!0,subtree:!0})}},create:{id:function(){x=(Math.random().toString(16)+"000000000").substr(2,8),y="."+x,k.verbose("Creating unique id for element",x)},userChoice:function(t){var n,o,r;return!!(t=t||k.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,function(t,a){k.get.item(a)===!1&&(r=T.templates.addition(k.add.variables(A.addResult,a)),o=e("<div />").html(r).attr("data-"+R.value,a).attr("data-"+R.text,a).addClass(S.addition).addClass(S.item),T.hideAdditions&&o.addClass(S.hidden),n=n===i?o:n.add(o),k.verbose("Creating user choices for value",a,o))}),n)},userLabels:function(t){var n=k.get.userValues();n&&(k.debug("Adding user labels",n),e.each(n,function(e,t){k.verbose("Adding custom user value"),k.add.label(t,t)}))},menu:function(){B=e("<div />").addClass(S.menu).appendTo(M)},sizer:function(){z=e("<span />").addClass(S.sizer).insertAfter($)}},search:function(e){e=e!==i?e:k.get.query(),k.verbose("Searching for query",e),k.has.minCharacters(e)?k.filter(e):k.hide()},select:{firstUnfiltered:function(){k.verbose("Selecting first non-filtered element"),k.remove.selectedItem(),_.not(P.unselectable).not(P.addition+P.hidden).eq(0).addClass(S.selected)},nextAvailable:function(e){e=e.eq(0);var t=e.nextAll(P.item).not(P.unselectable).eq(0),n=e.prevAll(P.item).not(P.unselectable).eq(0),i=t.length>0;i?(k.verbose("Moving selection to",t),t.addClass(S.selected)):(k.verbose("Moving selection to",n),n.addClass(S.selected))}},setup:{api:function(){var e={debug:T.debug,urlData:{value:k.get.value(),query:k.get.query()},on:!1};k.verbose("First request, initializing API"),M.api(e)},layout:function(){M.is("select")&&(k.setup.select(),k.setup.returnedObject()),k.has.menu()||k.create.menu(),k.is.search()&&!k.has.search()&&(k.verbose("Adding search input"),$=e("<input />").addClass(S.search).prop("autocomplete","off").insertBefore(H)),k.is.multiple()&&k.is.searchSelection()&&!k.has.sizer()&&k.create.sizer(),T.allowTab&&k.set.tabbable()},select:function(){var t=k.get.selectValues();k.debug("Dropdown initialized on a select",t),M.is("select")&&(U=M),U.parent(P.dropdown).length>0?(k.debug("UI dropdown already exists. Creating dropdown menu only"),M=U.closest(P.dropdown),k.has.menu()||k.create.menu(),B=M.children(P.menu),k.setup.menu(t)):(k.debug("Creating entire dropdown from select"),M=e("<div />").attr("class",U.attr("class")).addClass(S.selection).addClass(S.dropdown).html(L.dropdown(t)).insertBefore(U),U.hasClass(S.multiple)&&U.prop("multiple")===!1&&(k.error(F.missingMultiple),U.prop("multiple",!0)),U.is("[multiple]")&&k.set.multiple(),U.prop("disabled")&&(k.debug("Disabling dropdown"),M.addClass(S.disabled)),U.removeAttr("class").detach().prependTo(M)),k.refresh()},menu:function(e){B.html(L.menu(e,E)),_=B.find(P.item)},reference:function(){k.debug("Dropdown behavior was called on select, replacing with closest dropdown"),M=M.parent(P.dropdown),k.refresh(),k.setup.returnedObject(),p&&(G=k,k.invoke(f))},returnedObject:function(){var e=a.slice(0,g),t=a.slice(g+1);a=e.add(M).add(t)}},refresh:function(){k.refreshSelectors(),k.refreshData()},refreshItems:function(){_=B.find(P.item)},refreshSelectors:function(){k.verbose("Refreshing selector cache"),H=M.find(P.text),$=M.find(P.search),U=M.find(P.input),V=M.find(P.icon),W=M.prev().find(P.text).length>0?M.prev().find(P.text):M.prev(),B=M.children(P.menu),_=B.find(P.item)},refreshData:function(){k.verbose("Refreshing cached metadata"),_.removeData(R.text).removeData(R.value)},clearData:function(){k.verbose("Clearing metadata"),_.removeData(R.text).removeData(R.value),M.removeData(R.defaultText).removeData(R.defaultValue).removeData(R.placeholderText)},toggle:function(){k.verbose("Toggling menu visibility"),k.is.active()?k.hide():k.show()},show:function(t){if(t=e.isFunction(t)?t:function(){},k.can.show()&&!k.is.active()){if(k.debug("Showing dropdown"),!k.has.message()||k.has.maxSelections()||k.has.allResultsFiltered()||k.remove.message(),k.is.allFiltered())return!0;T.onShow.call(J)!==!1&&k.animate.show(function(){k.can.click()&&k.bind.intent(),k.has.menuSearch()&&k.focusSearch(),k.set.visible(),t.call(J)})}},hide:function(t){t=e.isFunction(t)?t:function(){},k.is.active()&&(k.debug("Hiding dropdown"),T.onHide.call(J)!==!1&&k.animate.hide(function(){k.remove.visible(),t.call(J)}))},hideOthers:function(){k.verbose("Finding other dropdowns to hide"),a.not(M).has(P.menu+"."+S.visible).dropdown("hide")},hideMenu:function(){k.verbose("Hiding menu instantaneously"),k.remove.active(),k.remove.visible(),B.transition("hide")},hideSubMenus:function(){var e=B.children(P.item).find(P.menu);k.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){c&&k.bind.touchEvents(),k.bind.keyboardEvents(),k.bind.inputEvents(),k.bind.mouseEvents()},touchEvents:function(){k.debug("Touch device detected binding additional touch events"),k.is.searchSelection()||k.is.single()&&M.on("touchstart"+q,k.event.test.toggle),B.on("touchstart"+q,P.item,k.event.item.mouseenter)},keyboardEvents:function(){k.verbose("Binding keyboard events"),M.on("keydown"+q,k.event.keydown),k.has.search()&&M.on(k.get.inputEvent()+q,P.search,k.event.input),k.is.multiple()&&s.on("keydown"+y,k.event.document.keydown)},inputEvents:function(){k.verbose("Binding input change events"),M.on("change"+q,P.input,k.event.change)},mouseEvents:function(){k.verbose("Binding mouse events"),k.is.multiple()&&M.on("click"+q,P.label,k.event.label.click).on("click"+q,P.remove,k.event.remove.click),k.is.searchSelection()?(M.on("mousedown"+q,k.event.mousedown).on("mouseup"+q,k.event.mouseup).on("mousedown"+q,P.menu,k.event.menu.mousedown).on("mouseup"+q,P.menu,k.event.menu.mouseup).on("click"+q,P.icon,k.event.icon.click).on("focus"+q,P.search,k.event.search.focus).on("click"+q,P.search,k.event.search.focus).on("blur"+q,P.search,k.event.search.blur).on("click"+q,P.text,k.event.text.focus),k.is.multiple()&&M.on("click"+q,k.event.click)):("click"==T.on?M.on("click"+q,P.icon,k.event.icon.click).on("click"+q,k.event.test.toggle):"hover"==T.on?M.on("mouseenter"+q,k.delay.show).on("mouseleave"+q,k.delay.hide):M.on(T.on+q,k.toggle),M.on("mousedown"+q,k.event.mousedown).on("mouseup"+q,k.event.mouseup).on("focus"+q,k.event.focus).on("blur"+q,k.event.blur)),B.on("mouseenter"+q,P.item,k.event.item.mouseenter).on("mouseleave"+q,P.item,k.event.item.mouseleave).on("click"+q,P.item,k.event.item.click)},intent:function(){k.verbose("Binding hide intent event to document"),c&&s.on("touchstart"+y,k.event.test.touch).on("touchmove"+y,k.event.test.touch),s.on("click"+y,k.event.test.hide)}},unbind:{intent:function(){k.verbose("Removing hide intent event from document"),c&&s.off("touchstart"+y).off("touchmove"+y),s.off("click"+y)}},filter:function(e){var t=e!==i?e:k.get.query(),n=function(){k.is.multiple()&&k.filterActive(),k.select.firstUnfiltered(),k.has.allResultsFiltered()?T.onNoResults.call(J,t)?T.allowAdditions?T.hideAdditions&&(k.verbose("User addition with no menu, setting empty style"),k.set.empty(),k.hideMenu()):(k.verbose("All items filtered, showing message",t),k.add.message(A.noResults)):(k.verbose("All items filtered, hiding dropdown",t),k.hideMenu()):(k.remove.empty(),k.remove.message()),T.allowAdditions&&k.add.userSuggestion(e),k.is.searchSelection()&&k.can.show()&&k.is.focusedOnSearch()&&k.show()};T.useLabels&&k.has.maxSelections()||(T.apiSettings?k.can.useAPI()?k.queryRemote(t,function(){n()}):k.error(F.noAPI):(k.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:T.throttle,urlData:{query:t},onError:function(){k.add.message(A.serverError),n()},onFailure:function(){k.add.message(A.serverError),n()},onSuccess:function(e){k.remove.message(),k.setup.menu({values:e[E.remoteValues]}),n()}};M.api("get request")||k.setup.api(),i=e.extend(!0,{},i,T.apiSettings),M.api("setting",i).api("query")},filterItems:function(t){var n=t!==i?t:k.get.query(),o=null,r=k.escape.regExp(n),a=new RegExp("^"+r,"igm");k.has.query()&&(o=[],k.verbose("Searching for matching values",n),_.each(function(){var t,i,r=e(this);if("both"==T.match||"text"==T.match){if(t=String(k.get.choiceText(r,!1)),t.search(a)!==-1)return o.push(this),!0;if("exact"===T.fullTextSearch&&k.exactSearch(n,t))return o.push(this),!0;if(T.fullTextSearch===!0&&k.fuzzySearch(n,t))return o.push(this),!0}if("both"==T.match||"value"==T.match){if(i=String(k.get.choiceValue(r,t)),i.search(a)!==-1)return o.push(this),!0;if(T.fullTextSearch&&k.fuzzySearch(n,i))return o.push(this),!0}})),k.debug("Showing only matched items",n),k.remove.filteredItem(),o&&_.not(o).addClass(S.filtered)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,r=0;o<i;o++){for(var a=e.charCodeAt(o);r<n;)if(t.charCodeAt(r++)===a)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),t.indexOf(e)>-1},filterActive:function(){T.useLabels&&_.filter("."+S.active).addClass(S.filtered)},focusSearch:function(e){k.has.search()&&!k.is.focusedOnSearch()&&(e?(M.off("focus"+q,P.search),$.focus(),M.on("focus"+q,P.search,k.event.search.focus)):$.focus())},forceSelection:function(){var e=_.not(S.filtered).filter("."+S.selected).eq(0),t=_.not(S.filtered).filter("."+S.active).eq(0),n=e.length>0?e:t,i=n.length>0;return i?(k.debug("Forcing partial selection to selected item",n),void k.event.item.click.call(n,{},!0)):void(T.allowAdditions?(k.set.selected(k.get.query()),k.remove.searchTerm()):k.remove.searchTerm())},event:{change:function(){Q||(k.debug("Input changed, updating selection"),k.set.selected())},focus:function(){T.showOnFocus&&!K&&k.is.hidden()&&!v&&k.show()},blur:function(e){v=n.activeElement===this,K||v||(k.remove.activeLabel(),k.hide())},mousedown:function(){k.is.searchSelection()?b=!0:K=!0},mouseup:function(){k.is.searchSelection()?b=!1:K=!1},click:function(t){var n=e(t.target);n.is(M)&&(k.is.focusedOnSearch()?k.show():k.focusSearch())},search:{focus:function(){K=!0,k.is.multiple()&&k.remove.activeLabel(),T.showOnFocus&&k.search()},blur:function(e){v=n.activeElement===this,b||X||v||(T.forceSelection&&k.forceSelection(),k.hide()),b=!1}},icon:{click:function(e){k.toggle()}},text:{focus:function(e){K=!0,k.focusSearch()}},input:function(e){(k.is.multiple()||k.is.searchSelection())&&k.set.filtered(),clearTimeout(k.timer),k.timer=setTimeout(k.search,T.delay.search);
},label:{click:function(t){var n=e(this),i=M.find(P.label),o=i.filter("."+S.active),r=n.nextAll("."+S.active),a=n.prevAll("."+S.active),s=r.length>0?n.nextUntil(r).add(o).add(n):n.prevUntil(a).add(o).add(n);t.shiftKey?(o.removeClass(S.active),s.addClass(S.active)):t.ctrlKey?n.toggleClass(S.active):(o.removeClass(S.active),n.addClass(S.active)),T.onLabelSelect.apply(this,i.filter("."+S.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(S.active)?k.remove.activeLabels():k.remove.activeLabels(t)}},test:{toggle:function(e){var t=k.is.multiple()?k.show:k.toggle;k.is.bubbledLabelClick(e)||k.is.bubbledIconClick(e)||k.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){k.determine.eventOnElement(e,function(){"touchstart"==e.type?k.timer=setTimeout(function(){k.hide()},T.delay.touch):"touchmove"==e.type&&clearTimeout(k.timer)}),e.stopPropagation()},hide:function(e){k.determine.eventInModule(e,k.hide)}},select:{mutation:function(e){k.debug("<select> modified, recreating menu"),k.setup.select()}},menu:{mutation:function(t){var n=t[0],i=e(!!n.addedNodes&&n.addedNodes[0]),o=e(!!n.removedNodes&&n.removedNodes[0]),r=i.add(o),a=r.is(P.addition)||r.closest(P.addition).length>0,s=r.is(P.message)||r.closest(P.message).length>0;a||s?(k.debug("Updating item selector cache"),k.refreshItems()):(k.debug("Menu modified, updating selector cache"),k.refresh())},mousedown:function(){X=!0},mouseup:function(){X=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),o=i.children(P.menu),r=i.siblings(P.item).children(P.menu),a=o.length>0,s=o.find(n).length>0;!s&&a&&(clearTimeout(k.itemTimer),k.itemTimer=setTimeout(function(){k.verbose("Showing sub-menu",o),e.each(r,function(){k.animate.hide(!1,e(this))}),k.animate.show(!1,o)},T.delay.show),t.preventDefault())},mouseleave:function(t){var n=e(this).children(P.menu);n.length>0&&(clearTimeout(k.itemTimer),k.itemTimer=setTimeout(function(){k.verbose("Hiding sub-menu",n),k.animate.hide(!1,n)},T.delay.hide))},click:function(t,n){var i=e(this),o=e(t?t.target:""),r=i.find(P.menu),a=k.get.choiceText(i),s=k.get.choiceValue(i,a),l=r.length>0,c=r.find(o).length>0;c||l&&!T.allowCategorySelection||(k.is.searchSelection()&&(T.allowAdditions&&k.remove.userAddition(),k.remove.searchTerm(),k.is.focusedOnSearch()||1==n||k.focusSearch(!0)),T.useLabels||(k.remove.filteredItem(),k.set.scrollPosition(i)),k.determine.selectAction.call(this,a,s))}},document:{keydown:function(e){var t=e.which,n=k.is.inObject(t,j);if(n){var i=M.find(P.label),o=i.filter("."+S.active),r=(o.data(R.value),i.index(o)),a=i.length,s=o.length>0,l=o.length>1,c=0===r,u=r+1==a,d=k.is.searchSelection(),f=k.is.focusedOnSearch(),p=k.is.focused(),h=f&&0===k.get.caretPosition();if(d&&!s&&!f)return;t==j.leftArrow?!p&&!h||s?s&&(e.shiftKey?k.verbose("Adding previous label to selection"):(k.verbose("Selecting previous label"),i.removeClass(S.active)),c&&!l?o.addClass(S.active):o.prev(P.siblingLabel).addClass(S.active).end(),e.preventDefault()):(k.verbose("Selecting previous label"),i.last().addClass(S.active)):t==j.rightArrow?(p&&!s&&i.first().addClass(S.active),s&&(e.shiftKey?k.verbose("Adding next label to selection"):(k.verbose("Selecting next label"),i.removeClass(S.active)),u?d?f?i.removeClass(S.active):k.focusSearch():l?o.next(P.siblingLabel).addClass(S.active):o.addClass(S.active):o.next(P.siblingLabel).addClass(S.active),e.preventDefault())):t==j.deleteKey||t==j.backspace?s?(k.verbose("Removing active labels"),u&&d&&!f&&k.focusSearch(),o.last().next(P.siblingLabel).addClass(S.active),k.remove.activeLabels(o),e.preventDefault()):h&&!s&&t==j.backspace&&(k.verbose("Removing last label on input backspace"),o=i.last().addClass(S.active),k.remove.activeLabels(o)):o.removeClass(S.active)}}},keydown:function(e){var t=e.which,n=k.is.inObject(t,j);if(n){var i,o,r=_.not(P.unselectable).filter("."+S.selected).eq(0),a=B.children("."+S.active).eq(0),s=r.length>0?r:a,l=s.length>0?s.siblings(":not(."+S.filtered+")").addBack():B.children(":not(."+S.filtered+")"),c=s.children(P.menu),u=s.closest(P.menu),d=u.hasClass(S.visible)||u.hasClass(S.animating)||u.parent(P.menu).length>0,f=c.length>0,p=s.length>0,h=s.not(P.unselectable).length>0,g=t==j.delimiter&&T.allowAdditions&&k.is.multiple(),m=T.allowAdditions&&T.hideAdditions&&(t==j.enter||g)&&h;if(m&&(k.verbose("Selecting item from keyboard shortcut",s),k.event.item.click.call(s,e),k.is.searchSelection()&&k.remove.searchTerm()),k.is.visible()){if((t==j.enter||g)&&(t==j.enter&&p&&f&&!T.allowCategorySelection?(k.verbose("Pressed enter on unselectable category, opening sub menu"),t=j.rightArrow):h&&(k.verbose("Selecting item from keyboard shortcut",s),k.event.item.click.call(s,e),k.is.searchSelection()&&k.remove.searchTerm()),e.preventDefault()),p&&(t==j.leftArrow&&(o=u[0]!==B[0],o&&(k.verbose("Left key pressed, closing sub-menu"),k.animate.hide(!1,u),s.removeClass(S.selected),u.closest(P.item).addClass(S.selected),e.preventDefault())),t==j.rightArrow&&f&&(k.verbose("Right key pressed, opening sub-menu"),k.animate.show(!1,c),s.removeClass(S.selected),c.find(P.item).eq(0).addClass(S.selected),e.preventDefault())),t==j.upArrow){if(i=p&&d?s.prevAll(P.item+":not("+P.unselectable+")").eq(0):_.eq(0),l.index(i)<0)return k.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();k.verbose("Up key pressed, changing active item"),s.removeClass(S.selected),i.addClass(S.selected),k.set.scrollPosition(i),T.selectOnKeydown&&k.is.single()&&k.set.selectedItem(i),e.preventDefault()}if(t==j.downArrow){if(i=p&&d?i=s.nextAll(P.item+":not("+P.unselectable+")").eq(0):_.eq(0),0===i.length)return k.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();k.verbose("Down key pressed, changing active item"),_.removeClass(S.selected),i.addClass(S.selected),k.set.scrollPosition(i),T.selectOnKeydown&&k.is.single()&&k.set.selectedItem(i),e.preventDefault()}t==j.pageUp&&(k.scrollPage("up"),e.preventDefault()),t==j.pageDown&&(k.scrollPage("down"),e.preventDefault()),t==j.escape&&(k.verbose("Escape key pressed, closing dropdown"),k.hide())}else g&&e.preventDefault(),t!=j.downArrow||k.is.visible()||(k.verbose("Down key pressed, showing dropdown"),k.select.firstUnfiltered(),k.show(),e.preventDefault())}else k.has.search()||k.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=U[0];t&&(k.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){k.verbose("Determining action",T.action),e.isFunction(k.action[T.action])?(k.verbose("Triggering preset action",T.action,t,n),k.action[T.action].call(J,t,n,this)):e.isFunction(T.action)?(k.verbose("Triggering user action",T.action,t,n),T.action.call(J,t,n,this)):k.error(F.action,T.action)},eventInModule:function(t,i){var o=e(t.target),r=o.closest(n.documentElement).length>0,a=o.closest(M).length>0;return i=e.isFunction(i)?i:function(){},r&&!a?(k.verbose("Triggering event",i),i(),!0):(k.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var o=e(t.target),r=o.closest(P.siblingLabel),a=n.body.contains(t.target),s=0===M.find(r).length,l=0===o.closest(B).length;return i=e.isFunction(i)?i:function(){},a&&s&&l?(k.verbose("Triggering event",i),i(),!0):(k.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,o){if(n=n!==i?n:t,k.can.activate(e(o))){if(k.set.selected(n,e(o)),k.is.multiple()&&!k.is.allFiltered())return;k.hideAndClear()}},select:function(t,n,o){if(n=n!==i?n:t,k.can.activate(e(o))){if(k.set.value(n,e(o)),k.is.multiple()&&!k.is.allFiltered())return;k.hideAndClear()}},combo:function(t,n,o){n=n!==i?n:t,k.set.selected(n,e(o)),k.hideAndClear()},hide:function(e,t,n){k.set.value(t,e),k.hideAndClear()}},get:{id:function(){return x},defaultText:function(){return M.data(R.defaultText)},defaultValue:function(){return M.data(R.defaultValue)},placeholderText:function(){return M.data(R.placeholderText)||""},text:function(){return H.text()},query:function(){return e.trim($.val())},searchWidth:function(e){return e=e!==i?e:$.val(),z.text(e),Math.ceil(z.width()+1)},selectionCount:function(){var t,n=k.get.values();return t=k.is.multiple()?e.isArray(n)?n.length:0:""!==k.get.value()?1:0},transition:function(e){return"auto"==T.transition?k.is.upward(e)?"slide up":"slide down":T.transition},userValues:function(){var t=k.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,function(e){return k.get.item(e)===!1}))},uniqueArray:function(t){return e.grep(t,function(n,i){return e.inArray(n,t)===i})},caretPosition:function(){var e,t,i=$.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),e=n.selection.createRange(),t=e.text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=U.length>0?U.val():M.data(R.value),n=e.isArray(t)&&1===t.length&&""===t[0];return t===i||n?"":t},values:function(){var e=k.get.value();return""===e?"":!k.has.selectInput()&&k.is.multiple()?"string"==typeof e?e.split(T.delimiter):"":e},remoteValues:function(){var t=k.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,function(e,t){var i=k.read.remoteData(t);k.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)})),n},choiceText:function(t,n){if(n=n!==i?n:T.preserveHTML,t)return t.find(P.menu).length>0&&(k.verbose("Retrieving text of element with sub-menu"),t=t.clone(),t.find(P.menu).remove(),t.find(P.menuIcon).remove()),t.data(R.text)!==i?t.data(R.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||k.get.choiceText(t),!!t&&(t.data(R.value)!==i?String(t.data(R.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=$[0];return!!e&&(e.oninput!==i?"input":e.onpropertychange!==i?"propertychange":"keyup")},selectValues:function(){var t={};return t.values=[],M.find("option").each(function(){var n=e(this),o=n.html(),r=n.attr("disabled"),a=n.attr("value")!==i?n.attr("value"):o;"auto"===T.placeholder&&""===a?t.placeholder=o:t.values.push({name:o,value:a,disabled:r})}),T.placeholder&&"auto"!==T.placeholder&&(k.debug("Setting placeholder value to",T.placeholder),t.placeholder=T.placeholder),T.sortSelect?(t.values.sort(function(e,t){return e.name>t.name?1:-1}),k.debug("Retrieved and sorted values from select",t)):k.debug("Retrieved values from select",t),t},activeItem:function(){return _.filter("."+S.active)},selectedItem:function(){var e=_.not(P.unselectable).filter("."+S.selected);return e.length>0?e:_.eq(0)},itemWithAdditions:function(e){var t=k.get.item(e),n=k.create.userChoice(e),i=n&&n.length>0;return i&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var o,r,a=!1;return t=t!==i?t:k.get.values()!==i?k.get.values():k.get.text(),o=r?t.length>0:t!==i&&null!==t,r=k.is.multiple()&&e.isArray(t),n=""===t||0===t||n||!1,o&&_.each(function(){var o=e(this),s=k.get.choiceText(o),l=k.get.choiceValue(o,s);if(null!==l&&l!==i)if(r)e.inArray(String(l),t)===-1&&e.inArray(s,t)===-1||(a=a?a.add(o):o);else if(n){if(k.verbose("Ambiguous dropdown value using strict type check",o,t),l===t||s===t)return a=o,!0}else if(String(l)==String(t)||s==t)return k.verbose("Found select item by value",l,t),a=o,!0}),a}},check:{maxSelections:function(e){return!T.maxSelections||(e=e!==i?e:k.get.selectionCount(),e>=T.maxSelections?(k.debug("Maximum selection count reached"),T.useLabels&&(_.addClass(S.filtered),k.add.message(A.maxSelections)),!0):(k.verbose("No longer at maximum selection count"),k.remove.message(),k.remove.filteredItem(),k.is.searchSelection()&&k.filterItems(),!1))}},restore:{defaults:function(){k.clear(),k.restore.defaultText(),k.restore.defaultValue()},defaultText:function(){var e=k.get.defaultText(),t=k.get.placeholderText;e===t?(k.debug("Restoring default placeholder text",e),k.set.placeholderText(e)):(k.debug("Restoring default text",e),k.set.text(e))},placeholderText:function(){k.set.placeholderText()},defaultValue:function(){var e=k.get.defaultValue();e!==i&&(k.debug("Restoring default value",e),""!==e?(k.set.value(e),k.set.selected()):(k.remove.activeItem(),k.remove.selectedItem()))},labels:function(){T.allowAdditions&&(T.useLabels||(k.error(F.labels),T.useLabels=!0),k.debug("Restoring selected values"),k.create.userLabels()),k.check.maxSelections()},selected:function(){k.restore.values(),k.is.multiple()?(k.debug("Restoring previously selected values and labels"),k.restore.labels()):k.debug("Restoring previously selected values")},values:function(){k.set.initialLoad(),T.apiSettings&&T.saveRemoteData&&k.get.remoteValues()?k.restore.remoteValues():k.set.selected(),k.remove.initialLoad()},remoteValues:function(){var t=k.get.remoteValues();k.debug("Recreating selected from session data",t),t&&(k.is.single()?e.each(t,function(e,t){k.set.text(t)}):e.each(t,function(e,t){k.add.label(e,t)}))}},read:{remoteData:function(e){var n;return t.Storage===i?void k.error(F.noStorage):(n=sessionStorage.getItem(e),n!==i&&n)}},save:{defaults:function(){k.save.defaultText(),k.save.placeholderText(),k.save.defaultValue()},defaultValue:function(){var e=k.get.value();k.verbose("Saving default value as",e),M.data(R.defaultValue,e)},defaultText:function(){var e=k.get.text();k.verbose("Saving default text as",e),M.data(R.defaultText,e)},placeholderText:function(){var e;T.placeholder!==!1&&H.hasClass(S.placeholder)&&(e=k.get.text(),k.verbose("Saving placeholder text as",e),M.data(R.placeholderText,e))},remoteData:function(e,n){return t.Storage===i?void k.error(F.noStorage):(k.verbose("Saving remote data to session storage",n,e),void sessionStorage.setItem(n,e))}},clear:function(){k.is.multiple()&&T.useLabels?k.remove.labels():(k.remove.activeItem(),k.remove.selectedItem()),k.set.placeholderText(),k.clearValue()},clearValue:function(){k.set.value("")},scrollPage:function(e,t){var n,i,o,r=t||k.get.selectedItem(),a=r.closest(P.menu),s=a.outerHeight(),l=a.scrollTop(),c=_.eq(0).outerHeight(),u=Math.floor(s/c),d=(a.prop("scrollHeight"),"up"==e?l-c*u:l+c*u),f=_.not(P.unselectable);o="up"==e?f.index(r)-u:f.index(r)+u,n="up"==e?o>=0:o<f.length,i=n?f.eq(o):"up"==e?f.first():f.last(),i.length>0&&(k.debug("Scrolling page",e,i),r.removeClass(S.selected),i.addClass(S.selected),T.selectOnKeydown&&k.is.single()&&k.set.selectedItem(i),a.scrollTop(d))},set:{filtered:function(){var e=k.is.multiple(),t=k.is.searchSelection(),n=e&&t,i=t?k.get.query():"",o="string"==typeof i&&i.length>0,r=k.get.searchWidth(),a=""!==i;e&&o&&(k.verbose("Adjusting input width",r,T.glyphWidth),$.css("width",r)),o||n&&a?(k.verbose("Hiding placeholder text"),H.addClass(S.filtered)):(!e||n&&!a)&&(k.verbose("Showing placeholder text"),H.removeClass(S.filtered))},empty:function(){M.addClass(S.empty)},loading:function(){M.addClass(S.loading)},placeholderText:function(e){e=e||k.get.placeholderText(),k.debug("Setting placeholder text",e),k.set.text(e),H.addClass(S.placeholder)},tabbable:function(){k.has.search()?(k.debug("Added tabindex to searchable dropdown"),$.val("").attr("tabindex",0),B.attr("tabindex",-1)):(k.debug("Added tabindex to dropdown"),M.attr("tabindex")===i&&(M.attr("tabindex",0),B.attr("tabindex",-1)))},initialLoad:function(){k.verbose("Setting initial load"),m=!0},activeItem:function(e){T.allowAdditions&&e.filter(P.addition).length>0?e.addClass(S.filtered):e.addClass(S.active)},partialSearch:function(e){var t=k.get.query().length;$.val(e.substr(0,t))},scrollPosition:function(e,t){var n,o,r,a,s,l,c,u,d,f=5;e=e||k.get.selectedItem(),n=e.closest(P.menu),o=e&&e.length>0,t=t!==i&&t,e&&n.length>0&&o&&(a=e.position().top,n.addClass(S.loading),l=n.scrollTop(),s=n.offset().top,a=e.offset().top,r=l-s+a,t||(c=n.height(),d=l+c<r+f,u=r-f<l),k.debug("Scrolling to active item",r),(t||u||d)&&n.scrollTop(r),n.removeClass(S.loading))},text:function(e){"select"!==T.action&&("combo"==T.action?(k.debug("Changing combo button text",e,W),T.preserveHTML?W.html(e):W.text(e)):(e!==k.get.placeholderText()&&H.removeClass(S.placeholder),k.debug("Changing text",e,H),H.removeClass(S.filtered),T.preserveHTML?H.html(e):H.text(e)))},selectedItem:function(e){var t=k.get.choiceValue(e),n=k.get.choiceText(e,!1);k.debug("Setting user selection to item",e),k.remove.activeItem(),k.set.partialSearch(n),k.set.activeItem(e),k.set.selected(t,e),k.set.text(n)},selectedLetter:function(t){var n,i=_.filter("."+S.selected),o=i.length>0&&k.has.firstLetter(i,t),r=!1;o&&(n=i.nextAll(_).eq(0),k.has.firstLetter(n,t)&&(r=n)),r||_.each(function(){if(k.has.firstLetter(e(this),t))return r=e(this),!1}),r&&(k.verbose("Scrolling to next value with letter",t),k.set.scrollPosition(r),i.removeClass(S.selected),r.addClass(S.selected),T.selectOnKeydown&&k.is.single()&&k.set.selectedItem(r))},direction:function(e){"auto"==T.direction?k.is.onScreen(e)?k.remove.upward(e):k.set.upward(e):"upward"==T.direction&&k.set.upward(e)},upward:function(e){var t=e||M;t.addClass(S.upward)},value:function(e,t,n){var o=k.escape.value(e),r=U.length>0,a=(!k.has.value(e),k.get.values()),s=e!==i?String(e):e;if(r){if(!T.allowReselection&&s==a&&(k.verbose("Skipping value update already same value",e,a),!k.is.initialLoad()))return;k.is.single()&&k.has.selectInput()&&k.can.extendSelect()&&(k.debug("Adding user option",e),k.add.optionValue(e)),k.debug("Updating input value",o,a),Q=!0,U.val(o),T.fireOnInit===!1&&k.is.initialLoad()?k.debug("Input native change event ignored on initial load"):k.trigger.change(),Q=!1}else k.verbose("Storing value in metadata",o,U),o!==a&&M.data(R.value,s);T.fireOnInit===!1&&k.is.initialLoad()?k.verbose("No callback on initial load",T.onChange):T.onChange.call(J,e,t,n)},active:function(){M.addClass(S.active)},multiple:function(){M.addClass(S.multiple)},visible:function(){M.addClass(S.visible)},exactly:function(e,t){k.debug("Setting selected to exact values"),k.clear(),k.set.selected(e,t)},selected:function(t,n){var i=k.is.multiple();n=T.allowAdditions?n||k.get.itemWithAdditions(t):n||k.get.item(t),n&&(k.debug("Setting selected menu item to",n),k.is.multiple()&&k.remove.searchWidth(),k.is.single()?(k.remove.activeItem(),k.remove.selectedItem()):T.useLabels&&k.remove.selectedItem(),n.each(function(){var t=e(this),o=k.get.choiceText(t),r=k.get.choiceValue(t,o),a=t.hasClass(S.filtered),s=t.hasClass(S.active),l=t.hasClass(S.addition),c=i&&1==n.length;i?!s||l?(T.apiSettings&&T.saveRemoteData&&k.save.remoteData(o,r),T.useLabels?(k.add.value(r,o,t),k.add.label(r,o,c),k.set.activeItem(t),k.filterActive(),k.select.nextAvailable(n)):(k.add.value(r,o,t),k.set.text(k.add.variables(A.count)),k.set.activeItem(t))):a||(k.debug("Selected active value, removing label"),k.remove.selected(r)):(T.apiSettings&&T.saveRemoteData&&k.save.remoteData(o,r),k.set.text(o),k.set.value(r,o,t),t.addClass(S.active).addClass(S.selected))}))}},add:{label:function(t,n,i){var o,r=k.is.searchSelection()?$:H,a=k.escape.value(t);return o=e("<a />").addClass(S.label).attr("data-value",a).html(L.label(a,n)),o=T.onLabelCreate.call(o,a,n),k.has.label(t)?void k.debug("Label already exists, skipping",a):(T.label.variation&&o.addClass(T.label.variation),void(i===!0?(k.debug("Animating in label",o),o.addClass(S.hidden).insertBefore(r).transition(T.label.transition,T.label.duration)):(k.debug("Adding selection label",o),o.insertBefore(r))))},message:function(t){var n=B.children(P.message),i=T.templates.message(k.add.variables(t));n.length>0?n.html(i):n=e("<div/>").html(i).addClass(S.message).appendTo(B)},optionValue:function(t){var n=k.escape.value(t),i=U.find('option[value="'+n+'"]'),o=i.length>0;o||(k.disconnect.selectObserver(),k.is.single()&&(k.verbose("Removing previous user addition"),U.find("option."+S.addition).remove()),e("<option/>").prop("value",n).addClass(S.addition).html(t).appendTo(U),k.verbose("Adding user addition as an <option>",t),k.observe.select())},userSuggestion:function(e){var t,n=B.children(P.addition),i=k.get.item(e),o=i&&i.not(P.addition).length,r=n.length>0;if(!T.useLabels||!k.has.maxSelections()){if(""===e||o)return void n.remove();r?(n.data(R.value,e).data(R.text,e).attr("data-"+R.value,e).attr("data-"+R.text,e).removeClass(S.filtered),T.hideAdditions||(t=T.templates.addition(k.add.variables(A.addResult,e)),n.html(t)),k.verbose("Replacing user suggestion with new value",n)):(n=k.create.userChoice(e),n.prependTo(B),k.verbose("Adding item choice to menu corresponding with user choice addition",n)),T.hideAdditions&&!k.is.allFiltered()||n.addClass(S.selected).siblings().removeClass(S.selected),k.refreshItems()}},variables:function(e,t){var n,i,o=e.search("{count}")!==-1,r=e.search("{maxCount}")!==-1,a=e.search("{term}")!==-1;return k.verbose("Adding templated variables to message",e),o&&(n=k.get.selectionCount(),e=e.replace("{count}",n)),r&&(n=k.get.selectionCount(),e=e.replace("{maxCount}",T.maxSelections)),a&&(i=t||k.get.query(),e=e.replace("{term}",i)),e},value:function(t,n,i){var o,r=k.get.values();return""===t?void k.debug("Cannot select blank values from multiselect"):(e.isArray(r)?(o=r.concat([t]),o=k.get.uniqueArray(o)):o=[t],k.has.selectInput()?k.can.extendSelect()&&(k.debug("Adding value to select",t,o,U),k.add.optionValue(t)):(o=o.join(T.delimiter),k.debug("Setting hidden input to delimited value",o,U)),T.fireOnInit===!1&&k.is.initialLoad()?k.verbose("Skipping onadd callback on initial load",T.onAdd):T.onAdd.call(J,t,n,i),k.set.value(o,t,n,i),void k.check.maxSelections())}},remove:{active:function(){M.removeClass(S.active)},activeLabel:function(){M.find(P.label).removeClass(S.active)},empty:function(){M.removeClass(S.empty)},loading:function(){M.removeClass(S.loading)},initialLoad:function(){m=!1},upward:function(e){var t=e||M;t.removeClass(S.upward)},visible:function(){M.removeClass(S.visible)},activeItem:function(){_.removeClass(S.active)},filteredItem:function(){T.useLabels&&k.has.maxSelections()||(T.useLabels&&k.is.multiple()?_.not("."+S.active).removeClass(S.filtered):_.removeClass(S.filtered),k.remove.empty())},optionValue:function(e){var t=k.escape.value(e),n=U.find('option[value="'+t+'"]'),i=n.length>0;i&&n.hasClass(S.addition)&&(w&&(w.disconnect(),k.verbose("Temporarily disconnecting mutation observer")),n.remove(),k.verbose("Removing user addition as an <option>",t),w&&w.observe(U[0],{childList:!0,subtree:!0}))},message:function(){B.children(P.message).remove()},searchWidth:function(){$.css("width","")},searchTerm:function(){k.verbose("Cleared search term"),$.val(""),k.set.filtered()},userAddition:function(){_.filter(P.addition).remove()},selected:function(t,n){return!!(n=T.allowAdditions?n||k.get.itemWithAdditions(t):n||k.get.item(t))&&void n.each(function(){var t=e(this),n=k.get.choiceText(t),i=k.get.choiceValue(t,n);k.is.multiple()?T.useLabels?(k.remove.value(i,n,t),k.remove.label(i)):(k.remove.value(i,n,t),0===k.get.selectionCount()?k.set.placeholderText():k.set.text(k.add.variables(A.count))):k.remove.value(i,n,t),t.removeClass(S.filtered).removeClass(S.active),T.useLabels&&t.removeClass(S.selected)})},selectedItem:function(){_.removeClass(S.selected)},value:function(e,t,n){var i,o=k.get.values();k.has.selectInput()?(k.verbose("Input is <select> removing selected option",e),i=k.remove.arrayValue(e,o),k.remove.optionValue(e)):(k.verbose("Removing from delimited values",e),i=k.remove.arrayValue(e,o),i=i.join(T.delimiter)),T.fireOnInit===!1&&k.is.initialLoad()?k.verbose("No callback on initial load",T.onRemove):T.onRemove.call(J,e,t,n),k.set.value(i,t,n),k.check.maxSelections()},arrayValue:function(t,n){return e.isArray(n)||(n=[n]),n=e.grep(n,function(e){return t!=e}),k.verbose("Removed value from delimited string",t,n),n},label:function(e,t){var n=M.find(P.label),i=n.filter('[data-value="'+e+'"]');k.verbose("Removing label",i),i.remove()},activeLabels:function(e){e=e||M.find(P.label).filter("."+S.active),k.verbose("Removing active label selections",e),k.remove.labels(e)},labels:function(t){t=t||M.find(P.label),k.verbose("Removing labels",t),t.each(function(){var t=e(this),n=t.data(R.value),o=n!==i?String(n):n,r=k.is.userValue(o);return T.onLabelRemove.call(t,n)===!1?void k.debug("Label remove callback cancelled removal"):(k.remove.message(),void(r?(k.remove.value(o),k.remove.label(o)):k.remove.selected(o)))})},tabbable:function(){k.has.search()?(k.debug("Searchable dropdown initialized"),$.removeAttr("tabindex"),B.removeAttr("tabindex")):(k.debug("Simple selection dropdown initialized"),M.removeAttr("tabindex"),B.removeAttr("tabindex"))}},has:{menuSearch:function(){return k.has.search()&&$.closest(B).length>0},search:function(){return $.length>0},sizer:function(){return z.length>0},selectInput:function(){return U.is("select")},minCharacters:function(e){return!T.minCharacters||(e=e!==i?String(e):String(k.get.query()),e.length>=T.minCharacters)},firstLetter:function(e,t){var n,i;return!(!e||0===e.length||"string"!=typeof t)&&(n=k.get.choiceText(e,!1),t=t.toLowerCase(),i=String(n).charAt(0).toLowerCase(),t==i)},input:function(){return U.length>0},items:function(){return _.length>0},menu:function(){return B.length>0},message:function(){return 0!==B.children(P.message).length},label:function(e){var t=k.escape.value(e),n=M.find(P.label);return n.filter('[data-value="'+t+'"]').length>0},maxSelections:function(){return T.maxSelections&&k.get.selectionCount()>=T.maxSelections},allResultsFiltered:function(){var e=_.not(P.addition);return e.filter(P.unselectable).length===e.length},userSuggestion:function(){return B.children(P.addition).length>0},query:function(){return""!==k.get.query()},value:function(t){var n=k.get.values(),i=e.isArray(n)?n&&e.inArray(t,n)!==-1:n==t;return!!i}},is:{active:function(){return M.hasClass(S.active)},bubbledLabelClick:function(t){return e(t.target).is("select, input")&&M.closest("label").length>0},bubbledIconClick:function(t){return e(t.target).closest(V).length>0},alreadySetup:function(){return M.is("select")&&M.parent(P.dropdown).length>0&&0===M.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):B.transition&&B.transition("is animating")},disabled:function(){return M.hasClass(S.disabled)},focused:function(){return n.activeElement===M[0]},focusedOnSearch:function(){return n.activeElement===$[0]},allFiltered:function(){return(k.is.multiple()||k.has.search())&&!(0==T.hideAdditions&&k.has.userSuggestion())&&!k.has.message()&&k.has.allResultsFiltered()},hidden:function(e){return!k.is.visible(e)},initialLoad:function(){return m},onScreen:function(e){var t,n=e||B,i=!0,o={};return n.addClass(S.loading),t={context:{scrollTop:I.scrollTop(),height:I.outerHeight()},menu:{offset:n.offset(),height:n.outerHeight()}},o={above:t.context.scrollTop<=t.menu.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top+t.menu.height},o.below?(k.verbose("Dropdown can fit in context downward",o),i=!0):o.below||o.above?(k.verbose("Dropdown cannot fit below, opening upward",o),i=!1):(k.verbose("Dropdown cannot fit in either direction, favoring downward",o),i=!0),n.removeClass(S.loading),i},inObject:function(t,n){var i=!1;return e.each(n,function(e,n){if(n==t)return i=!0,!0}),i},multiple:function(){return M.hasClass(S.multiple)},single:function(){return!k.is.multiple()},selectMutation:function(t){var n=!1;return e.each(t,function(t,i){if(i.target&&e(i.target).is("select"))return n=!0,!0}),n},search:function(){return M.hasClass(S.search)},searchSelection:function(){return k.has.search()&&1===$.parent(P.dropdown).length},selection:function(){return M.hasClass(S.selection)},userValue:function(t){return e.inArray(t,k.get.userValues())!==-1},upward:function(e){var t=e||M;return t.hasClass(S.upward)},visible:function(e){return e?e.hasClass(S.visible):B.hasClass(S.visible)}},can:{activate:function(e){return!!T.useLabels||!k.has.maxSelections()||!(!k.has.maxSelections()||!e.hasClass(S.active))},click:function(){return c||"click"==T.on},extendSelect:function(){return T.allowAdditions||T.apiSettings},show:function(){return!k.is.disabled()&&(k.has.items()||k.has.message())},useAPI:function(){return e.fn.api!==i}},animate:{show:function(t,n){var o,r=n||B,a=n?function(){}:function(){k.hideSubMenus(),k.hideOthers(),k.set.active()};t=e.isFunction(t)?t:function(){},k.verbose("Doing menu show animation",r),k.set.direction(n),o=k.get.transition(n),k.is.selection()&&k.set.scrollPosition(k.get.selectedItem(),!0),(k.is.hidden(r)||k.is.animating(r))&&("none"==o?(a(),r.transition("show"),t.call(J)):e.fn.transition!==i&&M.transition("is supported")?r.transition({animation:o+" in",debug:T.debug,verbose:T.verbose,duration:T.duration,queue:!0,onStart:a,onComplete:function(){t.call(J)}}):k.error(F.noTransition,o))},hide:function(t,n){var o=n||B,r=(n?.9*T.duration:T.duration,n?function(){}:function(){k.can.click()&&k.unbind.intent(),k.remove.active()}),a=k.get.transition(n);t=e.isFunction(t)?t:function(){},(k.is.visible(o)||k.is.animating(o))&&(k.verbose("Doing menu hide animation",o),"none"==a?(r(),o.transition("hide"),t.call(J)):e.fn.transition!==i&&M.transition("is supported")?o.transition({animation:a+" out",duration:T.duration,debug:T.debug,verbose:T.verbose,queue:!0,onStart:r,onComplete:function(){"auto"==T.direction&&k.remove.upward(n),t.call(J)}}):k.error(F.transition))}},hideAndClear:function(){k.remove.searchTerm(),k.has.maxSelections()||(k.has.search()?k.hide(function(){k.remove.filteredItem()}):k.hide())},delay:{show:function(){k.verbose("Delaying show event to ensure user intent"),clearTimeout(k.timer),k.timer=setTimeout(k.show,T.delay.show)},hide:function(){k.verbose("Delaying hide event to ensure user intent"),clearTimeout(k.timer),k.timer=setTimeout(k.hide,T.delay.hide)}},escape:{value:function(t){var n=e.isArray(t),i="string"==typeof t,o=!i&&!n,r=i&&t.search(O.quote)!==-1,a=[];return k.has.selectInput()&&!o&&r?(k.debug("Encoding quote values for use in select",t),n?(e.each(t,function(e,t){a.push(t.replace(O.quote,"&quot;"))}),a):t.replace(O.quote,"&quot;")):t},regExp:function(e){return e=String(e),e.replace(O.escape,"\\$&")}},setting:function(t,n){if(k.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,T,t);else{if(n===i)return T[t];e.isPlainObject(T[t])?e.extend(!0,T[t],n):T[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,k,t);else{if(n===i)return k[t];k[t]=n}},debug:function(){!T.silent&&T.debug&&(T.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,T.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!T.silent&&T.verbose&&T.debug&&(T.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,T.name+":"),k.verbose.apply(console,arguments)))},error:function(){T.silent||(k.error=Function.prototype.bind.call(console.error,console,T.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;T.performance&&(t=(new Date).getTime(),i=u||t,n=t-i,u=t,d.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:J,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var t=T.name+":",n=0;u=!1,clearTimeout(k.performance.timer),e.each(d,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",l&&(t+=" '"+l+"'"),(console.group!==i||console.table!==i)&&d.length>0&&(console.groupCollapsed(t),console.table?console.table(d):e.each(d,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),d=[]}},invoke:function(t,n,o){var a,s,l,c=G;return n=n||h,o=J||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(k.error(F.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},p?(G===i&&k.initialize(),k.invoke(f)):(G!==i&&G.invoke("destroy"),
k.initialize())}),r!==i?r:a},e.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",apiSettings:!1,selectOnKeydown:!0,minCharacters:0,saveRemoteData:!0,throttle:200,context:t,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(t,n){return e(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",visible:"visible"}},e.fn.dropdown.settings.templates={dropdown:function(t){var n=t.placeholder||!1,i=(t.values||{},"");return i+='<i class="dropdown icon"></i>',i+=t.placeholder?'<div class="default text">'+n+"</div>":'<div class="text"></div>',i+='<div class="menu">',e.each(t.values,function(e,t){i+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"}),i+="</div>"},menu:function(t,n){var i=t[n.values]||{},o="";return e.each(i,function(e,t){var i=t[n.text]?'data-text="'+t[n.text]+'"':"",r=t[n.disabled]?"disabled ":"";o+='<div class="'+r+'item" data-value="'+t[n.value]+'"'+i+">",o+=t[n.name],o+="</div>"}),o},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.embed=function(n){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return r.each(function(){var f,p=e.isPlainObject(n)?e.extend(!0,{},e.fn.embed.settings,n):e.extend({},e.fn.embed.settings),h=p.selector,g=p.className,m=p.sources,v=p.error,b=p.metadata,y=p.namespace,x=p.templates,w="."+y,C="module-"+y,k=(e(t),e(this)),T=k.find(h.placeholder),S=k.find(h.icon),A=k.find(h.embed),E=this,j=k.data(C);f={initialize:function(){f.debug("Initializing embed"),f.determine.autoplay(),f.create(),f.bind.events(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),j=f,k.data(C,f)},destroy:function(){f.verbose("Destroying previous instance of embed"),f.reset(),k.removeData(C).off(w)},refresh:function(){f.verbose("Refreshing selector cache"),T=k.find(h.placeholder),S=k.find(h.icon),A=k.find(h.embed)},bind:{events:function(){f.has.placeholder()&&(f.debug("Adding placeholder events"),k.on("click"+w,h.placeholder,f.createAndShow).on("click"+w,h.icon,f.createAndShow))}},create:function(){var e=f.get.placeholder();e?f.createPlaceholder():f.createAndShow()},createPlaceholder:function(e){var t=f.get.icon(),n=f.get.url();f.generate.embed(n),e=e||f.get.placeholder(),k.html(x.placeholder(e,t)),f.debug("Creating placeholder for embed",e,t)},createEmbed:function(t){f.refresh(),t=t||f.get.url(),A=e("<div/>").addClass(g.embed).html(f.generate.embed(t)).appendTo(k),p.onCreate.call(E,t),f.debug("Creating embed object",A)},changeEmbed:function(e){A.html(f.generate.embed(e))},createAndShow:function(){f.createEmbed(),f.show()},change:function(e,t,n){f.debug("Changing video to ",e,t,n),k.data(b.source,e).data(b.id,t),n?k.data(b.url,n):k.removeData(b.url),f.has.embed()?f.changeEmbed():f.create()},reset:function(){f.debug("Clearing embed and showing placeholder"),f.remove.active(),f.remove.embed(),f.showPlaceholder(),p.onReset.call(E)},show:function(){f.debug("Showing embed"),f.set.active(),p.onDisplay.call(E)},hide:function(){f.debug("Hiding embed"),f.showPlaceholder()},showPlaceholder:function(){f.debug("Showing placeholder image"),f.remove.active(),p.onPlaceholderDisplay.call(E)},get:{id:function(){return p.id||k.data(b.id)},placeholder:function(){return p.placeholder||k.data(b.placeholder)},icon:function(){return p.icon?p.icon:k.data(b.icon)!==i?k.data(b.icon):f.determine.icon()},source:function(e){return p.source?p.source:k.data(b.source)!==i?k.data(b.source):f.determine.source()},type:function(){var e=f.get.source();return m[e]!==i&&m[e].type},url:function(){return p.url?p.url:k.data(b.url)!==i?k.data(b.url):f.determine.url()}},determine:{autoplay:function(){f.should.autoplay()&&(p.autoplay=!0)},source:function(t){var n=!1;return t=t||f.get.url(),t&&e.each(m,function(e,i){if(t.search(i.domain)!==-1)return n=e,!1}),n},icon:function(){var e=f.get.source();return m[e]!==i&&m[e].icon},url:function(){var e,t=p.id||k.data(b.id),n=p.source||k.data(b.source);return e=m[n]!==i&&m[n].url.replace("{id}",t),e&&k.data(b.url,e),e}},set:{active:function(){k.addClass(g.active)}},remove:{active:function(){k.removeClass(g.active)},embed:function(){A.empty()}},encode:{parameters:function(e){var t,n=[];for(t in e)n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&amp;")}},generate:{embed:function(e){f.debug("Generating embed html");var t,n,i=f.get.source();return e=f.get.url(e),e?(n=f.generate.parameters(i),t=x.iframe(e,n)):f.error(v.noURL,k),t},parameters:function(t,n){var o=m[t]&&m[t].parameters!==i?m[t].parameters(p):{};return n=n||p.parameters,n&&(o=e.extend({},o,n)),o=p.onEmbed(o),f.encode.parameters(o)}},has:{embed:function(){return A.length>0},placeholder:function(){return p.placeholder||k.data(b.placeholder)}},should:{autoplay:function(){return"auto"===p.autoplay?p.placeholder||k.data(b.placeholder)!==i:p.autoplay}},is:{video:function(){return"video"==f.get.type()}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];e.isPlainObject(p[t])?e.extend(!0,p[t],n):p[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){!p.silent&&p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){p.silent||(f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;p.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=p.name+":",n=0;s=!1,clearTimeout(f.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,r){var a,s,l,c=j;return n=n||d,r=E||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(f.error(v.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},u?(j===i&&f.initialize(),f.invoke(c)):(j!==i&&j.invoke("destroy"),f.initialize())}),o!==i?o:this},e.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||i,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||i,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{iframe:function(e,t){var n=e;return t&&(n+="?"+t),'<iframe src="'+n+'" width="100%" height="100%" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},placeholder:function(e,t){var n="";return t&&(n+='<i class="'+t+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+e+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.modal=function(o){var r,a=e(this),s=e(t),l=e(n),c=e("body"),u=a.selector||"",d=(new Date).getTime(),f=[],p=arguments[0],h="string"==typeof p,g=[].slice.call(arguments,1),m=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var a,v,b,y,x,w,C,k,T,S=e.isPlainObject(o)?e.extend(!0,{},e.fn.modal.settings,o):e.extend({},e.fn.modal.settings),A=S.selector,E=S.className,j=S.namespace,R=S.error,D="."+j,O="module-"+j,P=e(this),F=e(S.context),L=P.find(A.close),q=this,N=P.data(O);T={initialize:function(){T.verbose("Initializing dimmer",F),T.create.id(),T.create.dimmer(),T.refreshModals(),T.bind.events(),S.observeChanges&&T.observeChanges(),T.instantiate()},instantiate:function(){T.verbose("Storing instance of modal"),N=T,P.data(O,N)},create:{dimmer:function(){var t={debug:S.debug,dimmerName:"modals",duration:{show:S.duration,hide:S.duration}},n=e.extend(!0,t,S.dimmerSettings);return S.inverted&&(n.variation=n.variation!==i?n.variation+" inverted":"inverted"),e.fn.dimmer===i?void T.error(R.dimmer):(T.debug("Creating dimmer with settings",n),y=F.dimmer(n),S.detachable?(T.verbose("Modal is detachable, moving content into dimmer"),y.dimmer("add content",P)):T.set.undetached(),S.blurring&&y.addClass(E.blurring),void(x=y.dimmer("get dimmer")))},id:function(){C=(Math.random().toString(16)+"000000000").substr(2,8),w="."+C,T.verbose("Creating unique id for element",C)}},destroy:function(){T.verbose("Destroying previous modal"),P.removeData(O).off(D),s.off(w),x.off(w),L.off(D),F.dimmer("destroy")},observeChanges:function(){"MutationObserver"in t&&(k=new MutationObserver(function(e){T.debug("DOM tree modified, refreshing"),T.refresh()}),k.observe(q,{childList:!0,subtree:!0}),T.debug("Setting up mutation observer",k))},refresh:function(){T.remove.scrolling(),T.cacheSizes(),T.set.screenHeight(),T.set.type(),T.set.position()},refreshModals:function(){v=P.siblings(A.modal),a=v.add(P)},attachEvents:function(t,n){var i=e(t);n=e.isFunction(T[n])?T[n]:T.toggle,i.length>0?(T.debug("Attaching modal events to element",t,n),i.off(D).on("click"+D,n)):T.error(R.notFound,t)},bind:{events:function(){T.verbose("Attaching events"),P.on("click"+D,A.close,T.event.close).on("click"+D,A.approve,T.event.approve).on("click"+D,A.deny,T.event.deny),s.on("resize"+w,T.event.resize)}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){return S.onApprove.call(q,e(this))===!1?void T.verbose("Approve callback returned false cancelling hide"):void T.hide()},deny:function(){return S.onDeny.call(q,e(this))===!1?void T.verbose("Deny callback returned false cancelling hide"):void T.hide()},close:function(){T.hide()},click:function(t){var i=e(t.target),o=i.closest(A.modal).length>0,r=e.contains(n.documentElement,t.target);!o&&r&&(T.debug("Dimmer clicked, hiding all modals"),T.is.active()&&(T.remove.clickaway(),S.allowMultiple?T.hide():T.hideAll()))},debounce:function(e,t){clearTimeout(T.timer),T.timer=setTimeout(e,t)},keyboard:function(e){var t=e.which,n=27;t==n&&(S.closable?(T.debug("Escape key pressed hiding modal"),T.hide()):T.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){y.dimmer("is active")&&m(T.refresh)}},toggle:function(){T.is.active()||T.is.animating()?T.hide():T.show()},show:function(t){t=e.isFunction(t)?t:function(){},T.refreshModals(),T.showModal(t)},hide:function(t){t=e.isFunction(t)?t:function(){},T.refreshModals(),T.hideModal(t)},showModal:function(t){t=e.isFunction(t)?t:function(){},T.is.animating()||!T.is.active()?(T.showDimmer(),T.cacheSizes(),T.set.position(),T.set.screenHeight(),T.set.type(),T.set.clickaway(),!S.allowMultiple&&T.others.active()?T.hideOthers(T.showModal):(S.onShow.call(q),S.transition&&e.fn.transition!==i&&P.transition("is supported")?(T.debug("Showing modal with css animations"),P.transition({debug:S.debug,animation:S.transition+" in",queue:S.queue,duration:S.duration,useFailSafe:!0,onComplete:function(){S.onVisible.apply(q),S.keyboardShortcuts&&T.add.keyboardShortcuts(),T.save.focus(),T.set.active(),S.autofocus&&T.set.autofocus(),t()}})):T.error(R.noTransition))):T.debug("Modal is already visible")},hideModal:function(t,n){return t=e.isFunction(t)?t:function(){},T.debug("Hiding modal"),S.onHide.call(q,e(this))===!1?void T.verbose("Hide callback returned false cancelling hide"):void((T.is.animating()||T.is.active())&&(S.transition&&e.fn.transition!==i&&P.transition("is supported")?(T.remove.active(),P.transition({debug:S.debug,animation:S.transition+" out",queue:S.queue,duration:S.duration,useFailSafe:!0,onStart:function(){T.others.active()||n||T.hideDimmer(),S.keyboardShortcuts&&T.remove.keyboardShortcuts()},onComplete:function(){S.onHidden.call(q),T.restore.focus(),t()}})):T.error(R.noTransition)))},showDimmer:function(){y.dimmer("is animating")||!y.dimmer("is active")?(T.debug("Showing dimmer"),y.dimmer("show")):T.debug("Dimmer already visible")},hideDimmer:function(){return y.dimmer("is animating")||y.dimmer("is active")?void y.dimmer("hide",function(){T.remove.clickaway(),T.remove.screenHeight()}):void T.debug("Dimmer is not visible cannot hide")},hideAll:function(t){var n=a.filter("."+E.active+", ."+E.animating);t=e.isFunction(t)?t:function(){},n.length>0&&(T.debug("Hiding all visible modals"),T.hideDimmer(),n.modal("hide modal",t))},hideOthers:function(t){var n=v.filter("."+E.active+", ."+E.animating);t=e.isFunction(t)?t:function(){},n.length>0&&(T.debug("Hiding other modals",v),n.modal("hide modal",t,!0))},others:{active:function(){return v.filter("."+E.active).length>0},animating:function(){return v.filter("."+E.animating).length>0}},add:{keyboardShortcuts:function(){T.verbose("Adding keyboard shortcuts"),l.on("keyup"+D,T.event.keyboard)}},save:{focus:function(){b=e(n.activeElement).blur()}},restore:{focus:function(){b&&b.length>0&&b.focus()}},remove:{active:function(){P.removeClass(E.active)},clickaway:function(){S.closable&&x.off("click"+w)},bodyStyle:function(){""===c.attr("style")&&(T.verbose("Removing style attribute"),c.removeAttr("style"))},screenHeight:function(){T.debug("Removing page height"),c.css("height","")},keyboardShortcuts:function(){T.verbose("Removing keyboard shortcuts"),l.off("keyup"+D)},scrolling:function(){y.removeClass(E.scrolling),P.removeClass(E.scrolling)}},cacheSizes:function(){var o=P.outerHeight();T.cache!==i&&0===o||(T.cache={pageHeight:e(n).outerHeight(),height:o+S.offset,contextHeight:"body"==S.context?e(t).height():y.height()}),T.debug("Caching modal and container sizes",T.cache)},can:{fit:function(){return T.cache.height+2*S.padding<T.cache.contextHeight}},is:{active:function(){return P.hasClass(E.active)},animating:function(){return P.transition("is supported")?P.transition("is animating"):P.is(":visible")},scrolling:function(){return y.hasClass(E.scrolling)},modernBrowser:function(){return!(t.ActiveXObject||"ActiveXObject"in t)}},set:{autofocus:function(){var e=P.find("[tabindex], :input").filter(":visible"),t=e.filter("[autofocus]"),n=t.length>0?t.first():e.first();n.length>0&&n.focus()},clickaway:function(){S.closable&&x.on("click"+w,T.event.click)},screenHeight:function(){T.can.fit()?c.css("height",""):(T.debug("Modal is taller than page content, resizing page height"),c.css("height",T.cache.height+2*S.padding))},active:function(){P.addClass(E.active)},scrolling:function(){y.addClass(E.scrolling),P.addClass(E.scrolling)},type:function(){T.can.fit()?(T.verbose("Modal fits on screen"),T.others.active()||T.others.animating()||T.remove.scrolling()):(T.verbose("Modal cannot fit on screen setting to scrolling"),T.set.scrolling())},position:function(){T.verbose("Centering modal on page",T.cache),T.can.fit()?P.css({top:"",marginTop:-(T.cache.height/2)}):P.css({marginTop:"",top:l.scrollTop()})},undetached:function(){y.addClass(E.undetached)}},setting:function(t,n){if(T.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,S,t);else{if(n===i)return S[t];e.isPlainObject(S[t])?e.extend(!0,S[t],n):S[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,T,t);else{if(n===i)return T[t];T[t]=n}},debug:function(){!S.silent&&S.debug&&(S.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,S.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!S.silent&&S.verbose&&S.debug&&(S.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,S.name+":"),T.verbose.apply(console,arguments)))},error:function(){S.silent||(T.error=Function.prototype.bind.call(console.error,console,S.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;S.performance&&(t=(new Date).getTime(),i=d||t,n=t-i,d=t,f.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:q,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var t=S.name+":",n=0;d=!1,clearTimeout(T.performance.timer),e.each(f,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&f.length>0&&(console.groupCollapsed(t),console.table?console.table(f):e.each(f,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),f=[]}},invoke:function(t,n,o){var a,s,l,c=N;return n=n||g,o=q||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},h?(N===i&&T.initialize(),T.invoke(p)):(N!==i&&N.invoke("destroy"),T.initialize())}),r!==i?r:this},e.fn.modal.settings={name:"Modal",namespace:"modal",silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,inverted:!1,blurring:!1,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,offset:0,transition:"scale",padding:50,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",scrolling:"scrolling",undetached:"undetached"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.nag=function(n){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return r.each(function(){var r,f=e.isPlainObject(n)?e.extend(!0,{},e.fn.nag.settings,n):e.extend({},e.fn.nag.settings),p=(f.className,f.selector),h=f.error,g=f.namespace,m="."+g,v=g+"-module",b=e(this),y=(b.find(p.close),e(f.context?f.context:"body")),x=this,w=b.data(v);t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},r={initialize:function(){r.verbose("Initializing element"),b.on("click"+m,p.close,r.dismiss).data(v,r),f.detachable&&b.parent()[0]!==y[0]&&b.detach().prependTo(y),f.displayTime>0&&setTimeout(r.hide,f.displayTime),r.show()},destroy:function(){r.verbose("Destroying instance"),b.removeData(v).off(m)},show:function(){r.should.show()&&!b.is(":visible")&&(r.debug("Showing nag",f.animation.show),"fade"==f.animation.show?b.fadeIn(f.duration,f.easing):b.slideDown(f.duration,f.easing))},hide:function(){r.debug("Showing nag",f.animation.hide),"fade"==f.animation.show?b.fadeIn(f.duration,f.easing):b.slideUp(f.duration,f.easing)},onHide:function(){r.debug("Removing nag",f.animation.hide),b.remove(),f.onHide&&f.onHide()},dismiss:function(e){f.storageMethod&&r.storage.set(f.key,f.value),r.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return f.persist?(r.debug("Persistent nag is set, can show nag"),!0):r.storage.get(f.key)!=f.value.toString()?(r.debug("Stored value is not set, can show nag",r.storage.get(f.key)),!0):(r.debug("Stored value is set, cannot show nag",r.storage.get(f.key)),!1)}},get:{storageOptions:function(){var e={};return f.expires&&(e.expires=f.expires),f.domain&&(e.domain=f.domain),f.path&&(e.path=f.path),e}},clear:function(){r.storage.remove(f.key)},storage:{set:function(n,o){var a=r.get.storageOptions();if("localstorage"==f.storageMethod&&t.localStorage!==i)t.localStorage.setItem(n,o),r.debug("Value stored using local storage",n,o);else if("sessionstorage"==f.storageMethod&&t.sessionStorage!==i)t.sessionStorage.setItem(n,o),r.debug("Value stored using session storage",n,o);else{if(e.cookie===i)return void r.error(h.noCookieStorage);e.cookie(n,o,a),r.debug("Value stored using cookie",n,o,a)}},get:function(n,o){var a;return"localstorage"==f.storageMethod&&t.localStorage!==i?a=t.localStorage.getItem(n):"sessionstorage"==f.storageMethod&&t.sessionStorage!==i?a=t.sessionStorage.getItem(n):e.cookie!==i?a=e.cookie(n):r.error(h.noCookieStorage),"undefined"!=a&&"null"!=a&&a!==i&&null!==a||(a=i),a},remove:function(n){var o=r.get.storageOptions();"localstorage"==f.storageMethod&&t.localStorage!==i?t.localStorage.removeItem(n):"sessionstorage"==f.storageMethod&&t.sessionStorage!==i?t.sessionStorage.removeItem(n):e.cookie!==i?e.removeCookie(n,o):r.error(h.noStorage)}},setting:function(t,n){if(r.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];e.isPlainObject(f[t])?e.extend(!0,f[t],n):f[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,r,t);else{if(n===i)return r[t];r[t]=n}},debug:function(){!f.silent&&f.debug&&(f.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,f.name+":"),r.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),r.verbose.apply(console,arguments)))},error:function(){f.silent||(r.error=Function.prototype.bind.call(console.error,console,f.name+":"),r.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;f.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(r.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,a){var s,l,c,u=w;return n=n||d,a=x||a,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,o){var a=n!=s?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[a])&&n!=s)u=u[a];else{if(u[a]!==i)return l=u[a],!1;if(!e.isPlainObject(u[o])||n==s)return u[o]!==i?(l=u[o],!1):(r.error(h.method,t),!1);u=u[o]}})),e.isFunction(l)?c=l.apply(a,n):l!==i&&(c=l),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),l}},u?(w===i&&r.initialize(),r.invoke(c)):(w!==i&&w.invoke("destroy"),r.initialize())}),o!==i?o:this},e.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noCookieStorage:"$.cookie is not included. A storage solution is required.",noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}},e.extend(e.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.popup=function(o){var r,a=e(this),s=e(n),l=e(t),c=e("body"),u=a.selector||"",d=!0,f=(new Date).getTime(),p=[],h=arguments[0],g="string"==typeof h,m=[].slice.call(arguments,1);return a.each(function(){var a,v,b,y,x,w,C=e.isPlainObject(o)?e.extend(!0,{},e.fn.popup.settings,o):e.extend({},e.fn.popup.settings),k=C.selector,T=C.className,S=C.error,A=C.metadata,E=C.namespace,j="."+C.namespace,R="module-"+E,D=e(this),O=e(C.context),P=e(C.scrollContext),F=e(C.boundary),L=C.target?e(C.target):D,q=0,N=!1,M=!1,I=this,H=D.data(R);w={initialize:function(){w.debug("Initializing",D),w.createID(),w.bind.events(),!w.exists()&&C.preserve&&w.create(),C.observeChanges&&w.observeChanges(),w.instantiate()},instantiate:function(){w.verbose("Storing instance",w),H=w,D.data(R,H)},observeChanges:function(){"MutationObserver"in t&&(b=new MutationObserver(w.event.documentChanged),b.observe(n,{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",b))},refresh:function(){C.popup?a=e(C.popup).eq(0):C.inline&&(a=L.nextAll(k.popup).eq(0),C.popup=a),C.popup?(a.addClass(T.loading),v=w.get.offsetParent(),a.removeClass(T.loading),C.movePopup&&w.has.popup()&&w.get.offsetParent(a)[0]!==v[0]&&(w.debug("Moving popup to the same offset parent as activating element"),a.detach().appendTo(v))):v=C.inline?w.get.offsetParent(L):w.has.popup()?w.get.offsetParent(a):c,v.is("html")&&v[0]!==c[0]&&(w.debug("Setting page as offset parent"),v=c),w.get.variation()&&w.set.variation()},reposition:function(){w.refresh(),w.set.position()},destroy:function(){w.debug("Destroying previous module"),b&&b.disconnect(),a&&!C.preserve&&w.removePopup(),clearTimeout(w.hideTimer),clearTimeout(w.showTimer),w.unbind.close(),w.unbind.events(),D.removeData(R)},event:{start:function(t){var n=e.isPlainObject(C.delay)?C.delay.show:C.delay;clearTimeout(w.hideTimer),M||(w.showTimer=setTimeout(w.show,n))},end:function(){var t=e.isPlainObject(C.delay)?C.delay.hide:C.delay;clearTimeout(w.showTimer),w.hideTimer=setTimeout(w.hide,t)},touchstart:function(e){M=!0,w.show()},resize:function(){w.is.visible()&&w.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==I||e(t).find(I).length>0)&&(w.debug("Element removed from DOM, tearing down events"),w.destroy())})})},hideGracefully:function(t){var i=e(t.target),o=e.contains(n.documentElement,t.target),r=i.closest(k.popup).length>0;t&&!r&&o?(w.debug("Click occurred outside popup hiding popup"),w.hide()):w.debug("Click was inside popup, keeping popup open")}},create:function(){var t=w.get.html(),n=w.get.title(),i=w.get.content();t||i||n?(w.debug("Creating pop-up html"),t||(t=C.templates.popup({title:n,content:i})),a=e("<div/>").addClass(T.popup).data(A.activator,D).html(t),C.inline?(w.verbose("Inserting popup element inline",a),a.insertAfter(D)):(w.verbose("Appending popup element to body",a),a.appendTo(O)),w.refresh(),w.set.variation(),C.hoverable&&w.bind.popup(),C.onCreate.call(a,I)):0!==L.next(k.popup).length?(w.verbose("Pre-existing popup found"),C.inline=!0,C.popup=L.next(k.popup).data(A.activator,D),w.refresh(),C.hoverable&&w.bind.popup()):C.popup?(e(C.popup).data(A.activator,D),w.verbose("Used popup specified in settings"),w.refresh(),C.hoverable&&w.bind.popup()):w.debug("No content specified skipping display",I)},createID:function(){x=(Math.random().toString(16)+"000000000").substr(2,8),y="."+x,w.verbose("Creating unique id for element",x)},toggle:function(){w.debug("Toggling pop-up"),w.is.hidden()?(w.debug("Popup is hidden, showing pop-up"),w.unbind.close(),w.show()):(w.debug("Popup is visible, hiding pop-up"),
w.hide())},show:function(e){if(e=e||function(){},w.debug("Showing pop-up",C.transition),w.is.hidden()&&(!w.is.active()||!w.is.dropdown())){if(w.exists()||w.create(),C.onShow.call(a,I)===!1)return void w.debug("onShow callback returned false, cancelling popup animation");C.preserve||C.popup||w.refresh(),a&&w.set.position()&&(w.save.conditions(),C.exclusive&&w.hideAll(),w.animate.show(e))}},hide:function(e){if(e=e||function(){},w.is.visible()||w.is.animating()){if(C.onHide.call(a,I)===!1)return void w.debug("onHide callback returned false, cancelling popup animation");w.remove.visible(),w.unbind.close(),w.restore.conditions(),w.animate.hide(e)}},hideAll:function(){e(k.popup).filter("."+T.visible).each(function(){e(this).data(A.activator).popup("hide")})},exists:function(){return!!a&&(C.inline||C.popup?w.has.popup():a.closest(O).length>=1)},removePopup:function(){w.has.popup()&&!C.popup&&(w.debug("Removing popup",a),a.remove(),a=i,C.onRemove.call(a,I))},save:{conditions:function(){w.cache={title:D.attr("title")},w.cache.title&&D.removeAttr("title"),w.verbose("Saving original attributes",w.cache.title)}},restore:{conditions:function(){return w.cache&&w.cache.title&&(D.attr("title",w.cache.title),w.verbose("Restoring original attributes",w.cache.title)),!0}},supports:{svg:function(){return typeof SVGGraphicsElement===i}},animate:{show:function(t){t=e.isFunction(t)?t:function(){},C.transition&&e.fn.transition!==i&&D.transition("is supported")?(w.set.visible(),a.transition({animation:C.transition+" in",queue:!1,debug:C.debug,verbose:C.verbose,duration:C.duration,onComplete:function(){w.bind.close(),t.call(a,I),C.onVisible.call(a,I)}})):w.error(S.noTransition)},hide:function(t){return t=e.isFunction(t)?t:function(){},w.debug("Hiding pop-up"),C.onHide.call(a,I)===!1?void w.debug("onHide callback returned false, cancelling popup animation"):void(C.transition&&e.fn.transition!==i&&D.transition("is supported")?a.transition({animation:C.transition+" out",queue:!1,duration:C.duration,debug:C.debug,verbose:C.verbose,onComplete:function(){w.reset(),t.call(a,I),C.onHidden.call(a,I)}}):w.error(S.noTransition))}},change:{content:function(e){a.html(e)}},get:{html:function(){return D.removeData(A.html),D.data(A.html)||C.html},title:function(){return D.removeData(A.title),D.data(A.title)||C.title},content:function(){return D.removeData(A.content),D.data(A.content)||D.attr("title")||C.content},variation:function(){return D.removeData(A.variation),D.data(A.variation)||C.variation},popup:function(){return a},popupOffset:function(){return a.offset()},calculations:function(){var e,n=L[0],i=F[0]==t,o=C.inline||C.popup&&C.movePopup?L.position():L.offset(),r=i?{top:0,left:0}:F.offset(),s={},c=i?{top:l.scrollTop(),left:l.scrollLeft()}:{top:0,left:0};return s={target:{element:L[0],width:L.outerWidth(),height:L.outerHeight(),top:o.top,left:o.left,margin:{}},popup:{width:a.outerWidth(),height:a.outerHeight()},parent:{width:v.outerWidth(),height:v.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:c.top,left:c.left},width:F.width(),height:F.height()}},C.setFluidWidth&&w.is.fluid()&&(s.container={width:a.parent().outerWidth()},s.popup.width=s.container.width),s.target.margin.top=C.inline?parseInt(t.getComputedStyle(n).getPropertyValue("margin-top"),10):0,s.target.margin.left=C.inline?w.is.rtl()?parseInt(t.getComputedStyle(n).getPropertyValue("margin-right"),10):parseInt(t.getComputedStyle(n).getPropertyValue("margin-left"),10):0,e=s.screen,s.boundary={top:e.top+e.scroll.top,bottom:e.top+e.scroll.top+e.height,left:e.left+e.scroll.left,right:e.left+e.scroll.left+e.width},s},id:function(){return x},startEvent:function(){return"hover"==C.on?"mouseenter":"focus"==C.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==C.on?"mouseleave":"focus"==C.on&&"blur"},distanceFromBoundary:function(e,t){var n,i,o={};return t=t||w.get.calculations(),n=t.popup,i=t.boundary,e&&(o={top:e.top-i.top,left:e.left-i.left,right:i.right-(e.left+n.width),bottom:i.bottom-(e.top+n.height)},w.verbose("Distance from boundaries determined",e,o)),o},offsetParent:function(t){var n=t!==i?t[0]:D[0],o=n.parentNode,r=e(o);if(o)for(var a="none"===r.css("transform"),s="static"===r.css("position"),l=r.is("html");o&&!l&&s&&a;)o=o.parentNode,r=e(o),a="none"===r.css("transform"),s="static"===r.css("position"),l=r.is("html");return r&&r.length>0?r:e()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],i=t[1],o={top:"bottom",bottom:"top",left:"right",right:"left"},r={left:"center",center:"right",right:"left"},a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"},s="top"==n||"bottom"==n,l=!1,c=!1,u=!1;return N||(w.verbose("All available positions available"),N=w.get.positions()),w.debug("Recording last position tried",e),N[e]=!0,"opposite"===C.prefer&&(u=[o[n],i],u=u.join(" "),l=N[u]===!0,w.debug("Trying opposite strategy",u)),"adjacent"===C.prefer&&s&&(u=[n,r[i]],u=u.join(" "),c=N[u]===!0,w.debug("Trying adjacent strategy",u)),(c||l)&&(w.debug("Using backup position",u),u=a[e]),u}},set:{position:function(e,t){if(0===L.length||0===a.length)return void w.error(S.notFound);var n,o,r,s,l,c,u,d;if(t=t||w.get.calculations(),e=e||D.data(A.position)||C.position,n=D.data(A.offset)||C.offset,o=C.distanceAway,r=t.target,s=t.popup,l=t.parent,0===r.width&&0===r.height&&!w.is.svg(r.element))return w.debug("Popup target is hidden, no action taken"),!1;switch(C.inline&&(w.debug("Adding margin to calculation",r.margin),"left center"==e||"right center"==e?(n+=r.margin.top,o+=-r.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=r.margin.left,o-=r.margin.top):(n+=r.margin.left,o+=r.margin.top)),w.debug("Determining popup position from calculations",e,t),w.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),w.debug("RTL: Popup position updated",e)),q==C.maxSearchDepth&&"string"==typeof C.lastResort&&(e=C.lastResort),e){case"top left":c={top:"auto",bottom:l.height-r.top+o,left:r.left+n,right:"auto"};break;case"top center":c={bottom:l.height-r.top+o,left:r.left+r.width/2-s.width/2+n,top:"auto",right:"auto"};break;case"top right":c={bottom:l.height-r.top+o,right:l.width-r.left-r.width-n,top:"auto",left:"auto"};break;case"left center":c={top:r.top+r.height/2-s.height/2+n,right:l.width-r.left+o,left:"auto",bottom:"auto"};break;case"right center":c={top:r.top+r.height/2-s.height/2+n,left:r.left+r.width+o,bottom:"auto",right:"auto"};break;case"bottom left":c={top:r.top+r.height+o,left:r.left+n,bottom:"auto",right:"auto"};break;case"bottom center":c={top:r.top+r.height+o,left:r.left+r.width/2-s.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":c={top:r.top+r.height+o,right:l.width-r.left-r.width-n,left:"auto",bottom:"auto"}}if(c===i&&w.error(S.invalidPosition,e),w.debug("Calculated popup positioning values",c),a.css(c).removeClass(T.position).addClass(e).addClass(T.loading),u=w.get.popupOffset(),d=w.get.distanceFromBoundary(u,t),w.is.offstage(d,e)){if(w.debug("Position is outside viewport",e),q<C.maxSearchDepth)return q++,e=w.get.nextPosition(e),w.debug("Trying new position",e),!!a&&w.set.position(e,t);if(!C.lastResort)return w.debug("Popup could not find a position to display",a),w.error(S.cannotPlace,I),w.remove.attempts(),w.remove.loading(),w.reset(),C.onUnplaceable.call(a,I),!1;w.debug("No position found, showing with last position")}return w.debug("Position is on stage",e),w.remove.attempts(),w.remove.loading(),C.setFluidWidth&&w.is.fluid()&&w.set.fluidWidth(t),!0},fluidWidth:function(e){e=e||w.get.calculations(),w.debug("Automatically setting element width to parent width",e.parent.width),a.css("width",e.container.width)},variation:function(e){e=e||w.get.variation(),e&&w.has.popup()&&(w.verbose("Adding variation to popup",e),a.addClass(e))},visible:function(){D.addClass(T.visible)}},remove:{loading:function(){a.removeClass(T.loading)},variation:function(e){e=e||w.get.variation(),e&&(w.verbose("Removing variation",e),a.removeClass(e))},visible:function(){D.removeClass(T.visible)},attempts:function(){w.verbose("Resetting all searched positions"),q=0,N=!1}},bind:{events:function(){w.debug("Binding popup events to module"),"click"==C.on&&D.on("click"+j,w.toggle),"hover"==C.on&&d&&D.on("touchstart"+j,w.event.touchstart),w.get.startEvent()&&D.on(w.get.startEvent()+j,w.event.start).on(w.get.endEvent()+j,w.event.end),C.target&&w.debug("Target set to element",L),l.on("resize"+y,w.event.resize)},popup:function(){w.verbose("Allowing hover events on popup to prevent closing"),a&&w.has.popup()&&a.on("mouseenter"+j,w.event.start).on("mouseleave"+j,w.event.end)},close:function(){(C.hideOnScroll===!0||"auto"==C.hideOnScroll&&"click"!=C.on)&&P.one(w.get.scrollEvent()+y,w.event.hideGracefully),"hover"==C.on&&M&&(w.verbose("Binding popup close event to document"),s.on("touchstart"+y,function(e){w.verbose("Touched away from popup"),w.event.hideGracefully.call(I,e)})),"click"==C.on&&C.closable&&(w.verbose("Binding popup close event to document"),s.on("click"+y,function(e){w.verbose("Clicked away from popup"),w.event.hideGracefully.call(I,e)}))}},unbind:{events:function(){l.off(y),D.off(j)},close:function(){s.off(y),P.off(y)}},has:{popup:function(){return a&&a.length>0}},is:{offstage:function(t,n){var i=[];return e.each(t,function(e,t){t<-C.jitter&&(w.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),i.length>0},svg:function(e){return w.supports.svg()&&e instanceof SVGGraphicsElement},active:function(){return D.hasClass(T.active)},animating:function(){return a!==i&&a.hasClass(T.animating)},fluid:function(){return a!==i&&a.hasClass(T.fluid)},visible:function(){return a!==i&&a.hasClass(T.visible)},dropdown:function(){return D.hasClass(T.dropdown)},hidden:function(){return!w.is.visible()},rtl:function(){return"rtl"==D.css("direction")}},reset:function(){w.remove.visible(),C.preserve?e.fn.transition!==i&&a.transition("remove transition"):w.removePopup()},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(n===i)return C[t];C[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,w,t);else{if(n===i)return w[t];w[t]=n}},debug:function(){!C.silent&&C.debug&&(C.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,C.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!C.silent&&C.verbose&&C.debug&&(C.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,C.name+":"),w.verbose.apply(console,arguments)))},error:function(){C.silent||(w.error=Function.prototype.bind.call(console.error,console,C.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;C.performance&&(t=(new Date).getTime(),i=f||t,n=t-i,f=t,p.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:I,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var t=C.name+":",n=0;f=!1,clearTimeout(w.performance.timer),e.each(p,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",u&&(t+=" '"+u+"'"),(console.group!==i||console.table!==i)&&p.length>0&&(console.groupCollapsed(t),console.table?console.table(p):e.each(p,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),p=[]}},invoke:function(t,n,o){var a,s,l,c=H;return n=n||m,o=I||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},g?(H===i&&w.initialize(),w.invoke(h)):(H!==i&&H.invoke("destroy"),w.initialize())}),r!==i?r:this},e.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:t,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:t,prefer:"opposite",lastResort:!1,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t=/[&<>"'`]/g,n=/[&<>"'`]/,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},o=function(e){return i[e]};return n.test(e)?e.replace(t,o):e},popup:function(t){var n="",o=e.fn.popup.settings.templates.escape;return typeof t!==i&&(typeof t.title!==i&&t.title&&(t.title=o(t.title),n+='<div class="header">'+t.title+"</div>"),typeof t.content!==i&&t.content&&(t.content=o(t.content),n+='<div class="content">'+t.content+"</div>")),n}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),"undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.progress=function(t){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return r.each(function(){var r,f,p=e.isPlainObject(t)?e.extend(!0,{},e.fn.progress.settings,t):e.extend({},e.fn.progress.settings),h=p.className,g=p.metadata,m=p.namespace,v=p.selector,b=p.error,y="."+m,x="module-"+m,w=e(this),C=e(this).find(v.bar),k=e(this).find(v.progress),T=e(this).find(v.label),S=this,A=w.data(x),E=!1;f={initialize:function(){f.debug("Initializing progress bar",p),f.set.duration(),f.set.transitionEvent(),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),A=f,w.data(x,f)},destroy:function(){f.verbose("Destroying previous progress for",w),clearInterval(A.interval),f.remove.state(),w.removeData(x),A=i},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(){(f.percent===i||f.percent<100)&&(f.remove.progressPoll(),f.set.percent(100))},read:{metadata:function(){var e={percent:w.data(g.percent),total:w.data(g.total),value:w.data(g.value)};e.percent&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent)),e.total&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),e.value&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value))},settings:function(){p.total!==!1&&(f.debug("Current total set in settings",p.total),f.set.total(p.total)),p.value!==!1&&(f.debug("Current value set in settings",p.value),f.set.value(p.value),f.set.progress(f.value)),p.percent!==!1&&(f.debug("Current percent set in settings",p.percent),f.set.percent(p.percent))}},bind:{transitionEnd:function(e){var t=f.get.transitionEnd();C.one(t+y,function(t){clearTimeout(f.failSafeTimer),e.call(this,t)}),f.failSafeTimer=setTimeout(function(){C.triggerHandler(t)},p.duration+p.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){var t,n,i;f.has.total()?(n=f.get.value(),e=e||1,i=n+e):(n=f.get.percent(),e=e||f.get.randomValue(),i=n+e,t=100,f.debug("Incrementing percentage by",n,i)),i=f.get.normalizedValue(i),f.set.progress(i)},decrement:function(e){var t,n,i=f.get.total();i?(t=f.get.value(),e=e||1,n=t-e,f.debug("Decrementing value by",e,t)):(t=f.get.percent(),e=e||f.get.randomValue(),n=t-e,f.debug("Decrementing percentage by",e,t)),n=f.get.normalizedValue(n),f.set.progress(n)},has:{progressPoll:function(){return f.progressPoll},total:function(){return f.get.total()!==!1}},get:{text:function(e){var t=f.value||0,n=f.total||0,i=E?f.get.displayPercent():f.percent||0,o=f.total>0?n-t:100-i;return e=e||"",e=e.replace("{value}",t).replace("{total}",n).replace("{left}",o).replace("{percent}",i),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(e>100)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==p.updateInterval?p.duration:p.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*p.random.max+p.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},displayPercent:function(){var e=C.width(),t=w.width(),n=parseInt(C.css("min-width"),10),i=e>n?e/t*100:f.percent;return p.precision>0?Math.round(i*(10*p.precision))/(10*p.precision):Math.round(i)},percent:function(){return f.percent||0},value:function(){return f.nextValue||f.value||0},total:function(){return f.total||!1}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return w.hasClass(h.success)},warning:function(){return w.hasClass(h.warning)},error:function(){return w.hasClass(h.error)},active:function(){return w.hasClass(h.active)},visible:function(){return w.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),w.removeClass(h.active)},success:function(){f.verbose("Removing success state"),w.removeClass(h.success)},warning:function(){f.verbose("Removing warning state"),w.removeClass(h.warning)},error:function(){f.verbose("Removing error state"),w.removeClass(h.error)}},set:{barWidth:function(e){e>100?f.error(b.tooHigh,e):e<0?f.error(b.tooLow,e):(C.css("width",e+"%"),w.attr("data-percent",parseInt(e,10)))},duration:function(e){e=e||p.duration,e="number"==typeof e?e+"ms":e,f.verbose("Setting progress bar transition duration",e),C.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=p.precision>0?Math.round(e*(10*p.precision))/(10*p.precision):Math.round(e),f.percent=e,f.has.total()||(f.value=p.precision>0?Math.round(e/100*f.total*(10*p.precision))/(10*p.precision):Math.round(e/100*f.total*10)/10,p.limitValues&&(f.value=f.value>100?100:f.value<0?0:f.value)),f.set.barWidth(e),f.set.labelInterval(),f.set.labels(),p.onChange.call(S,e,f.value,f.total)},labelInterval:function(){var t=function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),E=!1,f.set.labels()};clearInterval(f.interval),f.bind.transitionEnd(t),E=!0,f.interval=setInterval(function(){var t=e.contains(n.documentElement,S);t||(clearInterval(f.interval),E=!1),f.set.labels()},p.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){e=e||"",e&&(e=f.get.text(e),f.verbose("Setting label to text",e),T.text(e))},state:function(e){e=e!==i?e:f.percent,100===e?p.autoSuccess&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):e>0?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.set.label(p.text.active))},barLabel:function(e){e!==i?k.text(f.get.text(e)):"ratio"==p.label&&f.total?(f.verbose("Adding ratio to bar label"),k.text(f.get.text(p.text.ratio))):"percent"==p.label&&(f.verbose("Adding percentage to bar label"),k.text(f.get.text(p.text.percent)))},active:function(e){e=e||p.text.active,f.debug("Setting active state"),p.showActivity&&!f.is.active()&&w.addClass(h.active),f.remove.warning(),f.remove.error(),f.remove.success(),e=p.onLabelUpdate("active",e,f.value,f.total),e&&f.set.label(e),f.bind.transitionEnd(function(){p.onActive.call(S,f.value,f.total)})},success:function(e){e=e||p.text.success||p.text.active,f.debug("Setting success state"),w.addClass(h.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(),p.text.success?(e=p.onLabelUpdate("success",e,f.value,f.total),f.set.label(e)):(e=p.onLabelUpdate("active",e,f.value,f.total),f.set.label(e)),f.bind.transitionEnd(function(){p.onSuccess.call(S,f.total)})},warning:function(e){e=e||p.text.warning,f.debug("Setting warning state"),w.addClass(h.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(),e=p.onLabelUpdate("warning",e,f.value,f.total),e&&f.set.label(e),f.bind.transitionEnd(function(){p.onWarning.call(S,f.value,f.total)})},error:function(e){e=e||p.text.error,f.debug("Setting error state"),w.addClass(h.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(),e=p.onLabelUpdate("error",e,f.value,f.total),e&&f.set.label(e),f.bind.transitionEnd(function(){p.onError.call(S,f.value,f.total)})},transitionEvent:function(){r=f.get.transitionEnd()},total:function(e){f.total=e},value:function(e){f.value=e},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){var t;e=f.get.numericValue(e),e===!1&&f.error(b.nonNumeric,e),e=f.get.normalizedValue(e),f.has.total()?(f.set.value(e),t=e/f.total*100,f.debug("Calculating percent complete from total",t),f.set.percent(t)):(t=e,f.debug("Setting value to exact percentage value",t),f.set.percent(t))}},setting:function(t,n){if(f.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];e.isPlainObject(p[t])?e.extend(!0,p[t],n):p[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(n===i)return f[t];f[t]=n}},debug:function(){!p.silent&&p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){p.silent||(f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;p.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=p.name+":",n=0;s=!1,clearTimeout(f.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,r){var a,s,l,c=A;return n=n||d,r=S||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(f.error(b.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},u?(A===i&&f.initialize(),f.invoke(c)):(A!==i&&A.invoke("destroy"),f.initialize())}),o!==i?o:this},e.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}"},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.search=function(o){var r,a=e(this),s=a.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1);return e(this).each(function(){var p,h=e.isPlainObject(o)?e.extend(!0,{},e.fn.search.settings,o):e.extend({},e.fn.search.settings),g=h.className,m=h.metadata,v=h.regExp,b=h.fields,y=h.selector,x=h.error,w=h.namespace,C="."+w,k=w+"-module",T=e(this),S=T.find(y.prompt),A=T.find(y.searchButton),E=T.find(y.results),j=T.find(y.result),R=T.find(y.category),D=this,O=T.data(k),P=!1;p={initialize:function(){p.verbose("Initializing module"),p.determine.searchFields(),p.bind.events(),p.set.type(),p.create.results(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),O=p,T.data(k,p)},destroy:function(){p.verbose("Destroying instance"),T.off(C).removeData(k)},refresh:function(){p.debug("Refreshing selector cache"),S=T.find(y.prompt),A=T.find(y.searchButton),R=T.find(y.category),E=T.find(y.results),j=T.find(y.result)},refreshResults:function(){E=T.find(y.results),j=T.find(y.result)},bind:{events:function(){p.verbose("Binding events to search"),h.automatic&&(T.on(p.get.inputEvent()+C,y.prompt,p.event.input),S.attr("autocomplete","off")),T.on("focus"+C,y.prompt,p.event.focus).on("blur"+C,y.prompt,p.event.blur).on("keydown"+C,y.prompt,p.handleKeyboard).on("click"+C,y.searchButton,p.query).on("mousedown"+C,y.results,p.event.result.mousedown).on("mouseup"+C,y.results,p.event.result.mouseup).on("click"+C,y.result,p.event.result.click)}},determine:{searchFields:function(){o&&o.searchFields!==i&&(h.searchFields=o.searchFields)}},event:{input:function(){clearTimeout(p.timer),p.timer=setTimeout(p.query,h.searchDelay)},focus:function(){p.set.focus(),p.has.minimumCharacters()&&(p.query(),p.can.show()&&p.showResults())},blur:function(e){var t=n.activeElement===this,i=function(){p.cancel.query(),p.remove.focus(),p.timer=setTimeout(p.hideResults,h.hideDelay)};t||(p.resultsClicked?(p.debug("Determining if user action caused search to close"),T.one("click.close"+C,y.results,function(e){return p.is.inMessage(e)||P?void S.focus():(P=!1,void(p.is.animating()||p.is.hidden()||i()))})):(p.debug("Input blurred without user action, closing results"),i()))},result:{mousedown:function(){p.resultsClicked=!0},mouseup:function(){p.resultsClicked=!1},click:function(n){p.debug("Search result selected");var i=e(this),o=i.find(y.title).eq(0),r=i.is("a[href]")?i:i.find("a[href]").eq(0),a=r.attr("href")||!1,s=r.attr("target")||!1,l=(o.html(),o.length>0&&o.text()),c=p.get.results(),u=i.data(m.result)||p.get.result(l,c);return e.isFunction(h.onSelect)&&h.onSelect.call(D,u,c)===!1?(p.debug("Custom onSelect callback cancelled default select action"),void(P=!0)):(p.hideResults(),l&&p.set.value(l),void(a&&(p.verbose("Opening search link found in result",r),"_blank"==s||n.ctrlKey?t.open(a):t.location.href=a)))}}},handleKeyboard:function(e){var t,n=T.find(y.result),i=T.find(y.category),o=n.filter("."+g.active),r=n.index(o),a=n.length,s=o.length>0,l=e.which,c={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40};if(l==c.escape&&(p.verbose("Escape key pressed, blurring search field"),p.trigger.blur()),p.is.visible())if(l==c.enter){if(p.verbose("Enter key pressed, selecting active result"),n.filter("."+g.active).length>0)return p.event.result.click.call(n.filter("."+g.active),e),e.preventDefault(),!1}else l==c.upArrow&&s?(p.verbose("Up key pressed, changing active result"),t=r-1<0?r:r-1,i.removeClass(g.active),n.removeClass(g.active).eq(t).addClass(g.active).closest(i).addClass(g.active),e.preventDefault()):l==c.downArrow&&(p.verbose("Down key pressed, changing active result"),t=r+1>=a?r:r+1,i.removeClass(g.active),n.removeClass(g.active).eq(t).addClass(g.active).closest(i).addClass(g.active),e.preventDefault());else l==c.enter&&(p.verbose("Enter key pressed, executing query"),p.query(),p.set.buttonPressed(),S.one("keyup",p.remove.buttonFocus))},setup:{api:function(t){var n={debug:h.debug,on:!1,cache:!0,action:"search",urlData:{query:t},onSuccess:function(e){p.parse.response.call(D,e,t)},onAbort:function(e){},onFailure:function(){p.displayMessage(x.serverError)},onError:p.error};e.extend(!0,n,h.apiSettings),p.verbose("Setting up API request",n),T.api(n)}},can:{useAPI:function(){return e.fn.api!==i},show:function(){return p.is.focused()&&!p.is.visible()&&!p.is.empty()},transition:function(){return h.transition&&e.fn.transition!==i&&T.transition("is supported")}},is:{animating:function(){return E.hasClass(g.animating)},hidden:function(){return E.hasClass(g.hidden)},inMessage:function(t){if(t.target){var i=e(t.target),o=e.contains(n.documentElement,t.target);return o&&i.closest(y.message).length>0}},empty:function(){return""===E.html()},visible:function(){return E.filter(":visible").length>0},focused:function(){return S.filter(":focus").length>0}},trigger:{blur:function(){var e=n.createEvent("HTMLEvents"),t=S[0];t&&(p.verbose("Triggering native blur event"),e.initEvent("blur",!1,!1),t.dispatchEvent(e))}},get:{inputEvent:function(){var e=S[0],t=e!==i&&e.oninput!==i?"input":e!==i&&e.onpropertychange!==i?"propertychange":"keyup";return t},value:function(){return S.val()},results:function(){var e=T.data(m.results);return e},result:function(t,n){var o=["title","id"],r=!1;return t=t!==i?t:p.get.value(),n=n!==i?n:p.get.results(),"category"===h.type?(p.debug("Finding result that matches",t),
e.each(n,function(n,i){if(e.isArray(i.results)&&(r=p.search.object(t,i.results,o)[0]))return!1})):(p.debug("Finding result in results object",t),r=p.search.object(t,n,o)[0]),r||!1}},select:{firstResult:function(){p.verbose("Selecting first result"),j.first().addClass(g.active)}},set:{focus:function(){T.addClass(g.focus)},loading:function(){T.addClass(g.loading)},value:function(e){p.verbose("Setting search input value",e),S.val(e)},type:function(e){e=e||h.type,"category"==h.type&&T.addClass(h.type)},buttonPressed:function(){A.addClass(g.pressed)}},remove:{loading:function(){T.removeClass(g.loading)},focus:function(){T.removeClass(g.focus)},buttonPressed:function(){A.removeClass(g.pressed)}},query:function(){var t=p.get.value(),n=p.read.cache(t);p.has.minimumCharacters()?(n?(p.debug("Reading result from cache",t),p.save.results(n.results),p.addResults(n.html),p.inject.id(n.results)):(p.debug("Querying for",t),e.isPlainObject(h.source)||e.isArray(h.source)?p.search.local(t):p.can.useAPI()?p.search.remote(t):p.error(x.source)),h.onSearchQuery.call(D,t)):p.hideResults()},search:{local:function(e){var t,n=p.search.object(e,h.content);p.set.loading(),p.save.results(n),p.debug("Returned local search results",n),t=p.generateResults({results:n}),p.remove.loading(),p.addResults(t),p.inject.id(n),p.write.cache(e,{html:t,results:n})},remote:function(e){T.api("is loading")&&T.api("abort"),p.setup.api(e),T.api("query")},object:function(t,n,o){var r=[],a=[],s=t.toString().replace(v.escape,"\\$&"),l=new RegExp(v.beginsWith+s,"i"),c=function(t,n){var i=e.inArray(n,r)==-1,o=e.inArray(n,a)==-1;i&&o&&t.push(n)};return n=n||h.source,o=o!==i?o:h.searchFields,e.isArray(o)||(o=[o]),n===i||n===!1?(p.error(x.source),[]):(e.each(o,function(i,o){e.each(n,function(e,n){var i="string"==typeof n[o];i&&(n[o].search(l)!==-1?c(r,n):h.searchFullText&&p.fuzzySearch(t,n[o])&&c(a,n))})}),e.merge(r,a))}},fuzzySearch:function(e,t){var n=t.length,i=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,r=0;o<i;o++){for(var a=e.charCodeAt(o);r<n;)if(t.charCodeAt(r++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var n=p.generateResults(e);p.verbose("Parsing server response",e),e!==i&&t!==i&&e[b.results]!==i&&(p.addResults(n),p.inject.id(e[b.results]),p.write.cache(t,{html:n,results:e[b.results]}),p.save.results(e[b.results]))}},cancel:{query:function(){p.can.useAPI()&&T.api("abort")}},has:{minimumCharacters:function(){var e=p.get.value(),t=e.length;return t>=h.minCharacters}},clear:{cache:function(e){var t=T.data(m.cache);e?e&&t&&t[e]&&(p.debug("Removing value from cache",e),delete t[e],T.data(m.cache,t)):(p.debug("Clearing cache",e),T.removeData(m.cache))}},read:{cache:function(e){var t=T.data(m.cache);return!!h.cache&&(p.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==i&&t[e])}},create:{id:function(e,t){var n,o,r=e+1;return t!==i?(n=String.fromCharCode(97+t),o=n+r,p.verbose("Creating category result id",o)):(o=r,p.verbose("Creating result id",o)),o},results:function(){0===E.length&&(E=e("<div />").addClass(g.results).appendTo(T))}},inject:{result:function(e,t,n){p.verbose("Injecting result into results");var o=n!==i?E.children().eq(n).children(y.result).eq(t):E.children(y.result).eq(t);p.verbose("Injecting results metadata",o),o.data(m.result,e)},id:function(t){p.debug("Injecting unique ids into results");var n=0,o=0;return"category"===h.type?e.each(t,function(t,r){o=0,e.each(r.results,function(e,t){var a=r.results[e];a.id===i&&(a.id=p.create.id(o,n)),p.inject.result(a,o,n),o++}),n++}):e.each(t,function(e,n){var r=t[e];r.id===i&&(r.id=p.create.id(o)),p.inject.result(r,o),o++}),t}},save:{results:function(e){p.verbose("Saving current search results to metadata",e),T.data(m.results,e)}},write:{cache:function(e,t){var n=T.data(m.cache)!==i?T.data(m.cache):{};h.cache&&(p.verbose("Writing generated html to cache",e,t),n[e]=t,T.data(m.cache,n))}},addResults:function(t){return e.isFunction(h.onResultsAdd)&&h.onResultsAdd.call(E,t)===!1?(p.debug("onResultsAdd callback cancelled default action"),!1):void(t?(E.html(t),p.refreshResults(),h.selectFirstResult&&p.select.firstResult(),p.showResults()):p.hideResults())},showResults:function(){p.is.visible()||(p.can.transition()?(p.debug("Showing results with css animations"),E.transition({animation:h.transition+" in",debug:h.debug,verbose:h.verbose,duration:h.duration,queue:!0})):(p.debug("Showing results with javascript"),E.stop().fadeIn(h.duration,h.easing)),h.onResultsOpen.call(E))},hideResults:function(){p.is.visible()&&(p.can.transition()?(p.debug("Hiding results with css animations"),E.transition({animation:h.transition+" out",debug:h.debug,verbose:h.verbose,duration:h.duration,queue:!0})):(p.debug("Hiding results with javascript"),E.stop().fadeOut(h.duration,h.easing)),h.onResultsClose.call(E))},generateResults:function(t){p.debug("Generating html from response",t);var n=h.templates[h.type],i=e.isPlainObject(t[b.results])&&!e.isEmptyObject(t[b.results]),o=e.isArray(t[b.results])&&t[b.results].length>0,r="";return i||o?(h.maxResults>0&&(i?"standard"==h.type&&p.error(x.maxResults):t[b.results]=t[b.results].slice(0,h.maxResults)),e.isFunction(n)?r=n(t,b):p.error(x.noTemplate,!1)):h.showNoResults&&(r=p.displayMessage(x.noResults,"empty")),h.onResults.call(D,t),r},displayMessage:function(e,t){return t=t||"standard",p.debug("Displaying message",e,t),p.addResults(h.templates.message(e,t)),h.templates.message(e,t)},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,h,t);else{if(n===i)return h[t];h[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];p[t]=n}},debug:function(){!h.silent&&h.debug&&(h.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,h.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),p.verbose.apply(console,arguments)))},error:function(){h.silent||(p.error=Function.prototype.bind.call(console.error,console,h.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;h.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:D,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var t=h.name+":",n=0;l=!1,clearTimeout(p.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var a,s,l,c=O;return n=n||f,o=D||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},d?(O===i&&p.initialize(),p.invoke(u)):(O!==i&&O.invoke("destroy"),p.initialize())}),r!==i?r:this},e.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchFields:["title","description"],displayField:"",searchFullText:!0,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,n=/[&<>"'`]/,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},o=function(e){return i[e]};return n.test(e)?e.replace(t,o):e},message:function(e,t){var n="";return e!==i&&t!==i&&(n+='<div class="message '+t+'">',n+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",n+="</div>"),n},category:function(t,n){var o="";return e.fn.search.settings.templates.escape,t[n.categoryResults]!==i&&(e.each(t[n.categoryResults],function(t,r){r[n.results]!==i&&r.results.length>0&&(o+='<div class="category">',r[n.categoryName]!==i&&(o+='<div class="name">'+r[n.categoryName]+"</div>"),e.each(r.results,function(e,t){o+=t[n.url]?'<a class="result" href="'+t[n.url]+'">':'<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),o+="</div>")}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)},standard:function(t,n){var o="";return t[n.results]!==i&&(e.each(t[n.results],function(e,t){o+=t[n.url]?'<a class="result" href="'+t[n.url]+'">':'<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.sidebar=function(o){var r,a=e(this),s=e(t),l=e(n),c=e("html"),u=e("head"),d=a.selector||"",f=(new Date).getTime(),p=[],h=arguments[0],g="string"==typeof h,m=[].slice.call(arguments,1),v=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)};return a.each(function(){var a,b,y,x,w,C,k=e.isPlainObject(o)?e.extend(!0,{},e.fn.sidebar.settings,o):e.extend({},e.fn.sidebar.settings),T=k.selector,S=k.className,A=k.namespace,E=k.regExp,j=k.error,R="."+A,D="module-"+A,O=e(this),P=e(k.context),F=O.children(T.sidebar),L=P.children(T.fixed),q=P.children(T.pusher),N=this,M=O.data(D);C={initialize:function(){C.debug("Initializing sidebar",o),C.create.id(),w=C.get.transitionEvent(),C.is.ios()&&C.set.ios(),k.delaySetup?v(C.setup.layout):C.setup.layout(),v(function(){C.setup.cache()}),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),M=C,O.data(D,C)},create:{id:function(){y=(Math.random().toString(16)+"000000000").substr(2,8),b="."+y,C.verbose("Creating unique id for element",y)}},destroy:function(){C.verbose("Destroying previous module for",O),O.off(R).removeData(D),C.is.ios()&&C.remove.ios(),P.off(b),s.off(b),l.off(b)},event:{clickaway:function(e){var t=q.find(e.target).length>0||q.is(e.target),n=P.is(e.target);t&&(C.verbose("User clicked on dimmed page"),C.hide()),n&&(C.verbose("User clicked on dimmable context (scaled out page)"),C.hide())},touch:function(e){},containScroll:function(e){N.scrollTop<=0&&(N.scrollTop=1),N.scrollTop+N.offsetHeight>=N.scrollHeight&&(N.scrollTop=N.scrollHeight-N.offsetHeight-1)},scroll:function(t){0===e(t.target).closest(T.sidebar).length&&t.preventDefault()}},bind:{clickaway:function(){C.verbose("Adding clickaway events to context",P),k.closable&&P.on("click"+b,C.event.clickaway).on("touchend"+b,C.event.clickaway)},scrollLock:function(){k.scrollLock&&(C.debug("Disabling page scroll"),s.on("DOMMouseScroll"+b,C.event.scroll)),C.verbose("Adding events to contain sidebar scroll"),l.on("touchmove"+b,C.event.touch),O.on("scroll"+R,C.event.containScroll)}},unbind:{clickaway:function(){C.verbose("Removing clickaway events from context",P),P.off(b)},scrollLock:function(){C.verbose("Removing scroll lock from page"),l.off(b),s.off(b),O.off("scroll"+R)}},add:{inlineCSS:function(){var t,n=C.cache.width||O.outerWidth(),i=C.cache.height||O.outerHeight(),o=C.is.rtl(),r=C.get.direction(),s={left:n,right:-n,top:i,bottom:-i};o&&(C.verbose("RTL detected, flipping widths"),s.left=-n,s.right=n),t="<style>","left"===r||"right"===r?(C.debug("Adding CSS rules for animation distance",n),t+=" .ui.visible."+r+".sidebar ~ .fixed, .ui.visible."+r+".sidebar ~ .pusher { -webkit-transform: translate3d("+s[r]+"px, 0, 0); transform: translate3d("+s[r]+"px, 0, 0); }"):"top"!==r&&"bottom"!=r||(t+=" .ui.visible."+r+".sidebar ~ .fixed, .ui.visible."+r+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+s[r]+"px, 0); transform: translate3d(0, "+s[r]+"px, 0); }"),C.is.ie()&&("left"===r||"right"===r?(C.debug("Adding CSS rules for animation distance",n),t+=" body.pushable > .ui.visible."+r+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+s[r]+"px, 0, 0); transform: translate3d("+s[r]+"px, 0, 0); }"):"top"!==r&&"bottom"!=r||(t+=" body.pushable > .ui.visible."+r+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+s[r]+"px, 0); transform: translate3d(0, "+s[r]+"px, 0); }"),t+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0px, 0, 0); transform: translate3d(0px, 0, 0); }"),t+="</style>",a=e(t).appendTo(u),C.debug("Adding sizing css to head",a)}},refresh:function(){C.verbose("Refreshing selector cache"),P=e(k.context),F=P.children(T.sidebar),q=P.children(T.pusher),L=P.children(T.fixed),C.clear.cache()},refreshSidebars:function(){C.verbose("Refreshing other sidebars"),F=P.children(T.sidebar)},repaint:function(){C.verbose("Forcing repaint event"),N.style.display="none",N.offsetHeight,N.scrollTop=N.scrollTop,N.style.display=""},setup:{cache:function(){C.cache={width:O.outerWidth(),height:O.outerHeight(),rtl:"rtl"==O.css("direction")}},layout:function(){0===P.children(T.pusher).length&&(C.debug("Adding wrapper element for sidebar"),C.error(j.pusher),q=e('<div class="pusher" />'),P.children().not(T.omitted).not(F).wrapAll(q),C.refresh()),0!==O.nextAll(T.pusher).length&&O.nextAll(T.pusher)[0]===q[0]||(C.debug("Moved sidebar to correct parent element"),C.error(j.movedSidebar,N),O.detach().prependTo(P),C.refresh()),C.clear.cache(),C.set.pushable(),C.set.direction()}},attachEvents:function(t,n){var i=e(t);n=e.isFunction(C[n])?C[n]:C.toggle,i.length>0?(C.debug("Attaching sidebar events to element",t,n),i.on("click"+R,n)):C.error(j.notFound,t)},show:function(t){if(t=e.isFunction(t)?t:function(){},C.is.hidden()){if(C.refreshSidebars(),k.overlay&&(C.error(j.overlay),k.transition="overlay"),C.refresh(),C.othersActive())if(C.debug("Other sidebars currently visible"),k.exclusive){if("overlay"!=k.transition)return void C.hideOthers(C.show);C.hideOthers()}else k.transition="overlay";C.pushPage(function(){t.call(N),k.onShow.call(N)}),k.onChange.call(N),k.onVisible.call(N)}else C.debug("Sidebar is already visible")},hide:function(t){t=e.isFunction(t)?t:function(){},(C.is.visible()||C.is.animating())&&(C.debug("Hiding sidebar",t),C.refreshSidebars(),C.pullPage(function(){t.call(N),k.onHidden.call(N)}),k.onChange.call(N),k.onHide.call(N))},othersAnimating:function(){return F.not(O).filter("."+S.animating).length>0},othersVisible:function(){return F.not(O).filter("."+S.visible).length>0},othersActive:function(){return C.othersVisible()||C.othersAnimating()},hideOthers:function(e){var t=F.not(O).filter("."+S.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){i++,i==n&&e()})},toggle:function(){C.verbose("Determining toggled direction"),C.is.hidden()?C.show():C.hide()},pushPage:function(t){var n,i,o,r=C.get.transition(),a="overlay"===r||C.othersActive()?O:q;t=e.isFunction(t)?t:function(){},"scale down"==k.transition&&C.scrollToTop(),C.set.transition(r),C.repaint(),n=function(){C.bind.clickaway(),C.add.inlineCSS(),C.set.animating(),C.set.visible()},i=function(){C.set.dimmed()},o=function(e){e.target==a[0]&&(a.off(w+b,o),C.remove.animating(),C.bind.scrollLock(),t.call(N))},a.off(w+b),a.on(w+b,o),v(n),k.dimPage&&!C.othersVisible()&&v(i)},pullPage:function(t){var n,i,o=C.get.transition(),r="overlay"==o||C.othersActive()?O:q;t=e.isFunction(t)?t:function(){},C.verbose("Removing context push state",C.get.direction()),C.unbind.clickaway(),C.unbind.scrollLock(),n=function(){C.set.transition(o),C.set.animating(),C.remove.visible(),k.dimPage&&!C.othersVisible()&&q.removeClass(S.dimmed)},i=function(e){e.target==r[0]&&(r.off(w+b,i),C.remove.animating(),C.remove.transition(),C.remove.inlineCSS(),("scale down"==o||k.returnScroll&&C.is.mobile())&&C.scrollBack(),t.call(N))},r.off(w+b),r.on(w+b,i),v(n)},scrollToTop:function(){C.verbose("Scrolling to top of page to avoid animation issues"),x=e(t).scrollTop(),O.scrollTop(0),t.scrollTo(0,0)},scrollBack:function(){C.verbose("Scrolling back to original page position"),t.scrollTo(0,x)},clear:{cache:function(){C.verbose("Clearing cached dimensions"),C.cache={}}},set:{ios:function(){c.addClass(S.ios)},pushed:function(){P.addClass(S.pushed)},pushable:function(){P.addClass(S.pushable)},dimmed:function(){q.addClass(S.dimmed)},active:function(){O.addClass(S.active)},animating:function(){O.addClass(S.animating)},transition:function(e){e=e||C.get.transition(),O.addClass(e)},direction:function(e){e=e||C.get.direction(),O.addClass(S[e])},visible:function(){O.addClass(S.visible)},overlay:function(){O.addClass(S.overlay)}},remove:{inlineCSS:function(){C.debug("Removing inline css styles",a),a&&a.length>0&&a.remove()},ios:function(){c.removeClass(S.ios)},pushed:function(){P.removeClass(S.pushed)},pushable:function(){P.removeClass(S.pushable)},active:function(){O.removeClass(S.active)},animating:function(){O.removeClass(S.animating)},transition:function(e){e=e||C.get.transition(),O.removeClass(e)},direction:function(e){e=e||C.get.direction(),O.removeClass(S[e])},visible:function(){O.removeClass(S.visible)},overlay:function(){O.removeClass(S.overlay)}},get:{direction:function(){return O.hasClass(S.top)?S.top:O.hasClass(S.right)?S.right:O.hasClass(S.bottom)?S.bottom:S.left},transition:function(){var e,t=C.get.direction();return e=C.is.mobile()?"auto"==k.mobileTransition?k.defaultTransition.mobile[t]:k.mobileTransition:"auto"==k.transition?k.defaultTransition.computer[t]:k.transition,C.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]}},is:{ie:function(){var e=!t.ActiveXObject&&"ActiveXObject"in t,n="ActiveXObject"in t;return e||n},ios:function(){var e=navigator.userAgent,t=e.match(E.ios),n=e.match(E.mobileChrome);return!(!t||n||(C.verbose("Browser was found to be iOS",e),0))},mobile:function(){var e=navigator.userAgent,t=e.match(E.mobile);return t?(C.verbose("Browser was found to be mobile",e),!0):(C.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!C.is.visible()},visible:function(){return O.hasClass(S.visible)},open:function(){return C.is.visible()},closed:function(){return C.is.hidden()},vertical:function(){return O.hasClass(S.top)},animating:function(){return P.hasClass(S.animating)},rtl:function(){return C.cache.rtl===i&&(C.cache.rtl="rtl"==O.css("direction")),C.cache.rtl}},setting:function(t,n){if(C.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,k,t);else{if(n===i)return k[t];e.isPlainObject(k[t])?e.extend(!0,k[t],n):k[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,C,t);else{if(n===i)return C[t];C[t]=n}},debug:function(){!k.silent&&k.debug&&(k.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,k.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!k.silent&&k.verbose&&k.debug&&(k.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,k.name+":"),C.verbose.apply(console,arguments)))},error:function(){k.silent||(C.error=Function.prototype.bind.call(console.error,console,k.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;k.performance&&(t=(new Date).getTime(),i=f||t,n=t-i,f=t,p.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:N,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var t=k.name+":",n=0;f=!1,clearTimeout(C.performance.timer),e.each(p,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",d&&(t+=" '"+d+"'"),(console.group!==i||console.table!==i)&&p.length>0&&(console.groupCollapsed(t),console.table?console.table(p):e.each(p,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),p=[]}},invoke:function(t,n,o){var a,s,l,c=M;return n=n||m,o=N||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(C.error(j.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},g?(M===i&&C.initialize(),C.invoke(h)):(M!==i&&C.invoke("destroy"),C.initialize())}),r!==i?r:this},e.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.tab=function(o){var r,a=e(e.isFunction(this)?t:this),s=a.selector||"",l=(new Date).getTime(),c=[],u=arguments[0],d="string"==typeof u,f=[].slice.call(arguments,1),p=!1;return a.each(function(){var h,g,m,v,b,y,x=e.isPlainObject(o)?e.extend(!0,{},e.fn.tab.settings,o):e.extend({},e.fn.tab.settings),w=x.className,C=x.metadata,k=x.selector,T=x.error,S="."+x.namespace,A="module-"+x.namespace,E=e(this),j={},R=!0,D=0,O=this,P=E.data(A);b={initialize:function(){b.debug("Initializing tab menu item",E),b.fix.callbacks(),b.determineTabs(),b.debug("Determining tabs",x.context,g),x.auto&&b.set.auto(),b.bind.events(),x.history&&!p&&(b.initializeHistory(),p=!0),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),P=b,E.data(A,b)},destroy:function(){b.debug("Destroying tabs",E),E.removeData(A).off(S)},bind:{events:function(){e.isWindow(O)||(b.debug("Attaching tab activation events to element",E),E.on("click"+S,b.event.click))}},determineTabs:function(){var t;"parent"===x.context?(E.closest(k.ui).length>0?(t=E.closest(k.ui),b.verbose("Using closest UI element as parent",t)):t=E,h=t.parent(),b.verbose("Determined parent element for creating context",h)):x.context?(h=e(x.context),b.verbose("Using selector for tab context",x.context,h)):h=e("body"),x.childrenOnly?(g=h.children(k.tabs),b.debug("Searching tab context children for tabs",h,g)):(g=h.find(k.tabs),b.debug("Searching tab context for tabs",h,g))},fix:{callbacks:function(){e.isPlainObject(o)&&(o.onTabLoad||o.onTabInit)&&(o.onTabLoad&&(o.onLoad=o.onTabLoad,delete o.onTabLoad,b.error(T.legacyLoad,o.onLoad)),o.onTabInit&&(o.onFirstLoad=o.onTabInit,delete o.onTabInit,b.error(T.legacyInit,o.onFirstLoad)),x=e.extend(!0,{},e.fn.tab.settings,o))}},initializeHistory:function(){if(b.debug("Initializing page state"),e.address===i)return b.error(T.state),!1;if("state"==x.historyType){if(b.debug("Using HTML5 to manage state"),x.path===!1)return b.error(T.path),!1;e.address.history(!0).state(x.path)}e.address.bind("change",b.event.history.change)},event:{click:function(t){var n=e(this).data(C.tab);n!==i?(x.history?(b.verbose("Updating page state",t),e.address.value(n)):(b.verbose("Changing tab",t),b.changeTab(n)),t.preventDefault()):b.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||b.get.initialPath(),o=x.templates.determineTitle(n)||!1;b.performance.display(),b.debug("History change event",n,t),y=t,n!==i&&b.changeTab(n),o&&e.address.title(o)}}},refresh:function(){m&&(b.debug("Refreshing tab",m),b.changeTab(m))},cache:{read:function(e){return e!==i&&j[e]},add:function(e,t){e=e||m,b.debug("Adding cached content for",e),j[e]=t},remove:function(e){e=e||m,b.debug("Removing cached content for",e),delete j[e]}},set:{auto:function(){var t="string"==typeof x.path?x.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";b.verbose("Setting up automatic tab retrieval from server",t),e.isPlainObject(x.apiSettings)?x.apiSettings.url=t:x.apiSettings={url:t}},loading:function(e){var t=b.get.tabElement(e),n=t.hasClass(w.loading);n||(b.verbose("Setting loading state for",t),t.addClass(w.loading).siblings(g).removeClass(w.active+" "+w.loading),t.length>0&&x.onRequest.call(t[0],e))},state:function(t){e.address.value(t)}},changeTab:function(n){var i=t.history&&t.history.pushState,o=i&&x.ignoreFirstLoad&&R,r=x.auto||e.isPlainObject(x.apiSettings),a=r&&!o?b.utilities.pathToArray(n):b.get.defaultPathArray(n);n=b.utilities.arrayToPath(a),e.each(a,function(t,i){var s,l,c,u,d=a.slice(0,t+1),f=b.utilities.arrayToPath(d),p=b.is.tab(f),g=t+1==a.length,k=b.get.tabElement(f);if(b.verbose("Looking for tab",i),p){if(b.verbose("Tab was found",i),m=f,v=b.utilities.filterArray(a,d),g?u=!0:(l=a.slice(0,t+2),c=b.utilities.arrayToPath(l),u=!b.is.tab(c),u&&b.verbose("Tab parameters found",l)),u&&r)return o?(b.debug("Ignoring remote content on first tab load",f),R=!1,b.cache.add(n,k.html()),b.activate.all(f),x.onFirstLoad.call(k[0],f,v,y),x.onLoad.call(k[0],f,v,y)):(b.activate.navigation(f),b.fetch.content(f,n)),!1;b.debug("Opened local tab",f),b.activate.all(f),b.cache.read(f)||(b.cache.add(f,!0),b.debug("First time tab loaded calling tab init"),x.onFirstLoad.call(k[0],f,v,y)),x.onLoad.call(k[0],f,v,y)}else{if(n.search("/")!=-1||""===n)return b.error(T.missingTab,E,h,f),!1;if(s=e("#"+n+', a[name="'+n+'"]'),f=s.closest("[data-tab]").data(C.tab),k=b.get.tabElement(f),s&&s.length>0&&f)return b.debug("Anchor link used, opening parent tab",k,s),k.hasClass(w.active)||setTimeout(function(){b.scrollTo(s)},0),b.activate.all(f),b.cache.read(f)||(b.cache.add(f,!0),b.debug("First time tab loaded calling tab init"),x.onFirstLoad.call(k[0],f,v,y)),x.onLoad.call(k[0],f,v,y),!1}})},scrollTo:function(t){var i=!!(t&&t.length>0)&&t.offset().top;i!==!1&&(b.debug("Forcing scroll to an in-page link in a hidden tab",i,t),e(n).scrollTop(i))},update:{content:function(t,n,o){var r=b.get.tabElement(t),a=r[0];o=o!==i?o:x.evaluateScripts,"string"==typeof x.cacheType&&"dom"==x.cacheType.toLowerCase()&&"string"!=typeof n?r.empty().append(e(n).clone(!0)):o?(b.debug("Updating HTML and evaluating inline scripts",t,n),r.html(n)):(b.debug("Updating HTML",t,n),a.innerHTML=n)}},fetch:{content:function(t,n){var o,r,a=b.get.tabElement(t),s={dataType:"html",encodeParameters:!1,on:"now",cache:x.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==x.cacheType&&b.cache.add(n,e),b.update.content(t,e),t==m?(b.debug("Content loaded",t),b.activate.tab(t)):b.debug("Content loaded in background",t),x.onFirstLoad.call(a[0],t,v,y),x.onLoad.call(a[0],t,v,y),"string"==typeof x.cacheType&&"dom"==x.cacheType.toLowerCase()&&a.children().length>0?setTimeout(function(){var e=a.children().clone(!0);e=e.not("script"),b.cache.add(n,e)},0):b.cache.add(n,a.html())},urlData:{tab:n}},l=a.api("get request")||!1,c=l&&"pending"===l.state();n=n||t,r=b.cache.read(n),x.cache&&r?(b.activate.tab(t),b.debug("Adding cached content",n),"once"==x.evaluateScripts?b.update.content(t,r,!1):b.update.content(t,r),x.onLoad.call(a[0],t,v,y)):c?(b.set.loading(t),b.debug("Content is already loading",n)):e.api!==i?(o=e.extend(!0,{},x.apiSettings,s),b.debug("Retrieving remote content",n,o),b.set.loading(t),a.api(o)):b.error(T.api)}},activate:{all:function(e){b.activate.tab(e),b.activate.navigation(e)},tab:function(e){var t=b.get.tabElement(e),n="siblings"==x.deactivate?t.siblings(g):g.not(t),i=t.hasClass(w.active);b.verbose("Showing tab content for",t),i||(t.addClass(w.active),n.removeClass(w.active+" "+w.loading),t.length>0&&x.onVisible.call(t[0],e))},navigation:function(e){var t=b.get.navElement(e),n="siblings"==x.deactivate?t.siblings(a):a.not(t),i=t.hasClass(w.active);b.verbose("Activating tab navigation for",t,e),i||(t.addClass(w.active),n.removeClass(w.active+" "+w.loading))}},deactivate:{all:function(){b.deactivate.navigation(),b.deactivate.tabs()},navigation:function(){a.removeClass(w.active)},tabs:function(){g.removeClass(w.active+" "+w.loading)}},is:{tab:function(e){return e!==i&&b.get.tabElement(e).length>0}},get:{initialPath:function(){return a.eq(0).data(C.tab)||g.eq(0).data(C.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return b.utilities.pathToArray(b.get.defaultPath(e))},defaultPath:function(e){
var t=a.filter("[data-"+C.tab+'^="'+e+'/"]').eq(0),n=t.data(C.tab)||!1;if(n){if(b.debug("Found default tab",n),D<x.maxDepth)return D++,b.get.defaultPath(n);b.error(T.recursion)}else b.debug("No default tabs found for",e,g);return D=0,e},navElement:function(e){return e=e||m,a.filter("[data-"+C.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,o;return e=e||m,i=b.utilities.pathToArray(e),o=b.utilities.last(i),t=g.filter("[data-"+C.tab+'="'+e+'"]'),n=g.filter("[data-"+C.tab+'="'+o+'"]'),t.length>0?t:n},tab:function(){return m}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return e.inArray(t,n)==-1})},last:function(t){return!!e.isArray(t)&&t[t.length-1]},pathToArray:function(e){return e===i&&(e=m),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return!!e.isArray(t)&&t.join("/")}},setting:function(t,n){if(b.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,x,t);else{if(n===i)return x[t];e.isPlainObject(x[t])?e.extend(!0,x[t],n):x[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];b[t]=n}},debug:function(){!x.silent&&x.debug&&(x.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,x.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!x.silent&&x.verbose&&x.debug&&(x.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,x.name+":"),b.verbose.apply(console,arguments)))},error:function(){x.silent||(b.error=Function.prototype.bind.call(console.error,console,x.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;x.performance&&(t=(new Date).getTime(),i=l||t,n=t-i,l=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:O,"Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var t=x.name+":",n=0;l=!1,clearTimeout(b.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",s&&(t+=" '"+s+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,o){var a,s,l,c=P;return n=n||f,o=O||o,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(b.error(T.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(o,n):s!==i&&(l=s),e.isArray(r)?r.push(l):r!==i?r=[r,l]:l!==i&&(r=l),s}},d?(P===i&&b.initialize(),b.invoke(u)):(P!==i&&P.invoke("destroy"),b.initialize())}),r!==i?r:this},e.tab=function(){e(t).tab.apply(this,arguments)},e.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.transition=function(){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),l=[],c=arguments,u=c[0],d=[].slice.call(arguments,1),f="string"==typeof u;return t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},r.each(function(t){var p,h,g,m,v,b,y,x,w,C=e(this),k=this;w={initialize:function(){p=w.get.settings.apply(k,c),m=p.className,g=p.error,v=p.metadata,x="."+p.namespace,y="module-"+p.namespace,h=C.data(y)||w,b=w.get.animationEndEvent(),f&&(f=w.invoke(u)),f===!1&&(w.verbose("Converted arguments into settings object",p),p.interval?w.delay(p.animate):w.animate(),w.instantiate())},instantiate:function(){w.verbose("Storing instance of module",w),h=w,C.data(y,h)},destroy:function(){w.verbose("Destroying previous module for",k),C.removeData(y)},refresh:function(){w.verbose("Refreshing display type on next animation"),delete w.displayType},forceRepaint:function(){w.verbose("Forcing element repaint");var e=C.parent(),t=C.next();0===t.length?C.detach().appendTo(e):C.detach().insertBefore(t)},repaint:function(){w.verbose("Repainting element"),k.offsetWidth},delay:function(e){var n,o,a=w.get.animationDirection();a||(a=w.can.transition()?w.get.direction():"static"),e=e!==i?e:p.interval,n="auto"==p.reverse&&a==m.outward,o=n||1==p.reverse?(r.length-t)*p.interval:t*p.interval,w.debug("Delaying animation by",o),setTimeout(w.animate,o)},animate:function(e){if(p=e||p,!w.is.supported())return w.error(g.support),!1;if(w.debug("Preparing animation",p.animation),w.is.animating()){if(p.queue)return!p.allowRepeats&&w.has.direction()&&w.is.occurring()&&w.queuing!==!0?w.debug("Animation is currently occurring, preventing queueing same animation",p.animation):w.queue(p.animation),!1;if(!p.allowRepeats&&w.is.occurring())return w.debug("Animation is already occurring, will not execute repeated animation",p.animation),!1;w.debug("New animation started, completing previous early",p.animation),h.complete()}w.can.animate()?w.set.animating(p.animation):w.error(g.noAnimation,p.animation,k)},reset:function(){w.debug("Resetting animation to beginning conditions"),w.remove.animationCallbacks(),w.restore.conditions(),w.remove.animating()},queue:function(e){w.debug("Queueing animation of",e),w.queuing=!0,C.one(b+".queue"+x,function(){w.queuing=!1,w.repaint(),w.animate.apply(this,p)})},complete:function(e){w.debug("Animation complete",p.animation),w.remove.completeCallback(),w.remove.failSafe(),w.is.looping()||(w.is.outward()?(w.verbose("Animation is outward, hiding element"),w.restore.conditions(),w.hide()):w.is.inward()?(w.verbose("Animation is outward, showing element"),w.restore.conditions(),w.show()):(w.verbose("Static animation completed"),w.restore.conditions(),p.onComplete.call(k)))},force:{visible:function(){var e=C.attr("style"),t=w.get.userStyle(),n=w.get.displayType(),o=t+"display: "+n+" !important;",r=C.css("display"),a=e===i||""===e;r!==n?(w.verbose("Overriding default display to show element",n),C.attr("style",o)):a&&C.removeAttr("style")},hidden:function(){var e=C.attr("style"),t=C.css("display"),n=e===i||""===e;"none"===t||w.is.hidden()?n&&C.removeAttr("style"):(w.verbose("Overriding default display to hide element"),C.css("display","none"))}},has:{direction:function(t){var n=!1;return t=t||p.animation,"string"==typeof t&&(t=t.split(" "),e.each(t,function(e,t){t!==m.inward&&t!==m.outward||(n=!0)})),n},inlineDisplay:function(){var t=C.attr("style")||"";return e.isArray(t.match(/display.*?;/,""))}},set:{animating:function(e){var t;w.remove.completeCallback(),e=e||p.animation,t=w.get.animationClass(e),w.save.animation(t),w.force.visible(),w.remove.hidden(),w.remove.direction(),w.start.animation(t)},duration:function(e,t){t=t||p.duration,t="number"==typeof t?t+"ms":t,(t||0===t)&&(w.verbose("Setting animation duration",t),C.css({"animation-duration":t}))},direction:function(e){e=e||w.get.direction(),e==m.inward?w.set.inward():w.set.outward()},looping:function(){w.debug("Transition set to loop"),C.addClass(m.looping)},hidden:function(){C.addClass(m.transition).addClass(m.hidden)},inward:function(){w.debug("Setting direction to inward"),C.removeClass(m.outward).addClass(m.inward)},outward:function(){w.debug("Setting direction to outward"),C.removeClass(m.inward).addClass(m.outward)},visible:function(){C.addClass(m.transition).addClass(m.visible)}},start:{animation:function(e){e=e||w.get.animationClass(),w.debug("Starting tween",e),C.addClass(e).one(b+".complete"+x,w.complete),p.useFailSafe&&w.add.failSafe(),w.set.duration(p.duration),p.onStart.call(k)}},save:{animation:function(e){w.cache||(w.cache={}),w.cache.animation=e},displayType:function(e){"none"!==e&&C.data(v.displayType,e)},transitionExists:function(t,n){e.fn.transition.exists[t]=n,w.verbose("Saving existence of transition",t,n)}},restore:{conditions:function(){var e=w.get.currentAnimation();e&&(C.removeClass(e),w.verbose("Removing animation class",w.cache)),w.remove.duration()}},add:{failSafe:function(){var e=w.get.duration();w.timer=setTimeout(function(){C.triggerHandler(b)},e+p.failSafeDelay),w.verbose("Adding fail safe timer",w.timer)}},remove:{animating:function(){C.removeClass(m.animating)},animationCallbacks:function(){w.remove.queueCallback(),w.remove.completeCallback()},queueCallback:function(){C.off(".queue"+x)},completeCallback:function(){C.off(".complete"+x)},display:function(){C.css("display","")},direction:function(){C.removeClass(m.inward).removeClass(m.outward)},duration:function(){C.css("animation-duration","")},failSafe:function(){w.verbose("Removing fail safe timer",w.timer),w.timer&&clearTimeout(w.timer)},hidden:function(){C.removeClass(m.hidden)},visible:function(){C.removeClass(m.visible)},looping:function(){w.debug("Transitions are no longer looping"),w.is.looping()&&(w.reset(),C.removeClass(m.looping))},transition:function(){C.removeClass(m.visible).removeClass(m.hidden)}},get:{settings:function(t,n,i){return"object"==typeof t?e.extend(!0,{},e.fn.transition.settings,t):"function"==typeof i?e.extend({},e.fn.transition.settings,{animation:t,onComplete:i,duration:n}):"string"==typeof n||"number"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,duration:n}):"object"==typeof n?e.extend({},e.fn.transition.settings,n,{animation:t}):"function"==typeof n?e.extend({},e.fn.transition.settings,{animation:t,onComplete:n}):e.extend({},e.fn.transition.settings,{animation:t})},animationClass:function(e){var t=e||p.animation,n=w.can.transition()&&!w.has.direction()?w.get.direction()+" ":"";return m.animating+" "+m.transition+" "+n+t},currentAnimation:function(){return!(!w.cache||w.cache.animation===i)&&w.cache.animation},currentDirection:function(){return w.is.inward()?m.inward:m.outward},direction:function(){return w.is.hidden()||!w.is.visible()?m.inward:m.outward},animationDirection:function(t){var n;return t=t||p.animation,"string"==typeof t&&(t=t.split(" "),e.each(t,function(e,t){t===m.inward?n=m.inward:t===m.outward&&(n=m.outward)})),!!n&&n},duration:function(e){return e=e||p.duration,e===!1&&(e=C.css("animation-duration")||0),"string"==typeof e?e.indexOf("ms")>-1?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return e=e===i||e,p.displayType?p.displayType:(e&&C.data(v.displayType)===i&&w.can.transition(!0),C.data(v.displayType))},userStyle:function(e){return e=e||C.attr("style")||"",e.replace(/display.*?;/,"")},transitionExists:function(t){return e.fn.transition.exists[t]},animationStartEvent:function(){var e,t=n.createElement("div"),o={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in o)if(t.style[e]!==i)return o[e];return!1},animationEndEvent:function(){var e,t=n.createElement("div"),o={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in o)if(t.style[e]!==i)return o[e];return!1}},can:{transition:function(t){var n,o,r,a,s,l,c=p.animation,u=w.get.transitionExists(c),d=w.get.displayType(!1);if(u===i||t){if(w.verbose("Determining whether animation exists"),n=C.attr("class"),o=C.prop("tagName"),r=e("<"+o+" />").addClass(n).insertAfter(C),a=r.addClass(c).removeClass(m.inward).removeClass(m.outward).addClass(m.animating).addClass(m.transition).css("animationName"),s=r.addClass(m.inward).css("animationName"),d||(d=r.attr("class",n).removeAttr("style").removeClass(m.hidden).removeClass(m.visible).show().css("display"),w.verbose("Determining final display state",d),w.save.displayType(d)),r.remove(),a!=s)w.debug("Direction exists for animation",c),l=!0;else{if("none"==a||!a)return void w.debug("No animation defined in css",c);w.debug("Static animation found",c,d),l=!1}w.save.transitionExists(c,l)}return u!==i?u:l},animate:function(){return w.can.transition()!==i}},is:{animating:function(){return C.hasClass(m.animating)},inward:function(){return C.hasClass(m.inward)},outward:function(){return C.hasClass(m.outward)},looping:function(){return C.hasClass(m.looping)},occurring:function(e){return e=e||p.animation,e="."+e.replace(" ","."),C.filter(e).length>0},visible:function(){return C.is(":visible")},hidden:function(){return"hidden"===C.css("visibility")},supported:function(){return b!==!1}},hide:function(){w.verbose("Hiding element"),w.is.animating()&&w.reset(),k.blur(),w.remove.display(),w.remove.visible(),w.set.hidden(),w.force.hidden(),p.onHide.call(k),p.onComplete.call(k)},show:function(e){w.verbose("Showing element",e),w.remove.hidden(),w.set.visible(),w.force.visible(),p.onShow.call(k),p.onComplete.call(k)},toggle:function(){w.is.visible()?w.hide():w.show()},stop:function(){w.debug("Stopping current animation"),C.triggerHandler(b)},stopAll:function(){w.debug("Stopping all animation"),w.remove.queueCallback(),C.triggerHandler(b)},clear:{queue:function(){w.debug("Clearing animation queue"),w.remove.queueCallback()}},enable:function(){w.verbose("Starting animation"),C.removeClass(m.disabled)},disable:function(){w.debug("Stopping animation"),C.addClass(m.disabled)},setting:function(t,n){if(w.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,p,t);else{if(n===i)return p[t];e.isPlainObject(p[t])?e.extend(!0,p[t],n):p[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,w,t);else{if(n===i)return w[t];w[t]=n}},debug:function(){!p.silent&&p.debug&&(p.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,p.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),w.verbose.apply(console,arguments)))},error:function(){p.silent||(w.error=Function.prototype.bind.call(console.error,console,p.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;p.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var t=p.name+":",n=0;s=!1,clearTimeout(w.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,r){var a,s,l,c=h;return n=n||d,r=k||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i&&(s=c[o],!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s!==i&&s}},w.initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.state=function(t){var o,r=e(this),a=r.selector||"",s=("ontouchstart"in n.documentElement,(new Date).getTime()),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return r.each(function(){var n,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.state.settings,t):e.extend({},e.fn.state.settings),p=f.error,h=f.metadata,g=f.className,m=f.namespace,v=f.states,b=f.text,y="."+m,x=m+"-module",w=e(this),C=this,k=w.data(x);n={initialize:function(){n.verbose("Initializing module"),f.automatic&&n.add.defaults(),f.context&&""!==a?e(f.context).on(a,"mouseenter"+y,n.change.text).on(a,"mouseleave"+y,n.reset.text).on(a,"click"+y,n.toggle.state):w.on("mouseenter"+y,n.change.text).on("mouseleave"+y,n.reset.text).on("click"+y,n.toggle.state),n.instantiate()},instantiate:function(){n.verbose("Storing instance of module",n),k=n,w.data(x,n)},destroy:function(){n.verbose("Destroying previous module",k),w.off(y).removeData(x)},refresh:function(){n.verbose("Refreshing selector cache"),w=e(C)},add:{defaults:function(){var o=t&&e.isPlainObject(t.states)?t.states:{};e.each(f.defaults,function(t,r){n.is[t]!==i&&n.is[t]()&&(n.verbose("Adding default states",t,C),e.extend(f.states,r,o))})}},is:{active:function(){return w.hasClass(g.active)},loading:function(){return w.hasClass(g.loading)},inactive:function(){return!w.hasClass(g.active)},state:function(e){return g[e]!==i&&w.hasClass(g[e])},enabled:function(){return!w.is(f.filter.active)},disabled:function(){return w.is(f.filter.active)},textEnabled:function(){return!w.is(f.filter.text)},button:function(){return w.is(".button:not(a, .submit)")},input:function(){return w.is("input")},progress:function(){return w.is(".ui.progress")}},allow:function(e){n.debug("Now allowing state",e),v[e]=!0},disallow:function(e){n.debug("No longer allowing",e),v[e]=!1},allows:function(e){return v[e]||!1},enable:function(){w.removeClass(g.disabled)},disable:function(){w.addClass(g.disabled)},setState:function(e){n.allows(e)&&w.addClass(g[e])},removeState:function(e){n.allows(e)&&w.removeClass(g[e])},toggle:{state:function(){var t,o;if(n.allows("active")&&n.is.enabled()){if(n.refresh(),e.fn.api!==i)if(t=w.api("get request"),o=w.api("was cancelled"))n.debug("API Request cancelled by beforesend"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1};else if(t)return void n.listenTo(t);n.change.state()}}},listenTo:function(t){n.debug("API request detected, waiting for state signal",t),t&&(b.loading&&n.update.text(b.loading),e.when(t).then(function(){"resolved"==t.state()?(n.debug("API request succeeded"),f.activateTest=function(){return!0},f.deactivateTest=function(){return!0}):(n.debug("API request failed"),f.activateTest=function(){return!1},f.deactivateTest=function(){return!1}),n.change.state()}))},change:{state:function(){n.debug("Determining state change direction"),n.is.inactive()?n.activate():n.deactivate(),f.sync&&n.sync(),f.onChange.call(C)},text:function(){n.is.textEnabled()&&(n.is.disabled()?(n.verbose("Changing text to disabled text",b.hover),n.update.text(b.disabled)):n.is.active()?b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.deactivate&&(n.verbose("Changing text to deactivating text",b.deactivate),n.update.text(b.deactivate)):b.hover?(n.verbose("Changing text to hover text",b.hover),n.update.text(b.hover)):b.activate&&(n.verbose("Changing text to activating text",b.activate),n.update.text(b.activate)))}},activate:function(){f.activateTest.call(C)&&(n.debug("Setting state to active"),w.addClass(g.active),n.update.text(b.active),f.onActivate.call(C))},deactivate:function(){f.deactivateTest.call(C)&&(n.debug("Setting state to inactive"),w.removeClass(g.active),n.update.text(b.inactive),f.onDeactivate.call(C))},sync:function(){n.verbose("Syncing other buttons to current state"),n.is.active()?r.not(w).state("activate"):r.not(w).state("deactivate")},get:{text:function(){return f.selector.text?w.find(f.selector.text).text():w.html()},textFor:function(e){return b[e]||!1}},flash:{text:function(e,t,i){var o=n.get.text();n.debug("Flashing text message",e,t),e=e||f.text.flash,t=t||f.flashDuration,i=i||function(){},n.update.text(e),setTimeout(function(){n.update.text(o),i.call(C)},t)}},reset:{text:function(){var e=b.active||w.data(h.storedText),t=b.inactive||w.data(h.storedText);n.is.textEnabled()&&(n.is.active()&&e?(n.verbose("Resetting active text",e),n.update.text(e)):t&&(n.verbose("Resetting inactive text",e),n.update.text(t)))}},update:{text:function(e){var t=n.get.text();e&&e!==t?(n.debug("Updating text",e),f.selector.text?w.data(h.storedText,e).find(f.selector.text).text(e):w.data(h.storedText,e).html(e)):n.debug("Text is already set, ignoring update",e)}},setting:function(t,o){if(n.debug("Changing setting",t,o),e.isPlainObject(t))e.extend(!0,f,t);else{if(o===i)return f[t];e.isPlainObject(f[t])?e.extend(!0,f[t],o):f[t]=o}},internal:function(t,o){if(e.isPlainObject(t))e.extend(!0,n,t);else{if(o===i)return n[t];n[t]=o}},debug:function(){!f.silent&&f.debug&&(f.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,f.name+":"),n.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),n.verbose.apply(console,arguments)))},error:function(){f.silent||(n.error=Function.prototype.bind.call(console.error,console,f.name+":"),n.error.apply(console,arguments))},performance:{log:function(e){var t,i,o;f.performance&&(t=(new Date).getTime(),o=s||t,i=t-o,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":i})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,500)},display:function(){var t=f.name+":",o=0;s=!1,clearTimeout(n.performance.timer),e.each(l,function(e,t){o+=t["Execution Time"]}),t+=" "+o+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,r,a){var s,l,c,u=k;return r=r||d,a=C||a,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(o,r){var a=o!=s?r+t[o+1].charAt(0).toUpperCase()+t[o+1].slice(1):t;if(e.isPlainObject(u[a])&&o!=s)u=u[a];else{if(u[a]!==i)return l=u[a],!1;if(!e.isPlainObject(u[r])||o==s)return u[r]!==i?(l=u[r],!1):(n.error(p.method,t),!1);u=u[r]}})),e.isFunction(l)?c=l.apply(a,r):l!==i&&(c=l),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),l}},u?(k===i&&n.initialize(),n.invoke(c)):(k!==i&&k.invoke("destroy"),n.initialize())}),o!==i?o:this},e.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{beforeSend:"The before send function has cancelled state change",method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(jQuery,window,document),function(e,t,n,i){"use strict";var t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.api=e.fn.api=function(n){var o,r=e(e.isFunction(this)?t:this),a=r.selector||"",s=(new Date).getTime(),l=[],c=arguments[0],u="string"==typeof c,d=[].slice.call(arguments,1);return r.each(function(){var r,f,p,h,g,m,v=e.isPlainObject(n)?e.extend(!0,{},e.fn.api.settings,n):e.extend({},e.fn.api.settings),b=v.namespace,y=v.metadata,x=v.selector,w=v.error,C=v.className,k="."+b,T="module-"+b,S=e(this),A=S.closest(x.form),E=v.stateContext?e(v.stateContext):S,j=this,R=E[0],D=S.data(T);m={initialize:function(){u||m.bind.events(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),D=m,S.data(T,D)},destroy:function(){m.verbose("Destroying previous module for",j),S.removeData(T).off(k)},bind:{events:function(){var e=m.get.event();e?(m.verbose("Attaching API events to element",e),S.on(e+k,m.event.trigger)):"now"==v.on&&(m.debug("Querying API endpoint immediately"),m.query())}},decode:{json:function(e){if(e!==i&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var n;return t.Storage===i?void m.error(w.noStorage):(n=sessionStorage.getItem(e),m.debug("Using cached response",e,n),n=m.decode.json(n))}},write:{cachedResponse:function(n,o){return o&&""===o?void m.debug("Response empty, not caching",o):t.Storage===i?void m.error(w.noStorage):(e.isPlainObject(o)&&(o=JSON.stringify(o)),sessionStorage.setItem(n,o),void m.verbose("Storing cached response for url",n,o))}},query:function(){if(m.is.disabled())return void m.debug("Element is disabled API request aborted");if(m.is.loading()){if(!v.interruptRequests)return void m.debug("Cancelling request, previous request is still pending");m.debug("Interrupting previous request"),m.abort()}return v.defaultData&&e.extend(!0,v.urlData,m.get.defaultData()),v.serializeForm&&(v.data=m.add.formData(v.data)),f=m.get.settings(),f===!1?(m.cancelled=!0,void m.error(w.beforeSend)):(m.cancelled=!1,p=m.get.templatedURL(),p||m.is.mocked()?(p=m.add.urlData(p),p||m.is.mocked()?(f.url=v.base+p,r=e.extend(!0,{},v,{type:v.method||v.type,data:h,url:v.base+p,beforeSend:v.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),m.debug("Querying URL",r.url),m.verbose("Using AJAX settings",r),"local"===v.cache&&m.read.cachedResponse(p)?(m.debug("Response returned from local cache"),m.request=m.create.request(),void m.request.resolveWith(R,[m.read.cachedResponse(p)])):void(v.throttle?v.throttleFirstRequest||m.timer?(m.debug("Throttling request",v.throttle),clearTimeout(m.timer),m.timer=setTimeout(function(){m.timer&&delete m.timer,m.debug("Sending throttled request",h,r.method),m.send.request()},v.throttle)):(m.debug("Sending request",h,r.method),m.send.request(),m.timer=setTimeout(function(){},v.throttle)):(m.debug("Sending request",h,r.method),m.send.request()))):void 0):void m.error(w.missingURL))},should:{removeError:function(){return v.hideError===!0||"auto"===v.hideError&&!m.is.form()}},is:{disabled:function(){return S.filter(x.disabled).length>0},expectingJSON:function(){return"json"===v.dataType||"jsonp"===v.dataType},form:function(){return S.is("form")||E.is("form")},mocked:function(){return v.mockResponse||v.mockResponseAsync||v.response||v.responseAsync},input:function(){return S.is("input")},loading:function(){return!!m.request&&"pending"==m.request.state()},abortedRequest:function(e){return e&&e.readyState!==i&&0===e.readyState?(m.verbose("XHR request determined to be aborted"),!0):(m.verbose("XHR request was not aborted"),!1)},validResponse:function(t){return m.is.expectingJSON()&&e.isFunction(v.successTest)?(m.debug("Checking JSON returned success",v.successTest,t),v.successTest(t)?(m.debug("Response passed success test",t),!0):(m.debug("Response failed success test",t),!1)):(m.verbose("Response is not JSON, skipping validation",v.successTest,t),!0)}},was:{cancelled:function(){return m.cancelled||!1},succesful:function(){return m.request&&"resolved"==m.request.state()},failure:function(){return m.request&&"rejected"==m.request.state()},complete:function(){return m.request&&("resolved"==m.request.state()||"rejected"==m.request.state())}},add:{urlData:function(t,n){var o,r;return t&&(o=t.match(v.regExp.required),r=t.match(v.regExp.optional),n=n||v.urlData,o&&(m.debug("Looking for required URL variables",o),e.each(o,function(o,r){var a=r.indexOf("$")!==-1?r.substr(2,r.length-3):r.substr(1,r.length-2),s=e.isPlainObject(n)&&n[a]!==i?n[a]:S.data(a)!==i?S.data(a):E.data(a)!==i?E.data(a):n[a];return s===i?(m.error(w.requiredParameter,a,t),t=!1,!1):(m.verbose("Found required variable",a,s),s=v.encodeParameters?m.get.urlEncodedValue(s):s,void(t=t.replace(r,s)))})),r&&(m.debug("Looking for optional URL variables",o),e.each(r,function(o,r){var a=r.indexOf("$")!==-1?r.substr(3,r.length-4):r.substr(2,r.length-3),s=e.isPlainObject(n)&&n[a]!==i?n[a]:S.data(a)!==i?S.data(a):E.data(a)!==i?E.data(a):n[a];s!==i?(m.verbose("Optional variable Found",a,s),t=t.replace(r,s)):(m.verbose("Optional variable not found",a),t=t.indexOf("/"+r)!==-1?t.replace("/"+r,""):t.replace(r,""))}))),t},formData:function(t){var n,o=e.fn.serializeObject!==i,r=o?A.serializeObject():A.serialize();return t=t||v.data,n=e.isPlainObject(t),n?o?(m.debug("Extending existing data with form data",t,r),t=e.extend(!0,{},t,r)):(m.error(w.missingSerialize),m.debug("Cant extend data. Replacing data with form data",t,r),t=r):(m.debug("Adding form data",r),t=r),t}},send:{request:function(){m.set.loading(),m.request=m.create.request(),m.is.mocked()?m.mockedXHR=m.create.mockedXHR():m.xhr=m.create.xhr(),v.onRequest.call(R,m.request,m.xhr)}},event:{trigger:function(e){m.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var o=this,r=(new Date).getTime()-g,a=v.loadingDuration-r,s=!!e.isFunction(v.onResponse)&&(m.is.expectingJSON()?v.onResponse.call(o,e.extend(!0,{},t)):v.onResponse.call(o,t));a=a>0?a:0,s&&(m.debug("Modified API response in onResponse callback",v.onResponse,s,t),t=s),a>0&&m.debug("Response completed early delaying state change by",a),setTimeout(function(){m.is.validResponse(t)?m.request.resolveWith(o,[t,i]):m.request.rejectWith(o,[i,"invalid"])},a)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-g,r=v.loadingDuration-o;r=r>0?r:0,r>0&&m.debug("Response completed early delaying state change by",r),setTimeout(function(){m.is.abortedRequest(e)?m.request.rejectWith(i,[e,"aborted",n]):m.request.rejectWith(i,[e,"error",t,n])},r)}},request:{done:function(e,t){m.debug("Successful API Response",e),"local"===v.cache&&p&&(m.write.cachedResponse(p,e),m.debug("Saving server response locally",m.cache)),v.onSuccess.call(R,e,S,t)},complete:function(e,t){var n,i;m.was.succesful()?(i=e,n=t):(n=e,i=m.get.responseFromXHR(n)),m.remove.loading(),v.onComplete.call(R,i,S,n)},fail:function(e,t,n){var o=m.get.responseFromXHR(e),a=m.get.errorFromRequest(o,t,n);
return"aborted"==t?(m.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),v.onAbort.call(R,t,S,e),!0):("invalid"==t?m.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"==t&&e!==i&&(m.debug("XHR produced a server error",t,n),200!=e.status&&n!==i&&""!==n&&m.error(w.statusMessage+n,r.url),v.onError.call(R,a,S,e)),v.errorDuration&&"aborted"!==t&&(m.debug("Adding error state"),m.set.error(),m.should.removeError()&&setTimeout(m.remove.error,v.errorDuration)),m.debug("API Request failed",a,e),void v.onFailure.call(R,o,S,e))}}},create:{request:function(){return e.Deferred().always(m.event.request.complete).done(m.event.request.done).fail(m.event.request.fail)},mockedXHR:function(){var t,n,i,o=!1,r=!1,a=!1,s=v.mockResponse||v.response,l=v.mockResponseAsync||v.responseAsync;return i=e.Deferred().always(m.event.xhr.complete).done(m.event.xhr.done).fail(m.event.xhr.fail),s?(e.isFunction(s)?(m.debug("Using specified synchronous callback",s),n=s.call(R,f)):(m.debug("Using settings specified response",s),n=s),i.resolveWith(R,[n,o,{responseText:n}])):e.isFunction(l)&&(t=function(e){m.debug("Async callback returned response",e),e?i.resolveWith(R,[e,o,{responseText:e}]):i.rejectWith(R,[{responseText:e},r,a])},m.debug("Using specified async response callback",l),l.call(R,f,t)),i},xhr:function(){var t;return t=e.ajax(r).always(m.event.xhr.always).done(m.event.xhr.done).fail(m.event.xhr.fail),m.verbose("Created server request",t,r),t}},set:{error:function(){m.verbose("Adding error state to element",E),E.addClass(C.error)},loading:function(){m.verbose("Adding loading state to element",E),E.addClass(C.loading),g=(new Date).getTime()}},remove:{error:function(){m.verbose("Removing error state from element",E),E.removeClass(C.error)},loading:function(){m.verbose("Removing loading state from element",E),E.removeClass(C.loading)}},get:{responseFromXHR:function(t){return!!e.isPlainObject(t)&&(m.is.expectingJSON()?m.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,o){return e.isPlainObject(t)&&t.error!==i?t.error:v.error[n]!==i?v.error[n]:o},request:function(){return m.request||!1},xhr:function(){return m.xhr||!1},settings:function(){var t;return t=v.beforeSend.call(R,v),t&&(t.success!==i&&(m.debug("Legacy success callback detected",t),m.error(w.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==i&&(m.debug("Legacy failure callback detected",t),m.error(w.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==i&&(m.debug("Legacy complete callback detected",t),m.error(w.legacyParameters,t.complete),t.onComplete=t.complete)),t===i&&m.error(w.noReturnedValue),t===!1?t:t!==i?e.extend(!0,{},t):e.extend(!0,{},v)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e),o=n!==e;return o?(m.debug("URL value is already encoded, avoiding double encoding",e),e):(m.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var t={};return e.isWindow(j)||(m.is.input()?t.value=S.val():m.is.form()||(t.text=S.text())),t},event:function(){return e.isWindow(j)||"now"==v.on?(m.debug("API called without element, no events attached"),!1):"auto"==v.on?S.is("input")?j.oninput!==i?"input":j.onpropertychange!==i?"propertychange":"keyup":S.is("form")?"submit":"click":v.on},templatedURL:function(e){if(e=e||S.data(y.action)||v.action||!1,p=S.data(y.url)||v.url||!1)return m.debug("Using specified url",p),p;if(e){if(m.debug("Looking up url for action",e,v.api),v.api[e]===i&&!m.is.mocked())return void m.error(w.missingAction,v.action,v.api);p=v.api[e]}else m.is.form()&&(p=S.attr("action")||E.attr("action")||!1,m.debug("No url or action specified, defaulting to form action",p));return p}},abort:function(){var e=m.get.xhr();e&&"resolved"!==e.state()&&(m.debug("Cancelling API request"),e.abort())},reset:function(){m.remove.error(),m.remove.loading()},setting:function(t,n){if(m.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,v,t);else{if(n===i)return v[t];e.isPlainObject(v[t])?e.extend(!0,v[t],n):v[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(n===i)return m[t];m[t]=n}},debug:function(){!v.silent&&v.debug&&(v.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,v.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),m.verbose.apply(console,arguments)))},error:function(){v.silent||(m.error=Function.prototype.bind.call(console.error,console,v.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n,i;v.performance&&(t=(new Date).getTime(),i=s||t,n=t-i,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var t=v.name+":",n=0;s=!1,clearTimeout(m.performance.timer),e.each(l,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",a&&(t+=" '"+a+"'"),(console.group!==i||console.table!==i)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,n,r){var a,s,l,c=D;return n=n||d,r=j||r,"string"==typeof t&&c!==i&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(n,o){var r=n!=a?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(c[r])&&n!=a)c=c[r];else{if(c[r]!==i)return s=c[r],!1;if(!e.isPlainObject(c[o])||n==a)return c[o]!==i?(s=c[o],!1):(m.error(w.method,t),!1);c=c[o]}})),e.isFunction(s)?l=s.apply(r,n):s!==i&&(l=s),e.isArray(o)?o.push(l):o!==i?o=[o,l]:l!==i&&(o=l),s}},u?(D===i&&m.initialize(),m.invoke(c)):(D!==i&&D.invoke("destroy"),m.initialize())}),o!==i?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.i18next=t()}(this,function(){"use strict";function e(e){return null==e?"":""+e}function t(e,t,n){e.forEach(function(e){t[e]&&(n[e]=t[e])})}function n(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(!e)return{};var r=i(o.shift());!e[r]&&n&&(e[r]=new n),e=e[r]}return e?{obj:e,k:i(o.shift())}:{}}function i(e,t,i){var o=n(e,t,Object),r=o.obj,a=o.k;r[a]=i}function o(e,t,i,o){var r=n(e,t,Object),a=r.obj,s=r.k;a[s]=a[s]||[],o&&(a[s]=a[s].concat(i)),o||a[s].push(i)}function r(e,t){var i=n(e,t),o=i.obj,r=i.k;if(o)return o[r]}function a(e,t,n){for(var i in t)i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):a(e[i],t[i],n):e[i]=t[i];return e}function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function l(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return D[e]}):e}function c(e){return e.interpolation={unescapeSuffix:"HTML"},e.interpolation.prefix=e.interpolationPrefix||"__",e.interpolation.suffix=e.interpolationSuffix||"__",e.interpolation.escapeValue=e.escapeInterpolation||!1,e.interpolation.nestingPrefix=e.reusePrefix||"$t(",e.interpolation.nestingSuffix=e.reuseSuffix||")",e}function u(e){return e.resStore&&(e.resources=e.resStore),e.ns&&e.ns.defaultNs?(e.defaultNS=e.ns.defaultNs,e.ns=e.ns.namespaces):e.defaultNS=e.ns||"translation",e.fallbackToDefaultNS&&e.defaultNS&&(e.fallbackNS=e.defaultNS),e.saveMissing=e.sendMissing,e.saveMissingTo=e.sendMissingTo||"current",e.returnNull=!e.fallbackOnNull,e.returnEmptyString=!e.fallbackOnEmpty,e.returnObjects=e.returnObjectTrees,e.joinArrays="\n",e.returnedObjectHandler=e.objectTreeKeyHandler,e.parseMissingKeyHandler=e.parseMissingKey,e.appendNamespaceToMissingKey=!0,e.nsSeparator=e.nsseparator||":",e.keySeparator=e.keyseparator||".","sprintf"===e.shortcutFunction&&(e.overloadTranslationOptionHandler=function(e){for(var t=[],n=1;n<e.length;n++)t.push(e[n]);return{postProcess:"sprintf",sprintf:t}}),e.whitelist=e.lngWhitelist,e.preload=e.preload,"current"===e.load&&(e.load="currentOnly"),"unspecific"===e.load&&(e.load="languageOnly"),e.backend=e.backend||{},e.backend.loadPath=e.resGetPath||"locales/__lng__/__ns__.json",e.backend.addPath=e.resPostPath||"locales/add/__lng__/__ns__",e.backend.allowMultiLoading=e.dynamicLoad,e.cache=e.cache||{},e.cache.prefix="res_",e.cache.expirationTime=6048e5,e.cache.enabled=!!e.useLocalStorage,e=c(e),e.defaultVariables&&(e.interpolation.defaultVariables=e.defaultVariables),e}function d(e){return e=c(e),e.joinArrays="\n",e}function f(e){return(e.interpolationPrefix||e.interpolationSuffix||e.escapeInterpolation)&&(e=c(e)),e.nsSeparator=e.nsseparator,e.keySeparator=e.keyseparator,e.returnObjects=e.returnObjectTrees,e}function p(e){e.lng=function(){return j.deprecate("i18next.lng() can be replaced by i18next.language for detected language or i18next.languages for languages ordered by translation lookup."),e.services.languageUtils.toResolveHierarchy(e.language)[0]},e.preload=function(t,n){j.deprecate("i18next.preload() can be replaced with i18next.loadLanguages()"),e.loadLanguages(t,n)},e.setLng=function(t,n,i){return j.deprecate("i18next.setLng() can be replaced with i18next.changeLanguage() or i18next.getFixedT() to get a translation function with fixed language or namespace."),"function"==typeof n&&(i=n,n={}),n||(n={}),n.fixLng===!0&&i?i(null,e.getFixedT(t)):void e.changeLanguage(t,i)},e.addPostProcessor=function(t,n){j.deprecate("i18next.addPostProcessor() can be replaced by i18next.use({ type: 'postProcessor', name: 'name', process: fc })"),e.use({type:"postProcessor",name:t,process:n})}}function h(e){return e.charAt(0).toUpperCase()+e.slice(1)}function g(){var e={};return q.forEach(function(t){t.lngs.forEach(function(n){return e[n]={numbers:t.nr,plurals:N[t.fc]}})}),e}function m(e,t){for(var n=e.indexOf(t);n!==-1;)e.splice(n,1),n=e.indexOf(t)}function v(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",saveMissing:!1,saveMissingTo:"fallback",missingKeyHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){return{defaultValue:e[1]}},interpolation:{escapeValue:!0,format:function(e,t,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",defaultVariables:void 0}}}function b(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&e.whitelist.push("cimode"),e}function y(){}var x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},k=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},T=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},S=function(){function e(e,t){var n=[],i=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){o=!0,r=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A={type:"logger",log:function(e){this._output("log",e)},warn:function(e){this._output("warn",e)},error:function(e){this._output("error",e)},_output:function(e,t){console&&console[e]&&console[e].apply(console,Array.prototype.slice.call(t))}},E=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.init(t,n)}return e.prototype.init=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||A,this.options=t,this.debug=t.debug!==!1},e.prototype.setDebug=function(e){this.debug=e},e.prototype.log=function(){this.forward(arguments,"log","",!0)},e.prototype.warn=function(){this.forward(arguments,"warn","",!0)},e.prototype.error=function(){this.forward(arguments,"error","")},e.prototype.deprecate=function(){this.forward(arguments,"warn","WARNING DEPRECATED: ",!0)},e.prototype.forward=function(e,t,n,i){i&&!this.debug||("string"==typeof e[0]&&(e[0]=n+this.prefix+" "+e[0]),this.logger[t](e))},e.prototype.create=function(t){var n=new e(this.logger,C({prefix:this.prefix+":"+t+":"},this.options));return n},e}(),j=new E,R=function(){function e(){w(this,e),this.observers={}}return e.prototype.on=function(e,t){var n=this;e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})},e.prototype.off=function(e,t){var n=this;this.observers[e]&&this.observers[e].forEach(function(){if(t){var i=n.observers[e].indexOf(t);i>-1&&n.observers[e].splice(i,1)}else delete n.observers[e]})},e.prototype.emit=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach(function(e){e.apply(void 0,n)})}if(this.observers["*"]){var r=[].concat(this.observers["*"]);r.forEach(function(t){var i;t.apply(t,(i=[e]).concat.apply(i,n))})}},e}(),D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},O=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};w(this,t);var o=T(this,e.call(this));return o.data=n,o.options=i,o}return k(t,e),t.prototype.addNamespaces=function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)},t.prototype.removeNamespaces=function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)},t.prototype.getResource=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i.keySeparator||this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split(".")),r(this.data,a)},t.prototype.addResource=function(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var s=[e,t];n&&(s=s.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(s=e.split("."),o=t,t=s[1]),this.addNamespaces(t),i(this.data,s,o),r.silent||this.emit("added",e,t,n,o)},t.prototype.addResources=function(e,t,n){for(var i in n)"string"==typeof n[i]&&this.addResource(e,t,i,n[i],{silent:!0});this.emit("added",e,t,n)},t.prototype.addResourceBundle=function(e,t,n,o,s){var l=[e,t];e.indexOf(".")>-1&&(l=e.split("."),o=n,n=t,t=l[1]),this.addNamespaces(t);var c=r(this.data,l)||{};o?a(c,n,s):c=C({},c,n),i(this.data,l,c),this.emit("added",e,t,n)},t.prototype.removeResourceBundle=function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)},t.prototype.hasResourceBundle=function(e,t){return void 0!==this.getResource(e,t)},t.prototype.getResourceBundle=function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?C({},this.getResource(e,t)):this.getResource(e,t)},t.prototype.toJSON=function(){return this.data},t}(R),P={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,o){var r=this;return e.forEach(function(e){r.processors[e]&&(t=r.processors[e].process(t,n,i,o))}),t}},F=function(e){function n(i){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,n);var r=T(this,e.call(this));return t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector"],i,r),r.options=o,r.logger=j.create("translator"),r}return k(n,e),n.prototype.changeLanguage=function(e){e&&(this.language=e)},n.prototype.exists=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};return"v1"===this.options.compatibilityAPI&&(t=f(t)),void 0!==this.resolve(e,t)},n.prototype.extractFromKey=function(e,t){var n=t.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var i=t.keySeparator||this.options.keySeparator||".",o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var r=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(r[0])>-1)&&(o=r.shift()),e=r.join(i)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}},n.prototype.translate=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==("undefined"==typeof t?"undefined":x(t))?t=this.options.overloadTranslationOptionHandler(arguments):"v1"===this.options.compatibilityAPI&&(t=f(t)),void 0===e||null===e||""===e)return"";"number"==typeof e&&(e=String(e)),"string"==typeof e&&(e=[e]);var n=t.keySeparator||this.options.keySeparator||".",i=this.extractFromKey(e[e.length-1],t),o=i.key,r=i.namespaces,a=r[r.length-1],s=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(l){var c=t.nsSeparator||this.options.nsSeparator;return a+c+o}return o}var u=this.resolve(e,t),d=Object.prototype.toString.apply(u),p=["[object Number]","[object Function]","[object RegExp]"],h=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays;if(u&&"string"!=typeof u&&p.indexOf(d)<0&&(!h||"[object Array]"!==d)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(o,u,t):"key '"+o+" ("+this.language+")' returned an object instead of string.";if(t.keySeparator||this.options.keySeparator){var g="[object Array]"===d?[]:{};for(var m in u)g[m]=this.translate(""+o+n+m,C({joinArrays:!1,ns:r},t));u=g}}else if(h&&"[object Array]"===d)u=u.join(h),u&&(u=this.extendTranslation(u,o,t));else{var v=!1,b=!1;if(this.isValidLookup(u)||void 0===t.defaultValue||(v=!0,u=t.defaultValue),this.isValidLookup(u)||(b=!0,u=o),b||v){this.logger.log("missingKey",s,a,o,u);var y=[],w=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&w&&w[0])for(var k=0;k<w.length;k++)y.push(w[k]);else"all"===this.options.saveMissingTo?y=this.languageUtils.toResolveHierarchy(t.lng||this.language):y.push(t.lng||this.language);this.options.saveMissing&&(this.options.missingKeyHandler?this.options.missingKeyHandler(y,a,o,u):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(y,a,o,u)),this.emit("missingKey",y,a,o,u)}u=this.extendTranslation(u,o,t),b&&u===o&&this.options.appendNamespaceToMissingKey&&(u=a+":"+o),b&&this.options.parseMissingKeyHandler&&(u=this.options.parseMissingKeyHandler(u))}return u},n.prototype.extendTranslation=function(e,t,n){var i=this;n.interpolation&&this.interpolator.init(C({},n,{interpolation:C({},this.options.interpolation,n.interpolation)}));var o=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(o=C({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,this.language),e=this.interpolator.nest(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.translate.apply(i,t)},n),n.interpolation&&this.interpolator.reset();var r=n.postProcess||this.options.postProcess,a="string"==typeof r?[r]:r;return void 0!==e&&a&&a.length&&n.applyPostProcessor!==!1&&(e=P.handle(a,e,t,n,this)),e},n.prototype.resolve=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=void 0;return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!t.isValidLookup(i)){var o=t.extractFromKey(e,n),r=o.key,a=o.namespaces;t.options.fallbackNS&&(a=a.concat(t.options.fallbackNS));var s=void 0!==n.count&&"string"!=typeof n.count,l=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,c=n.lngs?n.lngs:t.languageUtils.toResolveHierarchy(n.lng||t.language);a.forEach(function(e){t.isValidLookup(i)||c.forEach(function(o){if(!t.isValidLookup(i)){var a=r,c=[a],u=void 0;s&&(u=t.pluralResolver.getSuffix(o,n.count)),s&&l&&c.push(a+u),l&&c.push(a+=""+t.options.contextSeparator+n.context),s&&c.push(a+=u);for(var d=void 0;d=c.pop();)t.isValidLookup(i)||(i=t.getResource(o,e,d,n))}})})}}),i},n.prototype.isValidLookup=function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)},n.prototype.getResource=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.resourceStore.getResource(e,t,n,i)},n}(R),L=function(){function e(t){w(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=j.create("languageUtils")}return e.prototype.getScriptPartFromCode=function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))},e.prototype.getLanguagePartFromCode=function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])},e.prototype.formatLanguageCode=function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=h(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=h(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=h(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e},e.prototype.isWhitelisted=function(e,t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist&&!t)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1},e.prototype.getFallbackCodes=function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e.default),n||[]},e.prototype.toResolveHierarchy=function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&(n.isWhitelisted(e,t)?o.push(e):n.logger.warn("rejecting non-whitelisted language code: "+e))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e),!0),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e),!0),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),i.forEach(function(e){o.indexOf(e)<0&&r(n.formatLanguageCode(e))}),o},e}(),q=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","es_ar","et","eu","fi","fo","fur","fy","gl","gu","ha","he","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt","pt_br","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21}],N={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)}},M=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.languageUtils=t,this.options=n,this.logger=j.create("pluralResolver"),this.rules=g()}return e.prototype.addRule=function(e,t){this.rules[e]=t},e.prototype.getRule=function(e){return this.rules[this.languageUtils.getLanguagePartFromCode(e)]},e.prototype.needsPlural=function(e){var t=this.getRule(e);return!(t&&t.numbers.length<=1)},e.prototype.getSuffix=function(e,t){var n=this,i=this.getRule(e);if(i){if(1===i.numbers.length)return"";var o=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),r=i.numbers[o];2===i.numbers.length&&1===i.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var a=function(){return n.options.prepend&&r.toString()?n.options.prepend+r.toString():r.toString()};return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_"+r.toString():a():"v2"===this.options.compatibilityJSON||2===i.numbers.length&&1===i.numbers[0]?a():2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: "+e),""},e}(),I=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,t),this.logger=j.create("interpolator"),this.init(e,!0)}return t.prototype.init=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e},this.escape=e.interpolation&&e.interpolation.escape||l),e.interpolation||(e.interpolation={escapeValue:!0});var n=e.interpolation;this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.prefix=n.prefix?s(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?s(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?s(n.nestingPrefix):n.nestingPrefixEscaped||s("$t("),this.nestingSuffix=n.nestingSuffix?s(n.nestingSuffix):n.nestingSuffixEscaped||s(")"),this.resetRegExp()},t.prototype.reset=function(){this.options&&this.init(this.options)},t.prototype.resetRegExp=function(){var e=this.prefix+"(.+?)"+this.suffix;this.regexp=new RegExp(e,"g");var t=this.prefix+this.unescapePrefix+"(.+?)"+this.unescapeSuffix+this.suffix;this.regexpUnescape=new RegExp(t,"g");var n=this.nestingPrefix+"(.+?)"+this.nestingSuffix;this.nestingRegexp=new RegExp(n,"g")},t.prototype.interpolate=function(t,n,i){function o(e){return e.replace(/\$/g,"$$$$")}var a=this,s=void 0,l=void 0,c=function(e){if(e.indexOf(a.formatSeparator)<0)return r(n,e);var t=e.split(a.formatSeparator),o=t.shift().trim(),s=t.join(a.formatSeparator).trim();return a.format(r(n,o),s,i)};for(this.resetRegExp();s=this.regexpUnescape.exec(t);){var u=c(s[1].trim());t=t.replace(s[0],u),this.regexpUnescape.lastIndex=0}for(;s=this.regexp.exec(t);)l=c(s[1].trim()),"string"!=typeof l&&(l=e(l)),l||(this.logger.warn("missed to pass in variable "+s[1]+" for interpolating "+t),l=""),l=o(this.escapeValue?this.escape(l):l),t=t.replace(s[0],l),this.regexp.lastIndex=0;return t},t.prototype.nest=function(t,n){function i(e){if(e.indexOf(",")<0)return e;var t=e.split(",");e=t.shift();var n=t.join(",");n=this.interpolate(n,s),n=n.replace(/'/g,'"');try{s=JSON.parse(n)}catch(t){this.logger.error("failed parsing options string in nesting for key "+e,t)}return e}var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=void 0,a=void 0,s=C({},o);for(s.applyPostProcessor=!1;r=this.nestingRegexp.exec(t);)a=n(i.call(this,r[1].trim()),s),
"string"!=typeof a&&(a=e(a)),a||(this.logger.warn("missed to pass in variable "+r[1]+" for interpolating "+t),a=""),t=t.replace(r[0],a),this.regexp.lastIndex=0;return t},t}(),H=function(e){function t(n,i,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};w(this,t);var a=T(this,e.call(this));return a.backend=n,a.store=i,a.services=o,a.options=r,a.logger=j.create("backendConnector"),a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,r.backend,r),a}return k(t,e),t.prototype.queueLoad=function(e,t,n){var i=this,o=[],r=[],a=[],s=[];return e.forEach(function(e){var n=!0;t.forEach(function(t){var a=e+"|"+t;i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?r.indexOf(a)<0&&r.push(a):(i.state[a]=1,n=!1,r.indexOf(a)<0&&r.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))}),n||a.push(e)}),(o.length||r.length)&&this.queue.push({pending:r,loaded:{},errors:[],callback:n}),{toLoad:o,pending:r,toLoadLanguages:a,toLoadNamespaces:s}},t.prototype.loaded=function(e,t,n){var i=this,r=e.split("|"),a=S(r,2),s=a[0],l=a[1];t&&this.emit("failedLoading",s,l,t),n&&this.store.addResourceBundle(s,l,n),this.state[e]=t?-1:2,this.queue.forEach(function(n){o(n.loaded,[s],l),m(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(i.emit("loaded",n.loaded),n.errors.length?n.callback(n.errors):n.callback(),n.done=!0)}),this.queue=this.queue.filter(function(e){return!e.done})},t.prototype.read=function(e,t,n,i,o,r){var a=this;return i||(i=0),o||(o=250),e.length?void this.backend[n](e,t,function(s,l){return s&&l&&i<5?void setTimeout(function(){a.read.call(a,e,t,n,++i,2*o,r)},o):void r(s,l)}):r(null,{})},t.prototype.load=function(e,t,n){var i=this;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();var o=C({},this.backend.options,this.options.backend);"string"==typeof e&&(e=this.services.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,n);if(!a.toLoad.length)return void(a.pending.length||n());if(o.allowMultiLoading&&this.backend.readMulti)this.read(a.toLoadLanguages,a.toLoadNamespaces,"readMulti",null,null,function(e,t){e&&i.logger.warn("loading namespaces "+a.toLoadNamespaces.join(", ")+" for languages "+a.toLoadLanguages.join(", ")+" via multiloading failed",e),!e&&t&&i.logger.log("loaded namespaces "+a.toLoadNamespaces.join(", ")+" for languages "+a.toLoadLanguages.join(", ")+" via multiloading",t),a.toLoad.forEach(function(n){var o=n.split("|"),a=S(o,2),s=a[0],l=a[1],c=r(t,[s,l]);if(c)i.loaded(n,e,c);else{var u="loading namespace "+l+" for language "+s+" via multiloading failed";i.loaded(n,u),i.logger.error(u)}})});else{var s=function(e){var t=this,n=e.split("|"),i=S(n,2),o=i[0],r=i[1];this.read(o,r,"read",null,null,function(n,i){n&&t.logger.warn("loading namespace "+r+" for language "+o+" failed",n),!n&&i&&t.logger.log("loaded namespace "+r+" for language "+o,i),t.loaded(e,n,i)})};a.toLoad.forEach(function(e){s.call(i,e)})}},t.prototype.reload=function(e,t){var n=this;this.backend||this.logger.warn("No backend was added via i18next.use. Will not load resources.");var i=C({},this.backend.options,this.options.backend);if("string"==typeof e&&(e=this.services.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]),i.allowMultiLoading&&this.backend.readMulti)this.read(e,t,"readMulti",null,null,function(i,o){i&&n.logger.warn("reloading namespaces "+t.join(", ")+" for languages "+e.join(", ")+" via multiloading failed",i),!i&&o&&n.logger.log("reloaded namespaces "+t.join(", ")+" for languages "+e.join(", ")+" via multiloading",o),e.forEach(function(e){t.forEach(function(t){var a=r(o,[e,t]);if(a)n.loaded(e+"|"+t,i,a);else{var s="reloading namespace "+t+" for language "+e+" via multiloading failed";n.loaded(e+"|"+t,s),n.logger.error(s)}})})});else{var o=function(e){var t=this,n=e.split("|"),i=S(n,2),o=i[0],r=i[1];this.read(o,r,"read",null,null,function(n,i){n&&t.logger.warn("reloading namespace "+r+" for language "+o+" failed",n),!n&&i&&t.logger.log("reloaded namespace "+r+" for language "+o,i),t.loaded(e,n,i)})};e.forEach(function(e){t.forEach(function(t){o.call(n,e+"|"+t)})})}},t.prototype.saveMissing=function(e,t,n,i){this.backend&&this.backend.create&&this.backend.create(e,t,n,i),e&&e[0]&&this.store.addResource(e[0],t,n,i)},t}(R),$=function(e){function t(n,i,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};w(this,t);var a=T(this,e.call(this));return a.cache=n,a.store=i,a.services=o,a.options=r,a.logger=j.create("cacheConnector"),a.cache&&a.cache.init&&a.cache.init(o,r.cache,r),a}return k(t,e),t.prototype.load=function(e,t,n){var i=this;if(!this.cache)return n&&n();var o=C({},this.cache.options,this.options.cache);"string"==typeof e&&(e=this.services.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]),o.enabled?this.cache.load(e,function(t,o){if(t&&i.logger.error("loading languages "+e.join(", ")+" from cache failed",t),o)for(var r in o)for(var a in o[r])if("i18nStamp"!==a){var s=o[r][a];s&&i.store.addResourceBundle(r,a,s)}n&&n()}):n&&n()},t.prototype.save=function(){this.cache&&this.options.cache&&this.options.cache.enabled&&this.cache.save(this.store.data)},t}(R),z=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1];w(this,t);var o=T(this,e.call(this));return o.options=b(n),o.services={},o.logger=j,o.modules={external:[]},!i||o.isInitialized||n.isClone||o.init(n,i),o}return k(t,e),t.prototype.init=function(e,t){function n(e){if(e)return"function"==typeof e?new e:e}var i=this;if("function"==typeof e&&(t=e,e={}),e||(e={}),"v1"===e.compatibilityAPI?this.options=C({},v(),b(u(e)),{}):"v1"===e.compatibilityJSON?this.options=C({},v(),b(d(e)),{}):this.options=C({},v(),this.options,b(e)),t||(t=y),!this.options.isClone){this.modules.logger?j.init(n(this.modules.logger),this.options):j.init(null,this.options);var o=new L(this.options);this.store=new O(this.options.resources,this.options);var r=this.services;r.logger=j,r.resourceStore=this.store,r.resourceStore.on("added removed",function(e,t){r.cacheConnector.save()}),r.languageUtils=o,r.pluralResolver=new M(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON}),r.interpolator=new I(this.options),r.backendConnector=new H(n(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];i.emit.apply(i,[e].concat(n))}),r.backendConnector.on("loaded",function(e){r.cacheConnector.save()}),r.cacheConnector=new $(n(this.modules.cache),r.resourceStore,r,this.options),r.cacheConnector.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];i.emit.apply(i,[e].concat(n))}),this.modules.languageDetector&&(r.languageDetector=n(this.modules.languageDetector),r.languageDetector.init(r,this.options.detection,this.options)),this.translator=new F(this.services,this.options),this.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];i.emit.apply(i,[e].concat(n))}),this.modules.external.forEach(function(e){e.init&&e.init(i)})}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle"];a.forEach(function(e){i[e]=function(){return this.store[e].apply(this.store,arguments)}}),"v1"===this.options.compatibilityAPI&&p(this);var s=function(){i.changeLanguage(i.options.lng,function(e,n){i.isInitialized=!0,i.logger.log("initialized",i.options),i.emit("initialized",i.options),t(e,n)})};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),this},t.prototype.loadResources=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;if(this.options.resources)t(null);else{if(this.language&&"cimode"===this.language.toLowerCase())return t();var n=[],i=function(t){if(t){var i=e.services.languageUtils.toResolveHierarchy(t);i.forEach(function(e){n.indexOf(e)<0&&n.push(e)})}};i(this.language),this.options.preload&&this.options.preload.forEach(function(e){i(e)}),this.services.cacheConnector.load(n,this.options.ns,function(){e.services.backendConnector.load(n,e.options.ns,t)})}},t.prototype.reloadResources=function(e,t){e||(e=this.languages),t||(t=this.options.ns),this.services.backendConnector.reload(e,t)},t.prototype.use=function(e){return"backend"===e.type&&(this.modules.backend=e),"cache"===e.type&&(this.modules.cache=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"postProcessor"===e.type&&P.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this},t.prototype.changeLanguage=function(e,t){var n=this,i=function(i){e&&(n.emit("languageChanged",e),n.logger.log("languageChanged",e)),t&&t(i,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.t.apply(n,t)})};!e&&this.services.languageDetector&&(e=this.services.languageDetector.detect()),e&&(this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.translator.changeLanguage(e),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage(e)),this.loadResources(function(e){i(e)})},t.prototype.getFixedT=function(e,t){var n=this,i=function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=C({},i);return o.lng=o.lng||e.lng,o.ns=o.ns||e.ns,n.t(t,o)};return i.lng=e,i.ns=t,i},t.prototype.t=function(){return this.translator&&this.translator.translate.apply(this.translator,arguments)},t.prototype.exists=function(){return this.translator&&this.translator.exists.apply(this.translator,arguments)},t.prototype.setDefaultNamespace=function(e){this.options.defaultNS=e},t.prototype.loadNamespaces=function(e,t){var n=this;return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),void this.loadResources(t)):t&&t()},t.prototype.loadLanguages=function(e,t){"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter(function(e){return n.indexOf(e)<0});return i.length?(this.options.preload=n.concat(i),void this.loadResources(t)):t()},t.prototype.dir=function(e){if(e||(e=this.language),!e)return"rtl";var t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return t.indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"},t.prototype.createInstance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];return new t(e,n)},t.prototype.cloneInstance=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y,o=C({},n,this.options,{isClone:!0}),r=new t(o,i),a=["store","services","language"];return a.forEach(function(t){r[t]=e[t]}),r.translator=new F(r.services,r.options),r.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];r.emit.apply(r,[e].concat(n))}),r.init(o,i),r},t}(R),U=new z;return U}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.i18nextXHRBackend=t()}(this,function(){"use strict";function e(e){return a.call(s.call(arguments,1),function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])}),e}function t(e,t){if(t&&"object"===(void 0===t?"undefined":l(t))){var n="",i=encodeURIComponent;for(var o in t)n+="&"+i(o)+"="+i(t[o]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e}function n(e,n,i,o,r){o&&"object"===(void 0===o?"undefined":l(o))&&(r||(o._t=new Date),o=t("",o).slice(1)),n.queryStringParams&&(e=t(e,n.queryStringParams));try{var a=new(XMLHttpRequest||ActiveXObject)("MSXML2.XMLHTTP.3.0");a.open(o?"POST":"GET",e,1),n.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!n.withCredentials,o&&a.setRequestHeader("Content-type","application/x-www-form-urlencoded");var s=n.customHeaders;if(s)for(var c in s)a.setRequestHeader(c,s[c]);a.onreadystatechange=function(){a.readyState>3&&i&&i(a.responseText,a)},a.send(o)}catch(e){console&&console.log(e)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:JSON.parse,crossDomain:!1,ajax:n}}var r=[],a=r.forEach,s=r.slice,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.init(e,n),this.type="backend"}return c(t,[{key:"init",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=t,this.options=e(n,this.options||{},o())}},{key:"readMulti",value:function(e,t,n){var i=this.options.loadPath;"function"==typeof this.options.loadPath&&(i=this.options.loadPath(e,t));var o=this.services.interpolator.interpolate(i,{lng:e.join("+"),ns:t.join("+")});this.loadUrl(o,n)}},{key:"read",value:function(e,t,n){var i=this.options.loadPath;"function"==typeof this.options.loadPath&&(i=this.options.loadPath([e],[t]));var o=this.services.interpolator.interpolate(i,{lng:e,ns:t});this.loadUrl(o,n)}},{key:"loadUrl",value:function(e,t){var n=this;this.options.ajax(e,this.options,function(i,o){if(o.status>=500&&o.status<600)return t("failed loading "+e,!0);if(o.status>=400&&o.status<500)return t("failed loading "+e,!1);var r=void 0,a=void 0;try{r=n.options.parse(i,e)}catch(t){a="failed parsing "+e+" to json"}return a?t(a,!1):void t(null,r)})}},{key:"create",value:function(e,t,n,i){var o=this;"string"==typeof e&&(e=[e]);var r={};r[n]=i||"",e.forEach(function(e){var n=o.services.interpolator.interpolate(o.options.addPath,{lng:e,ns:t});o.options.ajax(n,o.options,function(e,t){},r)})}}]),t}();return u.type="backend",u});var keyPlurals={"{{ stars }} star":"{{ stars }} stars","<b>{{ months }}</b> month costs <b>€ {{ eur }}</b>":"<b>{{ months }}</b> months cost <b>€ {{ eur }}</b>"},singlePageSnippets={"/2fa_gateway":function(){$("#telegram-code").on("input",function(){$(this).val().length>=6?$.get("/2fa_gateway/verify",{token:$(this).val().trim().substr(0,8)},function(e){switch(e){case"0":$("#telegram-code").closest(".field").addClass("success"),redir=redir?redir:"/",window.location.href=redir;break;case"1":$("#telegram-code").closest(".field").addClass("error")}}):$("#telegram-code").closest(".field").removeClass("error")})},"/leaderboard":function(){function e(){var e=window.location;window.history.replaceState("",document.title,e.pathname+"?mode="+favouriteMode+"&p="+page+(""!=country?"&country="+encodeURI(country):"")+e.hash),api("leaderboard",{mode:favouriteMode,p:page,l:50,country:country},function(e){var n=$(".ui.table tbody");n.find("tr").remove(),null==e.users&&(disableSimplepagButtons(!0),e.users=[]);var i=0;e.users.forEach(function(e){n.append($("<tr />").append($("<td />").text("#"+(50*(page-1)+ ++i)),$("<td />").html("<a href='/u/"+e.id+"' title='View profile'><i class='"+e.country.toLowerCase()+" flag'></i>"+escapeHTML(e.username)+"</a>"),$("<td />").html(t(e.chosen_mode.ranked_score,e.chosen_mode.pp)),$("<td />").text(e.chosen_mode.accuracy.toFixed(2)+"%"),$("<td />").html(addCommas(e.chosen_mode.playcount)+" <i title='"+T("Why, LOVE, of course!")+"'>(lv. "+e.chosen_mode.level.toFixed(0)+")</i>")))}),disableSimplepagButtons(e.users.length<50)})}function t(e,t){return 0===t?"<b>"+addCommas(e)+"</b>":"<b>"+addCommas(t)+"pp</b> ("+addCommas(e)+")"}page=0===page?1:page,$("#country-chooser-modal").click(function(){$(".ui.modal").modal("show")}),$(".lb-country").click(function(){country=$(this).data("country"),page=1,$(".ui.modal").modal("hide"),e()}),e(),setupSimplepag(e),$("#mode-menu .item").click(function(t){t.preventDefault(),$("#mode-menu .active.item").removeClass("active"),$(this).addClass("active"),favouriteMode=$(this).data("mode"),country="",page=1,e()})},"/relaxboard":function(){function e(){var e=window.location;window.history.replaceState("",document.title,e.pathname+"?mode="+favouriteMode+"&p="+page+(""!=country?"&country="+encodeURI(country):"")+e.hash),api("relaxboard",{mode:favouriteMode,p:page,l:50,country:country},function(e){var n=$(".ui.table tbody");n.find("tr").remove(),null==e.users&&(disableSimplepagButtons(!0),e.users=[]);var i=0;e.users.forEach(function(e){n.append($("<tr />").append($("<td />").text("#"+(50*(page-1)+ ++i)),$("<td />").html("<a href='/rx/u/"+e.id+"' title='View profile'><i class='"+e.country.toLowerCase()+" flag'></i>"+escapeHTML(e.username)+"</a>"),$("<td />").html(t(e.chosen_mode.ranked_score,e.chosen_mode.pp)),$("<td />").text(e.chosen_mode.accuracy.toFixed(2)+"%"),$("<td />").html(addCommas(e.chosen_mode.playcount)+" <i title='"+T("Why, LOVE, of course!")+"'>(lv. "+e.chosen_mode.level.toFixed(0)+")</i>")))}),disableSimplepagButtons(e.users.length<50)})}function t(e,t){return 0===t?"<b>"+addCommas(e)+"</b>":"<b>"+addCommas(t)+"pp</b> ("+addCommas(e)+")"}page=0===page?1:page,$("#country-chooser-modal").click(function(){$(".ui.modal").modal("show")}),$(".lb-country").click(function(){country=$(this).data("country"),page=1,$(".ui.modal").modal("hide"),e()}),e(),setupSimplepag(e),$("#mode-menu .item").click(function(t){t.preventDefault(),$("#mode-menu .active.item").removeClass("active"),$(this).addClass("active"),favouriteMode=$(this).data("mode"),country="",page=1,e()})},"/autoboard":function(){function e(){var e=window.location;window.history.replaceState("",document.title,e.pathname+"?mode="+favouriteMode+"&p="+page+(""!=country?"&country="+encodeURI(country):"")+e.hash),api("autoboard",{mode:favouriteMode,p:page,l:50,country:country},function(e){var n=$(".ui.table tbody");n.find("tr").remove(),null==e.users&&(disableSimplepagButtons(!0),e.users=[]);var i=0;e.users.forEach(function(e){n.append($("<tr />").append($("<td />").text("#"+(50*(page-1)+ ++i)),$("<td />").html("<a href='/ap/u/"+e.id+"' title='View profile'><i class='"+e.country.toLowerCase()+" flag'></i>"+escapeHTML(e.username)+"</a>"),$("<td />").html(t(e.chosen_mode.ranked_score,e.chosen_mode.pp)),$("<td />").text(e.chosen_mode.accuracy.toFixed(2)+"%"),$("<td />").html(addCommas(e.chosen_mode.playcount)+" <i title='"+T("Why, LOVE, of course!")+"'>(lv. "+e.chosen_mode.level.toFixed(0)+")</i>")))}),disableSimplepagButtons(e.users.length<50)})}function t(e,t){return 0===t?"<b>"+addCommas(e)+"</b>":"<b>"+addCommas(t)+"pp</b> ("+addCommas(e)+")"}page=0===page?1:page,$("#country-chooser-modal").click(function(){$(".ui.modal").modal("show")}),$(".lb-country").click(function(){country=$(this).data("country"),page=1,$(".ui.modal").modal("hide"),e()}),e(),setupSimplepag(e),$("#mode-menu .item").click(function(t){t.preventDefault(),$("#mode-menu .active.item").removeClass("active"),$(this).addClass("active"),favouriteMode=$(this).data("mode"),country="",page=1,e()})},"/friends":function(){$(".smalltext.button").click(function(){var e=$(this),t="1"===e.data("deleted")?"add":"del";console.log(t),e.addClass("disabled"),api("friends/"+t,{user:+e.data("userid")},function(t){e.removeClass("disabled"),e.data("deleted",t.friend?"0":"1"),e.removeClass("green red blue"),e.addClass(t.friend?t.mutual?"red":"green":"blue"),e.find(".icon").removeClass("minus plus heart").addClass(t.friend?t.mutual?"heart":"minus":"plus"),e.find("span").text(t.friend?T(t.mutual?"Mutual":"Remove"):e("Add"))},!0)})},"/team":function(){$("#everyone").click(function(){$(".ui.modal").modal("show")})},"/register/verify":function(){var e=query("u");setInterval(function(){$.getJSON(hanayoConf.banchoAPI+"/api/v1/verifiedStatus?u="+e,function(t){t.result>=0&&(window.location.href="/register/welcome?u="+e)})},5e3)},"/settings":function(){$("input[name='custom_badge.icon']").on("input",function(){$("#badge-icon").attr("class","circular big icon "+escapeHTML($(this).val()))}),$("input[name='custom_badge.name']").on("input",function(){$("#badge-name").html(escapeHTML($(this).val()))}),$("input[name='custom_badge.show']").change(function(){$(this).is(":checked")?$("#custom-badge-fields").slideDown():$("#custom-badge-fields").slideUp()});var e=$("#dark-site").is(":checked");$("form").submit(function(t){t.preventDefault();var n=$("#dark-site").is(":checked");if(n!=e){var i=document.cookie.replace(/(?:(?:^|.*;\s*)cflags\s*\=\s*([^;]*).*$)|^.*$/,"$1");i=n?1|+i:+i&-2,document.cookie="cflags="+i+";path=/;max-age=31536000"}var o=formToObject($(this)),r=0;$(this).find("input[data-sv]").each(function(e,t){t=$(t),t.is(":checked")&&(r|=t.data("sv"))}),o.play_style=r;var a=$(this);return api("users/self/settings",o,function(t){return n!=e?void window.location.reload():(showMessage("success","Your new settings have been saved."),void a.removeClass("loading"))},!0),!1})},"/settings/userpage":function(){var e=null;$("textarea[name='data']").on("input",function(){null!==e&&clearTimeout(e);$(this).val();e=setTimeout(function(){$("#userpage-content").addClass("loading"),$.post("/settings/userpage/parse",$("textarea[name='data']").val(),function(e){var t=$("#userpage-content").removeClass("loading").html(e);"undefined"!=typeof twemoji&&twemoji.parse(t[0])},"text")},800)}),$("form").submit(function(e){e.preventDefault();var t=formToObject($(this)),n=$(this);return api("users/self/userpage",t,function(e){showMessage("success","Your userpage has been saved."),n.removeClass("loading")},!0),!1})},"/donate":function(){var e=$("#months-slider")[0];noUiSlider.create(e,{start:[1],step:1,connect:[!0,!1],range:{min:[1],max:[24]}});var t={},n=e.noUiSlider;$.getJSON("/donate/rates",function(e){t=e,n.on("update",function(){var e=n.get(),i=Math.pow(30*e*.2,.7),o=i/t.EUR,r=o*t.USD;$("#cost").html(T("<b>{{ months }}</b> month costs <b>€ {{ eur }}</b>",{count:Math.round(+e),months:(+e).toFixed(0),eur:i.toFixed(2)})+"<br>"+T("($ {{ usd }} / BTC {{ btc }})",{usd:r.toFixed(2),btc:o.toFixed(10)})),$("input[name='os0']").attr("value",(+e).toFixed(0)+" month"+(1==e?"":"s")),$("#bitcoin-amt").text(o.toFixed(6)),$("#paypal-amt").val(i.toFixed(2))})}),$("#username-input").on("input",function(){$("#ipn-username").attr("value","username="+$(this).val())})},"/settings/avatar":function(){$("#file").change(function(e){var t=e.target.files;if(!(t.length<1)){var n=window.URL.createObjectURL(t[0]),i=$("#avatar-img")[0];i.src=n,i.onload=function(){window.URL.revokeObjectURL(this.src)}}})},"/beatmaps/rank_request":function(){function e(e){$("#queue-info").html(e.submitted+"/"+e.queue_size),0==e.submitted_by_user?$("#by-you").attr("hidden","hidden"):$("#by-you").removeAttr("hidden"),$("#submitted-by-user").text(e.submitted_by_user),$("#max-per-user").text(e.max_per_user);var t=(e.submitted/e.queue_size*100).toFixed(0);$("#progressbar .progress").text(t+"%"),$("#progressbar").progress({percent:t}),e.can_submit?$("#b-form .input, #b-form .button").removeClass("disabled"):$("#b-form .input, #b-form .button").addClass("disabled")}setInterval(function(){api("beatmaps/rank_requests/status",{},e)},1e4);var t=/^https?:\/\/osu.ppy.sh\/(s|b)\/(\d+)$/gi;$("#b-form").submit(function(n){n.preventDefault();var i=$("#beatmap").val().trim(),o=t.exec(i);if(t.exec(),console.log(i,o),null===o)return showMessage("error","Please provide a valid link, in the form of either https://osu.ppy.sh/s/&lt;ID&gt; or https://osu.ppy.sh/b/&lt;ID&gt;."),$(this).removeClass("loading"),!1;var r={};"s"==o[1]?r.set_id=+o[2]:r.id=+o[2];var a=$(this);return api("beatmaps/rank_requests",r,function(t){a.removeClass("loading"),showMessage("success","Beatmap rank request has been submitted."),e(t)},function(e){a.removeClass("loading"),406==e.code&&showMessage("warning","That beatmap is already ranked!")},!0),!1})},"/settings/profbackground":function(){$("#colorpicker").minicolors({inline:!0}),$("#background-type").change(function(){$("[data-type]:not([hidden])").attr("hidden","hidden"),$("[data-type="+$(this).val()+"]").removeAttr("hidden")}),$("#file").change(function(e){var t=e.target.files;if(!(t.length<1)){var n=window.URL.createObjectURL(t[0]),i=document.createElement("img");i.src=n,i.onload=function(){window.URL.revokeObjectURL(this.src)},$("#image-background").empty().append(i)}})},"/dev/tokens":function(){$("#privileges-number").on("input",function(){$("#privileges-text").text(privilegesToString($(this).val()))})}};$(document).ready(function(){$(".message .close").on("click",closeClosestMessage),$(".ui.checkbox").checkbox(),$(".ui.dropdown").dropdown(),$(".ui.progress").progress(),$(".ui.form").submit(function(e){var t=$(this);if(t.hasClass("loading")||t.hasClass("disabled"))return e.preventDefault(),!1;t.addClass("loading");var n=t.attr("id");$("[form='"+n+"']").addClass("loading")}),"undefined"!=typeof twemoji&&$(".twemoji").each(function(e,t){twemoji.parse(t)});var e=singlePageSnippets[window.location.pathname];"function"==typeof e&&e(),"function"==typeof deferredToPageLoad&&deferredToPageLoad(),$("#user-search").search({onSelect:function(e){return window.location.href=e.url,!1},apiSettings:{url:"/api/v1/users/lookup?name={query}",onResponse:function(e){var t={results:[]};return $.each(e.users,function(e,n){t.results.push({title:n.username,url:"/u/"+n.id,image:hanayoConf.avatars+"/"+n.id})}),t}}}),$("#user-search-input").keypress(function(e){13==e.which&&(window.location.pathname="/u/"+$(this).val())}),$(document).keydown(function(e){var t=$(document.activeElement),n=t.is(":input,[contenteditable]");83!==e.which&&115!==e.which||n||($("#user-search-input").focus(),e.preventDefault()),27===e.which&&n&&t.blur()}),$.timeago.settings.allowFuture=!0,$("time.timeago").timeago(),$("#language-selector .item").click(function(){var e=$(this).data("lang");document.cookie="language="+e+";path=/;max-age=31536000",window.location.reload()})});var modes={0:"osu! standard",1:"Taiko",2:"Catch the Beat",3:"osu!mania"},modesShort={0:"std",1:"taiko",2:"ctb",3:"mania"},entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};window.URL=window.URL||window.webkitURL;var modsString=["NF","EZ","NV","HD","HR","SD","DT","RX","HT","NC","FL","AU","SO","AP","PF","K4","K5","K6","K7","K8","K9","RN","LM","K9","K0","K1","K3","K2"],langWhitelist=["de","it","ko","es","ru","pl","fr","nl","sv","fi","ro","ko","vi"];i18next.use(i18nextXHRBackend).init({nsSeparator:!1,keySeparator:!1,fallbackLng:!1,lng:hanayoConf.language,whitelist:langWhitelist,load:"currentOnly",backend:{loadPath:"/static/locale/{{lng}}.json"}});var i18nLoaded=$.inArray(hanayoConf.language,langWhitelist)===-1;i18next.on("loaded",function(){i18nLoaded=!0});var apiPrivileges=["ReadConfidential","Write","ManageBadges","BetaKeys","ManageSettings","ViewUserAdvanced","ManageUser","ManageRoles","ManageAPIKeys","Blog","APIMeta","Beatmap"];