/*
 Copyright (c) 2008 Yii Software LLC
 @license http://www.yiiframework.com/license/
 @author Qiang Xue <qiang.xue@gmail.com>
 @since 2.0
*/
(function(c,g){"object"===typeof module&&"object"===typeof module.exports?module.exports=c.document?g(c,!0):function(c){if(!c.document)throw Error("jQuery requires a window with a document");return g(c)}:g(c)})("undefined"!==typeof window?window:this,function(c,g){function h(a){var b=a.length,c=l.type(a);return"function"===c||l.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"===typeof b&&0<b&&b-1 in a}function m(a,b,c){if(l.isFunction(b))return l.grep(a,function(a,d){return!!b.call(a,
d,a)!==c});if(b.nodeType)return l.grep(a,function(a){return a===b!==c});if("string"===typeof b){if(ta.test(b))return l.filter(b,a,c);b=l.filter(b,a)}return l.grep(a,function(a){return 0<=t.call(b,a)!==c})}function k(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function u(a){var b=bb[a]={};l.each(a.match(pa)||[],function(a,c){b[c]=!0});return b}function r(){S.removeEventListener("DOMContentLoaded",r,!1);c.removeEventListener("load",r,!1);l.ready()}function s(){Object.defineProperty(this.cache={},
0,{get:function(){return{}}});this.expando=l.expando+Math.random()}function y(a,b,c){if(void 0===c&&1===a.nodeType)if(c="data-"+b.replace(Ob,"-$1").toLowerCase(),c=a.getAttribute(c),"string"===typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:Pb.test(c)?l.parseJSON(c):c}catch(d){}ia.set(a,b,c)}else c=void 0;return c}function C(){return!0}function F(){return!1}function R(){try{return S.activeElement}catch(a){}}function N(a,b){return l.nodeName(a,"table")&&l.nodeName(11!==b.nodeType?
b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function M(a){a.type=(null!==a.getAttribute("type"))+"/"+a.type;return a}function D(a){var b=Db.exec(a.type);b?a.type=b[1]:a.removeAttribute("type");return a}function w(a,b){for(var c=0,d=a.length;c<d;c++)O.set(a[c],"globalEval",!b||O.get(b[c],"globalEval"))}function a(a,b){var c,d,e,f;if(1===b.nodeType){if(O.hasData(a)&&(f=O.access(a),c=O.set(b,f),f=f.events))for(e in delete c.handle,
c.events={},f)for(c=0,d=f[e].length;c<d;c++)l.event.add(b,e,f[e][c]);ia.hasData(a)&&(e=ia.access(a),e=l.extend({},e),ia.set(b,e))}}function b(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&l.nodeName(a,b)?l.merge([a],c):c}function d(a,b){var d,e=l(b.createElement(a)).appendTo(b.body),f=c.getDefaultComputedStyle&&(d=c.getDefaultComputedStyle(e[0]))?d.display:l.css(e[0],"display");e.detach();return f}function e(a){var b=
S,c=Oa[a];c||(c=d(a,b),"none"!==c&&c||(Pa=(Pa||l("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Pa[0].contentDocument,b.write(),b.close(),c=d(a,b),Pa.detach()),Oa[a]=c);return c}function f(a,b,c){var d,e,f=a.style;(c=c||Ha(a))&&(e=c.getPropertyValue(b)||c[b]);c&&(""!==e||l.contains(a.ownerDocument,a)||(e=l.style(a,b)),cb.test(e)&&db.test(b)&&(a=f.width,b=f.minWidth,d=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=c.width,f.width=a,f.minWidth=b,f.maxWidth=d));return void 0!==
e?e+"":e}function p(a,b){return{get:function(){if(a())delete this.get;else return(this.get=b).apply(this,arguments)}}}function z(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=eb.length;e--;)if(b=eb[e]+c,b in a)return b;return d}function J(a,b,c){return(a=ob.exec(b))?Math.max(0,a[1]-(c||0))+(a[2]||"px"):b}function Z(a,b,c,d,e){b=c===(d?"border":"content")?4:"width"===b?1:0;for(var f=0;4>b;b+=2)"margin"===c&&(f+=l.css(a,c+Ea[b],!0,e)),d?("content"===c&&(f-=l.css(a,"padding"+
Ea[b],!0,e)),"margin"!==c&&(f-=l.css(a,"border"+Ea[b]+"Width",!0,e))):(f+=l.css(a,"padding"+Ea[b],!0,e),"padding"!==c&&(f+=l.css(a,"border"+Ea[b]+"Width",!0,e)));return f}function A(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,p=Ha(a),n="border-box"===l.css(a,"boxSizing",!1,p);if(0>=e||null==e){e=f(a,b,p);if(0>e||null==e)e=a.style[b];if(cb.test(e))return e;d=n&&(L.boxSizingReliable()||e===a.style[b]);e=parseFloat(e)||0}return e+Z(a,b,c||(n?"border":"content"),d,p)+"px"}function x(a,
b){for(var c,d,f,p=[],n=0,k=a.length;n<k;n++)d=a[n],d.style&&(p[n]=O.get(d,"olddisplay"),c=d.style.display,b?(p[n]||"none"!==c||(d.style.display=""),""===d.style.display&&Qa(d)&&(p[n]=O.access(d,"olddisplay",e(d.nodeName)))):(f=Qa(d),"none"===c&&f||O.set(d,"olddisplay",f?c:l.css(d,"display"))));for(n=0;n<k;n++)d=a[n],!d.style||b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?p[n]||"":"none");return a}function v(a,b,c,d,e){return new v.prototype.init(a,b,c,d,e)}function aa(){setTimeout(function(){ja=
void 0});return ja=l.now()}function P(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=Ea[d],e["margin"+c]=e["padding"+c]=a;b&&(e.opacity=e.width=a);return e}function n(a,b,c){for(var d,e=(Fa[b]||[]).concat(Fa["*"]),f=0,l=e.length;f<l;f++)if(d=e[f].call(c,b,a))return d}function T(a,b){var c,d,e,f,p;for(c in a)if(d=l.camelCase(c),e=b[d],f=a[c],l.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),(p=l.cssHooks[d])&&"expand"in p)for(c in f=p.expand(f),delete a[d],f)c in a||(a[c]=f[c],b[c]=
e);else b[d]=e}function q(a,b,c){var d,e=0,f=Ra.length,p=l.Deferred().always(function(){delete k.elem}),k=function(){if(d)return!1;for(var b=ja||aa(),b=Math.max(0,t.startTime+t.duration-b),c=1-(b/t.duration||0),e=0,f=t.tweens.length;e<f;e++)t.tweens[e].run(c);p.notifyWith(a,[t,c,b]);if(1>c&&f)return b;p.resolveWith(a,[t]);return!1},t=p.promise({elem:a,props:l.extend({},b),opts:l.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:ja||aa(),duration:c.duration,tweens:[],
createTween:function(b,c){var d=l.Tween(a,t.opts,b,c,t.opts.specialEasing[b]||t.opts.easing);t.tweens.push(d);return d},stop:function(b){var c=0,e=b?t.tweens.length:0;if(d)return this;for(d=!0;c<e;c++)t.tweens[c].run(1);b?p.resolveWith(a,[t,b]):p.rejectWith(a,[t,b]);return this}});c=t.props;for(T(c,t.opts.specialEasing);e<f;e++)if(b=Ra[e].call(t,a,c,t.opts))return b;l.map(c,n,t);l.isFunction(t.opts.start)&&t.opts.start.call(a,t);l.fx.timer(l.extend(k,{elem:a,anim:t,queue:t.opts.queue}));return t.progress(t.opts.progress).done(t.opts.done,
t.opts.complete).fail(t.opts.fail).always(t.opts.always)}function X(a){return function(b,c){"string"!==typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(pa)||[];if(l.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function H(a,b,c,d){function e(n){var t;f[n]=!0;l.each(a[n]||[],function(a,G){var l=G(b,c,d);if("string"===typeof l&&!p&&!f[l])return b.dataTypes.unshift(l),e(l),!1;if(p)return!(t=l)});return t}var f={},p=a===la;return e(b.dataTypes[0])||
!f["*"]&&e("*")}function I(a,b){var c,d,e=l.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);d&&l.extend(!0,a,d);return a}function E(a,b,c,d){var e;if(l.isArray(b))l.each(b,function(b,e){c||pb.test(a)?d(a,e):E(a+"["+("object"===typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==l.type(b))d(a,b);else for(e in b)E(a+"["+e+"]",b[e],c,d)}function V(a){return l.isWindow(a)?a:9===a.nodeType&&a.defaultView}var K=[],Q=K.slice,da=K.concat,ea=K.push,t=K.indexOf,B={},Y=B.toString,
ha=B.hasOwnProperty,L={},S=c.document,l=function(a,b){return new l.fn.init(a,b)},ra=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,fb=/^-ms-/,wa=/-([\da-z])/gi,Sa=function(a,b){return b.toUpperCase()};l.fn=l.prototype={jquery:"2.1.1",constructor:l,selector:"",length:0,toArray:function(){return Q.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:Q.call(this)},pushStack:function(a){a=l.merge(this.constructor(),a);a.prevObject=this;a.context=this.context;return a},each:function(a,b){return l.each(this,
a,b)},map:function(a){return this.pushStack(l.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(Q.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length;a=+a+(0>a?b:0);return this.pushStack(0<=a&&a<b?[this[a]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ea,sort:K.sort,splice:K.splice};l.extend=l.fn.extend=function(){var a,b,c,d,e,f=arguments[0]||{},p=1,n=arguments.length,
t=!1;"boolean"===typeof f&&(t=f,f=arguments[p]||{},p++);"object"===typeof f||l.isFunction(f)||(f={});p===n&&(f=this,p--);for(;p<n;p++)if(null!=(a=arguments[p]))for(b in a)c=f[b],d=a[b],f!==d&&(t&&d&&(l.isPlainObject(d)||(e=l.isArray(d)))?(e?(e=!1,c=c&&l.isArray(c)?c:[]):c=c&&l.isPlainObject(c)?c:{},f[b]=l.extend(t,c,d)):void 0!==d&&(f[b]=d));return f};l.extend({expando:"jQuery"+("2.1.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw Error(a);},noop:function(){},isFunction:function(a){return"function"===
l.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!l.isArray(a)&&0<=a-parseFloat(a)},isPlainObject:function(a){return"object"!==l.type(a)||a.nodeType||l.isWindow(a)||a.constructor&&!ha.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){for(var b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"===typeof a||"function"===typeof a?B[Y.call(a)]||"object":typeof a},globalEval:function(a){var b;
b=eval;if(a=l.trim(a))1===a.indexOf("use strict")?(b=S.createElement("script"),b.text=a,S.head.appendChild(b).parentNode.removeChild(b)):b(a)},camelCase:function(a){return a.replace(fb,"ms-").replace(wa,Sa)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length;d=h(a);if(c)if(d)for(;e<f&&(d=b.apply(a[e],c),!1!==d);e++);else for(e in a){if(d=b.apply(a[e],c),!1===d)break}else if(d)for(;e<f&&(d=b.call(a[e],e,a[e]),!1!==d);e++);
else for(e in a)if(d=b.call(a[e],e,a[e]),!1===d)break;return a},trim:function(a){return null==a?"":(a+"").replace(ra,"")},makeArray:function(a,b){var c=b||[];null!=a&&(h(Object(a))?l.merge(c,"string"===typeof a?[a]:a):ea.call(c,a));return c},inArray:function(a,b,c){return null==b?-1:t.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];a.length=e;return a},grep:function(a,b,c){for(var d=[],e=0,f=a.length,l=!c;e<f;e++)c=!b(a[e],e),c!==l&&d.push(a[e]);return d},map:function(a,
b,c){var d,e=0,f=a.length,l=[];if(h(a))for(;e<f;e++)d=b(a[e],e,c),null!=d&&l.push(d);else for(e in a)d=b(a[e],e,c),null!=d&&l.push(d);return da.apply([],l)},guid:1,proxy:function(a,b){var c,d;"string"===typeof b&&(c=a[b],b=a,a=c);if(l.isFunction(a))return d=Q.call(arguments,2),c=function(){return a.apply(b||this,d.concat(Q.call(arguments)))},c.guid=a.guid=a.guid||l.guid++,c},now:Date.now,support:L});l.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){B["[object "+
b+"]"]=b.toLowerCase()});var xa=function(a){function b(a,c,d,e){var f,G,l,p,W;(c?c.ownerDocument||c:L)!==T&&x(c);c=c||T;d=d||[];if(!a||"string"!==typeof a)return d;if(1!==(p=c.nodeType)&&9!==p)return[];if(da&&!e){if(f=gb.exec(a))if(l=f[1])if(9===p)if((G=c.getElementById(l))&&G.parentNode){if(G.id===l)return d.push(G),d}else return d;else{if(c.ownerDocument&&(G=c.ownerDocument.getElementById(l))&&X(c,G)&&G.id===l)return d.push(G),d}else{if(f[2])return N.apply(d,c.getElementsByTagName(a)),d;if((l=f[3])&&
H.getElementsByClassName&&c.getElementsByClassName)return N.apply(d,c.getElementsByClassName(l)),d}if(H.qsa&&(!ea||!ea.test(a))){G=f=Q;l=c;W=9===p&&a;if(1===p&&"object"!==c.nodeName.toLowerCase()){p=Y(a);(f=c.getAttribute("id"))?G=f.replace(ua,"\\$&"):c.setAttribute("id",G);G="[id='"+G+"'] ";for(l=p.length;l--;)p[l]=G+B(p[l]);l=za.test(a)&&k(c.parentNode)||c;W=p.join(",")}if(W)try{return N.apply(d,l.querySelectorAll(W)),d}catch(n){}finally{f||c.removeAttribute("id")}}}return A(a.replace(xa,"$1"),
c,d,e)}function c(){function a(c,d){b.push(c+" ")>E.cacheLength&&delete a[b.shift()];return a[c+" "]=d}var b=[];return a}function d(a){a[Q]=!0;return a}function e(a){var b=T.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)E.attrHandle[c[d]]=b}function l(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||-2147483648)-(~a.sourceIndex||-2147483648);if(d)return d;if(c)for(;c=
c.nextSibling;)if(c===b)return-1;return a?1:-1}function p(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function n(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function t(a){return d(function(b){b=+b;return d(function(c,d){for(var e,f=a([],c.length,b),G=f.length;G--;)c[e=f[G]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!==typeof a.getElementsByTagName&&a}function z(){}function B(a){for(var b=0,c=
a.length,d="";b<c;b++)d+=a[b].value;return d}function g(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=D++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,G){var l,p,W=[y,f];if(G)for(;b=b[d];){if((1===b.nodeType||e)&&a(b,c,G))return!0}else for(;b=b[d];)if(1===b.nodeType||e){p=b[Q]||(b[Q]={});if((l=p[d])&&l[0]===y&&l[1]===f)return W[2]=l[2];p[d]=W;if(W[2]=a(b,c,G))return!0}}}function J(a){return 1<a.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,
c,d))return!1;return!0}:a[0]}function q(a,b,c,d,e){for(var f,G=[],l=0,p=a.length,W=null!=b;l<p;l++)if(f=a[l])if(!c||c(f,d,e))G.push(f),W&&b.push(l);return G}function h(a,c,e,f,G,l){f&&!f[Q]&&(f=h(f));G&&!G[Q]&&(G=h(G,l));return d(function(d,l,p,n){var U,t,k=[],ka=[],z=l.length,B;if(!(B=d)){B=c||"*";for(var g=p.nodeType?[p]:p,J=[],h=0,E=g.length;h<E;h++)b(B,g[h],J);B=J}B=!a||!d&&c?B:q(B,k,a,p,n);g=e?G||(d?a:z||f)?[]:l:B;e&&e(B,g,p,n);if(f)for(U=q(g,ka),f(U,[],p,n),p=U.length;p--;)if(t=U[p])g[ka[p]]=
!(B[ka[p]]=t);if(d){if(G||a){if(G){U=[];for(p=g.length;p--;)(t=g[p])&&U.push(B[p]=t);G(null,g=[],U,n)}for(p=g.length;p--;)(t=g[p])&&-1<(U=G?ca.call(d,t):k[p])&&(d[U]=!(l[U]=t))}}else g=q(g===l?g.splice(z,g.length):g),G?G(null,l,g,n):N.apply(l,g)})}function I(a){var b,c,d,e=a.length,f=E.relative[a[0].type];c=f||E.relative[" "];for(var G=f?1:0,l=g(function(a){return a===b},c,!0),p=g(function(a){return-1<ca.call(b,a)},c,!0),W=[function(a,c,d){return!f&&(d||c!==s)||((b=c).nodeType?l(a,c,d):p(a,c,d))}];G<
e;G++)if(c=E.relative[a[G].type])W=[g(J(W),c)];else{c=E.filter[a[G].type].apply(null,a[G].matches);if(c[Q]){for(d=++G;d<e&&!E.relative[a[d].type];d++);return h(1<G&&J(W),1<G&&B(a.slice(0,G-1).concat({value:" "===a[G-2].type?"*":""})).replace(xa,"$1"),c,G<d&&I(a.slice(G,d)),d<e&&I(a=a.slice(d)),d<e&&B(a))}W.push(c)}return J(W)}function Z(a,c){var e=0<c.length,f=0<a.length,G=function(d,G,l,p,n){var U,t,k,B=0,ka="0",z=d&&[],g=[],J=s,h=d||f&&E.find.TAG("*",n),H=y+=null==J?1:Math.random()||.1,I=h.length;
for(n&&(s=G!==T&&G);ka!==I&&null!=(U=h[ka]);ka++){if(f&&U){for(t=0;k=a[t++];)if(k(U,G,l)){p.push(U);break}n&&(y=H)}e&&((U=!k&&U)&&B--,d&&z.push(U))}B+=ka;if(e&&ka!==B){for(t=0;k=c[t++];)k(z,g,G,l);if(d){if(0<B)for(;ka--;)z[ka]||g[ka]||(g[ka]=fb.call(p));g=q(g)}N.apply(p,g);n&&!d&&0<g.length&&1<B+c.length&&b.uniqueSort(p)}n&&(y=H,s=J);return z};return e?d(G):G}var u,H,E,m,r,Y,V,A,s,P,v,x,T,K,da,ea,w,ha,X,Q="sizzle"+-new Date,L=a.document,y=0,D=0,aa=c(),S=c(),C=c(),F=function(a,b){a===b&&(v=!0);return 0},
M={}.hasOwnProperty,ra=[],fb=ra.pop,R=ra.push,N=ra.push,O=ra.slice,ca=ra.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]===a)return b;return-1},ba="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),wa="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ba+"))|)[\\x20\\t\\r\\n\\f]*\\]",Sa=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+
wa+")*)|.*)\\)|)",xa=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),fa=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,ia=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,ja=RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),na=new RegExp(Sa),pa=new RegExp("^"+ba+"$"),la={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG:new RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:new RegExp("^"+wa),
PSEUDO:new RegExp("^"+Sa),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},qa=/^(?:input|select|textarea|button)$/i,
sa=/^h\d$/i,oa=/^[^{]+\{\s*\[native \w/,gb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,za=/[+~]/,ua=/'|\\/g,ma=RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),ta=function(a,b,c){a="0x"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)};try{N.apply(ra=O.call(L.childNodes),L.childNodes),ra[L.childNodes.length].nodeType}catch(ya){N={apply:ra.length?function(a,b){R.apply(a,O.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=
b[d++];);a.length=c-1}}}H=b.support={};r=b.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};x=b.setDocument=function(a){var b=a?a.ownerDocument||a:L;a=b.defaultView;if(b===T||9!==b.nodeType||!b.documentElement)return T;T=b;K=b.documentElement;da=!r(b);a&&a!==a.top&&(a.addEventListener?a.addEventListener("unload",function(){x()},!1):a.attachEvent&&a.attachEvent("onunload",function(){x()}));H.attributes=e(function(a){a.className="i";return!a.getAttribute("className")});
H.getElementsByTagName=e(function(a){a.appendChild(b.createComment(""));return!a.getElementsByTagName("*").length});H.getElementsByClassName=oa.test(b.getElementsByClassName)&&e(function(a){a.innerHTML="<div class='a'></div><div class='a i'></div>";a.firstChild.className="i";return 2===a.getElementsByClassName("i").length});H.getById=e(function(a){K.appendChild(a).id=Q;return!b.getElementsByName||!b.getElementsByName(Q).length});H.getById?(E.find.ID=function(a,b){if("undefined"!==typeof b.getElementById&&
da){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},E.filter.ID=function(a){var b=a.replace(ma,ta);return function(a){return a.getAttribute("id")===b}}):(delete E.find.ID,E.filter.ID=function(a){var b=a.replace(ma,ta);return function(a){return(a="undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id"))&&a.value===b}});E.find.TAG=H.getElementsByTagName?function(a,b){if("undefined"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);
if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f};E.find.CLASS=H.getElementsByClassName&&function(a,b){if("undefined"!==typeof b.getElementsByClassName&&da)return b.getElementsByClassName(a)};w=[];ea=[];if(H.qsa=oa.test(b.querySelectorAll))e(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>";a.querySelectorAll("[msallowclip^='']").length&&ea.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");a.querySelectorAll("[selected]").length||ea.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
a.querySelectorAll(":checked").length||ea.push(":checked")}),e(function(a){var c=b.createElement("input");c.setAttribute("type","hidden");a.appendChild(c).setAttribute("name","D");a.querySelectorAll("[name=d]").length&&ea.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");a.querySelectorAll(":enabled").length||ea.push(":enabled",":disabled");a.querySelectorAll("*,:x");ea.push(",.*:")});(H.matchesSelector=oa.test(ha=K.matches||K.webkitMatchesSelector||K.mozMatchesSelector||K.oMatchesSelector||K.msMatchesSelector))&&
e(function(a){H.disconnectedMatch=ha.call(a,"div");ha.call(a,"[s!='']:x");w.push("!=",Sa)});ea=ea.length&&new RegExp(ea.join("|"));w=w.length&&new RegExp(w.join("|"));X=(a=oa.test(K.compareDocumentPosition))||oa.test(K.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&1===d.nodeType&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};F=a?function(a,
c){if(a===c)return v=!0,0;var d=!a.compareDocumentPosition-!c.compareDocumentPosition;if(d)return d;d=(a.ownerDocument||a)===(c.ownerDocument||c)?a.compareDocumentPosition(c):1;return d&1||!H.sortDetached&&c.compareDocumentPosition(a)===d?a===b||a.ownerDocument===L&&X(L,a)?-1:c===b||c.ownerDocument===L&&X(L,c)?1:P?ca.call(P,a)-ca.call(P,c):0:d&4?-1:1}:function(a,c){if(a===c)return v=!0,0;var d,e=0;d=a.parentNode;var f=c.parentNode,G=[a],p=[c];if(!d||!f)return a===b?-1:c===b?1:d?-1:f?1:P?ca.call(P,
a)-ca.call(P,c):0;if(d===f)return l(a,c);for(d=a;d=d.parentNode;)G.unshift(d);for(d=c;d=d.parentNode;)p.unshift(d);for(;G[e]===p[e];)e++;return e?l(G[e],p[e]):G[e]===L?-1:p[e]===L?1:0};return b};b.matches=function(a,c){return b(a,null,null,c)};b.matchesSelector=function(a,c){(a.ownerDocument||a)!==T&&x(a);c=c.replace(ja,"='$1']");if(!(!H.matchesSelector||!da||w&&w.test(c)||ea&&ea.test(c)))try{var d=ha.call(a,c);if(d||H.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return 0<
b(c,T,null,[a]).length};b.contains=function(a,b){(a.ownerDocument||a)!==T&&x(a);return X(a,b)};b.attr=function(a,b){(a.ownerDocument||a)!==T&&x(a);var c=E.attrHandle[b.toLowerCase()],c=c&&M.call(E.attrHandle,b.toLowerCase())?c(a,b,!da):void 0;return void 0!==c?c:H.attributes||!da?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};b.error=function(a){throw Error("Syntax error, unrecognized expression: "+a);};b.uniqueSort=function(a){var b,c=[],d=0,e=0;v=!H.detectDuplicates;P=!H.sortStable&&
a.slice(0);a.sort(F);if(v){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}P=null;return a};m=b.getText=function(a){var b,c="",d=0;b=a.nodeType;if(!b)for(;b=a[d++];)c+=m(b);else if(1===b||9===b||11===b){if("string"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=m(a)}else if(3===b||4===b)return a.nodeValue;return c};E=b.selectors={cacheLength:50,createPseudo:d,match:la,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},
"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(ma,ta);a[3]=(a[3]||a[4]||a[5]||"").replace(ma,ta);"~="===a[2]&&(a[3]=" "+a[3]+" ");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(la.CHILD.test(a[0]))return null;a[3]?
a[2]=a[4]||a[5]||"":c&&na.test(c)&&(b=Y(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b));return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(ma,ta).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=aa[a+" "];return b||(b=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"))&&aa(a,function(a){return b.test("string"===typeof a.className&&a.className||"undefined"!==
typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){e=b.attr(e,a);if(null==e)return"!="===c;if(!c)return!0;e+="";return"="===c?e===d:"!="===c?e!==d:"^="===c?d&&0===e.indexOf(d):"*="===c?d&&-1<e.indexOf(d):"$="===c?d&&e.slice(-d.length)===d:"~="===c?-1<(" "+e+" ").indexOf(d):"|="===c?e===d||e.slice(0,d.length+1)===d+"-":!1}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),G="last"!==a.slice(-4),l="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:
function(b,c,p){var W,n,U,t,k;c=f!==G?"nextSibling":"previousSibling";var B=b.parentNode,ka=l&&b.nodeName.toLowerCase();p=!p&&!l;if(B){if(f){for(;c;){for(n=b;n=n[c];)if(l?n.nodeName.toLowerCase()===ka:1===n.nodeType)return!1;k=c="only"===a&&!k&&"nextSibling"}return!0}k=[G?B.firstChild:B.lastChild];if(G&&p)for(p=B[Q]||(B[Q]={}),W=p[a]||[],t=W[0]===y&&W[1],U=W[0]===y&&W[2],n=t&&B.childNodes[t];n=++t&&n&&n[c]||(U=t=0)||k.pop();){if(1===n.nodeType&&++U&&n===b){p[a]=[y,t,U];break}}else if(p&&(W=(b[Q]||
(b[Q]={}))[a])&&W[0]===y)U=W[1];else for(;(n=++t&&n&&n[c]||(U=t=0)||k.pop())&&((l?n.nodeName.toLowerCase()!==ka:1!==n.nodeType)||!++U||(p&&((n[Q]||(n[Q]={}))[a]=[y,U]),n!==b)););U-=e;return U===d||0===U%d&&0<=U/d}}},PSEUDO:function(a,c){var e,f=E.pseudos[a]||E.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[Q]?f(c):1<f.length?(e=[a,a,"",c],E.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),G=e.length;G--;)d=ca.call(a,e[G]),a[d]=!(b[d]=e[G])}):function(a){return f(a,
0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=V(a.replace(xa,"$1"));return e[Q]?d(function(a,b,c,d){d=e(a,null,d,[]);for(var f=a.length;f--;)if(c=d[f])a[f]=!(b[f]=c)}):function(a,d,f){b[0]=a;e(b,null,f,c);return!c.pop()}}),has:d(function(a){return function(c){return 0<b(a,c).length}}),contains:d(function(a){return function(b){return-1<(b.textContent||b.innerText||m(b)).indexOf(a)}}),lang:d(function(a){pa.test(a||"")||b.error("unsupported lang: "+a);a=a.replace(ma,ta).toLowerCase();return function(b){var c;
do if(c=da?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===K},focus:function(a){return a===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=
a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!E.pseudos.empty(a)},header:function(a){return sa.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},
text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:t(function(){return[0]}),last:t(function(a,b){return[b-1]}),eq:t(function(a,b,c){return[0>c?c+b:c]}),even:t(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:t(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:t(function(a,b,c){for(b=0>c?c+b:c;0<=--b;)a.push(b);return a}),gt:t(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};
E.pseudos.nth=E.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})E.pseudos[u]=p(u);for(u in{submit:!0,reset:!0})E.pseudos[u]=n(u);z.prototype=E.filters=E.pseudos;E.setFilters=new z;Y=b.tokenize=function(a,c){var d,e,f,G,l,p,n;if(l=S[a+" "])return c?0:l.slice(0);l=a;p=[];for(n=E.preFilter;l;){if(!d||(e=fa.exec(l)))e&&(l=l.slice(e[0].length)||l),p.push(f=[]);d=!1;if(e=ia.exec(l))d=e.shift(),f.push({value:d,type:e[0].replace(xa," ")}),l=l.slice(d.length);for(G in E.filter)!(e=la[G].exec(l))||
n[G]&&!(e=n[G](e))||(d=e.shift(),f.push({value:d,type:G,matches:e}),l=l.slice(d.length));if(!d)break}return c?l.length:l?b.error(a):S(a,p).slice(0)};V=b.compile=function(a,b){var c,d=[],e=[],f=C[a+" "];if(!f){b||(b=Y(a));for(c=b.length;c--;)f=I(b[c]),f[Q]?d.push(f):e.push(f);f=C(a,Z(e,d));f.selector=a}return f};A=b.select=function(a,b,c,d){var e,f,G,l,p="function"===typeof a&&a,W=!d&&Y(a=p.selector||a);c=c||[];if(1===W.length){f=W[0]=W[0].slice(0);if(2<f.length&&"ID"===(G=f[0]).type&&H.getById&&9===
b.nodeType&&da&&E.relative[f[1].type]){b=(E.find.ID(G.matches[0].replace(ma,ta),b)||[])[0];if(!b)return c;p&&(b=b.parentNode);a=a.slice(f.shift().value.length)}for(e=la.needsContext.test(a)?0:f.length;e--;){G=f[e];if(E.relative[l=G.type])break;if(l=E.find[l])if(d=l(G.matches[0].replace(ma,ta),za.test(f[0].type)&&k(b.parentNode)||b)){f.splice(e,1);a=d.length&&B(f);if(!a)return N.apply(c,d),c;break}}}(p||V(a,W))(d,b,!da,c,za.test(a)&&k(b.parentNode)||b);return c};H.sortStable=Q.split("").sort(F).join("")===
Q;H.detectDuplicates=!!v;x();H.sortDetached=e(function(a){return a.compareDocumentPosition(T.createElement("div"))&1});e(function(a){a.innerHTML="<a href='#'></a>";return"#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)});H.attributes&&e(function(a){a.innerHTML="<input/>";a.firstChild.setAttribute("value","");return""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue});
e(function(a){return null==a.getAttribute("disabled")})||f("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null});return b}(c);l.find=xa;l.expr=xa.selectors;l.expr[":"]=l.expr.pseudos;l.unique=xa.uniqueSort;l.text=xa.getText;l.isXMLDoc=xa.isXML;l.contains=xa.contains;var gb=l.expr.match.needsContext,ca=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,
ta=/^.[^:#\[\.,]*$/;l.filter=function(a,b,c){var d=b[0];c&&(a=":not("+a+")");return 1===b.length&&1===d.nodeType?l.find.matchesSelector(d,a)?[d]:[]:l.find.matches(a,l.grep(b,function(a){return 1===a.nodeType}))};l.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!==typeof a)return this.pushStack(l(a).filter(function(){for(b=0;b<c;b++)if(l.contains(e[b],this))return!0}));for(b=0;b<c;b++)l.find(a,e[b],d);d=this.pushStack(1<c?l.unique(d):d);d.selector=this.selector?this.selector+
" "+a:a;return d},filter:function(a){return this.pushStack(m(this,a||[],!1))},not:function(a){return this.pushStack(m(this,a||[],!0))},is:function(a){return!!m(this,"string"===typeof a&&gb.test(a)?l(a):a||[],!1).length}});var za,qb=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(l.fn.init=function(a,b){var c;if(!a)return this;if("string"===typeof a){c="<"===a[0]&&">"===a[a.length-1]&&3<=a.length?[null,a,null]:qb.exec(a);if(!c||!c[1]&&b)return!b||b.jquery?(b||za).find(a):this.constructor(b).find(a);if(c[1]){if(b=
b instanceof l?b[0]:b,l.merge(this,l.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:S,!0)),ca.test(c[1])&&l.isPlainObject(b))for(c in b)if(l.isFunction(this[c]))this[c](b[c]);else this.attr(c,b[c])}else(c=S.getElementById(c[2]))&&c.parentNode&&(this.length=1,this[0]=c),this.context=S,this.selector=a;return this}if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(l.isFunction(a))return"undefined"!==typeof za.ready?za.ready(a):a(l);void 0!==a.selector&&(this.selector=a.selector,this.context=
a.context);return l.makeArray(a,this)}).prototype=l.fn;za=l(S);var hb=/^(?:parents|prev(?:Until|All))/,Ta={children:!0,contents:!0,next:!0,prev:!0};l.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&l(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});l.fn.extend({has:function(a){var b=l(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(l.contains(this,
b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],p=gb.test(a)||"string"!==typeof a?l(a,b||this.context):0;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(11>c.nodeType&&(p?-1<p.index(c):1===c.nodeType&&l.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(1<f.length?l.unique(f):f)},index:function(a){return a?"string"===typeof a?t.call(l(a),this[0]):t.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(l.unique(l.merge(this.get(),
l(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});l.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return l.dir(a,"parentNode")},parentsUntil:function(a,b,c){return l.dir(a,"parentNode",c)},next:function(a){return k(a,"nextSibling")},prev:function(a){return k(a,"previousSibling")},nextAll:function(a){return l.dir(a,"nextSibling")},prevAll:function(a){return l.dir(a,"previousSibling")},nextUntil:function(a,
b,c){return l.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return l.dir(a,"previousSibling",c)},siblings:function(a){return l.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return l.sibling(a.firstChild)},contents:function(a){return a.contentDocument||l.merge([],a.childNodes)}},function(a,b){l.fn[a]=function(c,d){var e=l.map(this,b,c);"Until"!==a.slice(-5)&&(d=c);d&&"string"===typeof d&&(e=l.filter(d,e));1<this.length&&(Ta[a]||l.unique(e),hb.test(a)&&e.reverse());return this.pushStack(e)}});
var pa=/\S+/g,bb={};l.Callbacks=function(a){a="string"===typeof a?bb[a]||u(a):l.extend({},a);var b,c,d,e,f,p,n=[],t=!a.once&&[],k=function(l){b=a.memory&&l;c=!0;p=e||0;e=0;f=n.length;for(d=!0;n&&p<f;p++)if(!1===n[p].apply(l[0],l[1])&&a.stopOnFalse){b=!1;break}d=!1;n&&(t?t.length&&k(t.shift()):b?n=[]:B.disable())},B={add:function(){if(n){var c=n.length;(function Hb(b){l.each(b,function(b,c){var d=l.type(c);"function"===d?a.unique&&B.has(c)||n.push(c):c&&c.length&&"string"!==d&&Hb(c)})})(arguments);
d?f=n.length:b&&(e=c,k(b))}return this},remove:function(){n&&l.each(arguments,function(a,b){for(var c;-1<(c=l.inArray(b,n,c));)n.splice(c,1),d&&(c<=f&&f--,c<=p&&p--)});return this},has:function(a){return a?-1<l.inArray(a,n):!(!n||!n.length)},empty:function(){n=[];f=0;return this},disable:function(){n=t=b=void 0;return this},disabled:function(){return!n},lock:function(){t=void 0;b||B.disable();return this},locked:function(){return!t},fireWith:function(a,b){!n||c&&!t||(b=b||[],b=[a,b.slice?b.slice():
b],d?t.push(b):k(b));return this},fire:function(){B.fireWith(this,arguments);return this},fired:function(){return!!c}};return B};l.extend({Deferred:function(a){var b=[["resolve","done",l.Callbacks("once memory"),"resolved"],["reject","fail",l.Callbacks("once memory"),"rejected"],["notify","progress",l.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var a=arguments;return l.Deferred(function(c){l.each(b,
function(b,f){var G=l.isFunction(a[b])&&a[b];e[f[1]](function(){var a=G&&G.apply(this,arguments);if(a&&l.isFunction(a.promise))a.promise().done(c.resolve).fail(c.reject).progress(c.notify);else c[f[0]+"With"](this===d?c.promise():this,G?[a]:arguments)})});a=null}).promise()},promise:function(a){return null!=a?l.extend(a,d):d}},e={};d.pipe=d.then;l.each(b,function(a,f){var G=f[2],l=f[3];d[f[1]]=G.add;l&&G.add(function(){c=l},b[a^1][2].disable,b[2][2].lock);e[f[0]]=function(){e[f[0]+"With"](this===
e?d:this,arguments);return this};e[f[0]+"With"]=G.fireWith});d.promise(e);a&&a.call(e,e);return e},when:function(a){var b=0,c=Q.call(arguments),d=c.length,e=1!==d||a&&l.isFunction(a.promise)?d:0,f=1===e?a:l.Deferred(),p=function(a,b,c){return function(d){b[a]=this;c[a]=1<arguments.length?Q.call(arguments):d;c===n?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},n,t,k;if(1<d)for(n=Array(d),t=Array(d),k=Array(d);b<d;b++)c[b]&&l.isFunction(c[b].promise)?c[b].promise().done(p(b,k,c)).fail(f.reject).progress(p(b,
t,n)):--e;e||f.resolveWith(k,c);return f.promise()}});var ua;l.fn.ready=function(a){l.ready.promise().done(a);return this};l.extend({isReady:!1,readyWait:1,holdReady:function(a){a?l.readyWait++:l.ready(!0)},ready:function(a){(!0===a?--l.readyWait:l.isReady)||(l.isReady=!0,!0!==a&&0<--l.readyWait||(ua.resolveWith(S,[l]),l.fn.triggerHandler&&(l(S).triggerHandler("ready"),l(S).off("ready"))))}});l.ready.promise=function(a){ua||(ua=l.Deferred(),"complete"===S.readyState?setTimeout(l.ready):(S.addEventListener("DOMContentLoaded",
r,!1),c.addEventListener("load",r,!1)));return ua.promise(a)};l.ready.promise();var ya=l.access=function(a,b,c,d,e,f,p){var n=0,t=a.length,k=null==c;if("object"===l.type(c))for(n in e=!0,c)l.access(a,b,n,c[n],!0,f,p);else if(void 0!==d&&(e=!0,l.isFunction(d)||(p=!0),k&&(p?(b.call(a,d),b=null):(k=b,b=function(a,b,c){return k.call(l(a),c)})),b))for(;n<t;n++)b(a[n],c,p?d:d.call(a[n],n,b(a[n],c)));return e?a:k?b.call(a):t?b(a[0],c):f};l.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};
s.uid=1;s.accepts=l.acceptData;s.prototype={key:function(a){if(!s.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=s.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,l.extend(a,b)}}this.cache[c]||(this.cache[c]={});return c},set:function(a,b,c){var d;a=this.key(a);var e=this.cache[a];if("string"===typeof b)e[b]=c;else if(l.isEmptyObject(e))l.extend(this.cache[a],b);else for(d in b)e[d]=b[d];return e},get:function(a,b){var c=this.cache[this.key(a)];
return void 0===b?c:c[b]},access:function(a,b,c){if(void 0===b||b&&"string"===typeof b&&void 0===c)return c=this.get(a,b),void 0!==c?c:this.get(a,l.camelCase(b));this.set(a,b,c);return void 0!==c?c:b},remove:function(a,b){var c,d;c=this.key(a);var e=this.cache[c];if(void 0===b)this.cache[c]={};else for(l.isArray(b)?d=b.concat(b.map(l.camelCase)):(c=l.camelCase(b),b in e?d=[b,c]:(d=c,d=d in e?[d]:d.match(pa)||[])),c=d.length;c--;)delete e[d[c]]},hasData:function(a){return!l.isEmptyObject(this.cache[a[this.expando]]||
{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var O=new s,ia=new s,Pb=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ob=/([A-Z])/g;l.extend({hasData:function(a){return ia.hasData(a)||O.hasData(a)},data:function(a,b,c){return ia.access(a,b,c)},removeData:function(a,b){ia.remove(a,b)},_data:function(a,b,c){return O.access(a,b,c)},_removeData:function(a,b){O.remove(a,b)}});l.fn.extend({data:function(a,b){var c,d,e,f=this[0],p=f&&f.attributes;if(void 0===a){if(this.length&&(e=ia.get(f),
1===f.nodeType&&!O.get(f,"hasDataAttrs"))){for(c=p.length;c--;)p[c]&&(d=p[c].name,0===d.indexOf("data-")&&(d=l.camelCase(d.slice(5)),y(f,d,e[d])));O.set(f,"hasDataAttrs",!0)}return e}return"object"===typeof a?this.each(function(){ia.set(this,a)}):ya(this,function(b){var c,d=l.camelCase(a);if(f&&void 0===b){c=ia.get(f,a);if(void 0!==c)return c;c=ia.get(f,d);if(void 0!==c)return c;c=y(f,d,void 0);if(void 0!==c)return c}else this.each(function(){var c=ia.get(this,d);ia.set(this,d,b);-1!==a.indexOf("-")&&
void 0!==c&&ia.set(this,a,b)})},null,b,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){ia.remove(this,a)})}});l.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=O.get(a,b),c&&(!d||l.isArray(c)?d=O.access(a,b,l.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=l.queue(a,b),d=c.length,e=c.shift(),f=l._queueHooks(a,b),p=function(){l.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--);e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,
e.call(a,p,f));!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return O.get(a,c)||O.access(a,c,{empty:l.Callbacks("once memory").add(function(){O.remove(a,[b+"queue",c])})})}});l.fn.extend({queue:function(a,b){var c=2;"string"!==typeof a&&(b=a,a="fx",c--);return arguments.length<c?l.queue(this[0],a):void 0===b?this:this.each(function(){var c=l.queue(this,a,b);l._queueHooks(this,a);"fx"===a&&"inprogress"!==c[0]&&l.dequeue(this,a)})},dequeue:function(a){return this.each(function(){l.dequeue(this,
a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=l.Deferred(),f=this,p=this.length,n=function(){--d||e.resolveWith(f,[f])};"string"!==typeof a&&(b=a,a=void 0);for(a=a||"fx";p--;)(c=O.get(f[p],a+"queueHooks"))&&c.empty&&(d++,c.empty.add(n));n();return e.promise(b)}});var Ua=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ea=["Top","Right","Bottom","Left"],Qa=function(a,b){a=b||a;return"none"===l.css(a,"display")||!l.contains(a.ownerDocument,a)},ib=/^(?:checkbox|radio)$/i;
(function(){var a=S.createDocumentFragment().appendChild(S.createElement("div")),b=S.createElement("input");b.setAttribute("type","radio");b.setAttribute("checked","checked");b.setAttribute("name","t");a.appendChild(b);L.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked;a.innerHTML="<textarea>x</textarea>";L.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue})();L.focusinBubbles="onfocusin"in c;var Vb=/^key/,Wb=/^(?:mouse|pointer|contextmenu)|click/,Va=/^(?:focusinfocus|focusoutblur)$/,
ma=/^([^.]*)(?:\.(.+)|)$/;l.event={global:{},add:function(a,b,c,d,e){var f,p,n,t,k,B,z,g,J;if(k=O.get(a))for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=l.guid++),(t=k.events)||(t=k.events={}),(p=k.handle)||(p=k.handle=function(b){return"undefined"!==typeof l&&l.event.triggered!==b.type?l.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(pa)||[""],k=b.length;k--;)n=ma.exec(b[k])||[],g=B=n[1],J=(n[2]||"").split(".").sort(),g&&(n=l.event.special[g]||{},g=(e?n.delegateType:n.bindType)||
g,n=l.event.special[g]||{},B=l.extend({type:g,origType:B,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&l.expr.match.needsContext.test(e),namespace:J.join(".")},f),(z=t[g])||(z=t[g]=[],z.delegateCount=0,n.setup&&!1!==n.setup.call(a,d,J,p)||a.addEventListener&&a.addEventListener(g,p,!1)),n.add&&(n.add.call(a,B),B.handler.guid||(B.handler.guid=c.guid)),e?z.splice(z.delegateCount++,0,B):z.push(B),l.event.global[g]=!0)},remove:function(a,b,c,d,e){var f,p,n,t,k,B,g,z,J,q,h,E=O.hasData(a)&&O.get(a);
if(E&&(t=E.events)){b=(b||"").match(pa)||[""];for(k=b.length;k--;)if(n=ma.exec(b[k])||[],J=h=n[1],q=(n[2]||"").split(".").sort(),J){g=l.event.special[J]||{};J=(d?g.delegateType:g.bindType)||J;z=t[J]||[];n=n[2]&&new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)");for(p=f=z.length;f--;)B=z[f],!e&&h!==B.origType||c&&c.guid!==B.guid||n&&!n.test(B.namespace)||d&&d!==B.selector&&("**"!==d||!B.selector)||(z.splice(f,1),B.selector&&z.delegateCount--,g.remove&&g.remove.call(a,B));p&&!z.length&&(g.teardown&&
!1!==g.teardown.call(a,q,E.handle)||l.removeEvent(a,J,E.handle),delete t[J])}else for(J in t)l.event.remove(a,J+b[k],c,d,!0);l.isEmptyObject(t)&&(delete E.handle,O.remove(a,"events"))}},trigger:function(a,b,d,e){var f,p,n,t,k,B,g=[d||S],z=ha.call(a,"type")?a.type:a;B=ha.call(a,"namespace")?a.namespace.split("."):[];p=f=d=d||S;if(3!==d.nodeType&&8!==d.nodeType&&!Va.test(z+l.event.triggered)&&(0<=z.indexOf(".")&&(B=z.split("."),z=B.shift(),B.sort()),t=0>z.indexOf(":")&&"on"+z,a=a[l.expando]?a:new l.Event(z,
"object"===typeof a&&a),a.isTrigger=e?2:3,a.namespace=B.join("."),a.namespace_re=a.namespace?new RegExp("(^|\\.)"+B.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=d),b=null==b?[a]:l.makeArray(b,[a]),B=l.event.special[z]||{},e||!B.trigger||!1!==B.trigger.apply(d,b))){if(!e&&!B.noBubble&&!l.isWindow(d)){n=B.delegateType||z;Va.test(n+z)||(p=p.parentNode);for(;p;p=p.parentNode)g.push(p),f=p;f===(d.ownerDocument||S)&&g.push(f.defaultView||f.parentWindow||c)}for(f=0;(p=g[f++])&&
!a.isPropagationStopped();)a.type=1<f?n:B.bindType||z,(k=(O.get(p,"events")||{})[a.type]&&O.get(p,"handle"))&&k.apply(p,b),(k=t&&p[t])&&k.apply&&l.acceptData(p)&&(a.result=k.apply(p,b),!1===a.result&&a.preventDefault());a.type=z;e||a.isDefaultPrevented()||B._default&&!1!==B._default.apply(g.pop(),b)||!l.acceptData(d)||!t||!l.isFunction(d[z])||l.isWindow(d)||((f=d[t])&&(d[t]=null),l.event.triggered=z,d[z](),l.event.triggered=void 0,f&&(d[t]=f));return a.result}},dispatch:function(a){a=l.event.fix(a);
var b,c,d,e,f=[],p=Q.call(arguments);b=(O.get(this,"events")||{})[a.type]||[];var n=l.event.special[a.type]||{};p[0]=a;a.delegateTarget=this;if(!n.preDispatch||!1!==n.preDispatch.call(this,a)){f=l.event.handlers.call(this,a,b);for(b=0;(e=f[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(d=e.handlers[c++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(d.namespace))a.handleObj=d,a.data=d.data,d=((l.event.special[d.origType]||{}).handle||d.handler).apply(e.elem,
p),void 0!==d&&!1===(a.result=d)&&(a.preventDefault(),a.stopPropagation());n.postDispatch&&n.postDispatch.call(this,a);return a.result}},handlers:function(a,b){var c,d,e,f,p=[],n=b.delegateCount,t=a.target;if(n&&t.nodeType&&(!a.button||"click"!==a.type))for(;t!==this;t=t.parentNode||this)if(!0!==t.disabled||"click"!==a.type){d=[];for(c=0;c<n;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?0<=l(e,this).index(t):l.find(e,this,null,[t]).length),d[e]&&d.push(f);d.length&&p.push({elem:t,
handlers:d})}n<b.length&&p.push({elem:this,handlers:b.slice(n)});return p},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,b){null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,
b){var c,d,e=b.button;null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||S,d=c.documentElement,c=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||c&&c.scrollLeft||0)-(d&&d.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||c&&c.scrollTop||0)-(d&&d.clientTop||c&&c.clientTop||0));a.which||void 0===e||(a.which=e&1?1:e&2?3:e&4?2:0);return a}},fix:function(a){if(a[l.expando])return a;var b,c,d;b=a.type;var e=a,f=this.fixHooks[b];f||(this.fixHooks[b]=f=Wb.test(b)?this.mouseHooks:Vb.test(b)?
this.keyHooks:{});d=f.props?this.props.concat(f.props):this.props;a=new l.Event(e);for(b=d.length;b--;)c=d[b],a[c]=e[c];a.target||(a.target=S);3===a.target.nodeType&&(a.target=a.target.parentNode);return f.filter?f.filter(a,e):a},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==R()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===R()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&
this.click&&l.nodeName(this,"input"))return this.click(),!1},_default:function(a){return l.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){a=l.extend(new l.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?l.event.trigger(a,null,b):l.event.dispatch.call(b,a);a.isDefaultPrevented()&&c.preventDefault()}};l.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,
c,!1)};l.Event=function(a,b){if(!(this instanceof l.Event))return new l.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&!1===a.returnValue?C:F):this.type=a;b&&l.extend(this,b);this.timeStamp=a&&a.timeStamp||l.now();this[l.expando]=!0};l.Event.prototype={isDefaultPrevented:F,isPropagationStopped:F,isImmediatePropagationStopped:F,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=C;a&&a.preventDefault&&
a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=C;a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=C;a&&a.stopImmediatePropagation&&a.stopImmediatePropagation();this.stopPropagation()}};l.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){l.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,
d=a.relatedTarget,e=a.handleObj;if(!d||d!==this&&!l.contains(this,d))a.type=e.origType,c=e.handler.apply(this,arguments),a.type=b;return c}}});L.focusinBubbles||l.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){l.event.simulate(b,a.target,l.event.fix(a),!0)};l.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=O.access(d,b);e||d.addEventListener(a,c,!0);O.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=O.access(d,b)-1;e?O.access(d,
b,e):(d.removeEventListener(a,c,!0),O.remove(d,b))}}});l.fn.extend({on:function(a,b,c,d,e){var f,p;if("object"===typeof a){"string"!==typeof b&&(c=c||b,b=void 0);for(p in a)this.on(p,b,c,a[p],e);return this}null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"===typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0));if(!1===d)d=F;else if(!d)return this;1===e&&(f=d,d=function(a){l().off(a);return f.apply(this,arguments)},d.guid=f.guid||(f.guid=l.guid++));return this.each(function(){l.event.add(this,a,d,c,b)})},
one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,l(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"===typeof a){for(d in a)this.off(d,b,a[d]);return this}if(!1===b||"function"===typeof b)c=b,b=void 0;!1===c&&(c=F);return this.each(function(){l.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){l.event.trigger(a,b,this)})},triggerHandler:function(a,
b){var c=this[0];if(c)return l.event.trigger(a,b,c,!0)}});var rb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,fa=/<([\w:]+)/,jb=/<|&#?\w+;/,sb=/<(?:script|style|link)/i,Ia=/checked\s*(?:[^=]|=\s*.checked.)/i,kb=/^$|\/(?:java|ecma)script/i,Db=/^true\/(.*)/,tb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ba={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,"",""]};ba.optgroup=ba.option;ba.tbody=ba.tfoot=ba.colgroup=ba.caption=ba.thead;ba.th=ba.td;l.extend({clone:function(c,d,e){var f,p,n,t,k=c.cloneNode(!0),B=l.contains(c.ownerDocument,c);if(!(L.noCloneChecked||1!==c.nodeType&&11!==c.nodeType||l.isXMLDoc(c)))for(t=b(k),n=b(c),f=0,p=n.length;f<p;f++){var z=n[f],g=t[f],J=g.nodeName.toLowerCase();if("input"===J&&ib.test(z.type))g.checked=z.checked;else if("input"===J||"textarea"===J)g.defaultValue=
z.defaultValue}if(d)if(e)for(n=n||b(c),t=t||b(k),f=0,p=n.length;f<p;f++)a(n[f],t[f]);else a(c,k);t=b(k,"script");0<t.length&&w(t,!B&&b(c,"script"));return k},buildFragment:function(a,c,d,e){for(var f,p,n,t=c.createDocumentFragment(),k=[],B=0,z=a.length;B<z;B++)if((f=a[B])||0===f)if("object"===l.type(f))l.merge(k,f.nodeType?[f]:f);else if(jb.test(f)){p=p||t.appendChild(c.createElement("div"));n=(fa.exec(f)||["",""])[1].toLowerCase();n=ba[n]||ba._default;p.innerHTML=n[1]+f.replace(rb,"<$1></$2>")+n[2];
for(n=n[0];n--;)p=p.lastChild;l.merge(k,p.childNodes);p=t.firstChild;p.textContent=""}else k.push(c.createTextNode(f));t.textContent="";for(B=0;f=k[B++];)if(!e||-1===l.inArray(f,e))if(a=l.contains(f.ownerDocument,f),p=b(t.appendChild(f),"script"),a&&w(p),d)for(n=0;f=p[n++];)kb.test(f.type||"")&&d.push(f);return t},cleanData:function(a){for(var b,c,d,e,f=l.event.special,p=0;void 0!==(c=a[p]);p++){if(l.acceptData(c)&&(e=c[O.expando])&&(b=O.cache[e])){if(b.events)for(d in b.events)f[d]?l.event.remove(c,
d):l.removeEvent(c,d,b.handle);O.cache[e]&&delete O.cache[e]}delete ia.cache[c[ia.expando]]}}});l.fn.extend({text:function(a){return ya(this,function(a){return void 0===a?l.text(this):this.empty().each(function(){if(1===this.nodeType||11===this.nodeType||9===this.nodeType)this.textContent=a})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||N(this,a).appendChild(a)})},prepend:function(){return this.domManip(arguments,
function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=N(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,c){for(var d,e=a?l.filter(a,this):this,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||l.cleanData(b(d)),d.parentNode&&
(c&&l.contains(d.ownerDocument,d)&&w(b(d,"script")),d.parentNode.removeChild(d));return this},empty:function(){for(var a,c=0;null!=(a=this[c]);c++)1===a.nodeType&&(l.cleanData(b(a,!1)),a.textContent="");return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return l.clone(this,a,b)})},html:function(a){return ya(this,function(a){var c=this[0]||{},d=0,e=this.length;if(void 0===a&&1===c.nodeType)return c.innerHTML;if("string"===typeof a&&!sb.test(a)&&!ba[(fa.exec(a)||
["",""])[1].toLowerCase()]){a=a.replace(rb,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},1===c.nodeType&&(l.cleanData(b(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];this.domManip(arguments,function(c){a=this.parentNode;l.cleanData(b(this));a&&a.replaceChild(c,this)});return a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,c){a=da.apply([],a);var d,e,f,
p,n=0,t=this.length,k=this,B=t-1,z=a[0],g=l.isFunction(z);if(g||1<t&&"string"===typeof z&&!L.checkClone&&Ia.test(z))return this.each(function(b){var d=k.eq(b);g&&(a[0]=z.call(this,b,d.html()));d.domManip(a,c)});if(t&&(d=l.buildFragment(a,this[0].ownerDocument,!1,this),e=d.firstChild,1===d.childNodes.length&&(d=e),e)){e=l.map(b(d,"script"),M);for(f=e.length;n<t;n++)p=d,n!==B&&(p=l.clone(p,!0,!0),f&&l.merge(e,b(p,"script"))),c.call(this[n],p,n);if(f)for(d=e[e.length-1].ownerDocument,l.map(e,D),n=0;n<
f;n++)p=e[n],kb.test(p.type||"")&&!O.access(p,"globalEval")&&l.contains(d,p)&&(p.src?l._evalUrl&&l._evalUrl(p.src):l.globalEval(p.textContent.replace(tb,"")))}return this}});l.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){l.fn[a]=function(a){for(var c=[],d=l(a),e=d.length-1,f=0;f<=e;f++)a=f===e?this:this.clone(!0),l(d[f])[b](a),ea.apply(c,a.get());return this.pushStack(c)}});var Pa,Oa={},db=/^margin/,cb=new RegExp("^("+
Ua+")(?!px)[a-z%]+$","i"),Ha=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};(function(){function a(){p.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";p.innerHTML="";e.appendChild(f);var l=c.getComputedStyle(p,null);b="1%"!==l.top;d="4px"===l.width;e.removeChild(f)}var b,d,e=S.documentElement,f=S.createElement("div"),p=S.createElement("div");
p.style&&(p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",L.clearCloneStyle="content-box"===p.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",f.appendChild(p),c.getComputedStyle&&l.extend(L,{pixelPosition:function(){a();return b},boxSizingReliable:function(){null==d&&a();return d},reliableMarginRight:function(){var a;a=p.appendChild(S.createElement("div"));a.style.cssText=p.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";
a.style.marginRight=a.style.width="0";p.style.width="1px";e.appendChild(f);a=!parseFloat(c.getComputedStyle(a,null).marginRight);e.removeChild(f);return a}}))})();l.swap=function(a,b,c,d){var e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];c=c.apply(a,d||[]);for(e in b)a.style[e]=f[e];return c};var Jb=/^(none|table(?!-c[ea]).+)/,ob=new RegExp("^("+Ua+")(.*)$","i"),ub=new RegExp("^([+-])=("+Ua+")","i"),Wa={position:"absolute",visibility:"hidden",display:"block"},Aa={letterSpacing:"0",fontWeight:"400"},
eb=["Webkit","O","Moz","ms"];l.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=f(a,"opacity");return""===c?"1":c}}}},cssNumber:{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(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,p,n=l.camelCase(b),t=a.style;b=l.cssProps[n]||(l.cssProps[n]=z(t,n));p=l.cssHooks[b]||l.cssHooks[n];if(void 0!==
c)f=typeof c,"string"===f&&(e=ub.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(l.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||l.cssNumber[n]||(c+="px"),L.clearCloneStyle||""!==c||0!==b.indexOf("background")||(t[b]="inherit"),p&&"set"in p&&void 0===(c=p.set(a,c,d))||(t[b]=c));else return p&&"get"in p&&void 0!==(e=p.get(a,!1,d))?e:t[b]}},css:function(a,b,c,d){var e,p;p=l.camelCase(b);b=l.cssProps[p]||(l.cssProps[p]=z(a.style,p));(p=l.cssHooks[b]||l.cssHooks[p])&&"get"in p&&(e=p.get(a,!0,c));void 0===
e&&(e=f(a,b,d));"normal"===e&&b in Aa&&(e=Aa[b]);return""===c||c?(a=parseFloat(e),!0===c||l.isNumeric(a)?a||0:e):e}});l.each(["height","width"],function(a,b){l.cssHooks[b]={get:function(a,c,d){if(c)return Jb.test(l.css(a,"display"))&&0===a.offsetWidth?l.swap(a,Wa,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&Ha(a);return J(a,c,d?Z(a,b,d,"border-box"===l.css(a,"boxSizing",!1,e),e):0)}}});l.cssHooks.marginRight=p(L.reliableMarginRight,function(a,b){if(b)return l.swap(a,{display:"inline-block"},
f,[a,"marginRight"])});l.each({margin:"",padding:"",border:"Width"},function(a,b){l.cssHooks[a+b]={expand:function(c){var d=0,e={};for(c="string"===typeof c?c.split(" "):[c];4>d;d++)e[a+Ea[d]+b]=c[d]||c[d-2]||c[0];return e}};db.test(a)||(l.cssHooks[a+b].set=J)});l.fn.extend({css:function(a,b){return ya(this,function(a,b,c){var d,e={},f=0;if(l.isArray(b)){c=Ha(a);for(d=b.length;f<d;f++)e[b[f]]=l.css(a,b[f],!1,c);return e}return void 0!==c?l.style(a,b,c):l.css(a,b)},a,b,1<arguments.length)},show:function(){return x(this,
!0)},hide:function(){return x(this)},toggle:function(a){return"boolean"===typeof a?a?this.show():this.hide():this.each(function(){Qa(this)?l(this).show():l(this).hide()})}});l.Tween=v;v.prototype={constructor:v,init:function(a,b,c,d,e,f){this.elem=a;this.prop=c;this.easing=e||"swing";this.options=b;this.start=this.now=this.cur();this.end=d;this.unit=f||(l.cssNumber[c]?"":"px")},cur:function(){var a=v.propHooks[this.prop];return a&&a.get?a.get(this):v.propHooks._default.get(this)},run:function(a){var b,
c=v.propHooks[this.prop];this.pos=this.options.duration?b=l.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):b=a;this.now=(this.end-this.start)*b+this.start;this.options.step&&this.options.step.call(this.elem,this.now,this);c&&c.set?c.set(this):v.propHooks._default.set(this);return this}};v.prototype.init.prototype=v.prototype;v.propHooks={_default:{get:function(a){return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(a=l.css(a.elem,a.prop,""))&&"auto"!==a?
a:0:a.elem[a.prop]},set:function(a){if(l.fx.step[a.prop])l.fx.step[a.prop](a);else a.elem.style&&(null!=a.elem.style[l.cssProps[a.prop]]||l.cssHooks[a.prop])?l.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};v.propHooks.scrollTop=v.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};l.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};l.fx=v.prototype.init;l.fx.step={};var ja,na,vb=/^(?:toggle|show|hide)$/,
lb=new RegExp("^(?:([+-])=|)("+Ua+")([a-z%]*)$","i"),Kb=/queueHooks$/,Ra=[function(a,b,c){var d,f,p,t,k,B,z=this,g={},J=a.style,q=a.nodeType&&Qa(a),h=O.get(a,"fxshow");c.queue||(t=l._queueHooks(a,"fx"),null==t.unqueued&&(t.unqueued=0,k=t.empty.fire,t.empty.fire=function(){t.unqueued||k()}),t.unqueued++,z.always(function(){z.always(function(){t.unqueued--;l.queue(a,"fx").length||t.empty.fire()})}));1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[J.overflow,J.overflowX,J.overflowY],B=l.css(a,
"display"),f="none"===B?O.get(a,"olddisplay")||e(a.nodeName):B,"inline"===f&&"none"===l.css(a,"float")&&(J.display="inline-block"));c.overflow&&(J.overflow="hidden",z.always(function(){J.overflow=c.overflow[0];J.overflowX=c.overflow[1];J.overflowY=c.overflow[2]}));for(d in b)if(f=b[d],vb.exec(f)){delete b[d];p=p||"toggle"===f;if(f===(q?"hide":"show"))if("show"===f&&h&&void 0!==h[d])q=!0;else continue;g[d]=h&&h[d]||l.style(a,d)}else B=void 0;if(l.isEmptyObject(g))"inline"===("none"===B?e(a.nodeName):
B)&&(J.display=B);else for(d in h?"hidden"in h&&(q=h.hidden):h=O.access(a,"fxshow",{}),p&&(h.hidden=!q),q?l(a).show():z.done(function(){l(a).hide()}),z.done(function(){var b;O.remove(a,"fxshow");for(b in g)l.style(a,b,g[b])}),g)b=n(q?h[d]:0,d,z),d in h||(h[d]=b.start,q&&(b.end=b.start,b.start="width"===d||"height"===d?1:0))}],Fa={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=lb.exec(b),f=e&&e[3]||(l.cssNumber[a]?"":"px"),p=(l.cssNumber[a]||"px"!==f&&+d)&&lb.exec(l.css(c.elem,a)),n=1,
t=20;if(p&&p[3]!==f){f=f||p[3];e=e||[];p=+d||1;do n=n||".5",p/=n,l.style(c.elem,a,p+f);while(n!==(n=c.cur()/d)&&1!==n&&--t)}e&&(p=c.start=+p||+d||0,c.unit=f,c.end=e[1]?p+(e[1]+1)*e[2]:+e[2]);return c}]};l.Animation=l.extend(q,{tweener:function(a,b){l.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d<e;d++)c=a[d],Fa[c]=Fa[c]||[],Fa[c].unshift(b)},prefilter:function(a,b){b?Ra.unshift(a):Ra.push(a)}});l.speed=function(a,b,c){var d=a&&"object"===typeof a?l.extend({},a):{complete:c||
!c&&b||l.isFunction(a)&&a,duration:a,easing:c&&b||b&&!l.isFunction(b)&&b};d.duration=l.fx.off?0:"number"===typeof d.duration?d.duration:d.duration in l.fx.speeds?l.fx.speeds[d.duration]:l.fx.speeds._default;if(null==d.queue||!0===d.queue)d.queue="fx";d.old=d.complete;d.complete=function(){l.isFunction(d.old)&&d.old.call(this);d.queue&&l.dequeue(this,d.queue)};return d};l.fn.extend({fadeTo:function(a,b,c,d){return this.filter(Qa).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,
b,c,d){var e=l.isEmptyObject(a),f=l.speed(b,c,d);b=function(){var b=q(this,l.extend({},a),f);(e||O.get(this,"finish"))&&b.stop(!0)};b.finish=b;return e||!1===f.queue?this.each(b):this.queue(f.queue,b)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop;b(c)};"string"!==typeof a&&(c=b,b=a,a=void 0);b&&!1!==a&&this.queue(a||"fx",[]);return this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=l.timers,p=O.get(this);if(e)p[e]&&p[e].stop&&d(p[e]);else for(e in p)p[e]&&p[e].stop&&Kb.test(e)&&
d(p[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||l.dequeue(this,a)})},finish:function(a){!1!==a&&(a=a||"fx");return this.each(function(){var b,c=O.get(this),d=c[a+"queue"];b=c[a+"queueHooks"];var e=l.timers,f=d?d.length:0;c.finish=!0;l.queue(this,a,[]);b&&b.stop&&b.stop.call(this,!0);for(b=e.length;b--;)e[b].elem===this&&e[b].queue===a&&(e[b].anim.stop(!0),e.splice(b,1));for(b=0;b<f;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}});
l.each(["toggle","show","hide"],function(a,b){var c=l.fn[b];l.fn[b]=function(a,d,e){return null==a||"boolean"===typeof a?c.apply(this,arguments):this.animate(P(b,!0),a,d,e)}});l.each({slideDown:P("show"),slideUp:P("hide"),slideToggle:P("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){l.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}});l.timers=[];l.fx.tick=function(){var a,b=0,c=l.timers;for(ja=l.now();b<c.length;b++)a=c[b],a()||c[b]!==a||
c.splice(b--,1);c.length||l.fx.stop();ja=void 0};l.fx.timer=function(a){l.timers.push(a);a()?l.fx.start():l.timers.pop()};l.fx.interval=13;l.fx.start=function(){na||(na=setInterval(l.fx.tick,l.fx.interval))};l.fx.stop=function(){clearInterval(na);na=null};l.fx.speeds={slow:600,fast:200,_default:400};l.fn.delay=function(a,b){a=l.fx?l.fx.speeds[a]||a:a;return this.queue(b||"fx",function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})};(function(){var a=S.createElement("input"),b=S.createElement("select"),
c=b.appendChild(S.createElement("option"));a.type="checkbox";L.checkOn=""!==a.value;L.optSelected=c.selected;b.disabled=!0;L.optDisabled=!c.disabled;a=S.createElement("input");a.value="t";a.type="radio";L.radioValue="t"===a.value})();var mb,Ja=l.expr.attrHandle;l.fn.extend({attr:function(a,b){return ya(this,l.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){l.removeAttr(this,a)})}});l.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f){if("undefined"===
typeof a.getAttribute)return l.prop(a,b,c);1===f&&l.isXMLDoc(a)||(b=b.toLowerCase(),d=l.attrHooks[b]||(l.expr.match.bool.test(b)?mb:void 0));if(void 0!==c)if(null===c)l.removeAttr(a,b);else{if(d&&"set"in d&&void 0!==(e=d.set(a,c,b)))return e;a.setAttribute(b,c+"");return c}else{if(d&&"get"in d&&null!==(e=d.get(a,b)))return e;e=l.find.attr(a,b);return null==e?void 0:e}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(pa);if(f&&1===a.nodeType)for(;c=f[e++];)d=l.propFix[c]||c,l.expr.match.bool.test(c)&&
(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!L.radioValue&&"radio"===b&&l.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b);c&&(a.value=c);return b}}}}});mb={set:function(a,b,c){!1===b?l.removeAttr(a,c):a.setAttribute(c,c);return c}};l.each(l.expr.match.bool.source.match(/\w+/g),function(a,b){var c=Ja[b]||l.find.attr;Ja[b]=function(a,b,d){var e,f;d||(f=Ja[b],Ja[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,Ja[b]=f);return e}});var Xa=/^(?:input|select|textarea|button)$/i;
l.fn.extend({prop:function(a,b){return ya(this,l.prop,a,b,1<arguments.length)},removeProp:function(a){return this.each(function(){delete this[l.propFix[a]||a]})}});l.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f;f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f){if(f=1!==f||!l.isXMLDoc(a))b=l.propFix[b]||b,e=l.propHooks[b];return void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]}},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||
Xa.test(a.nodeName)||a.href?a.tabIndex:-1}}}});L.optSelected||(l.propHooks.selected={get:function(a){(a=a.parentNode)&&a.parentNode&&a.parentNode.selectedIndex;return null}});l.each("tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" "),function(){l.propFix[this.toLowerCase()]=this});var wb=/[\t\r\n\f]/g;l.fn.extend({addClass:function(a){var b,c,d,e,f;b="string"===typeof a&&a;var p=0,n=this.length;if(l.isFunction(a))return this.each(function(b){l(this).addClass(a.call(this,
b,this.className))});if(b)for(b=(a||"").match(pa)||[];p<n;p++)if(c=this[p],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(wb," "):" ")){for(f=0;e=b[f++];)0>d.indexOf(" "+e+" ")&&(d+=e+" ");d=l.trim(d);c.className!==d&&(c.className=d)}return this},removeClass:function(a){var b,c,d,e,f;b=0===arguments.length||"string"===typeof a&&a;var p=0,n=this.length;if(l.isFunction(a))return this.each(function(b){l(this).removeClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(pa)||[];p<
n;p++)if(c=this[p],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(wb," "):"")){for(f=0;e=b[f++];)for(;0<=d.indexOf(" "+e+" ");)d=d.replace(" "+e+" "," ");d=a?l.trim(d):"";c.className!==d&&(c.className=d)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"===typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):l.isFunction(a)?this.each(function(c){l(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=l(this),
f=a.match(pa)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else if("undefined"===c||"boolean"===c)this.className&&O.set(this,"__className__",this.className),this.className=this.className||!1===a?"":O.get(this,"__className__")||""})},hasClass:function(a){a=" "+a+" ";for(var b=0,c=this.length;b<c;b++)if(1===this[b].nodeType&&0<=(" "+this[b].className+" ").replace(wb," ").indexOf(a))return!0;return!1}});var xb=/\r/g;l.fn.extend({val:function(a){var b,c,d,e=this[0];if(arguments.length)return d=
l.isFunction(a),this.each(function(c){1===this.nodeType&&(c=d?a.call(this,c,l(this).val()):a,null==c?c="":"number"===typeof c?c+="":l.isArray(c)&&(c=l.map(c,function(a){return null==a?"":a+""})),b=l.valHooks[this.type]||l.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,c,"value")||(this.value=c))});if(e){if((b=l.valHooks[e.type]||l.valHooks[e.nodeName.toLowerCase()])&&"get"in b&&void 0!==(c=b.get(e,"value")))return c;c=e.value;return"string"===typeof c?c.replace(xb,""):null==
c?"":c}}});l.extend({valHooks:{option:{get:function(a){var b=l.find.attr(a,"value");return null!=b?b:l.trim(l.text(a))}},select:{get:function(a){for(var b,c=a.options,d=a.selectedIndex,e=(a="select-one"===a.type||0>d)?null:[],f=a?d+1:c.length,p=0>d?f:a?d:0;p<f;p++)if(b=c[p],!(!b.selected&&p!==d||(L.optDisabled?b.disabled:null!==b.getAttribute("disabled"))||b.parentNode.disabled&&l.nodeName(b.parentNode,"optgroup"))){b=l(b).val();if(a)return b;e.push(b)}return e},set:function(a,b){for(var c,d,e=a.options,
f=l.makeArray(b),p=e.length;p--;)if(d=e[p],d.selected=0<=l.inArray(d.value,f))c=!0;c||(a.selectedIndex=-1);return f}}}});l.each(["radio","checkbox"],function(){l.valHooks[this]={set:function(a,b){if(l.isArray(b))return a.checked=0<=l.inArray(l(a).val(),b)}};L.checkOn||(l.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});l.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
function(a,b){l.fn[b]=function(a,c){return 0<arguments.length?this.on(b,null,a,c):this.trigger(b)}});l.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Ka=l.now(),nb=/\?/;l.parseJSON=function(a){return JSON.parse(a+"")};l.parseXML=
function(a){var b,c;if(!a||"string"!==typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}b&&!b.getElementsByTagName("parsererror").length||l.error("Invalid XML: "+a);return b};var sa,Ba,La=/#.*$/,oa=/([?&])_=[^&]*/,Ma=/^(.*?):[ \t]*([^\r\n]*)$/mg,yb=/^(?:GET|HEAD)$/,Lb=/^\/\//,zb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ya={},la={},qa="*/".concat("*");try{Ba=location.href}catch(Mb){Ba=S.createElement("a"),Ba.href="",Ba=Ba.href}sa=zb.exec(Ba.toLowerCase())||
[];l.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ba,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(sa[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qa,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,
"text html":!0,"text json":l.parseJSON,"text xml":l.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?I(I(a,l.ajaxSettings),b):I(l.ajaxSettings,a)},ajaxPrefilter:X(Ya),ajaxTransport:X(la),ajax:function(a,b){function c(a,b,p,t){var B,H,I,u;u=b;if(2!==Z){Z=2;n&&clearTimeout(n);d=void 0;f=t||"";r.readyState=0<a?4:0;t=200<=a&&300>a||304===a;if(p){I=z;for(var m=r,Y,V,A,s,P=I.contents,T=I.dataTypes;"*"===T[0];)T.shift(),void 0===Y&&(Y=I.mimeType||m.getResponseHeader("Content-Type"));
if(Y)for(V in P)if(P[V]&&P[V].test(Y)){T.unshift(V);break}if(T[0]in p)A=T[0];else{for(V in p){if(!T[0]||I.converters[V+" "+T[0]]){A=V;break}s||(s=V)}A=A||s}A?(A!==T[0]&&T.unshift(A),I=p[A]):I=void 0}a:{p=z;Y=I;V=r;A=t;var x,v,K,m={},P=p.dataTypes.slice();if(P[1])for(v in p.converters)m[v.toLowerCase()]=p.converters[v];for(s=P.shift();s;)if(p.responseFields[s]&&(V[p.responseFields[s]]=Y),!K&&A&&p.dataFilter&&(Y=p.dataFilter(Y,p.dataType)),K=s,s=P.shift())if("*"===s)s=K;else if("*"!==K&&K!==s){v=m[K+
" "+s]||m["* "+s];if(!v)for(x in m)if(I=x.split(" "),I[1]===s&&(v=m[K+" "+I[0]]||m["* "+I[0]])){!0===v?v=m[x]:!0!==m[x]&&(s=I[0],P.unshift(I[1]));break}if(!0!==v)if(v&&p["throws"])Y=v(Y);else try{Y=v(Y)}catch(G){I={state:"parsererror",error:v?G:"No conversion from "+K+" to "+s};break a}}I={state:"success",data:Y}}if(t)z.ifModified&&((u=r.getResponseHeader("Last-Modified"))&&(l.lastModified[e]=u),(u=r.getResponseHeader("etag"))&&(l.etag[e]=u)),204===a||"HEAD"===z.type?u="nocontent":304===a?u="notmodified":
(u=I.state,B=I.data,H=I.error,t=!H);else if(H=u,a||!u)u="error",0>a&&(a=0);r.status=a;r.statusText=(b||u)+"";t?q.resolveWith(g,[B,u,r]):q.rejectWith(g,[r,u,H]);r.statusCode(E);E=void 0;k&&J.trigger(t?"ajaxSuccess":"ajaxError",[r,z,t?B:H]);h.fireWith(g,[r,u]);k&&(J.trigger("ajaxComplete",[r,z]),--l.active||l.event.trigger("ajaxStop"))}}"object"===typeof a&&(b=a,a=void 0);b=b||{};var d,e,f,p,n,t,k,B,z=l.ajaxSetup({},b),g=z.context||z,J=z.context&&(g.nodeType||g.jquery)?l(g):l.event,q=l.Deferred(),h=
l.Callbacks("once memory"),E=z.statusCode||{},I={},u={},Z=0,m="canceled",r={readyState:0,getResponseHeader:function(a){var b;if(2===Z){if(!p)for(p={};b=Ma.exec(f);)p[b[1].toLowerCase()]=b[2];b=p[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===Z?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();Z||(a=u[c]=u[c]||a,I[a]=b);return this},overrideMimeType:function(a){Z||(z.mimeType=a);return this},statusCode:function(a){var b;if(a)if(2>Z)for(b in a)E[b]=[E[b],
a[b]];else r.always(a[r.status]);return this},abort:function(a){a=a||m;d&&d.abort(a);c(0,a);return this}};q.promise(r).complete=h.add;r.success=r.done;r.error=r.fail;z.url=((a||z.url||Ba)+"").replace(La,"").replace(Lb,sa[1]+"//");z.type=b.method||b.type||z.method||z.type;z.dataTypes=l.trim(z.dataType||"*").toLowerCase().match(pa)||[""];null==z.crossDomain&&(t=zb.exec(z.url.toLowerCase()),z.crossDomain=!(!t||t[1]===sa[1]&&t[2]===sa[2]&&(t[3]||("http:"===t[1]?"80":"443"))===(sa[3]||("http:"===sa[1]?
"80":"443"))));z.data&&z.processData&&"string"!==typeof z.data&&(z.data=l.param(z.data,z.traditional));H(Ya,z,b,r);if(2===Z)return r;(k=z.global)&&0===l.active++&&l.event.trigger("ajaxStart");z.type=z.type.toUpperCase();z.hasContent=!yb.test(z.type);e=z.url;z.hasContent||(z.data&&(e=z.url+=(nb.test(e)?"&":"?")+z.data,delete z.data),!1===z.cache&&(z.url=oa.test(e)?e.replace(oa,"$1_="+Ka++):e+(nb.test(e)?"&":"?")+"_="+Ka++));z.ifModified&&(l.lastModified[e]&&r.setRequestHeader("If-Modified-Since",l.lastModified[e]),
l.etag[e]&&r.setRequestHeader("If-None-Match",l.etag[e]));(z.data&&z.hasContent&&!1!==z.contentType||b.contentType)&&r.setRequestHeader("Content-Type",z.contentType);r.setRequestHeader("Accept",z.dataTypes[0]&&z.accepts[z.dataTypes[0]]?z.accepts[z.dataTypes[0]]+("*"!==z.dataTypes[0]?", "+qa+"; q=0.01":""):z.accepts["*"]);for(B in z.headers)r.setRequestHeader(B,z.headers[B]);if(z.beforeSend&&(!1===z.beforeSend.call(g,r,z)||2===Z))return r.abort();m="abort";for(B in{success:1,error:1,complete:1})r[B](z[B]);
if(d=H(la,z,b,r)){r.readyState=1;k&&J.trigger("ajaxSend",[r,z]);z.async&&0<z.timeout&&(n=setTimeout(function(){r.abort("timeout")},z.timeout));try{Z=1,d.send(I,c)}catch(Y){if(2>Z)c(-1,Y);else throw Y;}}else c(-1,"No Transport");return r},getJSON:function(a,b,c){return l.get(a,b,c,"json")},getScript:function(a,b){return l.get(a,void 0,b,"script")}});l.each(["get","post"],function(a,b){l[b]=function(a,c,d,e){l.isFunction(c)&&(e=e||d,d=c,c=void 0);return l.ajax({url:a,type:b,dataType:e,data:c,success:d})}});
l.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){l.fn[b]=function(a){return this.on(b,a)}});l._evalUrl=function(a){return l.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};l.fn.extend({wrapAll:function(a){var b;if(l.isFunction(a))return this.each(function(b){l(this).wrapAll(a.call(this,b))});this[0]&&(b=l(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=
a.firstElementChild;return a}).append(this));return this},wrapInner:function(a){return l.isFunction(a)?this.each(function(b){l(this).wrapInner(a.call(this,b))}):this.each(function(){var b=l(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=l.isFunction(a);return this.each(function(c){l(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){l.nodeName(this,"body")||l(this).replaceWith(this.childNodes)}).end()}});l.expr.filters.hidden=
function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight};l.expr.filters.visible=function(a){return!l.expr.filters.hidden(a)};var Ab=/%20/g,pb=/\[\]$/,Bb=/\r?\n/g,Sb=/^(?:submit|button|image|reset|file)$/i,Ca=/^(?:input|select|textarea|keygen)/i;l.param=function(a,b){var c,d=[],e=function(a,b){b=l.isFunction(b)?b():null==b?"":b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};void 0===b&&(b=l.ajaxSettings&&l.ajaxSettings.traditional);if(l.isArray(a)||a.jquery&&!l.isPlainObject(a))l.each(a,
function(){e(this.name,this.value)});else for(c in a)E(c,a[c],b,e);return d.join("&").replace(Ab,"+")};l.fn.extend({serialize:function(){return l.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=l.prop(this,"elements");return a?l.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!l(this).is(":disabled")&&Ca.test(this.nodeName)&&!Sb.test(a)&&(this.checked||!ib.test(a))}).map(function(a,b){var c=l(this).val();return null==c?null:l.isArray(c)?
l.map(c,function(a){return{name:b.name,value:a.replace(Bb,"\r\n")}}):{name:b.name,value:c.replace(Bb,"\r\n")}}).get()}});l.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Tb=0,Na={},Za={0:200,1223:204},$a=l.ajaxSettings.xhr();if(c.ActiveXObject)l(c).on("unload",function(){for(var a in Na)Na[a]()});L.cors=!!$a&&"withCredentials"in $a;L.ajax=$a=!!$a;l.ajaxTransport(function(a){var b;if(L.cors||$a&&!a.crossDomain)return{send:function(c,d){var e,f=a.xhr(),p=++Tb;f.open(a.type,
a.url,a.async,a.username,a.password);if(a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType);a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Na[p],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Za[f.status]||f.status,f.statusText,"string"===typeof f.responseText?{text:f.responseText}:void 0,
f.getAllResponseHeaders()))}};f.onload=b();f.onerror=b("error");b=Na[p]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(l){if(b)throw l;}},abort:function(){b&&b()}}});l.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){l.globalEval(a);return a}}});l.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type="GET")});
l.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=l("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove();c=null;a&&e("error"===a.type?404:200,a.type)});S.head.appendChild(b[0])},abort:function(){c&&c()}}}});var ab=[],Da=/(=)\?(?=&|$)|\?\?/;l.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ab.pop()||l.expando+"_"+Ka++;this[a]=!0;return a}});l.ajaxPrefilter("json jsonp",function(a,b,d){var e,f,p,n=
!1!==a.jsonp&&(Da.test(a.url)?"url":"string"===typeof a.data&&!(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&Da.test(a.data)&&"data");if(n||"jsonp"===a.dataTypes[0])return e=a.jsonpCallback=l.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,n?a[n]=a[n].replace(Da,"$1"+e):!1!==a.jsonp&&(a.url+=(nb.test(a.url)?"&":"?")+a.jsonp+"="+e),a.converters["script json"]=function(){p||l.error(e+" was not called");return p[0]},a.dataTypes[0]="json",f=c[e],c[e]=function(){p=arguments},
d.always(function(){c[e]=f;a[e]&&(a.jsonpCallback=b.jsonpCallback,ab.push(e));p&&l.isFunction(f)&&f(p[0]);p=f=void 0}),"script"});l.parseHTML=function(a,b,c){if(!a||"string"!==typeof a)return null;"boolean"===typeof b&&(c=b,b=!1);b=b||S;var d=ca.exec(a);c=!c&&[];if(d)return[b.createElement(d[1])];d=l.buildFragment([a],b,c);c&&c.length&&l(c).remove();return l.merge([],d.childNodes)};var Ga=l.fn.load;l.fn.load=function(a,b,c){if("string"!==typeof a&&Ga)return Ga.apply(this,arguments);var d,e,f,p=this,
n=a.indexOf(" ");0<=n&&(d=l.trim(a.slice(n)),a=a.slice(0,n));l.isFunction(b)?(c=b,b=void 0):b&&"object"===typeof b&&(e="POST");0<p.length&&l.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments;p.html(d?l("<div>").append(l.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){p.each(c,f||[a.responseText,b,a])});return this};l.expr.filters.animated=function(a){return l.grep(l.timers,function(b){return a===b.elem}).length};var Nb=c.document.documentElement;l.offset={setOffset:function(a,
b,c){var d,e,f,p=l.css(a,"position"),n=l(a),t={};"static"===p&&(a.style.position="relative");f=n.offset();e=l.css(a,"top");d=l.css(a,"left");("absolute"===p||"fixed"===p)&&-1<(e+d).indexOf("auto")?(d=n.position(),e=d.top,d=d.left):(e=parseFloat(e)||0,d=parseFloat(d)||0);l.isFunction(b)&&(b=b.call(a,c,f));null!=b.top&&(t.top=b.top-f.top+e);null!=b.left&&(t.left=b.left-f.left+d);"using"in b?b.using.call(a,t):n.css(t)}};l.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){l.offset.setOffset(this,
a,b)});var b,c;c=this[0];var d={top:0,left:0},e=c&&c.ownerDocument;if(e){b=e.documentElement;if(!l.contains(b,c))return d;"undefined"!==typeof c.getBoundingClientRect&&(d=c.getBoundingClientRect());c=V(e);return{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};"fixed"===l.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),l.nodeName(a[0],"html")||(d=a.offset()),d.top+=
l.css(a[0],"borderTopWidth",!0),d.left+=l.css(a[0],"borderLeftWidth",!0));return{top:b.top-d.top-l.css(c,"marginTop",!0),left:b.left-d.left-l.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Nb;a&&!l.nodeName(a,"html")&&"static"===l.css(a,"position");)a=a.offsetParent;return a||Nb})}});l.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var d="pageYOffset"===b;l.fn[a]=function(e){return ya(this,function(a,e,f){var p=V(a);
if(void 0===f)return p?p[b]:a[e];p?p.scrollTo(d?c.pageXOffset:f,d?f:c.pageYOffset):a[e]=f},a,e,arguments.length,null)}});l.each(["top","left"],function(a,b){l.cssHooks[b]=p(L.pixelPosition,function(a,c){if(c)return c=f(a,b),cb.test(c)?l(a).position()[b]+"px":c})});l.each({Height:"height",Width:"width"},function(a,b){l.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){l.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!==typeof d),p=c||(!0===d||!0===e?"margin":"border");return ya(this,
function(b,c,d){return l.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(c=b.documentElement,Math.max(b.body["scroll"+a],c["scroll"+a],b.body["offset"+a],c["offset"+a],c["client"+a])):void 0===d?l.css(b,c,p):l.style(b,c,d,p)},b,f?d:void 0,f,null)}})});l.fn.size=function(){return this.length};l.fn.andSelf=l.fn.addBack;"function"===typeof define&&define.amd&&define("jquery",[],function(){return l});var Ub=c.jQuery,Cb=c.$;l.noConflict=function(a){c.$===l&&(c.$=Cb);a&&c.jQuery===l&&
(c.jQuery=Ub);return l};"undefined"===typeof g&&(c.jQuery=c.$=l);return l});
yii=function(c){function g(){c(document).ajaxComplete(function(c,k,g){if(c=k.getResponseHeader("X-Redirect"))window.location=c})}function h(){c.ajaxPrefilter(function(c,k,g){!c.crossDomain&&u.getCsrfParam()&&g.setRequestHeader("X-CSRF-Token",u.getCsrfToken())});u.refreshCsrfToken()}function m(){var k=function(k){var g=c(this),h=g.data("method"),m=g.data("confirm");if(void 0===h&&void 0===m)return!0;void 0!==m?u.confirm(m,function(){u.handleAction(g)}):u.handleAction(g);k.stopImmediatePropagation();
return!1};c(document).on("click.yii",u.clickableSelector,k).on("change.yii",u.changeableSelector,k)}function k(){var k=location.protocol+"//"+location.host,g=c("script[src]").map(function(){return"/"===this.src.charAt(0)?k+this.src:this.src}).toArray();c.ajaxPrefilter("script",function(h,m,F){"jsonp"!=h.dataType&&(h="/"===h.url.charAt(0)?k+h.url:h.url,-1===c.inArray(h,g)?g.push(h):-1===c.inArray(h,c.map(u.reloadableScripts,function(c){return"/"===c.charAt(0)?k+c:c}))&&F.abort())})}var u={reloadableScripts:[],
clickableSelector:'a, button, input[type="submit"], input[type="button"], input[type="reset"], input[type="image"]',changeableSelector:"select, input, textarea",getCsrfParam:function(){return c("meta[name=csrf-param]").prop("content")},getCsrfToken:function(){return c("meta[name=csrf-token]").prop("content")},setCsrfToken:function(k,g){c("meta[name=csrf-param]").prop("content",k);c("meta[name=csrf-token]").prop("content",g)},refreshCsrfToken:function(){var k=u.getCsrfToken();k&&c('form input[name="'+
u.getCsrfParam()+'"]').val(k)},confirm:function(c,k,g){confirm(c)?!k||k():!g||g()},handleAction:function(k){var g=k.data("method"),h=k.closest("form"),m=k.attr("href");if(void 0===g)m&&"#"!=m&&(window.location=m);else{var F=!h.length||m&&"#"!=m;F&&(m&&m.match(/(^\/|:\/\/)/)||(m=window.location.href),h=c('<form method="'+g+'" action="'+m+'"></form>'),(m=k.prop("target"))&&h.attr("target",m),g.match(/(get|post)/i)||(h.append('<input name="_method" value="'+g+'" type="hidden">'),g="POST"),g.match(/(get|head|options)/i)||
(m=u.getCsrfParam())&&h.append('<input name="'+m+'" value="'+u.getCsrfToken()+'" type="hidden">'),h.hide().appendTo("body"));if(m=h.data("yiiActiveForm"))m.submitObject=k;k=h.prop("method");h.prop("method",g);h.trigger("submit");h.prop("method",k);F&&h.remove()}},getQueryParams:function(c){var k=c.indexOf("?");if(0>k)return{};c=c.substring(k+1).split("&");for(var k=0,g={};k<c.length;k++)c[k]=c[k].split("="),g[decodeURIComponent(c[k][0])]=decodeURIComponent(c[k][1]);return g},initModule:function(k){if(void 0===
k.isActive||k.isActive)c.isFunction(k.init)&&k.init(),c.each(k,function(){c.isPlainObject(this)&&u.initModule(this)})},init:function(){h();g();k();m()}};return u}(jQuery);jQuery(document).ready(function(){yii.initModule(yii)});if("undefined"===typeof jQuery)throw Error("Bootstrap's JavaScript requires jQuery");
+function(c){function g(){var c=document.createElement("bootstrap"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},k;for(k in g)if(void 0!==c.style[k])return{end:g[k]};return!1}c.fn.emulateTransitionEnd=function(g){var m=!1,k=this;c(this).one("bsTransitionEnd",function(){m=!0});setTimeout(function(){m||c(k).trigger(c.support.transition.end)},g);return this};c(function(){c.support.transition=g();c.support.transition&&
(c.event.special.bsTransitionEnd={bindType:c.support.transition.end,delegateType:c.support.transition.end,handle:function(g){if(c(g.target).is(this))return g.handleObj.handler.apply(this,arguments)}})})}(jQuery);
+function(c){var g=function(g){c(g).on("click",'[data-dismiss="alert"]',this.close)};g.VERSION="3.2.0";g.prototype.close=function(g){function k(){s.detach().trigger("closed.bs.alert").remove()}var h=c(this),r=h.attr("data-target");r||(r=(r=h.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,""));var s=c(r);g&&g.preventDefault();s.length||(s=h.hasClass("alert")?h:h.parent());s.trigger(g=c.Event("close.bs.alert"));g.isDefaultPrevented()||(s.removeClass("in"),c.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",
k).emulateTransitionEnd(150):k())};var h=c.fn.alert;c.fn.alert=function(h){return this.each(function(){var k=c(this),u=k.data("bs.alert");u||k.data("bs.alert",u=new g(this));"string"==typeof h&&u[h].call(k)})};c.fn.alert.Constructor=g;c.fn.alert.noConflict=function(){c.fn.alert=h;return this};c(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',g.prototype.close)}(jQuery);
+function(c){function g(k){return this.each(function(){var g=c(this),m=g.data("bs.button"),s="object"==typeof k&&k;m||g.data("bs.button",m=new h(this,s));"toggle"==k?m.toggle():k&&m.setState(k)})}var h=function(k,g){this.$element=c(k);this.options=c.extend({},h.DEFAULTS,g);this.isLoading=!1};h.VERSION="3.2.0";h.DEFAULTS={loadingText:"loading..."};h.prototype.setState=function(k){var g=this.$element,h=g.is("input")?"val":"html",m=g.data();k+="Text";null==m.resetText&&g.data("resetText",g[h]());g[h](null==
m[k]?this.options[k]:m[k]);setTimeout(c.proxy(function(){"loadingText"==k?(this.isLoading=!0,g.addClass("disabled").attr("disabled","disabled")):this.isLoading&&(this.isLoading=!1,g.removeClass("disabled").removeAttr("disabled"))},this),0)};h.prototype.toggle=function(){var c=!0,g=this.$element.closest('[data-toggle="buttons"]');if(g.length){var h=this.$element.find("input");"radio"==h.prop("type")&&(h.prop("checked")&&this.$element.hasClass("active")?c=!1:g.find(".active").removeClass("active"));
c&&h.prop("checked",!this.$element.hasClass("active")).trigger("change")}c&&this.$element.toggleClass("active")};var m=c.fn.button;c.fn.button=g;c.fn.button.Constructor=h;c.fn.button.noConflict=function(){c.fn.button=m;return this};c(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(k){var h=c(k.target);h.hasClass("btn")||(h=h.closest(".btn"));g.call(h,"toggle");k.preventDefault()})}(jQuery);
+function(c){function g(k){return this.each(function(){var g=c(this),m=g.data("bs.carousel"),s=c.extend({},h.DEFAULTS,g.data(),"object"==typeof k&&k),y="string"==typeof k?k:s.slide;m||g.data("bs.carousel",m=new h(this,s));if("number"==typeof k)m.to(k);else if(y)m[y]();else s.interval&&m.pause().cycle()})}var h=function(k,g){this.$element=c(k).on("keydown.bs.carousel",c.proxy(this.keydown,this));this.$indicators=this.$element.find(".carousel-indicators");this.options=g;this.paused=this.sliding=this.interval=
this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",c.proxy(this.pause,this)).on("mouseleave.bs.carousel",c.proxy(this.cycle,this))};h.VERSION="3.2.0";h.DEFAULTS={interval:5E3,pause:"hover",wrap:!0};h.prototype.keydown=function(c){switch(c.which){case 37:this.prev();break;case 39:this.next();break;default:return}c.preventDefault()};h.prototype.cycle=function(k){k||(this.paused=!1);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&
(this.interval=setInterval(c.proxy(this.next,this),this.options.interval));return this};h.prototype.getItemIndex=function(c){this.$items=c.parent().children(".item");return this.$items.index(c||this.$active)};h.prototype.to=function(k){var g=this,h=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(k>this.$items.length-1||0>k))return this.sliding?this.$element.one("slid.bs.carousel",function(){g.to(k)}):h==k?this.pause().cycle():this.slide(k>h?"next":"prev",c(this.$items[k]))};
h.prototype.pause=function(k){k||(this.paused=!0);this.$element.find(".next, .prev").length&&c.support.transition&&(this.$element.trigger(c.support.transition.end),this.cycle(!0));this.interval=clearInterval(this.interval);return this};h.prototype.next=function(){if(!this.sliding)return this.slide("next")};h.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};h.prototype.slide=function(k,g){var h=this.$element.find(".item.active"),m=g||h[k](),y=this.interval,C="next"==k?"left":"right",
F="next"==k?"first":"last",R=this;if(!m.length){if(!this.options.wrap)return;m=this.$element.find(".item")[F]()}if(m.hasClass("active"))return this.sliding=!1;var F=m[0],N=c.Event("slide.bs.carousel",{relatedTarget:F,direction:C});this.$element.trigger(N);if(!N.isDefaultPrevented()){this.sliding=!0;y&&this.pause();this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),(N=c(this.$indicators.children()[this.getItemIndex(m)]))&&N.addClass("active"));var M=c.Event("slid.bs.carousel",
{relatedTarget:F,direction:C});c.support.transition&&this.$element.hasClass("slide")?(m.addClass(k),m[0].offsetWidth,h.addClass(C),m.addClass(C),h.one("bsTransitionEnd",function(){m.removeClass([k,C].join(" ")).addClass("active");h.removeClass(["active",C].join(" "));R.sliding=!1;setTimeout(function(){R.$element.trigger(M)},0)}).emulateTransitionEnd(1E3*h.css("transition-duration").slice(0,-1))):(h.removeClass("active"),m.addClass("active"),this.sliding=!1,this.$element.trigger(M));y&&this.cycle();
return this}};var m=c.fn.carousel;c.fn.carousel=g;c.fn.carousel.Constructor=h;c.fn.carousel.noConflict=function(){c.fn.carousel=m;return this};c(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(k){var h,m=c(this),s=c(m.attr("data-target")||(h=m.attr("href"))&&h.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){h=c.extend({},s.data(),m.data());if(m=m.attr("data-slide-to"))h.interval=!1;g.call(s,h);m&&s.data("bs.carousel").to(m);k.preventDefault()}});c(window).on("load",
function(){c('[data-ride="carousel"]').each(function(){var k=c(this);g.call(k,k.data())})})}(jQuery);
+function(c){function g(k){return this.each(function(){var g=c(this),m=g.data("bs.collapse"),s=c.extend({},h.DEFAULTS,g.data(),"object"==typeof k&&k);!m&&s.toggle&&"show"==k&&(k=!k);m||g.data("bs.collapse",m=new h(this,s));if("string"==typeof k)m[k]()})}var h=function(k,g){this.$element=c(k);this.options=c.extend({},h.DEFAULTS,g);this.transitioning=null;this.options.parent&&(this.$parent=c(this.options.parent));this.options.toggle&&this.toggle()};h.VERSION="3.2.0";h.DEFAULTS={toggle:!0};h.prototype.dimension=
function(){return this.$element.hasClass("width")?"width":"height"};h.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var k=c.Event("show.bs.collapse");this.$element.trigger(k);if(!k.isDefaultPrevented()){if((k=this.$parent&&this.$parent.find("> .panel > .in"))&&k.length){var h=k.data("bs.collapse");if(h&&h.transitioning)return;g.call(k,"hide");h||k.data("bs.collapse",null)}var m=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[m](0);this.transitioning=
1;k=function(){this.$element.removeClass("collapsing").addClass("collapse in")[m]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!c.support.transition)return k.call(this);h=c.camelCase(["scroll",m].join("-"));this.$element.one("bsTransitionEnd",c.proxy(k,this)).emulateTransitionEnd(350)[m](this.$element[0][h])}}};h.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var k=c.Event("hide.bs.collapse");this.$element.trigger(k);if(!k.isDefaultPrevented()){k=
this.dimension();this.$element[k](this.$element[k]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse").removeClass("in");this.transitioning=1;var g=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!c.support.transition)return g.call(this);this.$element[k](0).one("bsTransitionEnd",c.proxy(g,this)).emulateTransitionEnd(350)}}};h.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":
"show"]()};var m=c.fn.collapse;c.fn.collapse=g;c.fn.collapse.Constructor=h;c.fn.collapse.noConflict=function(){c.fn.collapse=m;return this};c(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(k){var h,m=c(this);k=m.attr("data-target")||k.preventDefault()||(h=m.attr("href"))&&h.replace(/.*(?=#[^\s]+$)/,"");h=c(k);var s=(k=h.data("bs.collapse"))?"toggle":m.data(),y=m.attr("data-parent"),C=y&&c(y);k&&k.transitioning||(C&&C.find('[data-toggle="collapse"][data-parent="'+y+'"]').not(m).addClass("collapsed"),
m[h.hasClass("in")?"addClass":"removeClass"]("collapsed"));g.call(h,s)})}(jQuery);
+function(c){function g(k){k&&3===k.which||(c(".dropdown-backdrop").remove(),c('[data-toggle="dropdown"]').each(function(){var g=h(c(this)),m={relatedTarget:this};g.hasClass("open")&&(g.trigger(k=c.Event("hide.bs.dropdown",m)),k.isDefaultPrevented()||g.removeClass("open").trigger("hidden.bs.dropdown",m))}))}function h(k){var g=k.attr("data-target");g||(g=(g=k.attr("href"))&&/#[A-Za-z]/.test(g)&&g.replace(/.*(?=#[^\s]*$)/,""));return(g=g&&c(g))&&g.length?g:k.parent()}var m=function(k){c(k).on("click.bs.dropdown",
this.toggle)};m.VERSION="3.2.0";m.prototype.toggle=function(k){var m=c(this);if(!m.is(".disabled, :disabled")){var s=h(m);k=s.hasClass("open");g();if(!k){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length)c('<div class="dropdown-backdrop"/>').insertAfter(c(this)).on("click",g);var y={relatedTarget:this};s.trigger(k=c.Event("show.bs.dropdown",y));if(k.isDefaultPrevented())return;m.trigger("focus");s.toggleClass("open").trigger("shown.bs.dropdown",y)}return!1}};m.prototype.keydown=
function(k){if(/(38|40|27)/.test(k.keyCode)){var g=c(this);k.preventDefault();k.stopPropagation();if(!g.is(".disabled, :disabled")){var m=h(g),y=m.hasClass("open");if(!y||y&&27==k.keyCode)return 27==k.which&&m.find('[data-toggle="dropdown"]').trigger("focus"),g.trigger("click");g=m.find('[role="menu"] li:not(.divider):visible a, [role="listbox"] li:not(.divider):visible a');g.length&&(m=g.index(g.filter(":focus")),38==k.keyCode&&0<m&&m--,40==k.keyCode&&m<g.length-1&&m++,~m||(m=0),g.eq(m).trigger("focus"))}}};
var k=c.fn.dropdown;c.fn.dropdown=function(k){return this.each(function(){var g=c(this),h=g.data("bs.dropdown");h||g.data("bs.dropdown",h=new m(this));"string"==typeof k&&h[k].call(g)})};c.fn.dropdown.Constructor=m;c.fn.dropdown.noConflict=function(){c.fn.dropdown=k;return this};c(document).on("click.bs.dropdown.data-api",g).on("click.bs.dropdown.data-api",".dropdown form",function(c){c.stopPropagation()}).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',m.prototype.toggle).on("keydown.bs.dropdown.data-api",
'[data-toggle="dropdown"], [role="menu"], [role="listbox"]',m.prototype.keydown)}(jQuery);
+function(c){function g(k,g){return this.each(function(){var m=c(this),s=m.data("bs.modal"),y=c.extend({},h.DEFAULTS,m.data(),"object"==typeof k&&k);s||m.data("bs.modal",s=new h(this,y));if("string"==typeof k)s[k](g);else y.show&&s.show(g)})}var h=function(k,g){this.options=g;this.$body=c(document.body);this.$element=c(k);this.$backdrop=this.isShown=null;this.scrollbarWidth=0;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,c.proxy(function(){this.$element.trigger("loaded.bs.modal")},
this))};h.VERSION="3.2.0";h.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};h.prototype.toggle=function(c){return this.isShown?this.hide():this.show(c)};h.prototype.show=function(k){var g=this,h=c.Event("show.bs.modal",{relatedTarget:k});this.$element.trigger(h);this.isShown||h.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',c.proxy(this.hide,this)),this.backdrop(function(){var h=
c.support.transition&&g.$element.hasClass("fade");g.$element.parent().length||g.$element.appendTo(g.$body);g.$element.show().scrollTop(0);h&&g.$element[0].offsetWidth;g.$element.addClass("in").attr("aria-hidden",!1);g.enforceFocus();var m=c.Event("shown.bs.modal",{relatedTarget:k});h?g.$element.find(".modal-dialog").one("bsTransitionEnd",function(){g.$element.trigger("focus").trigger(m)}).emulateTransitionEnd(300):g.$element.trigger("focus").trigger(m)}))};h.prototype.hide=function(g){g&&g.preventDefault();
g=c.Event("hide.bs.modal");this.$element.trigger(g);this.isShown&&!g.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),c(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),c.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",c.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};h.prototype.enforceFocus=function(){c(document).off("focusin.bs.modal").on("focusin.bs.modal",
c.proxy(function(c){this.$element[0]===c.target||this.$element.has(c.target).length||this.$element.trigger("focus")},this))};h.prototype.escape=function(){if(this.isShown&&this.options.keyboard)this.$element.on("keyup.dismiss.bs.modal",c.proxy(function(c){27==c.which&&this.hide()},this));else this.isShown||this.$element.off("keyup.dismiss.bs.modal")};h.prototype.hideModal=function(){var c=this;this.$element.hide();this.backdrop(function(){c.$element.trigger("hidden.bs.modal")})};h.prototype.removeBackdrop=
function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};h.prototype.backdrop=function(g){var h=this,m=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=c.support.transition&&m;this.$backdrop=c('<div class="modal-backdrop '+m+'" />').appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",c.proxy(function(c){c.target===c.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this));
s&&this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");g&&(s?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(150):g())}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),m=function(){h.removeBackdrop();g&&g()},c.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",m).emulateTransitionEnd(150):m()):g&&g()};h.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||
this.measureScrollbar())};h.prototype.setScrollbar=function(){var c=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",c+this.scrollbarWidth)};h.prototype.resetScrollbar=function(){this.$body.css("padding-right","")};h.prototype.measureScrollbar=function(){var c=document.createElement("div");c.className="modal-scrollbar-measure";this.$body.append(c);var g=c.offsetWidth-c.clientWidth;this.$body[0].removeChild(c);return g};var m=c.fn.modal;c.fn.modal=
g;c.fn.modal.Constructor=h;c.fn.modal.noConflict=function(){c.fn.modal=m;return this};c(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(k){var h=c(this),m=h.attr("href"),s=c(h.attr("data-target")||m&&m.replace(/.*(?=#[^\s]+$)/,"")),m=s.data("bs.modal")?"toggle":c.extend({remote:!/#/.test(m)&&m},s.data(),h.data());h.is("a")&&k.preventDefault();s.one("show.bs.modal",function(c){if(!c.isDefaultPrevented())s.one("hidden.bs.modal",function(){h.is(":visible")&&h.trigger("focus")})});
g.call(s,m,this)})}(jQuery);
+function(c){var g=function(c,g){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",c,g)};g.VERSION="3.2.0";g.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};g.prototype.init=function(g,k,h){this.enabled=!0;this.type=g;this.$element=
c(k);this.options=this.getOptions(h);this.$viewport=this.options.viewport&&c(this.options.viewport.selector||this.options.viewport);g=this.options.trigger.split(" ");for(k=g.length;k--;)if(h=g[k],"click"==h)this.$element.on("click."+this.type,this.options.selector,c.proxy(this.toggle,this));else if("manual"!=h){var r="hover"==h?"mouseleave":"focusout";this.$element.on(("hover"==h?"mouseenter":"focusin")+"."+this.type,this.options.selector,c.proxy(this.enter,this));this.$element.on(r+"."+this.type,
this.options.selector,c.proxy(this.leave,this))}this.options.selector?this._options=c.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};g.prototype.getDefaults=function(){return g.DEFAULTS};g.prototype.getOptions=function(g){g=c.extend({},this.getDefaults(),this.$element.data(),g);g.delay&&"number"==typeof g.delay&&(g.delay={show:g.delay,hide:g.delay});return g};g.prototype.getDelegateOptions=function(){var g={},k=this.getDefaults();this._options&&c.each(this._options,function(c,
h){k[c]!=h&&(g[c]=h)});return g};g.prototype.enter=function(g){var k=g instanceof this.constructor?g:c(g.currentTarget).data("bs."+this.type);k||(k=new this.constructor(g.currentTarget,this.getDelegateOptions()),c(g.currentTarget).data("bs."+this.type,k));clearTimeout(k.timeout);k.hoverState="in";if(!k.options.delay||!k.options.delay.show)return k.show();k.timeout=setTimeout(function(){"in"==k.hoverState&&k.show()},k.options.delay.show)};g.prototype.leave=function(g){var k=g instanceof this.constructor?
g:c(g.currentTarget).data("bs."+this.type);k||(k=new this.constructor(g.currentTarget,this.getDelegateOptions()),c(g.currentTarget).data("bs."+this.type,k));clearTimeout(k.timeout);k.hoverState="out";if(!k.options.delay||!k.options.delay.hide)return k.hide();k.timeout=setTimeout(function(){"out"==k.hoverState&&k.hide()},k.options.delay.hide)};g.prototype.show=function(){var g=c.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(g);var k=c.contains(document.documentElement,
this.$element[0]);if(!g.isDefaultPrevented()&&k){var h=this,g=this.tip(),k=this.getUID(this.type);this.setContent();g.attr("id",k);this.$element.attr("aria-describedby",k);this.options.animation&&g.addClass("fade");var k="function"==typeof this.options.placement?this.options.placement.call(this,g[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,s=r.test(k);s&&(k=k.replace(r,"")||"top");g.detach().css({top:0,left:0,display:"block"}).addClass(k).data("bs."+this.type,this);this.options.container?
g.appendTo(this.options.container):g.insertAfter(this.$element);var r=this.getPosition(),y=g[0].offsetWidth,C=g[0].offsetHeight;if(s){var s=k,F=this.$element.parent(),F=this.getPosition(F),k="bottom"==k&&r.top+r.height+C-F.scroll>F.height?"top":"top"==k&&0>r.top-F.scroll-C?"bottom":"right"==k&&r.right+y>F.width?"left":"left"==k&&r.left-y<F.left?"right":k;g.removeClass(s).addClass(k)}r=this.getCalculatedOffset(k,r,y,C);this.applyPlacement(r,k);k=function(){h.$element.trigger("shown.bs."+h.type);h.hoverState=
null};c.support.transition&&this.$tip.hasClass("fade")?g.one("bsTransitionEnd",k).emulateTransitionEnd(150):k()}}};g.prototype.applyPlacement=function(g,k){var h=this.tip(),r=h[0].offsetWidth,s=h[0].offsetHeight,y=parseInt(h.css("margin-top"),10),C=parseInt(h.css("margin-left"),10);isNaN(y)&&(y=0);isNaN(C)&&(C=0);g.top+=y;g.left+=C;c.offset.setOffset(h[0],c.extend({using:function(c){h.css({top:Math.round(c.top),left:Math.round(c.left)})}},g),0);h.addClass("in");var C=h[0].offsetWidth,F=h[0].offsetHeight;
"top"==k&&F!=s&&(g.top=g.top+s-F);y=this.getViewportAdjustedDelta(k,g,C,F);y.left?g.left+=y.left:g.top+=y.top;r=y.left?2*y.left-r+C:2*y.top-s+F;s=y.left?"left":"top";y=y.left?"offsetWidth":"offsetHeight";h.offset(g);this.replaceArrow(r,h[0][y],s)};g.prototype.replaceArrow=function(c,g,h){this.arrow().css(h,c?50*(1-c/g)+"%":"")};g.prototype.setContent=function(){var c=this.tip(),g=this.getTitle();c.find(".tooltip-inner")[this.options.html?"html":"text"](g);c.removeClass("fade in top bottom left right")};
g.prototype.hide=function(){function g(){"in"!=k.hoverState&&h.detach();k.$element.trigger("hidden.bs."+k.type)}var k=this,h=this.tip(),r=c.Event("hide.bs."+this.type);this.$element.removeAttr("aria-describedby");this.$element.trigger(r);if(!r.isDefaultPrevented())return h.removeClass("in"),c.support.transition&&this.$tip.hasClass("fade")?h.one("bsTransitionEnd",g).emulateTransitionEnd(150):g(),this.hoverState=null,this};g.prototype.fixTitle=function(){var c=this.$element;(c.attr("title")||"string"!=
typeof c.attr("data-original-title"))&&c.attr("data-original-title",c.attr("title")||"").attr("title","")};g.prototype.hasContent=function(){return this.getTitle()};g.prototype.getPosition=function(g){g=g||this.$element;var k=g[0],h="BODY"==k.tagName;return c.extend({},"function"==typeof k.getBoundingClientRect?k.getBoundingClientRect():null,{scroll:h?document.documentElement.scrollTop||document.body.scrollTop:g.scrollTop(),width:h?c(window).width():g.outerWidth(),height:h?c(window).height():g.outerHeight()},
h?{top:0,left:0}:g.offset())};g.prototype.getCalculatedOffset=function(c,g,h,r){return"bottom"==c?{top:g.top+g.height,left:g.left+g.width/2-h/2}:"top"==c?{top:g.top-r,left:g.left+g.width/2-h/2}:"left"==c?{top:g.top+g.height/2-r/2,left:g.left-h}:{top:g.top+g.height/2-r/2,left:g.left+g.width}};g.prototype.getViewportAdjustedDelta=function(c,g,h,r){var s={top:0,left:0};if(!this.$viewport)return s;var y=this.options.viewport&&this.options.viewport.padding||0,C=this.getPosition(this.$viewport);/right|left/.test(c)?
(h=g.top-y-C.scroll,g=g.top+y-C.scroll+r,h<C.top?s.top=C.top-h:g>C.top+C.height&&(s.top=C.top+C.height-g)):(r=g.left-y,g=g.left+y+h,r<C.left?s.left=C.left-r:g>C.width&&(s.left=C.left+C.width-g));return s};g.prototype.getTitle=function(){var c=this.$element,g=this.options;return c.attr("data-original-title")||("function"==typeof g.title?g.title.call(c[0]):g.title)};g.prototype.getUID=function(c){do c+=~~(1E6*Math.random());while(document.getElementById(c));return c};g.prototype.tip=function(){return this.$tip=
this.$tip||c(this.options.template)};g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};g.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.options=this.$element=null)};g.prototype.enable=function(){this.enabled=!0};g.prototype.disable=function(){this.enabled=!1};g.prototype.toggleEnabled=function(){this.enabled=!this.enabled};g.prototype.toggle=function(g){var h=this;g&&(h=c(g.currentTarget).data("bs."+this.type),h||(h=new this.constructor(g.currentTarget,
this.getDelegateOptions()),c(g.currentTarget).data("bs."+this.type,h)));h.tip().hasClass("in")?h.leave(h):h.enter(h)};g.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var h=c.fn.tooltip;c.fn.tooltip=function(h){return this.each(function(){var k=c(this),u=k.data("bs.tooltip"),r="object"==typeof h&&h;if(u||"destroy"!=h)if(u||k.data("bs.tooltip",u=new g(this,r)),"string"==typeof h)u[h]()})};c.fn.tooltip.Constructor=g;c.fn.tooltip.noConflict=
function(){c.fn.tooltip=h;return this}}(jQuery);
+function(c){var g=function(c,g){this.init("popover",c,g)};if(!c.fn.tooltip)throw Error("Popover requires tooltip.js");g.VERSION="3.2.0";g.DEFAULTS=c.extend({},c.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});g.prototype=c.extend({},c.fn.tooltip.Constructor.prototype);g.prototype.constructor=g;g.prototype.getDefaults=function(){return g.DEFAULTS};
g.prototype.setContent=function(){var c=this.tip(),g=this.getTitle(),h=this.getContent();c.find(".popover-title")[this.options.html?"html":"text"](g);c.find(".popover-content").empty()[this.options.html?"string"==typeof h?"html":"append":"text"](h);c.removeClass("fade top bottom left right in");c.find(".popover-title").html()||c.find(".popover-title").hide()};g.prototype.hasContent=function(){return this.getTitle()||this.getContent()};g.prototype.getContent=function(){var c=this.$element,g=this.options;
return c.attr("data-content")||("function"==typeof g.content?g.content.call(c[0]):g.content)};g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};g.prototype.tip=function(){this.$tip||(this.$tip=c(this.options.template));return this.$tip};var h=c.fn.popover;c.fn.popover=function(h){return this.each(function(){var k=c(this),u=k.data("bs.popover"),r="object"==typeof h&&h;if(u||"destroy"!=h)if(u||k.data("bs.popover",u=new g(this,r)),"string"==typeof h)u[h]()})};c.fn.popover.Constructor=
g;c.fn.popover.noConflict=function(){c.fn.popover=h;return this}}(jQuery);
+function(c){function g(h,m){var r=c.proxy(this.process,this);this.$body=c("body");this.$scrollElement=c(h).is("body")?c(window):c(h);this.options=c.extend({},g.DEFAULTS,m);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",r);this.refresh();this.process()}function h(h){return this.each(function(){var m=c(this),r=m.data("bs.scrollspy"),s="object"==typeof h&&h;r||m.data("bs.scrollspy",
r=new g(this,s));if("string"==typeof h)r[h]()})}g.VERSION="3.2.0";g.DEFAULTS={offset:10};g.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};g.prototype.refresh=function(){var g="offset",h=0;c.isWindow(this.$scrollElement[0])||(g="position",h=this.$scrollElement.scrollTop());this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();var m=this;this.$body.find(this.selector).map(function(){var m=
c(this),m=m.data("target")||m.attr("href"),r=/^#./.test(m)&&c(m);return r&&r.length&&r.is(":visible")&&[[r[g]().top+h,m]]||null}).sort(function(c,g){return c[0]-g[0]}).each(function(){m.offsets.push(this[0]);m.targets.push(this[1])})};g.prototype.process=function(){var c=this.$scrollElement.scrollTop()+this.options.offset,g=this.getScrollHeight(),h=this.options.offset+g-this.$scrollElement.height(),m=this.offsets,y=this.targets,C=this.activeTarget,F;this.scrollHeight!=g&&this.refresh();if(c>=h)return C!=
(F=y[y.length-1])&&this.activate(F);if(C&&c<=m[0])return C!=(F=y[0])&&this.activate(F);for(F=m.length;F--;)C!=y[F]&&c>=m[F]&&(!m[F+1]||c<=m[F+1])&&this.activate(y[F])};g.prototype.activate=function(g){this.activeTarget=g;c(this.selector).parentsUntil(this.options.target,".active").removeClass("active");g=c(this.selector+'[data-target="'+g+'"],'+this.selector+'[href="'+g+'"]').parents("li").addClass("active");g.parent(".dropdown-menu").length&&(g=g.closest("li.dropdown").addClass("active"));g.trigger("activate.bs.scrollspy")};
var m=c.fn.scrollspy;c.fn.scrollspy=h;c.fn.scrollspy.Constructor=g;c.fn.scrollspy.noConflict=function(){c.fn.scrollspy=m;return this};c(window).on("load.bs.scrollspy.data-api",function(){c('[data-spy="scroll"]').each(function(){var g=c(this);h.call(g,g.data())})})}(jQuery);
+function(c){function g(g){return this.each(function(){var m=c(this),r=m.data("bs.tab");r||m.data("bs.tab",r=new h(this));if("string"==typeof g)r[g]()})}var h=function(g){this.element=c(g)};h.VERSION="3.2.0";h.prototype.show=function(){var g=this.element,h=g.closest("ul:not(.dropdown-menu)"),m=g.data("target");m||(m=(m=g.attr("href"))&&m.replace(/.*(?=#[^\s]*$)/,""));if(!g.parent("li").hasClass("active")){var s=h.find(".active:last a")[0],y=c.Event("show.bs.tab",{relatedTarget:s});g.trigger(y);y.isDefaultPrevented()||
(m=c(m),this.activate(g.closest("li"),h),this.activate(m,m.parent(),function(){g.trigger({type:"shown.bs.tab",relatedTarget:s})}))}};h.prototype.activate=function(g,h,m){function s(){y.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");g.addClass("active");C?(g[0].offsetWidth,g.addClass("in")):g.removeClass("fade");g.parent(".dropdown-menu")&&g.closest("li.dropdown").addClass("active");m&&m()}var y=h.find("> .active"),C=m&&c.support.transition&&y.hasClass("fade");C?y.one("bsTransitionEnd",
s).emulateTransitionEnd(150):s();y.removeClass("in")};var m=c.fn.tab;c.fn.tab=g;c.fn.tab.Constructor=h;c.fn.tab.noConflict=function(){c.fn.tab=m;return this};c(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(h){h.preventDefault();g.call(c(this),"show")})}(jQuery);
+function(c){function g(g){return this.each(function(){var m=c(this),r=m.data("bs.affix"),s="object"==typeof g&&g;r||m.data("bs.affix",r=new h(this,s));if("string"==typeof g)r[g]()})}var h=function(g,m){this.options=c.extend({},h.DEFAULTS,m);this.$target=c(this.options.target).on("scroll.bs.affix.data-api",c.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",c.proxy(this.checkPositionWithEventLoop,this));this.$element=c(g);this.affixed=this.unpin=this.pinnedOffset=null;this.checkPosition()};
h.VERSION="3.2.0";h.RESET="affix affix-top affix-bottom";h.DEFAULTS={offset:0,target:window};h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var c=this.$target.scrollTop();return this.pinnedOffset=this.$element.offset().top-c};h.prototype.checkPositionWithEventLoop=function(){setTimeout(c.proxy(this.checkPosition,this),1)};h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var g=c(document).height(),
m=this.$target.scrollTop(),r=this.$element.offset(),s=this.options.offset,y=s.top,C=s.bottom;"object"!=typeof s&&(C=y=s);"function"==typeof y&&(y=s.top(this.$element));"function"==typeof C&&(C=s.bottom(this.$element));m=null!=this.unpin&&m+this.unpin<=r.top?!1:null!=C&&r.top+this.$element.height()>=g-C?"bottom":null!=y&&m<=y?"top":!1;this.affixed!==m&&(null!=this.unpin&&this.$element.css("top",""),r="affix"+(m?"-"+m:""),s=c.Event(r+".bs.affix"),this.$element.trigger(s),s.isDefaultPrevented()||(this.affixed=
m,this.unpin="bottom"==m?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(r).trigger(c.Event(r.replace("affix","affixed"))),"bottom"==m&&this.$element.offset({top:g-this.$element.height()-C})))}};var m=c.fn.affix;c.fn.affix=g;c.fn.affix.Constructor=h;c.fn.affix.noConflict=function(){c.fn.affix=m;return this};c(window).on("load",function(){c('[data-spy="affix"]').each(function(){var h=c(this),m=h.data();m.offset=m.offset||{};m.offsetBottom&&(m.offset.bottom=m.offsetBottom);m.offsetTop&&
(m.offset.top=m.offsetTop);g.call(h,m)})})}(jQuery);
(function(c){"function"===typeof define&&define.amd?define(["jquery"],c):c(jQuery)})(function(c){function g(a,b){var d,e;d=a.nodeName.toLowerCase();if("area"===d){d=a.parentNode;e=d.name;if(!a.href||!e||"map"!==d.nodeName.toLowerCase())return!1;d=c("img[usemap='#"+e+"']")[0];return!!d&&h(d)}return(/^(input|select|textarea|button|object)$/.test(d)?!a.disabled:"a"===d?a.href||b:b)&&h(a)}function h(a){return c.expr.filters.visible(a)&&!c(a).parents().addBack().filter(function(){return"hidden"===c.css(this,
"visibility")}).length}function m(a){for(var b;a.length&&a[0]!==document;){b=a.css("position");if("absolute"===b||"relative"===b||"fixed"===b)if(b=parseInt(a.css("zIndex"),10),!isNaN(b)&&0!==b)return b;a=a.parent()}return 0}function k(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";
this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:"January February March April May June July August September October November December".split(" "),monthNamesShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
dayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),dayNamesShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),dayNamesMin:"Su Mo Tu We Th Fr Sa".split(" "),weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,
yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};c.extend(this._defaults,this.regional[""]);this.regional.en=c.extend(!0,{},this.regional[""]);
this.regional["en-US"]=c.extend(!0,{},this.regional.en);this.dpDiv=u(c("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function u(a){return a.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseout",function(){c(this).removeClass("ui-state-hover");-1!==this.className.indexOf("ui-datepicker-prev")&&c(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&
c(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",r)}function r(){c.datepicker._isDisabledDatepicker(w.inline?w.dpDiv.parent()[0]:w.input[0])||(c(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),c(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&c(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&
c(this).addClass("ui-datepicker-next-hover"))}function s(a,b){c.extend(a,b);for(var d in b)null==b[d]&&(a[d]=b[d]);return a}function y(a){return function(){var b=this.element.val();a.apply(this,arguments);this._refresh();b!==this.element.val()&&this._trigger("change")}}c.ui=c.ui||{};c.extend(c.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});c.fn.extend({scrollParent:function(a){var b=
this.css("position"),d="absolute"===b,e=a?/(auto|scroll|hidden)/:/(auto|scroll)/;a=this.parents().filter(function(){var a=c(this);return d&&"static"===a.css("position")?!1:e.test(a.css("overflow")+a.css("overflow-y")+a.css("overflow-x"))}).eq(0);return"fixed"!==b&&a.length?a:c(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&
c(this).removeAttr("id")})}});c.extend(c.expr[":"],{data:c.expr.createPseudo?c.expr.createPseudo(function(a){return function(b){return!!c.data(b,a)}}):function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return g(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b);return(d||0<=b)&&g(a,!d)}});c("<a>").outerWidth(1).jquery||c.each(["Width","Height"],function(a,b){function d(a,b,d,f){c.each(e,function(){b-=parseFloat(c.css(a,"padding"+this))||0;d&&(b-=
parseFloat(c.css(a,"border"+this+"Width"))||0);f&&(b-=parseFloat(c.css(a,"margin"+this))||0)});return b}var e="Width"===b?["Left","Right"]:["Top","Bottom"],f=b.toLowerCase(),p={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(a){return void 0===a?p["inner"+b].call(this):this.each(function(){c(this).css(f,d(this,a)+"px")})};c.fn["outer"+b]=function(a,e){return"number"!==typeof a?p["outer"+b].call(this,a):this.each(function(){c(this).css(f,
d(this,a,!0,e)+"px")})}});c.fn.addBack||(c.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))});c("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(c.fn.removeData=function(a){return function(b){return arguments.length?a.call(this,c.camelCase(b)):a.call(this)}}(c.fn.removeData));c.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());c.fn.extend({focus:function(a){return function(b,d){return"number"===typeof b?this.each(function(){var a=this;setTimeout(function(){c(a).focus();
d&&d.call(a)},b)}):a.apply(this,arguments)}}(c.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(a){if(void 0!==a)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if("absolute"===b||"relative"===
b||"fixed"===b)if(b=parseInt(a.css("zIndex"),10),!isNaN(b)&&0!==b)return b;a=a.parent()}}return 0}});c.ui.plugin={add:function(a,b,d){var e;a=c.ui[a].prototype;for(e in d)a.plugins[e]=a.plugins[e]||[],a.plugins[e].push([b,d[e]])},call:function(a,b,c,e){if((b=a.plugins[b])&&(e||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,c)}};var C=0,F=Array.prototype.slice;c.cleanData=function(a){return function(b){var d,e,f;for(f=
0;null!=(e=b[f]);f++)try{(d=c._data(e,"events"))&&d.remove&&c(e).triggerHandler("remove")}catch(p){}a(b)}}(c.cleanData);c.widget=function(a,b,d){var e,f,p,g,h={},k=a.split(".")[0];a=a.split(".")[1];e=k+"-"+a;d||(d=b,b=c.Widget);c.expr[":"][e.toLowerCase()]=function(a){return!!c.data(a,e)};c[k]=c[k]||{};f=c[k][a];p=c[k][a]=function(a,b){if(!this._createWidget)return new p(a,b);arguments.length&&this._createWidget(a,b)};c.extend(p,f,{version:d.version,_proto:c.extend({},d),_childConstructors:[]});g=
new b;g.options=c.widget.extend({},g.options);c.each(d,function(a,d){c.isFunction(d)?h[a]=function(){var c=function(){return b.prototype[a].apply(this,arguments)},e=function(c){return b.prototype[a].apply(this,c)};return function(){var a=this._super,b=this._superApply,f;this._super=c;this._superApply=e;f=d.apply(this,arguments);this._super=a;this._superApply=b;return f}}():h[a]=d});p.prototype=c.widget.extend(g,{widgetEventPrefix:f?g.widgetEventPrefix||a:a},h,{constructor:p,namespace:k,widgetName:a,
widgetFullName:e});f?(c.each(f._childConstructors,function(a,b){var d=b.prototype;c.widget(d.namespace+"."+d.widgetName,p,b._proto)}),delete f._childConstructors):b._childConstructors.push(p);c.widget.bridge(a,p);return p};c.widget.extend=function(a){for(var b=F.call(arguments,1),d=0,e=b.length,f,p;d<e;d++)for(f in b[d])p=b[d][f],b[d].hasOwnProperty(f)&&void 0!==p&&(c.isPlainObject(p)?a[f]=c.isPlainObject(a[f])?c.widget.extend({},a[f],p):c.widget.extend({},p):a[f]=p);return a};c.widget.bridge=function(a,
b){var d=b.prototype.widgetFullName||a;c.fn[a]=function(e){var f="string"===typeof e,p=F.call(arguments,1),g=this;f?this.each(function(){var b,f=c.data(this,d);if("instance"===e)return g=f,!1;if(!f)return c.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+e+"'");if(!c.isFunction(f[e])||"_"===e.charAt(0))return c.error("no such method '"+e+"' for "+a+" widget instance");b=f[e].apply(f,p);if(b!==f&&void 0!==b)return g=b&&b.jquery?g.pushStack(b.get()):b,!1}):(p.length&&
(e=c.widget.extend.apply(null,[e].concat(p))),this.each(function(){var a=c.data(this,d);a?(a.option(e||{}),a._init&&a._init()):c.data(this,d,new b(e,this))}));return g}};c.Widget=function(){};c.Widget._childConstructors=[];c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(a,b){b=c(b||this.defaultElement||this)[0];this.element=c(b);this.uuid=C++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=
c();this.hoverable=c();this.focusable=c();b!==this&&(c.data(b,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===b&&this.destroy()}}),this.document=c(b.style?b.ownerDocument:b.document||b),this.window=c(this.document[0].defaultView||this.document[0].parentWindow));this.options=c.widget.extend({},this.options,this._getCreateOptions(),a);this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:c.noop,_getCreateEventData:c.noop,
_create:c.noop,_init:c.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(c.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:c.noop,widget:function(){return this.element},
option:function(a,b){var d=a,e,f,p;if(0===arguments.length)return c.widget.extend({},this.options);if("string"===typeof a)if(d={},e=a.split("."),a=e.shift(),e.length){f=d[a]=c.widget.extend({},this.options[a]);for(p=0;p<e.length-1;p++)f[e[p]]=f[e[p]]||{},f=f[e[p]];a=e.pop();if(1===arguments.length)return void 0===f[a]?null:f[a];f[a]=b}else{if(1===arguments.length)return void 0===this.options[a]?null:this.options[a];d[a]=b}this._setOptions(d);return this},_setOptions:function(a){for(var b in a)this._setOption(b,
a[b]);return this},_setOption:function(a,b){this.options[a]=b;"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")));return this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(a,b,d){var e,f=this;"boolean"!==typeof a&&(d=b,b=a,a=!1);d?(b=e=c(b),this.bindings=this.bindings.add(b)):(d=b,b=this.element,
e=this.widget());c.each(d,function(d,g){function h(){if(a||!0!==f.options.disabled&&!c(this).hasClass("ui-state-disabled"))return("string"===typeof g?f[g]:g).apply(f,arguments)}"string"!==typeof g&&(h.guid=g.guid=g.guid||h.guid||c.guid++);var k=d.match(/^([\w:-]*)\s*(.*)$/),m=k[1]+f.eventNamespace;(k=k[2])?e.delegate(k,m,h):b.bind(m,h)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(b).undelegate(b);this.bindings=c(this.bindings.not(a).get());
this.focusable=c(this.focusable.not(a).get());this.hoverable=c(this.hoverable.not(a).get())},_delay:function(a,b){var c=this;return setTimeout(function(){return("string"===typeof a?c[a]:a).apply(c,arguments)},b||0)},_hoverable:function(a){this.hoverable=this.hoverable.add(a);this._on(a,{mouseenter:function(a){c(a.currentTarget).addClass("ui-state-hover")},mouseleave:function(a){c(a.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(a){this.focusable=this.focusable.add(a);this._on(a,
{focusin:function(a){c(a.currentTarget).addClass("ui-state-focus")},focusout:function(a){c(a.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(a,b,d){var e,f=this.options[a];d=d||{};b=c.Event(b);b.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();b.target=this.element[0];if(a=b.originalEvent)for(e in a)e in b||(b[e]=a[e]);this.element.trigger(b,d);return!(c.isFunction(f)&&!1===f.apply(this.element[0],[b].concat(d))||b.isDefaultPrevented())}};c.each({show:"fadeIn",
hide:"fadeOut"},function(a,b){c.Widget.prototype["_"+a]=function(d,e,f){"string"===typeof e&&(e={effect:e});var p,g=e?!0===e||"number"===typeof e?b:e.effect||b:a;e=e||{};"number"===typeof e&&(e={duration:e});p=!c.isEmptyObject(e);e.complete=f;e.delay&&d.delay(e.delay);if(p&&c.effects&&c.effects.effect[g])d[a](e);else if(g!==a&&d[g])d[g](e.duration,e.easing,f);else d.queue(function(b){c(this)[a]();f&&f.call(d[0]);b()})}});var R=!1;c(document).mouseup(function(){R=!1});c.widget("ui.mouse",{version:"1.11.4",
options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(!0===c.data(b.target,a.widgetName+".preventClickEvent"))return c.removeData(b.target,a.widgetName+".preventClickEvent"),b.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&this.document.unbind("mousemove."+
this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(a){if(!R){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var b=this,d=1===a.which,e="string"===typeof this.options.cancel&&a.target.nodeName?c(a.target).closest(this.options.cancel).length:!1;if(!d||e||!this._mouseCapture(a))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=
!0},this.options.delay));if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&(this._mouseStarted=!1!==this._mouseStart(a),!this._mouseStarted))return a.preventDefault(),!0;!0===c.data(a.target,this.widgetName+".preventClickEvent")&&c.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return b._mouseMove(a)};this._mouseUpDelegate=function(a){return b._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,
this._mouseUpDelegate);a.preventDefault();return R=!0}},_mouseMove:function(a){if(this._mouseMoved&&(c.ui.ie&&(!document.documentMode||9>document.documentMode)&&!a.button||!a.which))return this._mouseUp(a);if(a.which||a.button)this._mouseMoved=!0;if(this._mouseStarted)return this._mouseDrag(a),a.preventDefault();this._mouseDistanceMet(a)&&this._mouseDelayMet(a)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,a))?this._mouseDrag(a):this._mouseUp(a));return!this._mouseStarted},_mouseUp:function(a){this.document.unbind("mousemove."+
this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,a.target===this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(a));return R=!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},
_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});(function(){function a(a,b,c){return[parseFloat(a[0])*(v.test(a[0])?b/100:1),parseFloat(a[1])*(v.test(a[1])?c/100:1)]}function b(a){var b=a[0];return 9===b.nodeType?{width:a.width(),height:a.height(),offset:{top:0,left:0}}:c.isWindow(b)?{width:a.width(),height:a.height(),offset:{top:a.scrollTop(),left:a.scrollLeft()}}:b.preventDefault?{width:0,height:0,offset:{top:b.pageY,left:b.pageX}}:{width:a.outerWidth(),height:a.outerHeight(),
offset:a.offset()}}c.ui=c.ui||{};var d,e,f=Math.max,p=Math.abs,g=Math.round,h=/left|center|right/,k=/top|center|bottom/,m=/[\+\-]\d+(\.[\d]+)?%?/,x=/^\w+/,v=/%$/,w=c.fn.position;c.position={scrollbarWidth:function(){if(void 0!==d)return d;var a,b,e=c("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");b=e.children()[0];c("body").append(e);a=b.offsetWidth;e.css("overflow","scroll");b=b.offsetWidth;a===b&&(b=e[0].clientWidth);
e.remove();return d=a-b},getScrollInfo:function(a){var b=a.isWindow||a.isDocument?"":a.element.css("overflow-x"),d=a.isWindow||a.isDocument?"":a.element.css("overflow-y"),b="scroll"===b||"auto"===b&&a.width<a.element[0].scrollWidth;return{width:"scroll"===d||"auto"===d&&a.height<a.element[0].scrollHeight?c.position.scrollbarWidth():0,height:b?c.position.scrollbarWidth():0}},getWithinInfo:function(a){a=c(a||window);var b=c.isWindow(a[0]),d=!!a[0]&&9===a[0].nodeType;return{element:a,isWindow:b,isDocument:d,
offset:a.offset()||{left:0,top:0},scrollLeft:a.scrollLeft(),scrollTop:a.scrollTop(),width:b||d?a.width():a.outerWidth(),height:b||d?a.height():a.outerHeight()}}};c.fn.position=function(d){if(!d||!d.of)return w.apply(this,arguments);d=c.extend({},d);var n,v,q,s,H,I,E=c(d.of),V=c.position.getWithinInfo(d.within),K=c.position.getScrollInfo(V),Q=(d.collision||"flip").split(" "),da={};I=b(E);E[0].preventDefault&&(d.at="left top");v=I.width;q=I.height;s=I.offset;H=c.extend({},s);c.each(["my","at"],function(){var a=
(d[this]||"").split(" "),b,c;1===a.length&&(a=h.test(a[0])?a.concat(["center"]):k.test(a[0])?["center"].concat(a):["center","center"]);a[0]=h.test(a[0])?a[0]:"center";a[1]=k.test(a[1])?a[1]:"center";b=m.exec(a[0]);c=m.exec(a[1]);da[this]=[b?b[0]:0,c?c[0]:0];d[this]=[x.exec(a[0])[0],x.exec(a[1])[0]]});1===Q.length&&(Q[1]=Q[0]);"right"===d.at[0]?H.left+=v:"center"===d.at[0]&&(H.left+=v/2);"bottom"===d.at[1]?H.top+=q:"center"===d.at[1]&&(H.top+=q/2);n=a(da.at,v,q);H.left+=n[0];H.top+=n[1];return this.each(function(){var b,
h,B=c(this),k=B.outerWidth(),J=B.outerHeight(),m=parseInt(c.css(this,"marginLeft"),10)||0,I=parseInt(c.css(this,"marginTop"),10)||0,l=k+m+(parseInt(c.css(this,"marginRight"),10)||0)+K.width,Z=J+I+(parseInt(c.css(this,"marginBottom"),10)||0)+K.height,A=c.extend({},H),x=a(da.my,B.outerWidth(),B.outerHeight());"right"===d.my[0]?A.left-=k:"center"===d.my[0]&&(A.left-=k/2);"bottom"===d.my[1]?A.top-=J:"center"===d.my[1]&&(A.top-=J/2);A.left+=x[0];A.top+=x[1];e||(A.left=g(A.left),A.top=g(A.top));b={marginLeft:m,
marginTop:I};c.each(["left","top"],function(a,e){if(c.ui.position[Q[a]])c.ui.position[Q[a]][e](A,{targetWidth:v,targetHeight:q,elemWidth:k,elemHeight:J,collisionPosition:b,collisionWidth:l,collisionHeight:Z,offset:[n[0]+x[0],n[1]+x[1]],my:d.my,at:d.at,within:V,elem:B})});d.using&&(h=function(a){var b=s.left-A.left,c=b+v-k,e=s.top-A.top,g=e+q-J,l={target:{element:E,left:s.left,top:s.top,width:v,height:q},element:{element:B,left:A.left,top:A.top,width:k,height:J},horizontal:0>c?"left":0<b?"right":"center",
vertical:0>g?"top":0<e?"bottom":"middle"};v<k&&p(b+c)<v&&(l.horizontal="center");q<J&&p(e+g)<q&&(l.vertical="middle");f(p(b),p(c))>f(p(e),p(g))?l.important="horizontal":l.important="vertical";d.using.call(this,a,l)});B.offset(c.extend(A,{using:h}))})};c.ui.position={fit:{left:function(a,b){var c=b.within,d=c.isWindow?c.scrollLeft:c.offset.left,e=c.width,p=a.left-b.collisionPosition.marginLeft,c=d-p,g=p+b.collisionWidth-e-d;b.collisionWidth>e?0<c&&0>=g?(d=a.left+c+b.collisionWidth-e-d,a.left+=c-d):
a.left=0<g&&0>=c?d:c>g?d+e-b.collisionWidth:d:a.left=0<c?a.left+c:0<g?a.left-g:f(a.left-p,a.left)},top:function(a,b){var c=b.within,d=c.isWindow?c.scrollTop:c.offset.top,e=b.within.height,p=a.top-b.collisionPosition.marginTop,c=d-p,g=p+b.collisionHeight-e-d;b.collisionHeight>e?0<c&&0>=g?(d=a.top+c+b.collisionHeight-e-d,a.top+=c-d):a.top=0<g&&0>=c?d:c>g?d+e-b.collisionHeight:d:a.top=0<c?a.top+c:0<g?a.top-g:f(a.top-p,a.top)}},flip:{left:function(a,b){var c=b.within,d=c.offset.left+c.scrollLeft,e=c.width,
f=c.isWindow?c.scrollLeft:c.offset.left,g=a.left-b.collisionPosition.marginLeft,c=g-f,h=g+b.collisionWidth-e-f,g="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,z="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,k=-2*b.offset[0];if(0>c){if(d=a.left+g+z+k+b.collisionWidth-e-d,0>d||d<p(c))a.left+=g+z+k}else 0<h&&(d=a.left-b.collisionPosition.marginLeft+g+z+k-f,0<d||p(d)<h)&&(a.left+=g+z+k)},top:function(a,b){var c=b.within,d=c.offset.top+c.scrollTop,e=c.height,f=c.isWindow?
c.scrollTop:c.offset.top,g=a.top-b.collisionPosition.marginTop,c=g-f,h=g+b.collisionHeight-e-f,g="top"===b.my[1]?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,z="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,k=-2*b.offset[1];if(0>c){if(d=a.top+g+z+k+b.collisionHeight-e-d,0>d||d<p(c))a.top+=g+z+k}else 0<h&&(d=a.top-b.collisionPosition.marginTop+g+z+k-f,0<d||p(d)<h)&&(a.top+=g+z+k)}},flipfit:{left:function(){c.ui.position.flip.left.apply(this,arguments);c.ui.position.fit.left.apply(this,
arguments)},top:function(){c.ui.position.flip.top.apply(this,arguments);c.ui.position.fit.top.apply(this,arguments)}}};(function(){var a,b,d,f,p=document.getElementsByTagName("body")[0];d=document.createElement("div");a=document.createElement(p?"div":"body");b={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};p&&c.extend(b,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in b)a.style[f]=b[f];a.appendChild(d);b=p||document.documentElement;b.insertBefore(a,b.firstChild);
d.style.cssText="position: absolute; left: 10.7432222px;";d=c(d).offset().left;e=10<d&&11>d;a.innerHTML="";b.removeChild(a)})()})();c.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",
height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var a=this.options;this.prevShow=this.prevHide=c();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");a.collapsible||!1!==a.active&&null!=a.active||(a.active=0);this._processPanels();0>a.active&&(a.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?
this.active.next():c()}},_createIcons:function(){var a=this.options.icons;a&&(c("<span>").addClass("ui-accordion-header-icon ui-icon "+a.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(a.header).addClass(a.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");
this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId();this._destroyIcons();a=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId();
"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){"active"===a?this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||!1!==this.options.active||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),"disabled"===a&&(this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",
!!b)))},_keydown:function(a){if(!a.altKey&&!a.ctrlKey){var b=c.ui.keyCode,d=this.headers.length,e=this.headers.index(a.target),f=!1;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(e+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(e-1+d)%d];break;case b.SPACE:case b.ENTER:this._eventHandler(a);break;case b.HOME:f=this.headers[0];break;case b.END:f=this.headers[d-1]}f&&(c(a.target).attr("tabIndex",-1),c(f).attr("tabIndex",0),f.focus(),a.preventDefault())}},_panelKeyDown:function(a){a.keyCode===
c.ui.keyCode.UP&&a.ctrlKey&&c(a.currentTarget).prev().focus()},refresh:function(){var a=this.options;this._processPanels();!1===a.active&&!0===a.collapsible||!this.headers.length?(a.active=!1,this.active=c()):!1===a.active?this._activate(0):this.active.length&&!c.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(a.active=!1,this.active=c()):this._activate(Math.max(0,a.active-1)):a.active=this.headers.index(this.active);this._destroyIcons();
this._refresh()},_processPanels:function(){var a=this.headers,b=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all");this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide();b&&(this._off(a.not(this.headers)),this._off(b.not(this.panels)))},_refresh:function(){var a,b=this.options,d=b.heightStyle,e=this.element.parent();
this.active=this._findActive(b.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(){var a=c(this),b=a.uniqueId().attr("id"),d=a.next(),e=d.uniqueId().attr("id");a.attr("aria-controls",e);d.attr("aria-labelledby",b)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();
this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(b.event);"fill"===d?(a=e.height(),this.element.siblings(":visible").each(function(){var b=c(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(a-=b.outerHeight(!0))}),this.headers.each(function(){a-=c(this).outerHeight(!0)}),this.headers.next().each(function(){c(this).height(Math.max(0,
a-c(this).innerHeight()+c(this).height()))}).css("overflow","auto")):"auto"===d&&(a=0,this.headers.next().each(function(){a=Math.max(a,c(this).css("height","").height())}).height(a))},_activate:function(a){a=this._findActive(a)[0];a!==this.active[0]&&(a=a||this.active[0],this._eventHandler({target:a,currentTarget:a,preventDefault:c.noop}))},_findActive:function(a){return"number"===typeof a?this.headers.eq(a):c()},_setupEvents:function(a){var b={keydown:"_keydown"};a&&c.each(a.split(" "),function(a,
c){b[c]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,b);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(a){var b=this.options,d=this.active,e=c(a.currentTarget),f=e[0]===d[0],p=f&&b.collapsible,g=p?c():e.next(),h=d.next(),g={oldHeader:d,oldPanel:h,newHeader:p?c():e,newPanel:g};a.preventDefault();f&&!b.collapsible||!1===this._trigger("beforeActivate",a,g)||(b.active=
p?!1:this.headers.index(e),this.active=f?c():e,this._toggle(g),d.removeClass("ui-accordion-header-active ui-state-active"),b.icons&&d.children(".ui-accordion-header-icon").removeClass(b.icons.activeHeader).addClass(b.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),b.icons&&e.children(".ui-accordion-header-icon").removeClass(b.icons.header).addClass(b.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(a){var b=
a.newPanel,d=this.prevShow.length?this.prevShow:a.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=b;this.prevHide=d;this.options.animate?this._animate(b,d,a):(d.hide(),b.show(),this._toggleComplete(a));d.attr({"aria-hidden":"true"});d.prev().attr({"aria-selected":"false","aria-expanded":"false"});b.length&&d.length?d.prev().attr({tabIndex:-1,"aria-expanded":"false"}):b.length&&this.headers.filter(function(){return 0===parseInt(c(this).attr("tabIndex"),10)}).attr("tabIndex",-1);
b.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(a,b,c){var e,f,p,g=this,h=0,k=a.css("box-sizing"),m=a.length&&(!b.length||a.index()<b.index()),x=this.options.animate||{},m=m&&x.down||x,v=function(){g._toggleComplete(c)};"number"===typeof m&&(p=m);"string"===typeof m&&(f=m);f=f||m.easing||x.easing;p=p||m.duration||x.duration;if(!b.length)return a.animate(this.showProps,p,f,v);if(!a.length)return b.animate(this.hideProps,p,f,v);
e=a.show().outerHeight();b.animate(this.hideProps,{duration:p,easing:f,step:function(a,b){b.now=Math.round(a)}});a.hide().animate(this.showProps,{duration:p,easing:f,complete:v,step:function(a,c){c.now=Math.round(a);"height"!==c.prop?"content-box"===k&&(h+=c.now):"content"!==g.options.heightStyle&&(c.now=Math.round(e-b.outerHeight()-h),h=0)}})},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");b.length&&
(b.parent()[0].className=b.parent()[0].className);this._trigger("activate",null,a)}});c.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,
tabIndex:0});this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item":function(a){a.preventDefault()},"click .ui-menu-item":function(a){var b=c(a.target);!this.mouseHandled&&b.not(".ui-state-disabled").length&&(this.select(a),a.isPropagationStopped()||(this.mouseHandled=!0),b.has(".ui-menu").length?this.expand(a):!this.element.is(":focus")&&c(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",
[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(a){if(!this.previousFilter){var b=c(a.currentTarget);b.siblings(".ui-state-active").removeClass("ui-state-active");this.focus(a,b)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.find(this.options.items).eq(0);b||this.focus(a,c)},blur:function(a){this._delay(function(){c.contains(this.element[0],this.document[0].activeElement)||
this.collapseAll(a)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(a){this._closeOnDocumentClick(a)&&this.collapseAll(a);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var a=c(this);a.data("ui-menu-submenu-carat")&&a.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(a){var b,d,e,f=!0;switch(a.keyCode){case c.ui.keyCode.PAGE_UP:this.previousPage(a);
break;case c.ui.keyCode.PAGE_DOWN:this.nextPage(a);break;case c.ui.keyCode.HOME:this._move("first","first",a);break;case c.ui.keyCode.END:this._move("last","last",a);break;case c.ui.keyCode.UP:this.previous(a);break;case c.ui.keyCode.DOWN:this.next(a);break;case c.ui.keyCode.LEFT:this.collapse(a);break;case c.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(a);break;case c.ui.keyCode.ENTER:case c.ui.keyCode.SPACE:this._activate(a);break;case c.ui.keyCode.ESCAPE:this.collapse(a);
break;default:f=!1,b=this.previousFilter||"",d=String.fromCharCode(a.keyCode),e=!1,clearTimeout(this.filterTimer),d===b?e=!0:d=b+d,b=this._filterMenuItems(d),b=e&&-1!==b.index(this.active.next())?this.active.nextAll(".ui-menu-item"):b,b.length||(d=String.fromCharCode(a.keyCode),b=this._filterMenuItems(d)),b.length?(this.focus(a,b),this.previousFilter=d,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter}f&&a.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||
(this.active.is("[aria-haspopup='true']")?this.expand(a):this.select(a))},refresh:function(){var a,b=this,d=this.options.icons.submenu;a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length);a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var a=c(this),b=a.parent(),p=c("<span>").addClass("ui-menu-icon ui-icon "+
d).data("ui-menu-submenu-carat",!0);b.attr("aria-haspopup","true").prepend(p);a.attr("aria-labelledby",b.attr("id"))});a=a.add(this.element).find(this.options.items);a.not(".ui-menu-item").each(function(){var a=c(this);b._isDivider(a)&&a.addClass("ui-widget-content ui-menu-divider")});a.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()});a.filter(".ui-state-disabled").attr("aria-disabled","true");this.active&&!c.contains(this.element[0],
this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu);"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b);this._super(a,b)},focus:function(a,b){var c;this.blur(a,a&&"focus"===a.type);this._scrollIntoView(b);this.active=b.first();c=this.active.addClass("ui-state-focus").removeClass("ui-state-active");
this.options.role&&this.element.attr("aria-activedescendant",c.attr("id"));this.active.parent().closest(".ui-menu-item").addClass("ui-state-active");a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);c=b.children(".ui-menu");c.length&&a&&/^mouse/.test(a.type)&&this._startOpening(c);this.activeMenu=b.parent();this._trigger("focus",a,{item:b})},_scrollIntoView:function(a){var b,d,e;this._hasScroll()&&(b=parseFloat(c.css(this.activeMenu[0],"borderTopWidth"))||
0,d=parseFloat(c.css(this.activeMenu[0],"paddingTop"))||0,b=a.offset().top-this.activeMenu.offset().top-b-d,d=this.activeMenu.scrollTop(),e=this.activeMenu.height(),a=a.outerHeight(),0>b?this.activeMenu.scrollTop(d+b):b+a>e&&this.activeMenu.scrollTop(d+b-e+a))},blur:function(a,b){b||clearTimeout(this.timer);this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer);"true"===a.attr("aria-hidden")&&
(this.timer=this._delay(function(){this._close();this._open(a)},this.delay))},_open:function(a){var b=c.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(a.parents(".ui-menu")).hide().attr("aria-hidden","true");a.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(b)},collapseAll:function(a,b){clearTimeout(this.timer);this.timer=this._delay(function(){var d=b?this.element:c(a&&a.target).closest(this.element.find(".ui-menu"));
d.length||(d=this.element);this._close(d);this.blur(a);this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(a){return!c(a.target).closest(".ui-menu").length},_isDivider:function(a){return!/[^\-\u2014\u2013\s]/.test(a.text())},collapse:function(a){var b=
this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&
!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var e;this.active&&(e="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0));e&&e.length&&this.active||(e=this.activeMenu.find(this.options.items)[b]());this.focus(c,e)},nextPage:function(a){var b,d,e;this.active?this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){b=
c(this);return 0>b.offset().top-d-e}),this.focus(a,b)):this.focus(a,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(a)},previousPage:function(a){var b,d,e;this.active?this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){b=c(this);return 0<b.offset().top-d+e}),this.focus(a,b)):this.focus(a,this.activeMenu.find(this.options.items).first())):this.next(a)},_hasScroll:function(){return this.element.outerHeight()<
this.element.prop("scrollHeight")},select:function(a){this.active=this.active||c(a.target).closest(".ui-menu-item");var b={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(a,!0);this._trigger("select",a,b)},_filterMenuItems:function(a){a=a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");var b=new RegExp("^"+a,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return b.test(c.trim(c(this).text()))})}});c.widget("ui.autocomplete",{version:"1.11.4",
defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var a,b,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,e="input"===e;this.isMultiLine=f?!0:e?!1:this.element.prop("isContentEditable");this.valueMethod=this.element[f||e?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete",
"off");this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))b=d=a=!0;else{b=d=a=!1;var f=c.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:a=!0;this._move("previousPage",e);break;case f.PAGE_DOWN:a=!0;this._move("nextPage",e);break;case f.UP:a=!0;this._keyEvent("previous",e);break;case f.DOWN:a=!0;this._keyEvent("next",e);break;case f.ENTER:this.menu.active&&(a=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&
(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:b=!0,this._searchTimeout(e)}}},keypress:function(d){if(a)a=!1,this.isMultiLine&&!this.menu.element.is(":visible")||d.preventDefault();else if(!b){var e=c.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){d?(d=!1,a.preventDefault()):
this._searchTimeout(a)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),this._change(a))}});this._initSource();this.menu=c("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance");this._on(this.menu.element,{mousedown:function(a){a.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});var b=this.menu.element[0];
c(a.target).closest(".ui-menu-item").length||this._delay(function(){var a=this;this.document.one("mousedown",function(d){d.target===a.element[0]||d.target===b||c.contains(b,d.target)||a.close()})})},menufocus:function(a,b){var d;if(this.isNewMenu&&(this.isNewMenu=!1,a.originalEvent&&/^mouse/.test(a.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){c(a.target).trigger(a.originalEvent)});return}d=b.item.data("ui-autocomplete-item");!1!==this._trigger("focus",a,{item:d})&&
a.originalEvent&&/^key/.test(a.originalEvent.type)&&this._value(d.value);(d=b.item.attr("aria-label")||d.value)&&c.trim(d).length&&(this.liveRegion.children().hide(),c("<div>").text(d).appendTo(this.liveRegion))},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d;this.selectedItem=c}));!1!==this._trigger("select",a,{item:c})&&this._value(c.value);
this.term=this._value();this.close(a);this.selectedItem=c}});this.liveRegion=c("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(a,
b){this._super(a,b);"source"===a&&this._initSource();"appendTo"===a&&this.menu.element.appendTo(this._appendTo());"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var a=this.options.appendTo;a&&(a=a.jquery||a.nodeType?c(a):this.document.find(a).eq(0));a&&a[0]||(a=this.element.closest(".ui-front"));a.length||(a=this.document[0].body);return a},_initSource:function(){var a,b,d=this;c.isArray(this.options.source)?(a=this.options.source,this.source=function(b,d){d(c.ui.autocomplete.filter(a,
b.term))}):"string"===typeof this.options.source?(b=this.options.source,this.source=function(a,f){d.xhr&&d.xhr.abort();d.xhr=c.ajax({url:b,data:a,dataType:"json",success:function(a){f(a)},error:function(){f([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching);this.searching=this._delay(function(){var b=this.term===this._value(),c=this.menu.element.is(":visible"),e=a.altKey||a.ctrlKey||a.metaKey||a.shiftKey;if(!b||b&&!c&&!e)this.selectedItem=null,this.search(null,
a)},this.options.delay)},search:function(a,b){a=null!=a?a:this._value();this.term=this._value();if(a.length<this.options.minLength)return this.close(b);if(!1!==this._trigger("search",b))return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:a},this._response())},_response:function(){var a=++this.requestIndex;return c.proxy(function(b){a===this.requestIndex&&this.__response(b);this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},
this)},__response:function(a){a&&(a=this._normalize(a));this._trigger("response",null,{content:a});!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0;this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},
_normalize:function(a){return a.length&&a[0].label&&a[0].value?a:c.map(a,function(a){return"string"===typeof a?{label:a,value:a}:c.extend({},a,{label:a.label||a.value,value:a.value||a.label})})},_suggest:function(a){var b=this.menu.element.empty();this._renderMenu(b,a);this.isNewMenu=!0;this.menu.refresh();b.show();this._resizeMenu();b.position(c.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+
1,this.element.outerWidth()))},_renderMenu:function(a,b){var d=this;c.each(b,function(b,c){d._renderItemData(a,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(a,b){return c("<li>").text(b.label).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a))this.isMultiLine||this._value(this.term),this.menu.blur();else this.menu[a](b);
else this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}});c.extend(c.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(a,b){var d=new RegExp(c.ui.autocomplete.escapeRegex(b),"i");return c.grep(a,function(a){return d.test(a.label||a.value||
a)})}});c.widget("ui.autocomplete",c.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(1<a?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){var b;this._superApply(arguments);this.options.disabled||this.cancelSearch||(b=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.children().hide(),c("<div>").text(b).appendTo(this.liveRegion))}});var N,M=
function(){var a=c(this);setTimeout(function(){a.find(":ui-button").button("refresh")},1)},D=function(a){var b=a.name,d=a.form,e=c([]);b&&(b=b.replace(/'/g,"\\'"),e=d?c(d).find("[name='"+b+"'][type=radio]"):c("[name='"+b+"'][type=radio]",a.ownerDocument).filter(function(){return!this.form}));return e};c.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+
this.eventNamespace).bind("reset"+this.eventNamespace,M);"boolean"!==typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,b=this.options,d="checkbox"===this.type||"radio"===this.type,e=d?"":"ui-state-active";null===b.label&&(b.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);
this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter"+this.eventNamespace,function(){b.disabled||this===N&&c(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){b.disabled||c(this).removeClass(e)}).bind("click"+this.eventNamespace,function(a){b.disabled&&(a.preventDefault(),a.stopImmediatePropagation())});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});
d&&this.element.bind("change"+this.eventNamespace,function(){a.refresh()});"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(b.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(b.disabled)return!1;c(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed","true");var d=a.element[0];D(d).not(d).map(function(){return c(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",
"false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(b.disabled)return!1;c(this).addClass("ui-state-active");N=this;a.document.one("mouseup",function(){N=null})}).bind("mouseup"+this.eventNamespace,function(){if(b.disabled)return!1;c(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(a){if(b.disabled)return!1;a.keyCode!==c.ui.keyCode.SPACE&&a.keyCode!==c.ui.keyCode.ENTER||c(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+
" blur"+this.eventNamespace,function(){c(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(a){a.keyCode===c.ui.keyCode.SPACE&&c(this).click()}));this._setOption("disabled",b.disabled);this._resetButton()},_determineButtonType:function(){var a,b;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";"checkbox"===this.type||"radio"===this.type?
(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),(a=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",a)):this.buttonElement=this.element},widget:function(){return this.buttonElement},
_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){this._super(a,
b);"disabled"===a?(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),b&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active"))):this._resetButton()},refresh:function(){var a=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");a!==this.options.disabled&&this._setOption("disabled",a);"radio"===this.type?D(this.element[0]).each(function(){c(this).is(":checked")?
c(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):c(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
b=c("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":
"ui-button-icon-only"),this.hasTitle||a.attr("title",c.trim(b)))):f.push("ui-button-text-only");a.addClass(f.join(" "))}}});c.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b);this._super(a,b)},refresh:function(){var a=
"rtl"===this.element.css("direction"),b=this.element.find(this.options.items),d=b.filter(":ui-button");b.not(":ui-button").button();d.button("refresh");this.buttons=b.map(function(){return c(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(a?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return c(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});
c.extend(c.ui,{datepicker:{version:"1.11.4"}});var w;c.extend(k.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){s(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var d,e,f;d=a.nodeName.toLowerCase();e="div"===d||"span"===d;a.id||(this.uuid+=1,a.id="dp"+this.uuid);f=this._newInst(c(a),e);f.settings=c.extend({},b||{});"input"===d?this._connectDatepicker(a,f):e&&this._inlineDatepicker(a,f)},_newInst:function(a,
b){return{id:a[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?u(c("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(a,b){var d=c(a);b.append=c([]);b.trigger=c([]);d.hasClass(this.markerClassName)||(this._attachments(d,b),d.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),
this._autoSize(b),c.data(a,"datepicker",b),b.settings.disabled&&this._disableDatepicker(a))},_attachments:function(a,b){var d,e;d=this._get(b,"appendText");var f=this._get(b,"isRTL");b.append&&b.append.remove();d&&(b.append=c("<span class='"+this._appendClass+"'>"+d+"</span>"),a[f?"before":"after"](b.append));a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();d=this._get(b,"showOn");"focus"!==d&&"both"!==d||a.focus(this._showDatepicker);if("button"===d||"both"===d)d=this._get(b,
"buttonText"),e=this._get(b,"buttonImage"),b.trigger=c(this._get(b,"buttonImageOnly")?c("<img/>").addClass(this._triggerClass).attr({src:e,alt:d,title:d}):c("<button type='button'></button>").addClass(this._triggerClass).html(e?c("<img/>").attr({src:e,alt:d,title:d}):d)),a[f?"before":"after"](b.trigger),b.trigger.click(function(){c.datepicker._datepickerShowing&&c.datepicker._lastInput===a[0]?c.datepicker._hideDatepicker():(c.datepicker._datepickerShowing&&c.datepicker._lastInput!==a[0]&&c.datepicker._hideDatepicker(),
c.datepicker._showDatepicker(a[0]));return!1})},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,e,f,p=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(f=e=c=0;f<a.length;f++)a[f].length>c&&(c=a[f].length,e=f);return e},p.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),p.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-p.getDay()));a.input.attr("size",this._formatDate(a,p).length)}},_inlineDatepicker:function(a,
b){var d=c(a);d.hasClass(this.markerClassName)||(d.addClass(this.markerClassName).append(b.dpDiv),c.data(a,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block"))},_dialogDatepicker:function(a,b,d,e,f){var p;a=this._dialogInst;a||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=c("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),
this._dialogInput.keydown(this._doKeyDown),c("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},c.data(this._dialogInput[0],"datepicker",a));s(a.settings,e||{});b=b&&b.constructor===Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;this._pos||(b=document.documentElement.clientWidth,e=document.documentElement.clientHeight,f=document.documentElement.scrollLeft||document.body.scrollLeft,p=document.documentElement.scrollTop||
document.body.scrollTop,this._pos=[b/2-100+f,e/2-150+p]);this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=d;this._inDialog=!0;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);c.blockUI&&c.blockUI(this.dpDiv);c.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b,d=c(a),e=c.data(a,"datepicker");d.hasClass(this.markerClassName)&&(b=a.nodeName.toLowerCase(),c.removeData(a,"datepicker"),
"input"===b?(e.append.remove(),e.trigger.remove(),d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==b&&"span"!==b||d.removeClass(this.markerClassName).empty(),w===e&&(w=null))},_enableDatepicker:function(a){var b,d=c(a),e=c.data(a,"datepicker");if(d.hasClass(this.markerClassName)){b=a.nodeName.toLowerCase();if("input"===b)a.disabled=!1,e.trigger.filter("button").each(function(){this.disabled=
!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"===b||"span"===b)b=d.children("."+this._inlineClass),b.children().removeClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1);this._disabledInputs=c.map(this._disabledInputs,function(b){return b===a?null:b})}},_disableDatepicker:function(a){var b,d=c(a),e=c.data(a,"datepicker");if(d.hasClass(this.markerClassName)){b=a.nodeName.toLowerCase();if("input"===b)a.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=
!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"===b||"span"===b)b=d.children("."+this._inlineClass),b.children().addClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0);this._disabledInputs=c.map(this._disabledInputs,function(b){return b===a?null:b});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===
a)return!0;return!1},_getInst:function(a){try{return c.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,d){var e,f,p,g,h=this._getInst(a);if(2===arguments.length&&"string"===typeof b)return"defaults"===b?c.extend({},c.datepicker._defaults):h?"all"===b?c.extend({},h.settings):this._get(h,b):null;e=b||{};"string"===typeof b&&(e={},e[b]=d);h&&(this._curInst===h&&this._hideDatepicker(),f=this._getDateDatepicker(a,!0),p=this._getMinMaxDate(h,
"min"),g=this._getMinMaxDate(h,"max"),s(h.settings,e),null!==p&&void 0!==e.dateFormat&&void 0===e.minDate&&(h.settings.minDate=this._formatDate(h,p)),null!==g&&void 0!==e.dateFormat&&void 0===e.maxDate&&(h.settings.maxDate=this._formatDate(h,g)),"disabled"in e&&(e.disabled?this._disableDatepicker(a):this._enableDatepicker(a)),this._attachments(c(a),h),this._autoSize(h),this._setDate(h,f),this._updateAlternate(h),this._updateDatepicker(h))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,
b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);c&&!c.inline&&this._setDateFromField(c,b);return c?this._getDate(c):null},_doKeyDown:function(a){var b,d=c.datepicker._getInst(a.target);b=!0;var e=d.dpDiv.is(".ui-datepicker-rtl");d._keyEvent=!0;if(c.datepicker._datepickerShowing)switch(a.keyCode){case 9:c.datepicker._hideDatepicker();
b=!1;break;case 13:return b=c("td."+c.datepicker._dayOverClass+":not(."+c.datepicker._currentClass+")",d.dpDiv),b[0]&&c.datepicker._selectDay(a.target,d.selectedMonth,d.selectedYear,b[0]),(a=c.datepicker._get(d,"onSelect"))?(b=c.datepicker._formatDate(d),a.apply(d.input?d.input[0]:null,[b,d])):c.datepicker._hideDatepicker(),!1;case 27:c.datepicker._hideDatepicker();break;case 33:c.datepicker._adjustDate(a.target,a.ctrlKey?-c.datepicker._get(d,"stepBigMonths"):-c.datepicker._get(d,"stepMonths"),"M");
break;case 34:c.datepicker._adjustDate(a.target,a.ctrlKey?+c.datepicker._get(d,"stepBigMonths"):+c.datepicker._get(d,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&c.datepicker._clearDate(a.target);b=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&c.datepicker._gotoToday(a.target);b=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&c.datepicker._adjustDate(a.target,e?1:-1,"D");b=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&c.datepicker._adjustDate(a.target,a.ctrlKey?
-c.datepicker._get(d,"stepBigMonths"):-c.datepicker._get(d,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&c.datepicker._adjustDate(a.target,-7,"D");b=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&c.datepicker._adjustDate(a.target,e?-1:1,"D");b=a.ctrlKey||a.metaKey;a.originalEvent.altKey&&c.datepicker._adjustDate(a.target,a.ctrlKey?+c.datepicker._get(d,"stepBigMonths"):+c.datepicker._get(d,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&c.datepicker._adjustDate(a.target,
7,"D");b=a.ctrlKey||a.metaKey;break;default:b=!1}else 36===a.keyCode&&a.ctrlKey?c.datepicker._showDatepicker(this):b=!1;b&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b,d;b=c.datepicker._getInst(a.target);if(c.datepicker._get(b,"constrainInput"))return b=c.datepicker._possibleChars(c.datepicker._get(b,"dateFormat")),d=String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),a.ctrlKey||a.metaKey||" ">d||!b||-1<b.indexOf(d)},_doKeyUp:function(a){var b;a=c.datepicker._getInst(a.target);
if(a.input.val()!==a.lastVal)try{if(b=c.datepicker.parseDate(c.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,c.datepicker._getFormatConfig(a)))c.datepicker._setDateFromField(a),c.datepicker._updateAlternate(a),c.datepicker._updateDatepicker(a)}catch(d){}return!0},_showDatepicker:function(a){a=a.target||a;"input"!==a.nodeName.toLowerCase()&&(a=c("input",a.parentNode)[0]);if(!c.datepicker._isDisabledDatepicker(a)&&c.datepicker._lastInput!==a){var b,d,e,f;b=c.datepicker._getInst(a);c.datepicker._curInst&&
c.datepicker._curInst!==b&&(c.datepicker._curInst.dpDiv.stop(!0,!0),b&&c.datepicker._datepickerShowing&&c.datepicker._hideDatepicker(c.datepicker._curInst.input[0]));d=(d=c.datepicker._get(b,"beforeShow"))?d.apply(a,[a,b]):{};if(!1!==d&&(s(b.settings,d),b.lastVal=null,c.datepicker._lastInput=a,c.datepicker._setDateFromField(b),c.datepicker._inDialog&&(a.value=""),c.datepicker._pos||(c.datepicker._pos=c.datepicker._findPos(a),c.datepicker._pos[1]+=a.offsetHeight),e=!1,c(a).parents().each(function(){e|=
"fixed"===c(this).css("position");return!e}),d={left:c.datepicker._pos[0],top:c.datepicker._pos[1]},c.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),c.datepicker._updateDatepicker(b),d=c.datepicker._checkOffset(b,d,e),b.dpDiv.css({position:c.datepicker._inDialog&&c.blockUI?"static":e?"fixed":"absolute",display:"none",left:d.left+"px",top:d.top+"px"}),!b.inline)){d=c.datepicker._get(b,"showAnim");f=c.datepicker._get(b,"duration");b.dpDiv.css("z-index",
m(c(a))+1);c.datepicker._datepickerShowing=!0;if(c.effects&&c.effects.effect[d])b.dpDiv.show(d,c.datepicker._get(b,"showOptions"),f);else b.dpDiv[d||"show"](d?f:null);c.datepicker._shouldFocusInput(b)&&b.input.focus();c.datepicker._curInst=b}}},_updateDatepicker:function(a){this.maxRows=4;w=a;a.dpDiv.empty().append(this._generateHTML(a));this._attachHandlers(a);var b,d=this._getNumberOfMonths(a),e=d[1],f=a.dpDiv.find("."+this._dayOverClass+" a");0<f.length&&r.apply(f.get(0));a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
1<e&&a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em");a.dpDiv[(1!==d[0]||1!==d[1]?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a===c.datepicker._curInst&&c.datepicker._datepickerShowing&&c.datepicker._shouldFocusInput(a)&&a.input.focus();a.yearshtml&&(b=a.yearshtml,setTimeout(function(){b===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);b=a.yearshtml=
null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(a,b,d){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),p=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(d?0:c(document).scrollLeft()),k=document.documentElement.clientHeight+(d?0:c(document).scrollTop());b.left-=this._get(a,"isRTL")?e-p:0;b.left-=d&&b.left===a.input.offset().left?c(document).scrollLeft():
0;b.top-=d&&b.top===a.input.offset().top+g?c(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>h&&h>e?Math.abs(b.left+e-h):0);b.top-=Math.min(b.top,b.top+f>k&&k>f?Math.abs(f+g):0);return b},_findPos:function(a){for(var b=this._getInst(a),b=this._get(b,"isRTL");a&&("hidden"===a.type||1!==a.nodeType||c.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=c(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b,d,e=this._curInst;if(e&&(!a||e===c.data(a,"datepicker"))&&
this._datepickerShowing){a=this._get(e,"showAnim");b=this._get(e,"duration");d=function(){c.datepicker._tidyDialog(e)};if(c.effects&&(c.effects.effect[a]||c.effects[a]))e.dpDiv.hide(a,c.datepicker._get(e,"showOptions"),b,d);else e.dpDiv["slideDown"===a?"slideUp":"fadeIn"===a?"fadeOut":"hide"](a?b:null,d);a||d();this._datepickerShowing=!1;(a=this._get(e,"onClose"))&&a.apply(e.input?e.input[0]:null,[e.input?e.input.val():"",e]);this._lastInput=null;this._inDialog&&(this._dialogInput.css({position:"absolute",
left:"0",top:"-100px"}),c.blockUI&&(c.unblockUI(),c("body").append(this.dpDiv)));this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(c.datepicker._curInst){a=c(a.target);var b=c.datepicker._getInst(a[0]);(!(a[0].id===c.datepicker._mainDivId||0!==a.parents("#"+c.datepicker._mainDivId).length||a.hasClass(c.datepicker.markerClassName)||a.closest("."+c.datepicker._triggerClass).length||!c.datepicker._datepickerShowing||
c.datepicker._inDialog&&c.blockUI)||a.hasClass(c.datepicker.markerClassName)&&c.datepicker._curInst!==b)&&c.datepicker._hideDatepicker()}},_adjustDate:function(a,b,d){a=c(a);var e=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(e,b+("M"===d?this._get(e,"showCurrentAtPos"):0),d),this._updateDatepicker(e))},_gotoToday:function(a){var b=c(a),d=this._getInst(b[0]);this._get(d,"gotoCurrent")&&d.currentDay?(d.selectedDay=d.currentDay,d.drawMonth=d.selectedMonth=d.currentMonth,
d.drawYear=d.selectedYear=d.currentYear):(a=new Date,d.selectedDay=a.getDate(),d.drawMonth=d.selectedMonth=a.getMonth(),d.drawYear=d.selectedYear=a.getFullYear());this._notifyChange(d);this._adjustDate(b)},_selectMonthYear:function(a,b,d){a=c(a);var e=this._getInst(a[0]);e["selected"+("M"===d?"Month":"Year")]=e["draw"+("M"===d?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,d,e){var f;f=c(a);c(e).hasClass(this._unselectableClass)||
this._isDisabledDatepicker(f[0])||(f=this._getInst(f[0]),f.selectedDay=f.currentDay=c("a",e).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=d,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(a){a=c(a);this._selectDate(a,"")},_selectDate:function(a,b){var d;d=c(a);var e=this._getInst(d[0]);b=null!=b?b:this._formatDate(e);e.input&&e.input.val(b);this._updateAlternate(e);(d=this._get(e,"onSelect"))?d.apply(e.input?e.input[0]:
null,[b,e]):e.input&&e.input.trigger("change");e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!==typeof e.input[0]&&e.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b,d,e,f=this._get(a,"altField");f&&(b=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(b,d,this._getFormatConfig(a)),c(f).each(function(){c(this).val(e)}))},noWeekends:function(a){a=a.getDay();return[0<a&&6>a,""]},iso8601Week:function(a){var b=
new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));a=b.getTime();b.setMonth(0);b.setDate(1);return Math.floor(Math.round((a-b)/864E5)/7)+1},parseDate:function(a,b,d){if(null==a||null==b)throw"Invalid arguments";b="object"===typeof b?b.toString():b+"";if(""===b)return null;var e,f,p,g=0;f=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff;f="string"!==typeof f?f:(new Date).getFullYear()%100+parseInt(f,10);p=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort;var h=(d?d.dayNames:
null)||this._defaults.dayNames,k=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,m=(d?d.monthNames:null)||this._defaults.monthNames,x=d=-1,v=-1,w=-1,s=!1,n,r=function(b){(b=e+1<a.length&&a.charAt(e+1)===b)&&e++;return b},q=function(a){var c=r(a),c="@"===a?14:"!"===a?20:"y"===a&&c?4:"o"===a?3:2;a=new RegExp("^\\d{"+("y"===a?c:1)+","+c+"}");a=b.substring(g).match(a);if(!a)throw"Missing number at position "+g;g+=a[0].length;return parseInt(a[0],10)},u=function(a,d,e){var f=-1;a=c.map(r(a)?
e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});c.each(a,function(a,c){var d=c[1];if(b.substr(g,d.length).toLowerCase()===d.toLowerCase())return f=c[0],g+=d.length,!1});if(-1!==f)return f+1;throw"Unknown name at position "+g;},H=function(){if(b.charAt(g)!==a.charAt(e))throw"Unexpected literal at position "+g;g++};for(e=0;e<a.length;e++)if(s)"'"!==a.charAt(e)||r("'")?H():s=!1;else switch(a.charAt(e)){case "d":v=q("d");break;case "D":u("D",p,h);break;case "o":w=
q("o");break;case "m":x=q("m");break;case "M":x=u("M",k,m);break;case "y":d=q("y");break;case "@":n=new Date(q("@"));d=n.getFullYear();x=n.getMonth()+1;v=n.getDate();break;case "!":n=new Date((q("!")-this._ticksTo1970)/1E4);d=n.getFullYear();x=n.getMonth()+1;v=n.getDate();break;case "'":r("'")?H():s=!0;break;default:H()}if(g<b.length&&(p=b.substr(g),!/^\s+/.test(p)))throw"Extra/unparsed characters found in date: "+p;-1===d?d=(new Date).getFullYear():100>d&&(d+=(new Date).getFullYear()-(new Date).getFullYear()%
100+(d<=f?0:-100));if(-1<w){x=1;v=w;do{f=this._getDaysInMonth(d,x-1);if(v<=f)break;x++;v-=f}while(1)}n=this._daylightSavingAdjust(new Date(d,x-1,v));if(n.getFullYear()!==d||n.getMonth()+1!==x||n.getDate()!==v)throw"Invalid date";return n},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864E9*(718685+Math.floor(492.5)-Math.floor(19.7)+
Math.floor(4.925)),formatDate:function(a,b,c){if(!b)return"";var e,f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,g=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var k=function(b){(b=e+1<a.length&&a.charAt(e+1)===b)&&e++;return b},m=function(a,b,c){b=""+b;if(k(a))for(;b.length<c;)b="0"+b;return b},A=function(a,b,c,d){return k(a)?d[b]:c[b]},x="",v=!1;if(b)for(e=0;e<a.length;e++)if(v)"'"!==
a.charAt(e)||k("'")?x+=a.charAt(e):v=!1;else switch(a.charAt(e)){case "d":x+=m("d",b.getDate(),2);break;case "D":x+=A("D",b.getDay(),f,g);break;case "o":x+=m("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":x+=m("m",b.getMonth()+1,2);break;case "M":x+=A("M",b.getMonth(),h,c);break;case "y":x+=k("y")?b.getFullYear():(10>b.getYear()%100?"0":"")+b.getYear()%100;break;case "@":x+=b.getTime();break;case "!":x+=
1E4*b.getTime()+this._ticksTo1970;break;case "'":k("'")?x+="'":v=!0;break;default:x+=a.charAt(e)}return x},_possibleChars:function(a){var b,c="",e=!1,f=function(c){(c=b+1<a.length&&a.charAt(b+1)===c)&&b++;return c};for(b=0;b<a.length;b++)if(e)"'"!==a.charAt(b)||f("'")?c+=a.charAt(b):e=!1;else switch(a.charAt(b)){case "d":case "m":case "y":case "@":c+="0123456789";break;case "D":case "M":return null;case "'":f("'")?c+="'":e=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,b){return void 0!==
a.settings[b]?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f=this._getDefaultDate(a),g=f,h=this._getFormatConfig(a);try{g=this.parseDate(c,e,h)||f}catch(k){e=b?"":e}a.selectedDay=g.getDate();a.drawMonth=a.selectedMonth=g.getMonth();a.drawYear=a.selectedYear=g.getFullYear();a.currentDay=e?g.getDate():0;a.currentMonth=e?g.getMonth():0;a.currentYear=e?g.getFullYear():0;this._adjustInstDate(a)}},
_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,d){var e=function(a){var b=new Date;b.setDate(b.getDate()+a);return b},f=function(b){try{return c.datepicker.parseDate(c.datepicker._get(a,"dateFormat"),b,c.datepicker._getFormatConfig(a))}catch(d){}for(var e=(b.toLowerCase().match(/^c/)?c.datepicker._getDate(a):null)||new Date,f=e.getFullYear(),g=e.getMonth(),e=e.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
k=h.exec(b);k;){switch(k[2]||"d"){case "d":case "D":e+=parseInt(k[1],10);break;case "w":case "W":e+=7*parseInt(k[1],10);break;case "m":case "M":g+=parseInt(k[1],10);e=Math.min(e,c.datepicker._getDaysInMonth(f,g));break;case "y":case "Y":f+=parseInt(k[1],10),e=Math.min(e,c.datepicker._getDaysInMonth(f,g))}k=h.exec(b)}return new Date(f,g,e)};if(b=(b=null==b||""===b?d:"string"===typeof b?f(b):"number"===typeof b?isNaN(b)?d:e(b):new Date(b.getTime()))&&"Invalid Date"===b.toString()?d:b)b.setHours(0),
b.setMinutes(0),b.setSeconds(0),b.setMilliseconds(0);return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(12<a.getHours()?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,g=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();f===a.selectedMonth&&g===
a.selectedYear||c||this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),d="#"+a.id.replace(/\\\\/g,"\\");a.dpDiv.find("[data-handler]").map(function(){c(this).bind(this.getAttribute("data-event"),{prev:function(){c.datepicker._adjustDate(d,-b,
"M")},next:function(){c.datepicker._adjustDate(d,+b,"M")},hide:function(){c.datepicker._hideDatepicker()},today:function(){c.datepicker._gotoToday(d)},selectDay:function(){c.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return!1},selectMonth:function(){c.datepicker._selectMonthYear(d,this,"M");return!1},selectYear:function(){c.datepicker._selectMonthYear(d,this,"Y");return!1}}[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,
e,f,g,h,k,m,A,x,v,w,s,n,r,q,u,H,I,E,V,K,Q,da,ea,t,B,Y=new Date,Y=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),ha=this._get(a,"isRTL");h=this._get(a,"showButtonPanel");e=this._get(a,"hideIfNoPrevNext");g=this._get(a,"navigationAsDateFormat");var L=this._getNumberOfMonths(a),D=this._get(a,"showCurrentAtPos");f=this._get(a,"stepMonths");var l=1!==L[0]||1!==L[1],F=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,
9,9)),y=this._getMinMaxDate(a,"min"),C=this._getMinMaxDate(a,"max"),D=a.drawMonth-D,M=a.drawYear;0>D&&(D+=12,M--);if(C)for(b=this._daylightSavingAdjust(new Date(C.getFullYear(),C.getMonth()-L[0]*L[1]+1,C.getDate())),b=y&&b<y?y:b;this._daylightSavingAdjust(new Date(M,D,1))>b;)D--,0>D&&(D=11,M--);a.drawMonth=D;a.drawYear=M;b=this._get(a,"prevText");b=g?this.formatDate(b,this._daylightSavingAdjust(new Date(M,D-f,1)),this._getFormatConfig(a)):b;b=this._canAdjustMonth(a,-1,M,D)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+
b+"'><span class='ui-icon ui-icon-circle-triangle-"+(ha?"e":"w")+"'>"+b+"</span></a>":e?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+b+"'><span class='ui-icon ui-icon-circle-triangle-"+(ha?"e":"w")+"'>"+b+"</span></a>";c=this._get(a,"nextText");c=g?this.formatDate(c,this._daylightSavingAdjust(new Date(M,D+f,1)),this._getFormatConfig(a)):c;e=this._canAdjustMonth(a,1,M,D)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+
(ha?"w":"e")+"'>"+c+"</span></a>":e?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(ha?"w":"e")+"'>"+c+"</span></a>";f=this._get(a,"currentText");c=this._get(a,"gotoCurrent")&&a.currentDay?F:Y;f=g?this.formatDate(f,c,this._getFormatConfig(a)):f;g=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+
"</button>";h=h?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(ha?g:"")+(this._isInRange(a,c)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+f+"</button>":"")+(ha?"":g)+"</div>":"";g=parseInt(this._get(a,"firstDay"),10);g=isNaN(g)?0:g;f=this._get(a,"showWeek");c=this._get(a,"dayNames");k=this._get(a,"dayNamesMin");m=this._get(a,"monthNames");A=this._get(a,"monthNamesShort");x=this._get(a,
"beforeShowDay");v=this._get(a,"showOtherMonths");w=this._get(a,"selectOtherMonths");s=this._getDefaultDate(a);n="";r;for(q=0;q<L[0];q++){u="";this.maxRows=4;for(H=0;H<L[1];H++){I=this._daylightSavingAdjust(new Date(M,D,a.selectedDay));r=" ui-corner-all";E="";if(l){E+="<div class='ui-datepicker-group";if(1<L[1])switch(H){case 0:E+=" ui-datepicker-group-first";r=" ui-corner-"+(ha?"right":"left");break;case L[1]-1:E+=" ui-datepicker-group-last";r=" ui-corner-"+(ha?"left":"right");break;default:E+=" ui-datepicker-group-middle",
r=""}E+="'>"}E+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+r+"'>"+(/all|left/.test(r)&&0===q?ha?e:b:"")+(/all|right/.test(r)&&0===q?ha?b:e:"")+this._generateMonthYearHeader(a,D,M,y,C,0<q||0<H,m,A)+"</div><table class='ui-datepicker-calendar'><thead><tr>";V=f?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"";for(r=0;7>r;r++)K=(r+g)%7,V+="<th scope='col'"+(5<=(r+g+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+c[K]+"'>"+k[K]+"</span></th>";
E+=V+"</tr></thead><tbody>";V=this._getDaysInMonth(M,D);M===a.selectedYear&&D===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,V));r=(this._getFirstDayOfMonth(M,D)-g+7)%7;V=Math.ceil((r+V)/7);this.maxRows=V=l?this.maxRows>V?this.maxRows:V:V;K=this._daylightSavingAdjust(new Date(M,D,1-r));for(Q=0;Q<V;Q++){E+="<tr>";da=f?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(K)+"</td>":"";for(r=0;7>r;r++)ea=x?x.apply(a.input?a.input[0]:null,[K]):[!0,""],B=(t=K.getMonth()!==D)&&!w||
!ea[0]||y&&K<y||C&&K>C,da+="<td class='"+(5<=(r+g+6)%7?" ui-datepicker-week-end":"")+(t?" ui-datepicker-other-month":"")+(K.getTime()===I.getTime()&&D===a.selectedMonth&&a._keyEvent||s.getTime()===K.getTime()&&s.getTime()===I.getTime()?" "+this._dayOverClass:"")+(B?" "+this._unselectableClass+" ui-state-disabled":"")+(t&&!v?"":" "+ea[1]+(K.getTime()===F.getTime()?" "+this._currentClass:"")+(K.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(t&&!v||!ea[2]?"":" title='"+ea[2].replace(/'/g,"&#39;")+
"'")+(B?"":" data-handler='selectDay' data-event='click' data-month='"+K.getMonth()+"' data-year='"+K.getFullYear()+"'")+">"+(t&&!v?"&#xa0;":B?"<span class='ui-state-default'>"+K.getDate()+"</span>":"<a class='ui-state-default"+(K.getTime()===Y.getTime()?" ui-state-highlight":"")+(K.getTime()===F.getTime()?" ui-state-active":"")+(t?" ui-priority-secondary":"")+"' href='#'>"+K.getDate()+"</a>")+"</td>",K.setDate(K.getDate()+1),K=this._daylightSavingAdjust(K);E+=da+"</tr>"}D++;11<D&&(D=0,M++);E+="</tbody></table>"+
(l?"</div>"+(0<L[0]&&H===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"");u+=E}n+=u}a._keyEvent=!1;return n+h},_generateMonthYearHeader:function(a,b,c,e,f,g,h,k){var m,A,x,v=this._get(a,"changeMonth"),w=this._get(a,"changeYear"),r=this._get(a,"showMonthAfterYear"),n="<div class='ui-datepicker-title'>",s="";if(g||!v)s+="<span class='ui-datepicker-month'>"+h[b]+"</span>";else{h=e&&e.getFullYear()===c;m=f&&f.getFullYear()===c;s+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
for(A=0;12>A;A++)(!h||A>=e.getMonth())&&(!m||A<=f.getMonth())&&(s+="<option value='"+A+"'"+(A===b?" selected='selected'":"")+">"+k[A]+"</option>");s+="</select>"}r||(n+=s+(!g&&v&&w?"":"&#xa0;"));if(!a.yearshtml)if(a.yearshtml="",g||!w)n+="<span class='ui-datepicker-year'>"+c+"</span>";else{k=this._get(a,"yearRange").split(":");x=(new Date).getFullYear();h=function(a){a=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?x+parseInt(a,10):parseInt(a,10);return isNaN(a)?x:a};b=h(k[0]);
k=Math.max(b,h(k[1]||""));b=e?Math.max(b,e.getFullYear()):b;k=f?Math.min(k,f.getFullYear()):k;for(a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";b<=k;b++)a.yearshtml+="<option value='"+b+"'"+(b===c?" selected='selected'":"")+">"+b+"</option>";a.yearshtml+="</select>";n+=a.yearshtml;a.yearshtml=null}n+=this._get(a,"yearSuffix");r&&(n+=(!g&&v&&w?"":"&#xa0;")+s);return n+"</div>"},_adjustInstDate:function(a,b,c){var e=a.drawYear+("Y"===c?b:0),f=a.drawMonth+
("M"===c?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+("D"===c?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max"),c=c&&b<c?c:b;return e&&c>e?e:c},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?
a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"===typeof a?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,
e+(0>b?b:f[0]*f[1]),1));0>b&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c,e,f=this._getMinMaxDate(a,"min"),g=this._getMinMaxDate(a,"max"),h=null,k=null;if(c=this._get(a,"yearRange"))c=c.split(":"),e=(new Date).getFullYear(),h=parseInt(c[0],10),k=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(h+=e),c[1].match(/[+\-].*/)&&(k+=e);return(!f||b.getTime()>=f.getTime())&&(!g||b.getTime()<=g.getTime())&&(!h||b.getFullYear()>=h)&&(!k||
b.getFullYear()<=k)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff"),b="string"!==typeof b?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);b=b?"object"===typeof b?b:this._daylightSavingAdjust(new Date(e,
c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});c.fn.datepicker=function(a){if(!this.length)return this;c.datepicker.initialized||(c(document).mousedown(c.datepicker._checkExternalClick),c.datepicker.initialized=!0);0===c("#"+c.datepicker._mainDivId).length&&c("body").append(c.datepicker.dpDiv);var b=Array.prototype.slice.call(arguments,1);return"string"===typeof a&&("isDisabled"===
a||"getDate"===a||"widget"===a)||"option"===a&&2===arguments.length&&"string"===typeof arguments[1]?c.datepicker["_"+a+"Datepicker"].apply(c.datepicker,[this[0]].concat(b)):this.each(function(){"string"===typeof a?c.datepicker["_"+a+"Datepicker"].apply(c.datepicker,[this].concat(b)):c.datepicker._attachDatepicker(this,a)})};c.datepicker=new k;c.datepicker.initialized=!1;c.datepicker.uuid=(new Date).getTime();c.datepicker.version="1.11.4";c.widget("ui.draggable",c.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",
options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative();this.options.addClasses&&this.element.addClass("ui-draggable");
this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(a){var b=
this.options;this._blurActiveElement(a);if(this.helper||b.disabled||0<c(a.target).closest(".ui-resizable-handle").length)return!1;this.handle=this._getHandle(a);if(!this.handle)return!1;this._blockFrames(!0===b.iframeFix?"iframe":b.iframeFix);return!0},_blockFrames:function(a){this.iframeBlocks=this.document.find(a).map(function(){var a=c(this);return c("<div>").css("position","absolute").appendTo(a.parent()).outerWidth(a.outerWidth()).outerHeight(a.outerHeight()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&
(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(a){var b=this.document[0];if(this.handleElement.is(a.target))try{b.activeElement&&"body"!==b.activeElement.nodeName.toLowerCase()&&c(b.activeElement).blur()}catch(d){}},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();c.ui.ddmanager&&(c.ui.ddmanager.current=this);this._cacheMargins();this.cssPosition=this.helper.css("position");
this.scrollParent=this.helper.scrollParent(!0);this.offsetParent=this.helper.offsetParent();this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===c(this).css("position")}).length;this.positionAbs=this.element.offset();this._refreshOffsets(a);this.originalPosition=this.position=this._generatePosition(a,!1);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this._setContainment();if(!1===this._trigger("start",a))return this._clear(),
!1;this._cacheHelperProportions();c.ui.ddmanager&&!b.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,a);this._normalizeRightBottom();this._mouseDrag(a,!0);c.ui.ddmanager&&c.ui.ddmanager.dragStart(this,a);return!0},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(a,
b){this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset());this.position=this._generatePosition(a,!0);this.positionAbs=this._convertPositionTo("absolute");if(!b){var d=this._uiHash();if(!1===this._trigger("drag",a,d))return this._mouseUp({}),!1;this.position=d.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";c.ui.ddmanager&&c.ui.ddmanager.drag(this,a);return!1},_mouseStop:function(a){var b=this,d=!1;c.ui.ddmanager&&!this.options.dropBehaviour&&
(d=c.ui.ddmanager.drop(this,a));this.dropped&&(d=this.dropped,this.dropped=!1);"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||!0===this.options.revert||c.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?c(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==b._trigger("stop",a)&&b._clear()}):!1!==this._trigger("stop",a)&&this._clear();return!1},_mouseUp:function(a){this._unblockFrames();c.ui.ddmanager&&
c.ui.ddmanager.dragStop(this,a);this.handleElement.is(a.target)&&this.element.focus();return c.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){return this.options.handle?!!c(a.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this.handleElement.addClass("ui-draggable-handle")},
_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(a){var b=this.options,d=c.isFunction(b.helper);a=d?c(b.helper.apply(this.element[0],[a])):"clone"===b.helper?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo("parent"===b.appendTo?this.element[0].parentNode:b.appendTo);d&&a[0]===this.element[0]&&this._setPositionRelative();a[0]===this.element[0]||/(fixed|absolute)/.test(a.css("position"))||a.css("position",
"absolute");return a},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(a){"string"===typeof a&&(a=a.split(" "));c.isArray(a)&&(a={left:+a[0],top:+a[1]||0});"left"in a&&(this.offset.click.left=a.left+this.margins.left);"right"in a&&(this.offset.click.left=this.helperProportions.width-a.right+this.margins.left);"top"in a&&(this.offset.click.top=a.top+this.margins.top);"bottom"in a&&(this.offset.click.top=
this.helperProportions.height-a.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var a=this.offsetParent.offset(),b=this.document[0];"absolute"===this.cssPosition&&this.scrollParent[0]!==b&&c.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());this._isRootNode(this.offsetParent[0])&&(a={top:0,left:0});return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),
10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),
10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a,b,d;a=this.options;b=this.document[0];this.relativeContainer=null;if(a.containment)if("window"===a.containment)this.containment=[c(window).scrollLeft()-this.offset.relative.left-
this.offset.parent.left,c(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,c(window).scrollLeft()+c(window).width()-this.helperProportions.width-this.margins.left,c(window).scrollTop()+(c(window).height()||b.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];else if("document"===a.containment)this.containment=[0,0,c(b).width()-this.helperProportions.width-this.margins.left,(c(b).height()||b.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];
else if(a.containment.constructor===Array)this.containment=a.containment;else{if("parent"===a.containment&&(a.containment=this.helper[0].parentNode),b=c(a.containment),d=b[0])a=/(scroll|auto)/.test(b.css("overflow")),this.containment=[(parseInt(b.css("borderLeftWidth"),10)||0)+(parseInt(b.css("paddingLeft"),10)||0),(parseInt(b.css("borderTopWidth"),10)||0)+(parseInt(b.css("paddingTop"),10)||0),(a?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(b.css("borderRightWidth"),10)||0)-(parseInt(b.css("paddingRight"),
10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(a?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(b.css("borderBottomWidth"),10)||0)-(parseInt(b.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=b}else this.containment=null},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,e=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*
c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:e?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:e?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]);f=a.pageX;e=a.pageY;h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()});b&&(this.containment&&
(this.relativeContainer?(c=this.relativeContainer.offset(),c=[this.containment[0]+c.left,this.containment[1]+c.top,this.containment[2]+c.left,this.containment[3]+c.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(f=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(e=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(f=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(e=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+
Math.round((e-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,e=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,f=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(f=this.originalPageX),"x"===g.axis&&(e=this.originalPageY));
return{top:e-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=
!1;this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto"));"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(a,b,d){d=d||this._uiHash();c.ui.plugin.call(this,a,[b,d,this],!0);/^(drag|start|stop)/.test(a)&&(this.positionAbs=this._convertPositionTo("absolute"),
d.offset=this.positionAbs);return c.Widget.prototype._trigger.call(this,a,b,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});c.ui.plugin.add("draggable","connectToSortable",{start:function(a,b,d){var e=c.extend({},b,{item:d.element});d.sortables=[];c(d.options.connectToSortable).each(function(){var b=c(this).sortable("instance");b&&!b.options.disabled&&(d.sortables.push(b),b.refreshPositions(),b._trigger("activate",
a,e))})},stop:function(a,b,d){var e=c.extend({},b,{item:d.element});d.cancelHelperRemoval=!1;c.each(d.sortables,function(){this.isOver?(this.isOver=0,d.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(a),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",a,e))})},drag:function(a,b,d){c.each(d.sortables,function(){var e=
!1,f=this;f.positionAbs=d.positionAbs;f.helperProportions=d.helperProportions;f.offset.click=d.offset.click;f._intersectsWith(f.containerCache)&&(e=!0,c.each(d.sortables,function(){this.positionAbs=d.positionAbs;this.helperProportions=d.helperProportions;this.offset.click=d.offset.click;this!==f&&this._intersectsWith(this.containerCache)&&c.contains(f.element[0],this.element[0])&&(e=!1);return e}));e?(f.isOver||(f.isOver=1,d._parent=b.helper.parent(),f.currentItem=b.helper.appendTo(f.element).data("ui-sortable-item",
!0),f.options._helper=f.options.helper,f.options.helper=function(){return b.helper[0]},a.target=f.currentItem[0],f._mouseCapture(a,!0),f._mouseStart(a,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",a),d.dropped=f.element,c.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=
d),f.currentItem&&(f._mouseDrag(a),b.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",a,f._uiHash(f)),f._mouseStop(a,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),b.helper.appendTo(d._parent),d._refreshOffsets(a),b.position=d._generatePosition(a,!0),d._trigger("fromSortable",a),d.dropped=!1,c.each(d.sortables,function(){this.refreshPositions()}))})}});
c.ui.plugin.add("draggable","cursor",{start:function(a,b,d){a=c("body");d=d.options;a.css("cursor")&&(d._cursor=a.css("cursor"));a.css("cursor",d.cursor)},stop:function(a,b,d){a=d.options;a._cursor&&c("body").css("cursor",a._cursor)}});c.ui.plugin.add("draggable","opacity",{start:function(a,b,d){a=c(b.helper);d=d.options;a.css("opacity")&&(d._opacity=a.css("opacity"));a.css("opacity",d.opacity)},stop:function(a,b,d){a=d.options;a._opacity&&c(b.helper).css("opacity",a._opacity)}});c.ui.plugin.add("draggable",
"scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1));c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(a,b,d){b=d.options;var e=!1,f=d.scrollParentNotHidden[0],g=d.document[0];f!==g&&"HTML"!==f.tagName?(b.axis&&"x"===b.axis||(d.overflowOffset.top+f.offsetHeight-a.pageY<b.scrollSensitivity?f.scrollTop=e=f.scrollTop+b.scrollSpeed:a.pageY-d.overflowOffset.top<
b.scrollSensitivity&&(f.scrollTop=e=f.scrollTop-b.scrollSpeed)),b.axis&&"y"===b.axis||(d.overflowOffset.left+f.offsetWidth-a.pageX<b.scrollSensitivity?f.scrollLeft=e=f.scrollLeft+b.scrollSpeed:a.pageX-d.overflowOffset.left<b.scrollSensitivity&&(f.scrollLeft=e=f.scrollLeft-b.scrollSpeed))):(b.axis&&"x"===b.axis||(a.pageY-c(g).scrollTop()<b.scrollSensitivity?e=c(g).scrollTop(c(g).scrollTop()-b.scrollSpeed):c(window).height()-(a.pageY-c(g).scrollTop())<b.scrollSensitivity&&(e=c(g).scrollTop(c(g).scrollTop()+
b.scrollSpeed))),b.axis&&"y"===b.axis||(a.pageX-c(g).scrollLeft()<b.scrollSensitivity?e=c(g).scrollLeft(c(g).scrollLeft()-b.scrollSpeed):c(window).width()-(a.pageX-c(g).scrollLeft())<b.scrollSensitivity&&(e=c(g).scrollLeft(c(g).scrollLeft()+b.scrollSpeed))));!1!==e&&c.ui.ddmanager&&!b.dropBehaviour&&c.ui.ddmanager.prepareOffsets(d,a)}});c.ui.plugin.add("draggable","snap",{start:function(a,b,d){a=d.options;d.snapElements=[];c(a.snap.constructor!==String?a.snap.items||":data(ui-draggable)":a.snap).each(function(){var a=
c(this),b=a.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:a.outerWidth(),height:a.outerHeight(),top:b.top,left:b.left})})},drag:function(a,b,d){var e,f,g,h,k,m,A,x,v,w,s=d.options,n=s.snapTolerance,r=b.offset.left,q=r+d.helperProportions.width,D=b.offset.top,H=D+d.helperProportions.height;for(v=d.snapElements.length-1;0<=v;v--)k=d.snapElements[v].left-d.margins.left,m=k+d.snapElements[v].width,A=d.snapElements[v].top-d.margins.top,x=A+d.snapElements[v].height,q<k-n||r>m+n||H<
A-n||D>x+n||!c.contains(d.snapElements[v].item.ownerDocument,d.snapElements[v].item)?(d.snapElements[v].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,a,c.extend(d._uiHash(),{snapItem:d.snapElements[v].item})),d.snapElements[v].snapping=!1):("inner"!==s.snapMode&&(e=Math.abs(A-H)<=n,f=Math.abs(x-D)<=n,g=Math.abs(k-q)<=n,h=Math.abs(m-r)<=n,e&&(b.position.top=d._convertPositionTo("relative",{top:A-d.helperProportions.height,left:0}).top),f&&(b.position.top=d._convertPositionTo("relative",
{top:x,left:0}).top),g&&(b.position.left=d._convertPositionTo("relative",{top:0,left:k-d.helperProportions.width}).left),h&&(b.position.left=d._convertPositionTo("relative",{top:0,left:m}).left)),w=e||f||g||h,"outer"!==s.snapMode&&(e=Math.abs(A-D)<=n,f=Math.abs(x-H)<=n,g=Math.abs(k-r)<=n,h=Math.abs(m-q)<=n,e&&(b.position.top=d._convertPositionTo("relative",{top:A,left:0}).top),f&&(b.position.top=d._convertPositionTo("relative",{top:x-d.helperProportions.height,left:0}).top),g&&(b.position.left=d._convertPositionTo("relative",
{top:0,left:k}).left),h&&(b.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left)),!d.snapElements[v].snapping&&(e||f||g||h||w)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,a,c.extend(d._uiHash(),{snapItem:d.snapElements[v].item})),d.snapElements[v].snapping=e||f||g||h||w)}});c.ui.plugin.add("draggable","stack",{start:function(a,b,d){var e;a=c.makeArray(c(d.options.stack)).sort(function(a,b){return(parseInt(c(a).css("zIndex"),10)||0)-(parseInt(c(b).css("zIndex"),
10)||0)});a.length&&(e=parseInt(c(a[0]).css("zIndex"),10)||0,c(a).each(function(a){c(this).css("zIndex",e+a)}),this.css("zIndex",e+a.length))}});c.ui.plugin.add("draggable","zIndex",{start:function(a,b,d){a=c(b.helper);d=d.options;a.css("zIndex")&&(d._zIndex=a.css("zIndex"));a.css("zIndex",d.zIndex)},stop:function(a,b,d){a=d.options;a._zIndex&&c(b.helper).css("zIndex",a._zIndex)}});c.widget("ui.resizable",c.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",
animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(a,b){if("hidden"===c(a).css("overflow"))return!1;var d=b&&"left"===b?"scrollLeft":"scrollTop",e=!1;if(0<a[d])return!0;a[d]=1;e=0<a[d];a[d]=0;return e},_create:function(){var a,b,d,
e,f,g=this,h=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(c("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),
height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),
this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize());this.handles=h.handles||(c(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",
ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");this._handles=c();if(this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),a=this.handles.split(","),this.handles={},b=0;b<a.length;b++)d=c.trim(a[b]),f="ui-resizable-"+d,e=c("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(a){var b,
d,e;a=a||this.element;for(b in this.handles){if(this.handles[b].constructor===String)this.handles[b]=this.element.children(this.handles[b]).first().show();else if(this.handles[b].jquery||this.handles[b].nodeType)this.handles[b]=c(this.handles[b]),this._on(this.handles[b],{mousedown:g._mouseDown});this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=c(this.handles[b],this.element),e=/sw|ne|nw|se|n|s/.test(b)?d.outerHeight():d.outerWidth(),d=["padding",
/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join(""),a.css(d,e),this._proportionallyResize());this._handles=this._handles.add(this.handles[b])}};this._renderAxis(this.element);this._handles=this._handles.add(this.element.find(".ui-resizable-handle"));this._handles.disableSelection();this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")});h.autoHide&&(this._handles.hide(),
c(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(c(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(c(this).addClass("ui-resizable-autohide"),g._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var a,b=function(a){c(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
this.elementIsWrapper&&(b(this.element),a=this.element,this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")}).insertAfter(a),a.remove());this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(a){var b,d,e=!1;for(b in this.handles)if(d=c(this.handles[b])[0],d===a.target||c.contains(d,a.target))e=!0;return!this.options.disabled&&e},_mouseStart:function(a){var b,
d,e=this.options,f=this.element;this.resizing=!0;this._renderProxy();b=this._num(this.helper.css("left"));d=this._num(this.helper.css("top"));e.containment&&(b+=c(e.containment).scrollLeft()||0,d+=c(e.containment).scrollTop()||0);this.offset=this.helper.offset();this.position={left:b,top:d};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),
height:f.height()};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalPosition={left:b,top:d};this.originalMousePosition={left:a.pageX,top:a.pageY};this.aspectRatio="number"===typeof e.aspectRatio?e.aspectRatio:this.originalSize.width/this.originalSize.height||1;b=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor","auto"===b?this.axis+"-resize":b);f.addClass("ui-resizable-resizing");this._propagate("start",a);return!0},_mouseDrag:function(a){var b,
d=this.originalMousePosition;b=a.pageX-d.left||0;var d=a.pageY-d.top||0,e=this._change[this.axis];this._updatePrevProperties();if(!e)return!1;b=e.apply(this,[a,b,d]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)b=this._updateRatio(b,a);b=this._respectSize(b,a);this._updateCache(b);this._propagate("resize",a);b=this._applyChanges();!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();c.isEmptyObject(b)||(this._updatePrevProperties(),this._trigger("resize",
a,this.ui()),this._applyChanges());return!1},_mouseStop:function(a){this.resizing=!1;var b,d,e,f=this.options;this._helper&&(b=this._proportionallyResizeElements,b=(d=b.length&&/textarea/i.test(b[0].nodeName))&&this._hasScroll(b[0],"left")?0:this.sizeDiff.height,d=d?0:this.sizeDiff.width,d={width:this.helper.width()-d,height:this.helper.height()-b},b=parseInt(this.element.css("left"),10)+(this.position.left-this.originalPosition.left)||null,e=parseInt(this.element.css("top"),10)+(this.position.top-
this.originalPosition.top)||null,f.animate||this.element.css(c.extend(d,{top:e,left:b})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!f.animate&&this._proportionallyResize());c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",a);this._helper&&this.helper.remove();return!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,
height:this.size.height}},_applyChanges:function(){var a={};this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px");this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px");this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px");this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px");this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b,c,e,f;f=this.options;f={minWidth:this._isNumber(f.minWidth)?f.minWidth:0,
maxWidth:this._isNumber(f.maxWidth)?f.maxWidth:Infinity,minHeight:this._isNumber(f.minHeight)?f.minHeight:0,maxHeight:this._isNumber(f.maxHeight)?f.maxHeight:Infinity};if(this._aspectRatio||a)a=f.minHeight*this.aspectRatio,c=f.minWidth/this.aspectRatio,b=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,a>f.minWidth&&(f.minWidth=a),c>f.minHeight&&(f.minHeight=c),b<f.maxWidth&&(f.maxWidth=b),e<f.maxHeight&&(f.maxHeight=e);this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset();
this._isNumber(a.left)&&(this.position.left=a.left);this._isNumber(a.top)&&(this.position.top=a.top);this._isNumber(a.height)&&(this.size.height=a.height);this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,e=this.axis;this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio);"sw"===e&&(a.left=b.left+(c.width-a.width),a.top=null);"nw"===e&&(a.top=b.top+(c.height-a.height),a.left=
b.left+(c.width-a.width));return a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,e=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,g=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,h=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,k=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,A=/sw|nw|w/.test(c),c=/nw|ne|n/.test(c);g&&(a.width=b.minWidth);h&&(a.height=
b.minHeight);e&&(a.width=b.maxWidth);f&&(a.height=b.maxHeight);g&&A&&(a.left=k-b.minWidth);e&&A&&(a.left=k-b.maxWidth);h&&c&&(a.top=m-b.minHeight);f&&c&&(a.top=m-b.maxHeight);a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null;return a},_getPaddingPlusBorderDimensions:function(a){var b=0,c=[],e=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")];for(a=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),
a.css("paddingLeft")];4>b;b++)c[b]=parseInt(e[b],10)||0,c[b]+=parseInt(a[b],10)||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||
0})},_renderProxy:function(){var a=this.options;this.elementOffset=this.element.offset();this._helper?(this.helper=this.helper||c("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++a.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+
b}},w:function(a,b){return{left:this.originalPosition.left+b,width:this.originalSize.width-b}},n:function(a,b,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,b,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,d]))},sw:function(a,b,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,b,d]))},ne:function(a,b,d){return c.extend(this._change.n.apply(this,
arguments),this._change.e.apply(this,[a,b,d]))},nw:function(a,b,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,d]))}},_propagate:function(a,b){c.ui.plugin.call(this,a,[b,this.ui()]);"resize"!==a&&this._trigger(a,b,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.ui.plugin.add("resizable",
"animate",{stop:function(a){var b=c(this).resizable("instance"),d=b.options,e=b._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&b._hasScroll(e[0],"left")?0:b.sizeDiff.height,f={width:b.size.width-(f?0:b.sizeDiff.width),height:b.size.height-g},g=parseInt(b.element.css("left"),10)+(b.position.left-b.originalPosition.left)||null,h=parseInt(b.element.css("top"),10)+(b.position.top-b.originalPosition.top)||null;b.element.animate(c.extend(f,h&&g?{top:h,left:g}:{}),{duration:d.animateDuration,
easing:d.animateEasing,step:function(){var d={width:parseInt(b.element.css("width"),10),height:parseInt(b.element.css("height"),10),top:parseInt(b.element.css("top"),10),left:parseInt(b.element.css("left"),10)};e&&e.length&&c(e[0]).css({width:d.width,height:d.height});b._updateCache(d);b._propagate("resize",a)}})}});c.ui.plugin.add("resizable","containment",{start:function(){var a,b,d,e,f,g=c(this).resizable("instance"),h=g.element;d=g.options.containment;if(h=d instanceof c?d.get(0):/parent/.test(d)?
h.parent().get(0):d)g.containerElement=c(h),/document/.test(d)||d===document?(g.containerOffset={left:0,top:0},g.containerPosition={left:0,top:0},g.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}):(a=c(h),b=[],c(["Top","Right","Left","Bottom"]).each(function(c,d){b[c]=g._num(a.css("padding"+d))}),g.containerOffset=a.offset(),g.containerPosition=a.position(),g.containerSize={height:a.innerHeight()-b[3],width:a.innerWidth()-
b[1]},d=g.containerOffset,e=g.containerSize.height,f=g.containerSize.width,f=g._hasScroll(h,"left")?h.scrollWidth:f,e=g._hasScroll(h)?h.scrollHeight:e,g.parentData={element:h,left:d.left,top:d.top,width:f,height:e})},resize:function(a){var b,d,e,f=c(this).resizable("instance");b=f.options;d=f.containerOffset;e=f.position;a=f._aspectRatio||a.shiftKey;var g={top:0,left:0},h=f.containerElement,k=!0;h[0]!==document&&/static/.test(h.css("position"))&&(g=d);e.left<(f._helper?d.left:0)&&(f.size.width+=f._helper?
f.position.left-d.left:f.position.left-g.left,a&&(f.size.height=f.size.width/f.aspectRatio,k=!1),f.position.left=b.helper?d.left:0);e.top<(f._helper?d.top:0)&&(f.size.height+=f._helper?f.position.top-d.top:f.position.top,a&&(f.size.width=f.size.height*f.aspectRatio,k=!1),f.position.top=f._helper?d.top:0);b=f.containerElement.get(0)===f.element.parent().get(0);e=/relative|absolute/.test(f.containerElement.css("position"));b&&e?(f.offset.left=f.parentData.left+f.position.left,f.offset.top=f.parentData.top+
f.position.top):(f.offset.left=f.element.offset().left,f.offset.top=f.element.offset().top);b=Math.abs(f.sizeDiff.width+(f._helper?f.offset.left-g.left:f.offset.left-d.left));d=Math.abs(f.sizeDiff.height+(f._helper?f.offset.top-g.top:f.offset.top-d.top));b+f.size.width>=f.parentData.width&&(f.size.width=f.parentData.width-b,a&&(f.size.height=f.size.width/f.aspectRatio,k=!1));d+f.size.height>=f.parentData.height&&(f.size.height=f.parentData.height-d,a&&(f.size.width=f.size.height*f.aspectRatio,k=!1));
k||(f.position.left=f.prevPosition.left,f.position.top=f.prevPosition.top,f.size.width=f.prevSize.width,f.size.height=f.prevSize.height)},stop:function(){var a=c(this).resizable("instance"),b=a.options,d=a.containerOffset,e=a.containerPosition,f=a.containerElement,g=c(a.helper),h=g.offset(),k=g.outerWidth()-a.sizeDiff.width,g=g.outerHeight()-a.sizeDiff.height;a._helper&&!b.animate&&/relative/.test(f.css("position"))&&c(this).css({left:h.left-e.left-d.left,width:k,height:g});a._helper&&!b.animate&&
/static/.test(f.css("position"))&&c(this).css({left:h.left-e.left-d.left,width:k,height:g})}});c.ui.plugin.add("resizable","alsoResize",{start:function(){var a=c(this).resizable("instance").options;c(a.alsoResize).each(function(){var a=c(this);a.data("ui-resizable-alsoresize",{width:parseInt(a.width(),10),height:parseInt(a.height(),10),left:parseInt(a.css("left"),10),top:parseInt(a.css("top"),10)})})},resize:function(a,b){var d=c(this).resizable("instance"),e=d.originalSize,f=d.originalPosition,g=
{height:d.size.height-e.height||0,width:d.size.width-e.width||0,top:d.position.top-f.top||0,left:d.position.left-f.left||0};c(d.options.alsoResize).each(function(){var a=c(this),d=c(this).data("ui-resizable-alsoresize"),e={},f=a.parents(b.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(f,function(a,b){var c=(d[b]||0)+(g[b]||0);c&&0<=c&&(e[b]=c||null)});a.css(e)})},stop:function(){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","ghost",
{start:function(){var a=c(this).resizable("instance"),b=a.options,d=a.size;a.ghost=a.originalElement.clone();a.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"===typeof b.ghost?b.ghost:"");a.ghost.appendTo(a.helper)},resize:function(){var a=c(this).resizable("instance");a.ghost&&a.ghost.css({position:"relative",height:a.size.height,width:a.size.width})},stop:function(){var a=c(this).resizable("instance");
a.ghost&&a.helper&&a.helper.get(0).removeChild(a.ghost.get(0))}});c.ui.plugin.add("resizable","grid",{resize:function(){var a,b=c(this).resizable("instance"),d=b.options,e=b.size,f=b.originalSize,g=b.originalPosition,h=b.axis,k="number"===typeof d.grid?[d.grid,d.grid]:d.grid,m=k[0]||1,A=k[1]||1,x=Math.round((e.width-f.width)/m)*m,e=Math.round((e.height-f.height)/A)*A,v=f.width+x,w=f.height+e,s=d.maxWidth&&d.maxWidth<v,n=d.maxHeight&&d.maxHeight<w,r=d.minWidth&&d.minWidth>v,q=d.minHeight&&d.minHeight>
w;d.grid=k;r&&(v+=m);q&&(w+=A);s&&(v-=m);n&&(w-=A);if(/^(se|s|e)$/.test(h))b.size.width=v,b.size.height=w;else if(/^(ne)$/.test(h))b.size.width=v,b.size.height=w,b.position.top=g.top-e;else if(/^(sw)$/.test(h))b.size.width=v,b.size.height=w,b.position.left=g.left-x;else{if(0>=w-A||0>=v-m)a=b._getPaddingPlusBorderDimensions(this);0<w-A?(b.size.height=w,b.position.top=g.top-e):(w=A-a.height,b.size.height=w,b.position.top=g.top+f.height-w);0<v-m?(b.size.width=v,b.position.left=g.left-x):(v=m-a.width,
b.size.width=v,b.position.left=g.left+f.width-v)}}});c.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=c(this).css(a).offset().top;0>b&&c(this).css("top",a.top-b)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,
drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};
this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();this.options.draggable&&c.fn.draggable&&this._makeDraggable();this.options.resizable&&c.fn.resizable&&this._makeResizable();
this._isOpen=!1;this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var a=this.options.appendTo;return a&&(a.jquery||a.nodeType)?c(a):this.document.find(a||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance();this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",
this.originalTitle);a=b.parent.children().eq(b.index);a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:c.noop,enable:c.noop,close:function(a){var b,d=this;if(this._isOpen&&!1!==this._trigger("beforeClose",a)){this._isOpen=!1;this._focusedElement=null;this._destroyOverlay();this._untrackInstance();if(!this.opener.filter(":focusable").focus().length)try{(b=this.document[0].activeElement)&&"body"!==b.nodeName.toLowerCase()&&
c(b).blur()}catch(e){}this._hide(this.uiDialog,this.options.hide,function(){d._trigger("close",a)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,b){var d=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+c(this).css("z-index")}).get(),e=Math.max.apply(null,e);e>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",e+1),d=!0);d&&!b&&this._trigger("focus",a);return d},open:function(){var a=this;this._isOpen?this._moveToTop()&&
this._focusTabbable():(this._isOpen=!0,this.opener=c(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){a._focusTabbable();a._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]"));a.length||(a=this.element.find(":tabbable"));
a.length||(a=this.uiDialogButtonPane.find(":tabbable"));a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable"));a.length||(a=this.uiDialog);a.eq(0).focus()},_keepFocus:function(a){function b(){var a=this.document[0].activeElement;this.uiDialog[0]===a||c.contains(this.uiDialog[0],a)||this._focusTabbable()}a.preventDefault();b.call(this);this._delay(b)},_createWrapper:function(){this.uiDialog=c("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,
role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(a){if(this.options.closeOnEscape&&!a.isDefaultPrevented()&&a.keyCode&&a.keyCode===c.ui.keyCode.ESCAPE)a.preventDefault(),this.close(a);else if(a.keyCode===c.ui.keyCode.TAB&&!a.isDefaultPrevented()){var b=this.uiDialog.find(":tabbable"),d=b.filter(":first"),e=b.filter(":last");a.target!==e[0]&&a.target!==this.uiDialog[0]||a.shiftKey?a.target!==d[0]&&a.target!==this.uiDialog[0]||!a.shiftKey||(this._delay(function(){e.focus()}),
a.preventDefault()):(this._delay(function(){d.focus()}),a.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var a;this.uiDialogTitlebar=c("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(a){c(a.target).closest(".ui-dialog-titlebar-close")||
this.uiDialog.focus()}});this.uiDialogTitlebarClose=c("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault();this.close(a)}});a=c("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(a);this.uiDialog.attr({"aria-labelledby":a.attr("id")})},_title:function(a){this.options.title||
a.html("&#160;");a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=c("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=c("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var a=this,b=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();c.isEmptyObject(b)||c.isArray(b)&&!b.length?this.uiDialog.removeClass("ui-dialog-buttons"):
(c.each(b,function(b,e){var f,g;e=c.isFunction(e)?{click:e,text:b}:e;e=c.extend({type:"button"},e);f=e.click;e.click=function(){f.apply(a.element[0],arguments)};g={icons:e.icons,text:e.showText};delete e.icons;delete e.showText;c("<button></button>",e).button(g).appendTo(a.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function a(a){return{position:a.position,offset:a.offset}}var b=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(d,f){c(this).addClass("ui-dialog-dragging");b._blockFrames();b._trigger("dragStart",d,a(f))},drag:function(c,d){b._trigger("drag",c,a(d))},stop:function(e,f){var g=f.offset.left-b.document.scrollLeft(),h=f.offset.top-b.document.scrollTop();d.position={my:"left top",at:"left"+(0<=g?"+":"")+g+" top"+(0<=h?"+":"")+h,of:b.window};c(this).removeClass("ui-dialog-dragging");b._unblockFrames();b._trigger("dragStop",e,a(f))}})},_makeResizable:function(){function a(a){return{originalPosition:a.originalPosition,
originalSize:a.originalSize,position:a.position,size:a.size}}var b=this,d=this.options,e=d.resizable,f=this.uiDialog.css("position"),e="string"===typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:d.maxWidth,maxHeight:d.maxHeight,minWidth:d.minWidth,minHeight:this._minHeight(),handles:e,start:function(d,e){c(this).addClass("ui-dialog-resizing");b._blockFrames();b._trigger("resizeStart",d,a(e))},resize:function(c,
d){b._trigger("resize",c,a(d))},stop:function(e,f){var g=b.uiDialog.offset(),h=g.left-b.document.scrollLeft(),g=g.top-b.document.scrollTop();d.height=b.uiDialog.height();d.width=b.uiDialog.width();d.position={my:"left top",at:"left"+(0<=h?"+":"")+h+" top"+(0<=g?"+":"")+g,of:b.window};c(this).removeClass("ui-dialog-resizing");b._unblockFrames();b._trigger("resizeStop",e,a(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(a){this._makeFocusTarget();this._focusedElement=
c(a.target)}})},_makeFocusTarget:function(){this._untrackInstance();this._trackingInstances().unshift(this)},_untrackInstance:function(){var a=this._trackingInstances(),b=c.inArray(this,a);-1!==b&&a.splice(b,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");a||(a=[],this.document.data("ui-dialog-instances",a));return a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");
a||this.uiDialog.show();this.uiDialog.position(this.options.position);a||this.uiDialog.hide()},_setOptions:function(a){var b=this,d=!1,e={};c.each(a,function(a,c){b._setOption(a,c);a in b.sizeRelatedOptions&&(d=!0);a in b.resizableRelatedOptions&&(e[a]=c)});d&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",e)},_setOption:function(a,b){var c,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b);"disabled"!==
a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&((c=e.is(":data(ui-draggable)"))&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&((c=e.is(":data(ui-resizable)"))&&!b&&e.resizable("destroy"),c&&"string"===typeof b&&e.resizable("option","handles",b),c||!1===b||this._makeResizable()),"title"===
a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,e=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});e.minWidth>e.width&&(e.width=e.minWidth);a=this.uiDialog.css({height:"auto",width:e.width}).outerHeight();b=Math.max(0,e.minHeight-a);c="number"===typeof e.maxHeight?Math.max(0,e.maxHeight-a):"none";"auto"===e.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,e.height-a));
this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var a=c(this);return c("<div>").css({position:"absolute",width:a.outerWidth(),height:a.outerHeight()}).appendTo(a.parent()).offset(a.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(a){return c(a.target).closest(".ui-dialog").length?
!0:!!c(a.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var a=!0;this._delay(function(){a=!1});this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(b){a||this._allowInteraction(b)||(b.preventDefault(),this._trackingInstances()[0]._focusTabbable())}});this.overlay=c("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});this.document.data("ui-dialog-overlays",
(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):this.document.unbind("focusin").removeData("ui-dialog-overlays");this.overlay.remove();this.overlay=null}}});c.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,
deactivate:null,drop:null,out:null,over:null},_create:function(){var a,b=this.options,d=b.accept;this.isover=!1;this.isout=!0;this.accept=c.isFunction(d)?d:function(a){return a.is(d)};this.proportions=function(){if(arguments.length)a=arguments[0];else return a?a:a={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(b.scope);b.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(a){c.ui.ddmanager.droppables[a]=c.ui.ddmanager.droppables[a]||
[];c.ui.ddmanager.droppables[a].push(this)},_splice:function(a){for(var b=0;b<a.length;b++)a[b]===this&&a.splice(b,1)},_destroy:function(){this._splice(c.ui.ddmanager.droppables[this.options.scope]);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(a,b){"accept"===a?this.accept=c.isFunction(b)?b:function(a){return a.is(b)}:"scope"===a&&(this._splice(c.ui.ddmanager.droppables[this.options.scope]),this._addToManager(b));this._super(a,b)},_activate:function(a){var b=
c.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=c.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=c.ui.ddmanager.current;b&&(b.currentItem||b.element)[0]!==this.element[0]&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),
this._trigger("over",a,this.ui(b)))},_out:function(a){var b=c.ui.ddmanager.current;b&&(b.currentItem||b.element)[0]!==this.element[0]&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",a,this.ui(b)))},_drop:function(a,b){var d=b||c.ui.ddmanager.current,e=!1;if(!d||(d.currentItem||d.element)[0]===this.element[0])return!1;this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var b=
c(this).droppable("instance");if(b.options.greedy&&!b.options.disabled&&b.options.scope===d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&c.ui.intersect(d,c.extend(b,{offset:b.element.offset()}),b.options.tolerance,a))return e=!0,!1});return e?!1:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",
a,this.ui(d)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});c.ui.intersect=function(){return function(a,b,c,e){if(!b.offset)return!1;var f=(a.positionAbs||a.position.absolute).left+a.margins.left,g=(a.positionAbs||a.position.absolute).top+a.margins.top,h=f+a.helperProportions.width,k=g+a.helperProportions.height,m=b.offset.left,A=b.offset.top,w=m+b.proportions().width,v=A+b.proportions().height;switch(c){case "fit":return m<=
f&&h<=w&&A<=g&&k<=v;case "intersect":return m<f+a.helperProportions.width/2&&h-a.helperProportions.width/2<w&&A<g+a.helperProportions.height/2&&k-a.helperProportions.height/2<v;case "pointer":a=e.pageY;c=b.proportions().height;if(A=a>=A&&a<A+c)e=e.pageX,b=b.proportions().width,A=e>=m&&e<m+b;return A;case "touch":return(g>=A&&g<=v||k>=A&&k<=v||g<A&&k>v)&&(f>=m&&f<=w||h>=m&&h<=w||f<m&&h>w);default:return!1}}}();c.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var d,
e,f=c.ui.ddmanager.droppables[a.options.scope]||[],g=b?b.type:null,h=(a.currentItem||a.element).find(":data(ui-droppable)").addBack();d=0;a:for(;d<f.length;d++)if(!(f[d].options.disabled||a&&!f[d].accept.call(f[d].element[0],a.currentItem||a.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions().height=0;continue a}f[d].visible="none"!==f[d].element.css("display");f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],b),f[d].offset=f[d].element.offset(),f[d].proportions({width:f[d].element[0].offsetWidth,
height:f[d].element[0].offsetHeight}))}},drop:function(a,b){var d=!1;c.each((c.ui.ddmanager.droppables[a.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&c.ui.intersect(a,this,this.options.tolerance,b)&&(d=this._drop.call(this,b)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem||a.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,b)))});return d},dragStart:function(a,b){a.element.parentsUntil("body").bind("scroll.droppable",
function(){a.options.refreshPositions||c.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&c.ui.ddmanager.prepareOffsets(a,b);c.each(c.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f;f=c.ui.intersect(a,this,this.options.tolerance,b);var g=!f&&this.isover?"isout":f&&!this.isover?"isover":null;g&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return c(this).droppable("instance").options.scope===
e}),f.length&&(d=c(f[0]).droppable("instance"),d.greedyChild="isover"===g)),d&&"isover"===g&&(d.isover=!1,d.isout=!0,d._out.call(d,b)),this[g]=!0,this["isout"===g?"isover":"isout"]=!1,this["isover"===g?"_over":"_out"].call(this,b),d&&"isout"===g&&(d.isout=!1,d.isover=!0,d._over.call(d,b)))}})},dragStop:function(a,b){a.element.parentsUntil("body").unbind("scroll.droppable");a.options.refreshPositions||c.ui.ddmanager.prepareOffsets(a,b)}};c.effects={effect:{}};(function(a,b){function c(a,b,d){var e=
w[b.type]||{};if(null==a)return d||!b.def?null:b.def;a=e.floor?~~a:parseFloat(a);return isNaN(a)?b.def:e.mod?(a+e.mod)%e.mod:0>a?0:e.max<a?e.max:a}function e(b){var c=k(),d=c._rgba=[];b=b.toLowerCase();r(h,function(a,e){var f,g=e.re.exec(b);f=g&&e.parse(g);g=e.space||"rgba";if(f)return f=c[g](f),c[m[g].cache]=f[m[g].cache],d=c._rgba=f._rgba,!1});return d.length?("0,0,0,0"===d.join()&&a.extend(d,s.transparent),c):s[b]}function f(a,b,c){c=(c+1)%1;return 1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-
c)*6:a}var g=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,
parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],k=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},
lightness:{idx:2,type:"percent"}}}},w={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},x=k.support={},v=a("<p>")[0],s,r=a.each;v.style.cssText="background-color:rgba(1,1,1,.5)";x.rgba=-1<v.style.backgroundColor.indexOf("rgba");r(m,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});k.fn=a.extend(k.prototype,{parse:function(f,g,h,p){if(f===b)return this._rgba=[null,null,null,null],this;if(f.jquery||f.nodeType)f=a(f).css(g),g=b;var z=this,I=a.type(f),E=this._rgba=
[];g!==b&&(f=[f,g,h,p],I="array");if("string"===I)return this.parse(e(f)||s._default);if("array"===I)return r(m.rgba.props,function(a,b){E[b.idx]=c(f[b.idx],b)}),this;if("object"===I)return f instanceof k?r(m,function(a,b){f[b.cache]&&(z[b.cache]=f[b.cache].slice())}):r(m,function(b,e){var g=e.cache;r(e.props,function(a,b){if(!z[g]&&e.to){if("alpha"===a||null==f[a])return;z[g]=e.to(z._rgba)}z[g][b.idx]=c(f[a],b,!0)});z[g]&&0>a.inArray(null,z[g].slice(0,3))&&(z[g][3]=1,e.from&&(z._rgba=e.from(z[g])))}),
this},is:function(a){var b=k(a),c=!0,d=this;r(m,function(a,e){var f,g=b[e.cache];g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],r(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]}));return c});return c},_space:function(){var a=[],b=this;r(m,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var e=k(a),f=e._space(),g=m[f],h=0===this.alpha()?k("transparent"):this,p=h[g.cache]||g.to(h._rgba),z=p.slice(),e=e[g.cache];r(g.props,function(a,f){var g=f.idx,h=p[g],
t=e[g],k=w[f.type]||{};null!==t&&(null===h?z[g]=t:(k.mod&&(t-h>k.mod/2?h+=k.mod:h-t>k.mod/2&&(h-=k.mod)),z[g]=c((t-h)*b+h,f)))});return this[f](z)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=k(b)._rgba;return k(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?2<b?1:0:a});1===c[3]&&(c.pop(),b="rgb(");return b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),
function(a,b){null==a&&(a=2<b?1:0);b&&3>b&&(a=Math.round(100*a)+"%");return a});1===c[3]&&(c.pop(),b="hsl(");return b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();b&&c.push(~~(255*d));return"#"+a.map(c,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});k.fn.parse.prototype=k.fn;m.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=
a[0]/255,c=a[1]/255,d=a[2]/255;a=a[3];var e=Math.max(b,c,d),f=Math.min(b,c,d),g=e-f,h=e+f,p=.5*h,h=0===g?0:.5>=p?g/h:g/(2-h);return[Math.round(f===e?0:b===e?60*(c-d)/g+360:c===e?60*(d-b)/g+120:60*(b-c)/g+240)%360,h,p,null==a?1:a]};m.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2];a=a[3];c=.5>=d?d*(1+c):d+c-d*c;d=2*d-c;return[Math.round(255*f(d,c,b+1/3)),Math.round(255*f(d,c,b)),Math.round(255*f(d,c,b-1/3)),a]};r(m,function(e,f){var h=
f.props,m=f.cache,z=f.to,I=f.from;k.fn[e]=function(e){z&&!this[m]&&(this[m]=z(this._rgba));if(e===b)return this[m].slice();var f,g=a.type(e),p="array"===g||"object"===g?e:arguments,n=this[m].slice();r(h,function(a,b){var e=p["object"===g?a:b.idx];null==e&&(e=n[b.idx]);n[b.idx]=c(e,b)});return I?(f=k(I(n)),f[m]=n,f):k(n)};r(h,function(b,c){k.fn[b]||(k.fn[b]=function(d){var f=a.type(d),h="alpha"===b?this._hsla?"hsla":"rgba":e,k=this[h](),t=k[c.idx];if("undefined"===f)return t;"function"===f&&(d=d.call(this,
t),f=a.type(d));if(null==d&&c.empty)return this;"string"===f&&(f=g.exec(d))&&(d=t+parseFloat(f[2])*("+"===f[1]?1:-1));k[c.idx]=d;return this[h](k)})})});k.hook=function(b){b=b.split(" ");r(b,function(b,c){a.cssHooks[c]={set:function(b,d){var f,g="";if("transparent"!==d&&("string"!==a.type(d)||(f=e(d)))){d=k(f||d);if(!x.rgba&&1!==d._rgba[3]){for(f="backgroundColor"===c?b.parentNode:b;(""===g||"transparent"===g)&&f&&f.style;)try{g=a.css(f,"backgroundColor"),f=f.parentNode}catch(h){}d=d.blend(g&&"transparent"!==
g?g:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(p){}}};a.fx.step[c]=function(b){b.colorInit||(b.start=k(b.elem,c),b.end=k(b.end),b.colorInit=!0);a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})};k.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");a.cssHooks.borderColor={expand:function(a){var b={};r(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=
a});return b}};s=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(c);(function(){function a(a){var b,d=a.ownerDocument.defaultView?a.ownerDocument.defaultView.getComputedStyle(a,null):a.currentStyle,g={};if(d&&d.length&&d[0]&&d[d[0]])for(a=
d.length;a--;)b=d[a],"string"===typeof d[b]&&(g[c.camelCase(b)]=d[b]);else for(b in d)"string"===typeof d[b]&&(g[b]=d[b]);return g}var b=["add","remove","toggle"],d={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};c.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(a,b){c.fx.step[b]=function(a){if("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)c.style(a.elem,b,a.end),a.setAttr=!0}});c.fn.addBack||
(c.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))});c.effects.animateClass=function(e,f,g,h){var k=c.speed(f,g,h);return this.queue(function(){var f=c(this),g=f.attr("class")||"",h,p=k.children?f.find("*").addBack():f,p=p.map(function(){return{el:c(this),start:a(this)}});h=function(){c.each(b,function(a,b){if(e[b])f[b+"Class"](e[b])})};h();p=p.map(function(){this.end=a(this.el[0]);var b=this.start,e=this.end,f={},g,h;for(g in e)h=e[g],b[g]===h||d[g]||!c.fx.step[g]&&
isNaN(parseFloat(h))||(f[g]=h);this.diff=f;return this});f.attr("class",g);p=p.map(function(){var a=this,b=c.Deferred(),d=c.extend({},k,{queue:!1,complete:function(){b.resolve(a)}});this.el.animate(this.diff,d);return b.promise()});c.when.apply(c,p.get()).done(function(){h();c.each(arguments,function(){var a=this.el;c.each(this.diff,function(b){a.css(b,"")})});k.complete.call(f[0])})})};c.fn.extend({addClass:function(a){return function(b,d,g,h){return d?c.effects.animateClass.call(this,{add:b},d,
g,h):a.apply(this,arguments)}}(c.fn.addClass),removeClass:function(a){return function(b,d,g,h){return 1<arguments.length?c.effects.animateClass.call(this,{remove:b},d,g,h):a.apply(this,arguments)}}(c.fn.removeClass),toggleClass:function(a){return function(b,d,g,h,k){return"boolean"===typeof d||void 0===d?g?c.effects.animateClass.call(this,d?{add:b}:{remove:b},g,h,k):a.apply(this,arguments):c.effects.animateClass.call(this,{toggle:b},d,g,h)}}(c.fn.toggleClass),switchClass:function(a,b,d,g,h){return c.effects.animateClass.call(this,
{add:b,remove:a},d,g,h)}})})();(function(){function a(a,b,f,g){c.isPlainObject(a)&&(b=a,a=a.effect);a={effect:a};null==b&&(b={});c.isFunction(b)&&(g=b,f=null,b={});if("number"===typeof b||c.fx.speeds[b])g=f,f=b,b={};c.isFunction(f)&&(g=f,f=null);b&&c.extend(a,b);f=f||b.duration;a.duration=c.fx.off?0:"number"===typeof f?f:f in c.fx.speeds?c.fx.speeds[f]:c.fx.speeds._default;a.complete=g||b.complete;return a}function b(a){return!a||"number"===typeof a||c.fx.speeds[a]||"string"===typeof a&&!c.effects.effect[a]||
c.isFunction(a)||"object"===typeof a&&!a.effect?!0:!1}c.extend(c.effects,{version:"1.11.4",save:function(a,b){for(var c=0;c<b.length;c++)null!==b[c]&&a.data("ui-effects-"+b[c],a[0].style[b[c]])},restore:function(a,b){var c,g;for(g=0;g<b.length;g++)null!==b[g]&&(c=a.data("ui-effects-"+b[g]),void 0===c&&(c=""),a.css(b[g],c))},setMode:function(a,b){"toggle"===b&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var c,g;switch(a[0]){case "top":c=0;break;case "middle":c=.5;break;case "bottom":c=
1;break;default:c=a[0]/b.height}switch(a[1]){case "left":g=0;break;case "center":g=.5;break;case "right":g=1;break;default:g=a[1]/b.width}return{x:g,y:c}},createWrapper:function(a){if(a.parent().is(".ui-effects-wrapper"))return a.parent();var b={width:a.outerWidth(!0),height:a.outerHeight(!0),"float":a.css("float")},f=c("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),g={width:a.width(),height:a.height()},h=document.activeElement;
try{h.id}catch(k){h=document.body}a.wrap(f);(a[0]===h||c.contains(a[0],h))&&c(h).focus();f=a.parent();"static"===a.css("position")?(f.css({position:"relative"}),a.css({position:"relative"})):(c.extend(b,{position:a.css("position"),zIndex:a.css("z-index")}),c.each(["top","left","bottom","right"],function(c,f){b[f]=a.css(f);isNaN(parseInt(b[f],10))&&(b[f]="auto")}),a.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));a.css(g);return f.css(b).show()},removeWrapper:function(a){var b=
document.activeElement;a.parent().is(".ui-effects-wrapper")&&(a.parent().replaceWith(a),(a[0]===b||c.contains(a[0],b))&&c(b).focus());return a},setTransition:function(a,b,f,g){g=g||{};c.each(b,function(b,c){var e=a.cssUnit(c);0<e[0]&&(g[c]=e[0]*f+e[1])});return g}});c.fn.extend({effect:function(){function b(a){function d(){c.isFunction(g)&&g.call(f[0]);c.isFunction(a)&&a()}var f=c(this),g=e.complete,p=e.mode;(f.is(":hidden")?"hide"===p:"show"===p)?(f[p](),d()):h.call(f[0],e,d)}var e=a.apply(this,
arguments),f=e.mode,g=e.queue,h=c.effects.effect[e.effect];return c.fx.off||!h?f?this[f](e.duration,e.complete):this.each(function(){e.complete&&e.complete.call(this)}):!1===g?this.each(b):this.queue(g||"fx",b)},show:function(c){return function(e){if(b(e))return c.apply(this,arguments);var f=a.apply(this,arguments);f.mode="show";return this.effect.call(this,f)}}(c.fn.show),hide:function(c){return function(e){if(b(e))return c.apply(this,arguments);var f=a.apply(this,arguments);f.mode="hide";return this.effect.call(this,
f)}}(c.fn.hide),toggle:function(c){return function(e){if(b(e)||"boolean"===typeof e)return c.apply(this,arguments);var f=a.apply(this,arguments);f.mode="toggle";return this.effect.call(this,f)}}(c.fn.toggle),cssUnit:function(a){var b=this.css(a),f=[];c.each(["em","px","%","pt"],function(a,c){0<b.indexOf(c)&&(f=[parseFloat(b),c])});return f}})})();(function(){var a={};c.each(["Quad","Cubic","Quart","Quint","Expo"],function(b,c){a[c]=function(a){return Math.pow(a,b+2)}});c.extend(a,{Sine:function(a){return 1-
Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var c,e=4;a<((c=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*c-2)/22-a,2)}});c.each(a,function(a,d){c.easing["easeIn"+a]=d;c.easing["easeOut"+a]=function(a){return 1-d(1-a)};c.easing["easeInOut"+a]=function(a){return.5>a?d(2*a)/2:1-d(-2*a+2)/2}})})();
c.effects.effect.blind=function(a,b){var d=c(this),e="position top bottom left right height width".split(" "),f=c.effects.setMode(d,a.mode||"hide"),g=a.direction||"up",h=/up|down|vertical/.test(g),k=h?"height":"width",m=h?"top":"left",g=/up|left|vertical|horizontal/.test(g),w={},r="show"===f,v,s,D;d.parent().is(".ui-effects-wrapper")?c.effects.save(d.parent(),e):c.effects.save(d,e);d.show();v=c.effects.createWrapper(d).css({overflow:"hidden"});s=v[k]();D=parseFloat(v.css(m))||0;w[k]=r?s:0;g||(d.css(h?
"bottom":"right",0).css(h?"top":"left","auto").css({position:"absolute"}),w[m]=r?D:s+D);r&&(v.css(k,0),g||v.css(m,D+s));v.animate(w,{duration:a.duration,easing:a.easing,queue:!1,complete:function(){"hide"===f&&d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()}})};c.effects.effect.bounce=function(a,b){var d=c(this),e="position top bottom left right height width".split(" "),f=c.effects.setMode(d,a.mode||"effect"),g="hide"===f,h="show"===f,k=a.direction||"up",f=a.distance,m=a.times||5,w=
2*m+(h||g?1:0),r=a.duration/w,v=a.easing,s="up"===k||"down"===k?"top":"left",k="up"===k||"left"===k,D,n,u=d.queue(),q=u.length;(h||g)&&e.push("opacity");c.effects.save(d,e);d.show();c.effects.createWrapper(d);f||(f=d["top"===s?"outerHeight":"outerWidth"]()/3);h&&(n={opacity:1},n[s]=0,d.css("opacity",0).css(s,k?2*-f:2*f).animate(n,r,v));g&&(f/=Math.pow(2,m-1));n={};for(h=n[s]=0;h<m;h++)D={},D[s]=(k?"-=":"+=")+f,d.animate(D,r,v).animate(n,r,v),f=g?2*f:f/2;g&&(D={opacity:0},D[s]=(k?"-=":"+=")+f,d.animate(D,
r,v));d.queue(function(){g&&d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()});1<q&&u.splice.apply(u,[1,0].concat(u.splice(q,w+1)));d.dequeue()};c.effects.effect.clip=function(a,b){var d=c(this),e="position top bottom left right height width".split(" "),f="show"===c.effects.setMode(d,a.mode||"hide"),g="vertical"===(a.direction||"vertical"),h=g?"height":"width",g=g?"top":"left",k={},m,w;c.effects.save(d,e);d.show();m=c.effects.createWrapper(d).css({overflow:"hidden"});m="IMG"===d[0].tagName?
m:d;w=m[h]();f&&(m.css(h,0),m.css(g,w/2));k[h]=f?w:0;k[g]=f?0:w/2;m.animate(k,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){f||d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()}})};c.effects.effect.drop=function(a,b){var d=c(this),e="position top bottom left right opacity height width".split(" "),f=c.effects.setMode(d,a.mode||"hide"),g="show"===f,h=a.direction||"left",k="up"===h||"down"===h?"top":"left",h="up"===h||"left"===h?"pos":"neg",m={opacity:g?1:0},w;c.effects.save(d,
e);d.show();c.effects.createWrapper(d);w=a.distance||d["top"===k?"outerHeight":"outerWidth"](!0)/2;g&&d.css("opacity",0).css(k,"pos"===h?-w:w);m[k]=(g?"pos"===h?"+=":"-=":"pos"===h?"-=":"+=")+w;d.animate(m,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){"hide"===f&&d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()}})};c.effects.effect.explode=function(a,b){function d(){r.push(this);r.length===e*f&&(g.css({visibility:"visible"}),c(r).remove(),h||g.hide(),b())}var e=a.pieces?
Math.round(Math.sqrt(a.pieces)):3,f=e,g=c(this),h="show"===c.effects.setMode(g,a.mode||"hide"),k=g.show().css("visibility","hidden").offset(),m=Math.ceil(g.outerWidth()/f),w=Math.ceil(g.outerHeight()/e),r=[],s,D,u,n,F,q;for(s=0;s<e;s++)for(n=k.top+s*w,q=s-(e-1)/2,D=0;D<f;D++)u=k.left+D*m,F=D-(f-1)/2,g.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-D*m,top:-s*w}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:m,
height:w,left:u+(h?F*m:0),top:n+(h?q*w:0),opacity:h?0:1}).animate({left:u+(h?0:F*m),top:n+(h?0:q*w),opacity:h?1:0},a.duration||500,a.easing,d)};c.effects.effect.fade=function(a,b){var d=c(this),e=c.effects.setMode(d,a.mode||"toggle");d.animate({opacity:e},{queue:!1,duration:a.duration,easing:a.easing,complete:b})};c.effects.effect.fold=function(a,b){var d=c(this),e="position top bottom left right height width".split(" "),f=c.effects.setMode(d,a.mode||"hide"),g="show"===f,h="hide"===f,f=a.size||15,
k=/([0-9]+)%/.exec(f),m=!!a.horizFirst,w=g!==m,r=w?["width","height"]:["height","width"],s=a.duration/2,D,u={},n={};c.effects.save(d,e);d.show();D=c.effects.createWrapper(d).css({overflow:"hidden"});w=w?[D.width(),D.height()]:[D.height(),D.width()];k&&(f=parseInt(k[1],10)/100*w[h?0:1]);g&&D.css(m?{height:0,width:f}:{height:f,width:0});u[r[0]]=g?w[0]:f;n[r[1]]=g?w[1]:0;D.animate(u,s,a.easing).animate(n,s,a.easing,function(){h&&d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()})};c.effects.effect.highlight=
function(a,b){var d=c(this),e=["backgroundImage","backgroundColor","opacity"],f=c.effects.setMode(d,a.mode||"show"),g={backgroundColor:d.css("backgroundColor")};"hide"===f&&(g.opacity=0);c.effects.save(d,e);d.show().css({backgroundImage:"none",backgroundColor:a.color||"#ffff99"}).animate(g,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){"hide"===f&&d.hide();c.effects.restore(d,e);b()}})};c.effects.effect.size=function(a,b){var d,e,f,g,h,k,m=c(this),w="position top bottom left right width height overflow opacity".split(" ");
h="position top bottom left right overflow opacity".split(" ");var r=["width","height","overflow"],s=["fontSize"],D=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=c.effects.setMode(m,a.mode||"effect"),F=a.restore||"effect"!==n,q=a.scale||"both";k=a.origin||["middle","center"];var C=m.css("position"),H=F?w:h,I={height:0,width:0,outerHeight:0,outerWidth:0};"show"===n&&m.show();h={height:m.height(),width:m.width(),
outerHeight:m.outerHeight(),outerWidth:m.outerWidth()};"toggle"===a.mode&&"show"===n?(m.from=a.to||I,m.to=a.from||h):(m.from=a.from||("show"===n?I:h),m.to=a.to||("hide"===n?I:h));f=m.from.height/h.height;g=m.from.width/h.width;d=m.to.height/h.height;e=m.to.width/h.width;if("box"===q||"both"===q)f!==d&&(H=H.concat(D),m.from=c.effects.setTransition(m,D,f,m.from),m.to=c.effects.setTransition(m,D,d,m.to)),g!==e&&(H=H.concat(u),m.from=c.effects.setTransition(m,u,g,m.from),m.to=c.effects.setTransition(m,
u,e,m.to));"content"!==q&&"both"!==q||f===d||(H=H.concat(s).concat(r),m.from=c.effects.setTransition(m,s,f,m.from),m.to=c.effects.setTransition(m,s,d,m.to));c.effects.save(m,H);m.show();c.effects.createWrapper(m);m.css("overflow","hidden").css(m.from);k&&(k=c.effects.getBaseline(k,h),m.from.top=(h.outerHeight-m.outerHeight())*k.y,m.from.left=(h.outerWidth-m.outerWidth())*k.x,m.to.top=(h.outerHeight-m.to.outerHeight)*k.y,m.to.left=(h.outerWidth-m.to.outerWidth)*k.x);m.css(m.from);if("content"===q||
"both"===q)D=D.concat(["marginTop","marginBottom"]).concat(s),u=u.concat(["marginLeft","marginRight"]),r=w.concat(D).concat(u),m.find("*[width]").each(function(){var b=c(this),h=b.height(),k=b.width(),m=b.outerHeight(),n=b.outerWidth();F&&c.effects.save(b,r);b.from={height:h*f,width:k*g,outerHeight:m*f,outerWidth:n*g};b.to={height:h*d,width:k*e,outerHeight:h*d,outerWidth:k*e};f!==d&&(b.from=c.effects.setTransition(b,D,f,b.from),b.to=c.effects.setTransition(b,D,d,b.to));g!==e&&(b.from=c.effects.setTransition(b,
u,g,b.from),b.to=c.effects.setTransition(b,u,e,b.to));b.css(b.from);b.animate(b.to,a.duration,a.easing,function(){F&&c.effects.restore(b,r)})});m.animate(m.to,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){0===m.to.opacity&&m.css("opacity",m.from.opacity);"hide"===n&&m.hide();c.effects.restore(m,H);F||("static"===C?m.css({position:"relative",top:m.to.top,left:m.to.left}):c.each(["top","left"],function(a,b){m.css(b,function(b,c){var d=parseInt(c,10),e=a?m.to.left:m.to.top;return"auto"===
c?e+"px":d+e+"px"})}));c.effects.removeWrapper(m);b()}})};c.effects.effect.scale=function(a,b){var d=c(this),e=c.extend(!0,{},a),f=c.effects.setMode(d,a.mode||"effect"),g=parseInt(a.percent,10)||(0===parseInt(a.percent,10)?0:"hide"===f?0:100),h=a.direction||"both",k=a.origin,m={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},w="horizontal"!==h?g/100:1,g="vertical"!==h?g/100:1;e.effect="size";e.queue=!1;e.complete=b;"effect"!==f&&(e.origin=k||["middle","center"],
e.restore=!0);e.from=a.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:m);e.to={height:m.height*w,width:m.width*g,outerHeight:m.outerHeight*w,outerWidth:m.outerWidth*g};e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0));d.effect(e)};c.effects.effect.puff=function(a,b){var d=c(this),e=c.effects.setMode(d,a.mode||"hide"),f="hide"===e,g=parseInt(a.percent,10)||150,h=g/100,k={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),
outerWidth:d.outerWidth()};c.extend(a,{effect:"scale",queue:!1,fade:!0,mode:e,complete:b,percent:f?g:100,from:f?k:{height:k.height*h,width:k.width*h,outerHeight:k.outerHeight*h,outerWidth:k.outerWidth*h}});d.effect(a)};c.effects.effect.pulsate=function(a,b){var d=c(this),e=c.effects.setMode(d,a.mode||"show"),f="show"===e,g="hide"===e,e=2*(a.times||5)+(f||"hide"===e?1:0),h=a.duration/e,k=0,m=d.queue(),w=m.length;if(f||!d.is(":visible"))d.css("opacity",0).show(),k=1;for(f=1;f<e;f++)d.animate({opacity:k},
h,a.easing),k=1-k;d.animate({opacity:k},h,a.easing);d.queue(function(){g&&d.hide();b()});1<w&&m.splice.apply(m,[1,0].concat(m.splice(w,e+1)));d.dequeue()};c.effects.effect.shake=function(a,b){var d=c(this),e="position top bottom left right height width".split(" "),f=c.effects.setMode(d,a.mode||"effect"),g=a.direction||"left",h=a.distance||20,k=a.times||3,m=2*k+1,w=Math.round(a.duration/m),r="up"===g||"down"===g?"top":"left",s="up"===g||"left"===g,g={},D={},u={},n=d.queue(),F=n.length;c.effects.save(d,
e);d.show();c.effects.createWrapper(d);g[r]=(s?"-=":"+=")+h;D[r]=(s?"+=":"-=")+2*h;u[r]=(s?"-=":"+=")+2*h;d.animate(g,w,a.easing);for(h=1;h<k;h++)d.animate(D,w,a.easing).animate(u,w,a.easing);d.animate(D,w,a.easing).animate(g,w/2,a.easing).queue(function(){"hide"===f&&d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()});1<F&&n.splice.apply(n,[1,0].concat(n.splice(F,m+1)));d.dequeue()};c.effects.effect.slide=function(a,b){var d=c(this),e="position top bottom left right width height".split(" "),
f=c.effects.setMode(d,a.mode||"show"),g="show"===f,h=a.direction||"left",k="up"===h||"down"===h?"top":"left",h="up"===h||"left"===h,m,w={};c.effects.save(d,e);d.show();m=a.distance||d["top"===k?"outerHeight":"outerWidth"](!0);c.effects.createWrapper(d).css({overflow:"hidden"});g&&d.css(k,h?isNaN(m)?"-"+m:-m:m);w[k]=(g?h?"+=":"-=":h?"-=":"+=")+m;d.animate(w,{queue:!1,duration:a.duration,easing:a.easing,complete:function(){"hide"===f&&d.hide();c.effects.restore(d,e);c.effects.removeWrapper(d);b()}})};
c.effects.effect.transfer=function(a,b){var d=c(this),e=c(a.to),f="fixed"===e.css("position"),g=c("body"),h=f?g.scrollTop():0,g=f?g.scrollLeft():0,k=e.offset(),e={top:k.top-h,left:k.left-g,height:e.innerHeight(),width:e.innerWidth()},k=d.offset(),m=c("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(a.className).css({top:k.top-h,left:k.left-g,height:d.innerHeight(),width:d.innerWidth(),position:f?"fixed":"absolute"}).animate(e,a.duration,a.easing,function(){m.remove();b()})};
c.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=c("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove()},value:function(a){if(void 0===a)return this.options.value;this.options.value=this._constrainedValue(a);this._refreshValue()},_constrainedValue:function(a){void 0===a&&(a=this.options.value);this.indeterminate=!1===a;"number"!==typeof a&&(a=0);return this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value;this._super(a);this.options.value=this._constrainedValue(b);this._refreshValue()},_setOption:function(a,
b){"max"===a&&(b=Math.max(this.min,b));"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b);this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var a=this.options.value,b=this._percentage();this.valueDiv.toggle(this.indeterminate||a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",
this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=c("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":a}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));a===this.options.max&&this._trigger("complete")}});c.widget("ui.selectable",c.ui.mouse,{version:"1.11.4",options:{appendTo:"body",
autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var a,b=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){a=c(b.options.filter,b.element[0]);a.addClass("ui-selectee");a.each(function(){var a=c(this),b=a.offset();c.data(this,"selectable-item",{element:this,$element:a,left:b.left,top:b.top,right:b.left+a.outerWidth(),bottom:b.top+a.outerHeight(),startselected:!1,
selected:a.hasClass("ui-selected"),selecting:a.hasClass("ui-selecting"),unselecting:a.hasClass("ui-unselecting")})})};this.refresh();this.selectees=a.addClass("ui-selectee");this._mouseInit();this.helper=c("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");this._mouseDestroy()},_mouseStart:function(a){var b=this,d=this.options;this.opos=[a.pageX,a.pageY];
this.options.disabled||(this.selectees=c(d.filter,this.element[0]),this._trigger("start",a),c(d.appendTo).append(this.helper),this.helper.css({left:a.pageX,top:a.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=c.data(this,"selectable-item");d.startselected=!0;a.metaKey||a.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,b._trigger("unselecting",a,{unselecting:d.element}))}),
c(a.target).parents().addBack().each(function(){var d,f=c.data(this,"selectable-item");if(f)return d=!a.metaKey&&!a.ctrlKey||!f.$element.hasClass("ui-selected"),f.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),f.unselecting=!d,f.selecting=d,(f.selected=d)?b._trigger("selecting",a,{selecting:f.element}):b._trigger("unselecting",a,{unselecting:f.element}),!1}))},_mouseDrag:function(a){this.dragged=!0;if(!this.options.disabled){var b,d=this,e=this.options,
f=this.opos[0],g=this.opos[1],h=a.pageX,k=a.pageY;f>h&&(b=h,h=f,f=b);g>k&&(b=k,k=g,g=b);this.helper.css({left:f,top:g,width:h-f,height:k-g});this.selectees.each(function(){var b=c.data(this,"selectable-item"),m=!1;b&&b.element!==d.element[0]&&("touch"===e.tolerance?m=!(b.left>h||b.right<f||b.top>k||b.bottom<g):"fit"===e.tolerance&&(m=b.left>f&&b.right<h&&b.top>g&&b.bottom<k),m?(b.selected&&(b.$element.removeClass("ui-selected"),b.selected=!1),b.unselecting&&(b.$element.removeClass("ui-unselecting"),
b.unselecting=!1),b.selecting||(b.$element.addClass("ui-selecting"),b.selecting=!0,d._trigger("selecting",a,{selecting:b.element}))):(b.selecting&&((a.metaKey||a.ctrlKey)&&b.startselected?(b.$element.removeClass("ui-selecting"),b.selecting=!1,b.$element.addClass("ui-selected"),b.selected=!0):(b.$element.removeClass("ui-selecting"),b.selecting=!1,b.startselected&&(b.$element.addClass("ui-unselecting"),b.unselecting=!0),d._trigger("unselecting",a,{unselecting:b.element}))),!b.selected||a.metaKey||a.ctrlKey||
b.startselected||(b.$element.removeClass("ui-selected"),b.selected=!1,b.$element.addClass("ui-unselecting"),b.unselecting=!0,d._trigger("unselecting",a,{unselecting:b.element}))))});return!1}},_mouseStop:function(a){var b=this;this.dragged=!1;c(".ui-unselecting",this.element[0]).each(function(){var d=c.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=!1;d.startselected=!1;b._trigger("unselected",a,{unselected:d.element})});c(".ui-selecting",this.element[0]).each(function(){var d=
c.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=!1;d.selected=!0;d.startselected=!0;b._trigger("selected",a,{selected:d.element})});this._trigger("stop",a);this.helper.remove();return!1}});c.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,
select:null},_create:function(){var a=this.element.uniqueId().attr("id");this.ids={element:a,button:a+"-button",menu:a+"-menu"};this._drawButton();this._drawMenu();this.options.disabled&&this.disable()},_drawButton:function(){var a=this;this.label=c("label[for='"+this.ids.element+"']").attr("for",this.ids.button);this._on(this.label,{click:function(a){this.button.focus();a.preventDefault()}});this.element.hide();this.button=c("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element);c("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button);this.buttonText=c("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button);this._setText(this.buttonText,this.element.find("option:selected").text());this._resizeButton();this._on(this.button,this._buttonEvents);this.button.one("focusin",
function(){a.menuItems||a._refreshMenu()});this._hoverable(this.button);this._focusable(this.button)},_drawMenu:function(){var a=this;this.menu=c("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu});this.menuWrap=c("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo());this.menuInstance=this.menu.menu({role:"listbox",select:function(b,c){b.preventDefault();a._setSelection();a._select(c.item.data("ui-selectmenu-item"),b)},focus:function(b,
c){var e=c.item.data("ui-selectmenu-item");null!=a.focusIndex&&e.index!==a.focusIndex&&(a._trigger("focus",b,{item:e}),a.isOpen||a._select(e,b));a.focusIndex=e.index;a.button.attr("aria-activedescendant",a.menuItems.eq(e.index).attr("id"))}}).menu("instance");this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all");this.menuInstance._off(this.menu,"mouseleave");this.menuInstance._closeOnDocumentClick=function(){return!1};this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu();
this._setText(this.buttonText,this._getSelectedItem().text());this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var a;a=this.element.find("option");a.length&&(this._parseOptions(a),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),a=this._getSelectedItem(),this.menuInstance.focus(null,a),this._setAria(a.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},
open:function(a){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",a))},_position:function(){this.menuWrap.position(c.extend({of:this.button},this.options.position))},close:function(a){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=
null,this._off(this.document),this._trigger("close",a))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(a,b){var d=this,e="";c.each(b,function(b,g){g.optgroup!==e&&(c("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(g.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:g.optgroup}).appendTo(a),e=g.optgroup);d._renderItemData(a,g)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-selectmenu-item",
b)},_renderItem:function(a,b){var d=c("<li>");b.disabled&&d.addClass("ui-state-disabled");this._setText(d,b.label);return d.appendTo(a)},_setText:function(a,b){b?a.text(b):a.html("&#160;")},_move:function(a,b){var c,e=".ui-menu-item";this.isOpen?c=this.menuItems.eq(this.focusIndex):(c=this.menuItems.eq(this.element[0].selectedIndex),e+=":not(.ui-state-disabled)");c="first"===a||"last"===a?c["first"===a?"prevAll":"nextAll"](e).eq(-1):c[a+"All"](e).eq(0);c.length&&this.menuInstance.focus(b,c)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},
_toggle:function(a){this[this.isOpen?"close":"open"](a)},_setSelection:function(){var a;this.range&&(window.getSelection?(a=window.getSelection(),a.removeAllRanges(),a.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(a){this.isOpen&&(c(a.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(a))}},_buttonEvents:{mousedown:function(){var a;window.getSelection?(a=window.getSelection(),a.rangeCount&&(this.range=a.getRangeAt(0))):
this.range=document.selection.createRange()},click:function(a){this._setSelection();this._toggle(a)},keydown:function(a){var b=!0;switch(a.keyCode){case c.ui.keyCode.TAB:case c.ui.keyCode.ESCAPE:this.close(a);b=!1;break;case c.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(a);break;case c.ui.keyCode.UP:a.altKey?this._toggle(a):this._move("prev",a);break;case c.ui.keyCode.DOWN:a.altKey?this._toggle(a):this._move("next",a);break;case c.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(a):
this._toggle(a);break;case c.ui.keyCode.LEFT:this._move("prev",a);break;case c.ui.keyCode.RIGHT:this._move("next",a);break;case c.ui.keyCode.HOME:case c.ui.keyCode.PAGE_UP:this._move("first",a);break;case c.ui.keyCode.END:case c.ui.keyCode.PAGE_DOWN:this._move("last",a);break;default:this.menu.trigger(a),b=!1}b&&a.preventDefault()}},_selectFocusedItem:function(a){var b=this.menuItems.eq(this.focusIndex);b.hasClass("ui-state-disabled")||this._select(b.data("ui-selectmenu-item"),a)},_select:function(a,
b){var c=this.element[0].selectedIndex;this.element[0].selectedIndex=a.index;this._setText(this.buttonText,a.label);this._setAria(a);this._trigger("select",b,{item:a});a.index!==c&&this._trigger("change",b,{item:a});this.close(b)},_setAria:function(a){a=this.menuItems.eq(a.index).attr("id");this.button.attr({"aria-labelledby":a,"aria-activedescendant":a});this.menu.attr("aria-activedescendant",a)},_setOption:function(a,b){"icons"===a&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(b.button);
this._super(a,b);"appendTo"===a&&this.menuWrap.appendTo(this._appendTo());"disabled"===a&&(this.menuInstance.option("disabled",b),this.button.toggleClass("ui-state-disabled",b).attr("aria-disabled",b),this.element.prop("disabled",b),b?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0));"width"===a&&this._resizeButton()},_appendTo:function(){var a=this.options.appendTo;a&&(a=a.jquery||a.nodeType?c(a):this.document.find(a).eq(0));a&&a[0]||(a=this.element.closest(".ui-front"));
a.length||(a=this.document[0].body);return a},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen);this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen);this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var a=this.options.width;a||(a=this.element.show().outerWidth(),this.element.hide());this.button.outerWidth(a)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),
this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(a){var b=[];a.each(function(a,e){var f=c(e),g=f.parent("optgroup");b.push({element:f,index:a,value:f.val(),label:f.text(),optgroup:g.attr("label")||"",disabled:g.prop("disabled")||f.prop("disabled")})});this.items=b},_destroy:function(){this.menuWrap.remove();this.button.remove();this.element.show();this.element.removeUniqueId();this.label.attr("for",this.ids.element)}});
c.widget("ui.slider",c.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this._calculateNewMax();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");
this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=!1},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var a,b;a=this.options;var d=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),e=[];b=a.values&&a.values.length||1;d.length>b&&(d.slice(b).remove(),d=d.slice(0,b));for(a=d.length;a<b;a++)e.push("<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>");
this.handles=d.add(c(e.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.each(function(a){c(this).data("ui-slider-handle-index",a)})},_createRange:function(){var a=this.options,b="";a.range?(!0===a.range&&(a.values?a.values.length&&2!==a.values.length?a.values=[a.values[0],a.values[0]]:c.isArray(a.values)&&(a.values=a.values.slice(0)):a.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",
bottom:""}):(this.range=c("<div></div>").appendTo(this.element),b="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(b+("min"===a.range||"max"===a.range?" ui-slider-range-"+a.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles);this._on(this.handles,this._handleEvents);this._hoverable(this.handles);this._focusable(this.handles)},_destroy:function(){this.handles.remove();this.range&&this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");
this._mouseDestroy()},_mouseCapture:function(a){var b,d,e,f,g,h=this,k=this.options;if(k.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();b=this._normValueFromMouse({x:a.pageX,y:a.pageY});d=this._valueMax()-this._valueMin()+1;this.handles.each(function(a){var g=Math.abs(b-h.values(a));if(d>g||d===g&&(a===h._lastChangedValue||h.values(a)===k.min))d=g,e=c(this),f=a});if(!1===this._start(a,f))return!1;this._mouseSliding=
!0;this._handleIndex=f;e.addClass("ui-state-active").focus();g=e.offset();this._clickOffset=c(a.target).parents().addBack().is(".ui-slider-handle")?{left:a.pageX-g.left-e.width()/2,top:a.pageY-g.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)}:{left:0,top:0};this.handles.hasClass("ui-state-hover")||this._slide(a,f,b);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(a){var b=
this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return!1},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;"horizontal"===this.orientation?(b=this.elementSize.width,
a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0));b=a/b;1<b&&(b=1);0>b&&(b=0);"vertical"===this.orientation&&(b=1-b);a=this._valueMax()-this._valueMin();b=this._valueMin()+b*a;return this._trimAlignValue(b)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());
return this._trigger("start",a,c)},_slide:function(a,b,c){var e;this.options.values&&this.options.values.length?(e=this.values(b?0:1),2===this.options.values.length&&!0===this.options.range&&(0===b&&c>e||1===b&&c<e)&&(c=e),c!==this.values(b)&&(e=this.values(),e[b]=c,a=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),this.values(b?0:1),!1!==a&&this.values(b,c))):c!==this.value()&&(a=this._trigger("slide",a,{handle:this.handles[b],value:c}),!1!==a&&this.value(c))},_stop:function(a,
b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values());this._lastChangedValue=b;this._trigger("change",a,c)}},value:function(a){if(arguments.length)this.options.value=
this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(a,b){var d,e,f;if(1<arguments.length)this.options.values[a]=this._trimAlignValue(b),this._refreshValue(),this._change(null,a);else if(arguments.length)if(c.isArray(arguments[0])){d=this.options.values;e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):this.value();
else return this._values()},_setOption:function(a,b){var d,e=0;"range"===a&&!0===this.options.range&&("min"===b?(this.options.value=this._values(0),this.options.values=null):"max"===b&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null));c.isArray(this.options.values)&&(e=this.options.values.length);"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b);this._super(a,b);switch(a){case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+
this.orientation);this._refreshValue();this.handles.css("horizontal"===b?"bottom":"left","");break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=!0;this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1;break;case "step":case "min":case "max":this._animateOff=!0;this._calculateNewMax();this._refreshValue();this._animateOff=!1;break;case "range":this._animateOff=!0,this._refresh(),this._animateOff=
!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){b=this.options.values.slice();for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);return b}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=0<this.options.step?this.options.step:
1,c=(a-this._valueMin())%b;a-=c;2*Math.abs(c)>=b&&(a+=0<c?b:-b);return parseFloat(a.toFixed(5))},_calculateNewMax:function(){var a=this.options.max,b=this._valueMin(),c=this.options.step,a=Math.floor(+(a-b).toFixed(this._precision())/c)*c+b;this.max=parseFloat(a.toFixed(this._precision()))},_precision:function(){var a=this._precisionOf(this.options.step);null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min)));return a},_precisionOf:function(a){a=a.toString();var b=a.indexOf(".");
return-1===b?0:a.length-b-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var a,b,d,e,f,g=this.options.range,h=this.options,k=this,m=this._animateOff?!1:h.animate,w={};if(this.options.values&&this.options.values.length)this.handles.each(function(d){b=(k.values(d)-k._valueMin())/(k._valueMax()-k._valueMin())*100;w["horizontal"===k.orientation?"left":"bottom"]=b+"%";c(this).stop(1,1)[m?"animate":"css"](w,h.animate);if(!0===k.options.range)if("horizontal"===
k.orientation){if(0===d)k.range.stop(1,1)[m?"animate":"css"]({left:b+"%"},h.animate);if(1===d)k.range[m?"animate":"css"]({width:b-a+"%"},{queue:!1,duration:h.animate})}else{if(0===d)k.range.stop(1,1)[m?"animate":"css"]({bottom:b+"%"},h.animate);if(1===d)k.range[m?"animate":"css"]({height:b-a+"%"},{queue:!1,duration:h.animate})}a=b});else{d=this.value();e=this._valueMin();f=this._valueMax();b=f!==e?(d-e)/(f-e)*100:0;w["horizontal"===this.orientation?"left":"bottom"]=b+"%";this.handle.stop(1,1)[m?"animate":
"css"](w,h.animate);if("min"===g&&"horizontal"===this.orientation)this.range.stop(1,1)[m?"animate":"css"]({width:b+"%"},h.animate);if("max"===g&&"horizontal"===this.orientation)this.range[m?"animate":"css"]({width:100-b+"%"},{queue:!1,duration:h.animate});if("min"===g&&"vertical"===this.orientation)this.range.stop(1,1)[m?"animate":"css"]({height:b+"%"},h.animate);if("max"===g&&"vertical"===this.orientation)this.range[m?"animate":"css"]({height:100-b+"%"},{queue:!1,duration:h.animate})}},_handleEvents:{keydown:function(a){var b,
d,e,f=c(a.target).data("ui-slider-handle-index");switch(a.keyCode){case c.ui.keyCode.HOME:case c.ui.keyCode.END:case c.ui.keyCode.PAGE_UP:case c.ui.keyCode.PAGE_DOWN:case c.ui.keyCode.UP:case c.ui.keyCode.RIGHT:case c.ui.keyCode.DOWN:case c.ui.keyCode.LEFT:if(a.preventDefault(),!this._keySliding&&(this._keySliding=!0,c(a.target).addClass("ui-state-active"),b=this._start(a,f),!1===b))return}e=this.options.step;b=this.options.values&&this.options.values.length?d=this.values(f):d=this.value();switch(a.keyCode){case c.ui.keyCode.HOME:d=
this._valueMin();break;case c.ui.keyCode.END:d=this._valueMax();break;case c.ui.keyCode.PAGE_UP:d=this._trimAlignValue(b+(this._valueMax()-this._valueMin())/this.numPages);break;case c.ui.keyCode.PAGE_DOWN:d=this._trimAlignValue(b-(this._valueMax()-this._valueMin())/this.numPages);break;case c.ui.keyCode.UP:case c.ui.keyCode.RIGHT:if(b===this._valueMax())return;d=this._trimAlignValue(b+e);break;case c.ui.keyCode.DOWN:case c.ui.keyCode.LEFT:if(b===this._valueMin())return;d=this._trimAlignValue(b-e)}this._slide(a,
f,d)},keyup:function(a){var b=c(a.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(a,b),this._change(a,b),c(a.target).removeClass("ui-state-active"))}}});c.widget("ui.sortable",c.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,
revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(a,b,c){return a>=b&&a<b+c},_isFloating:function(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();
this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=!0},_setOption:function(a,b){this._super(a,b);"handle"===a&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle");c.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle");
this._mouseDestroy();for(var a=this.items.length-1;0<=a;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(a,b){var d=null,e=!1,f=this;if(this.reverting||this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(a);c(a.target).parents().each(function(){if(c.data(this,f.widgetName+"-item")===f)return d=c(this),!1});c.data(a.target,f.widgetName+"-item")===f&&(d=c(a.target));if(!d||this.options.handle&&!b&&(c(this.options.handle,d).find("*").addBack().each(function(){this===
a.target&&(e=!0)}),!e))return!1;this.currentItem=d;this._removeCurrentsFromItems();return!0},_mouseStart:function(a,b,d){var e;b=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};c.extend(this.offset,{click:{left:a.pageX-this.offset.left,
top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();
b.containment&&this._setContainment();b.cursor&&"auto"!==b.cursor&&(e=this.document.find("body"),this.storedCursor=e.css("cursor"),e.css("cursor",b.cursor),this.storedStylesheet=c("<style>*{ cursor: "+b.cursor+" !important; }</style>").appendTo(e));b.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",b.opacity));b.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",b.zIndex));this.scrollParent[0]!==
this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(d=this.containers.length-1;0<=d;d--)this.containers[d]._trigger("activate",a,this._uiHash(this));c.ui.ddmanager&&(c.ui.ddmanager.current=this);c.ui.ddmanager&&!b.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,a);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);
return!0},_mouseDrag:function(a){var b,d,e,f;b=this.options;d=!1;this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY<b.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+b.scrollSpeed:a.pageY-this.overflowOffset.top<
b.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-b.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-a.pageX<b.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+b.scrollSpeed:a.pageX-this.overflowOffset.left<b.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-b.scrollSpeed)):(a.pageY-this.document.scrollTop()<b.scrollSensitivity?d=this.document.scrollTop(this.document.scrollTop()-
b.scrollSpeed):this.window.height()-(a.pageY-this.document.scrollTop())<b.scrollSensitivity&&(d=this.document.scrollTop(this.document.scrollTop()+b.scrollSpeed)),a.pageX-this.document.scrollLeft()<b.scrollSensitivity?d=this.document.scrollLeft(this.document.scrollLeft()-b.scrollSpeed):this.window.width()-(a.pageX-this.document.scrollLeft())<b.scrollSensitivity&&(d=this.document.scrollLeft(this.document.scrollLeft()+b.scrollSpeed))),!1!==d&&c.ui.ddmanager&&!b.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,
a));this.positionAbs=this._convertPositionTo("absolute");this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px");this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(b=this.items.length-1;0<=b;b--)if(d=this.items[b],e=d.item[0],(f=this._intersectsWithPointer(d))&&d.instance===this.currentContainer&&e!==this.currentItem[0]&&this.placeholder[1===f?"next":"prev"]()[0]!==e&&!c.contains(this.placeholder[0],e)&&("semi-dynamic"===
this.options.type?!c.contains(this.element[0],e):1)){this.direction=1===f?"down":"up";if("pointer"===this.options.tolerance||this._intersectsWithSides(d))this._rearrange(a,d);else break;this._trigger("change",a,this._uiHash());break}this._contactContainers(a);c.ui.ddmanager&&c.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(a,b){if(a){c.ui.ddmanager&&!this.options.dropBehaviour&&c.ui.ddmanager.drop(this,a);if(this.options.revert){var d=
this,e=this.placeholder.offset(),f=this.options.axis,g={};f&&"x"!==f||(g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft));f&&"y"!==f||(g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop));this.reverting=!0;c(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(a)})}else this._clear(a,b);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});
"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var a=this.containers.length-1;0<=a;a--)this.containers[a]._trigger("deactivate",null,this._uiHash(this)),this.containers[a].containerCache.over&&(this.containers[a]._trigger("out",null,this._uiHash(this)),this.containers[a].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==
this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),c.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?c(this.domPosition.prev).after(this.currentItem):c(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),d=[];a=a||{};c(b).each(function(){var b=(c(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[\-=_](.+)/);b&&d.push((a.key||
b[1]+"[]")+"="+(a.key&&a.expression?b[1]:b[2]))});!d.length&&a.key&&d.push(a.key+"=");return d.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),d=[];a=a||{};b.each(function(){d.push(c(a.item||this).attr(a.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,k=a.top,m=k+a.height,w=this.offset.click.top,r=this.offset.click.left,
r="y"===this.options.axis||b+r>g&&b+r<h,w=("x"===this.options.axis||e+w>k&&e+w<m)&&r;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?w:g<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<h&&k<e+this.helperProportions.height/2&&f-this.helperProportions.height/2<m},_intersectsWithPointer:function(a){var b="x"===this.options.axis||
this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height);a="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width);b=b&&a;a=this._getDragVerticalDirection();var c=this._getDragHorizontalDirection();return b?this.floating?c&&"right"===c||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(a){var b=this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height);a=this._isOverAxis(this.positionAbs.left+
this.offset.click.left,a.left+a.width/2,a.width);var c=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?"right"===e&&a||"left"===e&&!a:c&&("down"===c&&b||"up"===c&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(0<a?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(0<a?"right":"left")},refresh:function(a){this._refreshItems(a);
this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){function b(){g.push(this)}var d,e,f,g=[],h=[],k=this._connectWith();if(k&&a)for(a=k.length-1;0<=a;a--)for(e=c(k[a],this.document[0]),d=e.length-1;0<=d;d--)(f=c.data(e[d],this.widgetFullName))&&f!==this&&!f.options.disabled&&h.push([c.isFunction(f.options.items)?f.options.items.call(f.element):
c(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f]);h.push([c.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):c(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=h.length-1;0<=a;a--)h[a][0].each(b);return c(g)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=c.grep(this.items,
function(b){for(var c=0;c<a.length;c++)if(a[c]===b.item[0])return!1;return!0})},_refreshItems:function(a){this.items=[];this.containers=[this];var b,d,e,f,g,h=this.items,k=[[c.isFunction(this.options.items)?this.options.items.call(this.element[0],a,{item:this.currentItem}):c(this.options.items,this.element),this]];if((g=this._connectWith())&&this.ready)for(b=g.length-1;0<=b;b--)for(e=c(g[b],this.document[0]),d=e.length-1;0<=d;d--)(f=c.data(e[d],this.widgetFullName))&&f!==this&&!f.options.disabled&&
(k.push([c.isFunction(f.options.items)?f.options.items.call(f.element[0],a,{item:this.currentItem}):c(f.options.items,f.element),f]),this.containers.push(f));for(b=k.length-1;0<=b;b--)for(a=k[b][1],e=k[b][0],d=0,g=e.length;d<g;d++)f=c(e[d]),f.data(this.widgetName+"-item",a),h.push({item:f,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(a){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1;this.offsetParent&&this.helper&&(this.offset.parent=
this._getParentOffset());var b,d,e;for(b=this.items.length-1;0<=b;b--)d=this.items[b],d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]||(e=this.options.toleranceElement?c(this.options.toleranceElement,d.item):d.item,a||(d.width=e.outerWidth(),d.height=e.outerHeight()),e=e.offset(),d.left=e.left,d.top=e.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;0<=
b;b--)e=this.containers[b].element.offset(),this.containers[b].containerCache.left=e.left,this.containers[b].containerCache.top=e.top,this.containers[b].containerCache.width=this.containers[b].element.outerWidth(),this.containers[b].containerCache.height=this.containers[b].element.outerHeight();return this},_createPlaceholder:function(a){a=a||this;var b,d=a.options;d.placeholder&&d.placeholder.constructor!==String||(b=d.placeholder,d.placeholder={element:function(){var d=a.currentItem[0].nodeName.toLowerCase(),
f=c("<"+d+">",a.document[0]).addClass(b||a.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");"tbody"===d?a._createTrPlaceholder(a.currentItem.find("tr").eq(0),c("<tr>",a.document[0]).appendTo(f)):"tr"===d?a._createTrPlaceholder(a.currentItem,f):"img"===d&&f.attr("src",a.currentItem.attr("src"));b||f.css("visibility","hidden");return f},update:function(c,f){if(!b||d.forcePlaceholderSize)f.height()||f.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css("paddingTop")||
0,10)-parseInt(a.currentItem.css("paddingBottom")||0,10)),f.width()||f.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css("paddingLeft")||0,10)-parseInt(a.currentItem.css("paddingRight")||0,10))}});a.placeholder=c(d.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);d.placeholder.update(a,a.placeholder)},_createTrPlaceholder:function(a,b){var d=this;a.children().each(function(){c("<td>&#160;</td>",d.document[0]).attr("colspan",c(this).attr("colspan")||1).appendTo(b)})},
_contactContainers:function(a){var b,d,e,f,g,h,k,m,w=f=null;for(b=this.containers.length-1;0<=b;b--)c.contains(this.currentItem[0],this.containers[b].element[0])||(this._intersectsWith(this.containers[b].containerCache)?f&&c.contains(this.containers[b].element[0],f.element[0])||(f=this.containers[b],w=b):this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",a,this._uiHash(this)),this.containers[b].containerCache.over=0));if(f)if(1===this.containers.length)this.containers[w].containerCache.over||
(this.containers[w]._trigger("over",a,this._uiHash(this)),this.containers[w].containerCache.over=1);else{b=1E4;e=null;f=(d=f.floating||this._isFloating(this.currentItem))?"left":"top";g=d?"width":"height";m=d?"clientX":"clientY";for(d=this.items.length-1;0<=d;d--)c.contains(this.containers[w].element[0],this.items[d].item[0])&&this.items[d].item[0]!==this.currentItem[0]&&(h=this.items[d].item.offset()[f],k=!1,a[m]-h>this.items[d][g]/2&&(k=!0),Math.abs(a[m]-h)<b&&(b=Math.abs(a[m]-h),e=this.items[d],
this.direction=k?"up":"down"));if(e||this.options.dropOnEmpty)this.currentContainer===this.containers[w]?this.currentContainer.containerCache.over||(this.containers[w]._trigger("over",a,this._uiHash()),this.currentContainer.containerCache.over=1):(e?this._rearrange(a,e,null,!0):this._rearrange(a,null,this.containers[w].element,!0),this._trigger("change",a,this._uiHash()),this.containers[w]._trigger("change",a,this._uiHash(this)),this.currentContainer=this.containers[w],this.options.placeholder.update(this.currentContainer,
this.placeholder),this.containers[w]._trigger("over",a,this._uiHash(this)),this.containers[w].containerCache.over=1)}},_createHelper:function(a){var b=this.options;a=c.isFunction(b.helper)?c(b.helper.apply(this.element[0],[a,this.currentItem])):"clone"===b.helper?this.currentItem.clone():this.currentItem;a.parents("body").length||c("parent"!==b.appendTo?b.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0]);a[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,
height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")});a[0].style.width&&!b.forceHelperSize||a.width(this.currentItem.width());a[0].style.height&&!b.forceHelperSize||a.height(this.currentItem.height());return a},_adjustOffsetFromHelper:function(a){"string"===typeof a&&(a=a.split(" "));c.isArray(a)&&(a={left:+a[0],top:+a[1]||0});"left"in a&&(this.offset.click.left=a.left+this.margins.left);"right"in a&&(this.offset.click.left=
this.helperProportions.width-a.right+this.margins.left);"top"in a&&(this.offset.click.top=a.top+this.margins.top);"bottom"in a&&(this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&c.contains(this.scrollParent[0],this.offsetParent[0])&&(a.left+=this.scrollParent.scrollLeft(),a.top+=this.scrollParent.scrollTop());
if(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&c.ui.ie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-
(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a,b,d;b=this.options;"parent"===b.containment&&(b.containment=this.helper[0].parentNode);if("document"===
b.containment||"window"===b.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===b.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===b.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];/^(document|window|parent)$/.test(b.containment)||(a=c(b.containment)[0],
b=c(b.containment).offset(),d="hidden"!==c(a).css("overflow"),this.containment=[b.left+(parseInt(c(a).css("borderLeftWidth"),10)||0)+(parseInt(c(a).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(c(a).css("borderTopWidth"),10)||0)+(parseInt(c(a).css("paddingTop"),10)||0)-this.margins.top,b.left+(d?Math.max(a.scrollWidth,a.offsetWidth):a.offsetWidth)-(parseInt(c(a).css("borderLeftWidth"),10)||0)-(parseInt(c(a).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,
b.top+(d?Math.max(a.scrollHeight,a.offsetHeight):a.offsetHeight)-(parseInt(c(a).css("borderTopWidth"),10)||0)-(parseInt(c(a).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(a,b){b||(b=this.position);var d="absolute"===a?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&c.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:b.top+
this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:b.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(a){var b,d,e=this.options;d=a.pageX;b=a.pageY;var f="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&c.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:
this.offsetParent,g=/(html|body)/i.test(f[0].tagName);"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());this.originalPosition&&(this.containment&&(a.pageX-this.offset.click.left<this.containment[0]&&(d=this.containment[0]+this.offset.click.left),a.pageY-this.offset.click.top<this.containment[1]&&(b=this.containment[1]+this.offset.click.top),a.pageX-this.offset.click.left>this.containment[2]&&
(d=this.containment[2]+this.offset.click.left),a.pageY-this.offset.click.top>this.containment[3]&&(b=this.containment[3]+this.offset.click.top)),e.grid&&(b=this.originalPageY+Math.round((b-this.originalPageY)/e.grid[1])*e.grid[1],b=this.containment?b-this.offset.click.top>=this.containment[1]&&b-this.offset.click.top<=this.containment[3]?b:b-this.offset.click.top>=this.containment[1]?b-e.grid[1]:b+e.grid[1]:b,d=this.originalPageX+Math.round((d-this.originalPageX)/e.grid[0])*e.grid[0],d=this.containment?
d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d));return{top:b-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():g?0:f.scrollTop()),left:d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())}},_rearrange:function(a,
b,c,e){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling);var f=this.counter=this.counter?++this.counter:1;this._delay(function(){f===this.counter&&this.refreshPositions(!e)})},_clear:function(a,b){function c(a,b,d){return function(c){d._trigger(a,c,b._uiHash(b))}}this.reverting=!1;var e,f=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=
null;if(this.helper[0]===this.currentItem[0]){for(e in this._storedCSS)if("auto"===this._storedCSS[e]||"static"===this._storedCSS[e])this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!b&&f.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||
b||f.push(function(a){this._trigger("update",a,this._uiHash())});this===this.currentContainer||b||(f.push(function(a){this._trigger("remove",a,this._uiHash())}),f.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),f.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)));for(e=this.containers.length-1;0<=e;e--)b||f.push(c("deactivate",this,this.containers[e])),this.containers[e].containerCache.over&&
(f.push(c("out",this,this.containers[e])),this.containers[e].containerCache.over=0);this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove());this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;b||this._trigger("beforeStop",a,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.cancelHelperRemoval||
(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null);if(!b){for(e=0;e<f.length;e++)f[e].call(this,a);this._trigger("stop",a,this._uiHash())}this.fromOutside=!1;return!this.cancelHelperRemoval},_trigger:function(){!1===c.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(a){var b=a||this;return{helper:b.helper,placeholder:b.placeholder||c([]),position:b.position,originalPosition:b.originalPosition,offset:b.positionAbs,item:b.currentItem,sender:a?
a.element:null}}});c.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);this._setOption("min",this.options.min);this._setOption("step",this.options.step);""!==this.value()&&this._value(this.element.val(),!0);this._draw();
this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var a={},b=this.element;c.each(["min","max","step"],function(c,e){var f=b.attr(e);void 0!==f&&f.length&&(a[e]=f)});return a},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(this._stop(),
this._refresh(),this.previous!==this.element.val()&&this._trigger("change",a))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((0<b?1:-1)*this.options.step,a);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100);a.preventDefault()}},"mousedown .ui-spinner-button":function(a){function b(){this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=
d}))}var d;d=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();a.preventDefault();b.call(this);this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;b.call(this)});!1!==this._start(a)&&this._repeat(null,c(a.currentTarget).hasClass("ui-spinner-up")?1:-1,a)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(a){if(c(a.currentTarget).hasClass("ui-state-active")){if(!1===this._start(a))return!1;this._repeat(null,c(a.currentTarget).hasClass("ui-spinner-up")?
1:-1,a)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(.5*a.height())&&0<a.height()&&a.height(a.height());this.options.disabled&&this.disable()},_keydown:function(a){var b=
this.options,d=c.ui.keyCode;switch(a.keyCode){case d.UP:return this._repeat(null,1,a),!0;case d.DOWN:return this._repeat(null,-1,a),!0;case d.PAGE_UP:return this._repeat(null,b.page,a),!0;case d.PAGE_DOWN:return this._repeat(null,-b.page,a),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+
this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){if(!this.spinning&&!1===this._trigger("start",a))return!1;this.counter||(this.counter=1);return this.spinning=!0},_repeat:function(a,b,c){a=a||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,b,c)},a);this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1);c=this._adjustValue(c+a*this._increment(this.counter));this.spinning&&!1===this._trigger("spin",
b,{value:c})||(this._value(c),this.counter++)},_increment:function(a){var b=this.options.incremental;return b?c.isFunction(b)?b(a):Math.floor(a*a*a/5E4-a*a/500+17*a/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min)));return a},_precisionOf:function(a){a=a.toString();var b=a.indexOf(".");return-1===b?0:a.length-b-1},_adjustValue:function(a){var b,c=this.options;b=null!==c.min?c.min:0;a=Math.round((a-
b)/c.step)*c.step;a=b+a;a=parseFloat(a.toFixed(this._precision()));return null!==c.max&&a>c.max?c.max:null!==c.min&&a<c.min?c.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());this.options[a]=b;this.element.val(this._format(c))}else"max"!==a&&"min"!==a&&"step"!==a||"string"!==typeof b||(b=this._parse(b)),
"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(this.widget().toggleClass("ui-state-disabled",!!b),this.element.prop("disabled",!!b),this.buttons.button(b?"disable":"enable"))},_setOptions:y(function(a){this._super(a)}),_parse:function(a){"string"===typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,
10,this.options.culture):+a);return""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var a=this.value();return null===a?!1:a===this._adjustValue(a)},_value:function(a,b){var c;""!==a&&(c=this._parse(a),
null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c)));this.element.val(a);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:y(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:y(function(a){this._stepDown(a)}),
_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:y(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:y(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){if(!arguments.length)return this._parse(this.element.val());y(this._value).call(this,a)},widget:function(){return this.uiSpinner}});c.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,
activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var a=/#.*$/;return function(b){var c,e;b=b.cloneNode(!1);c=b.href.replace(a,"");e=location.href.replace(a,"");try{c=decodeURIComponent(c)}catch(f){}try{e=decodeURIComponent(e)}catch(g){}return 1<b.hash.length&&c===e}}(),_create:function(){var a=this,b=this.options;this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",b.collapsible);this._processTabs();
b.active=this._initialActive();c.isArray(b.disabled)&&(b.disabled=c.unique(b.disabled.concat(c.map(this.tabs.filter(".ui-state-disabled"),function(b){return a.tabs.index(b)}))).sort());this.active=!1!==this.options.active&&this.anchors.length?this._findActive(b.active):c();this._refresh();this.active.length&&this.load(b.active)},_initialActive:function(){var a=this.options.active,b=this.options.collapsible,d=location.hash.substring(1);null===a&&(d&&this.tabs.each(function(b,f){if(c(f).attr("aria-controls")===
d)return a=b,!1}),null===a&&(a=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null===a||-1===a)&&(a=this.tabs.length?0:!1);!1!==a&&(a=this.tabs.index(this.tabs.eq(a)),-1===a&&(a=b?!1:0));!b&&!1===a&&this.anchors.length&&(a=0);return a},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):c()}},_tabKeydown:function(a){var b=c(this.document[0].activeElement).closest("li"),d=this.tabs.index(b),e=!0;if(!this._handlePageNav(a)){switch(a.keyCode){case c.ui.keyCode.RIGHT:case c.ui.keyCode.DOWN:d++;
break;case c.ui.keyCode.UP:case c.ui.keyCode.LEFT:e=!1;d--;break;case c.ui.keyCode.END:d=this.anchors.length-1;break;case c.ui.keyCode.HOME:d=0;break;case c.ui.keyCode.SPACE:a.preventDefault();clearTimeout(this.activating);this._activate(d);return;case c.ui.keyCode.ENTER:a.preventDefault();clearTimeout(this.activating);this._activate(d===this.options.active?!1:d);return;default:return}a.preventDefault();clearTimeout(this.activating);d=this._focusNextTab(d,e);a.ctrlKey||a.metaKey||(b.attr("aria-selected",
"false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(a){!this._handlePageNav(a)&&a.ctrlKey&&a.keyCode===c.ui.keyCode.UP&&(a.preventDefault(),this.active.focus())},_handlePageNav:function(a){if(a.altKey&&a.keyCode===c.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(a.altKey&&a.keyCode===c.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+
1,!0)),!0},_findNextTab:function(a,b){function d(){a>e&&(a=0);0>a&&(a=e);return a}for(var e=this.tabs.length-1;-1!==c.inArray(d(),this.options.disabled);)a=b?a+1:a-1;return a},_focusNextTab:function(a,b){a=this._findNextTab(a,b);this.tabs.eq(a).focus();return a},_setOption:function(a,b){"active"===a?this._activate(b):"disabled"===a?this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||!1!==this.options.active||this._activate(0)),"event"===
a&&this._setupEvents(b),"heightStyle"===a&&this._setupHeightStyle(b))},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var a=this.options,b=this.tablist.children(":has(a[href])");a.disabled=c.map(b.filter(".ui-state-disabled"),function(a){return b.index(a)});this._processTabs();!1!==a.active&&this.anchors.length?this.active.length&&!c.contains(this.tablist[0],this.active[0])?this.tabs.length===a.disabled.length?(a.active=!1,this.active=
c()):this._activate(this._findNextTab(Math.max(0,a.active-1),!1)):a.active=this.tabs.index(this.active):(a.active=!1,this.active=c());this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"});this.active.length?
(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var a=this,b=this.tabs,d=this.anchors,e=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(a){c(this).is(".ui-state-disabled")&&
a.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){c(this).closest("li").is(".ui-state-disabled")&&this.blur()});this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return c("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=c();this.anchors.each(function(b,d){var e,g,h=c(d).uniqueId().attr("id"),k=c(d).closest("li"),
m=k.attr("aria-controls");a._isLocal(d)?(e=d.hash,g=e.substring(1),e=a.element.find(a._sanitizeSelector(e))):(g=k.attr("aria-controls")||c({}).uniqueId()[0].id,e=a.element.find("#"+g),e.length||(e=a._createPanel(g),e.insertAfter(a.panels[b-1]||a.tablist)),e.attr("aria-live","polite"));e.length&&(a.panels=a.panels.add(e));m&&k.data("ui-tabs-aria-controls",m);k.attr({"aria-controls":g,"aria-labelledby":h});e.attr("aria-labelledby",h)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role",
"tabpanel");b&&(this._off(b.not(this.tabs)),this._off(d.not(this.anchors)),this._off(e.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(a){return c("<div>").attr("id",a).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(a){c.isArray(a)&&(a.length?a.length===this.anchors.length&&(a=!0):a=!1);for(var b=0,d;d=this.tabs[b];b++)!0===a||-1!==c.inArray(b,a)?c(d).addClass("ui-state-disabled").attr("aria-disabled",
"true"):c(d).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=a},_setupEvents:function(a){var b={};a&&c.each(a.split(" "),function(a,c){b[c]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(!0,this.anchors,{click:function(a){a.preventDefault()}});this._on(this.anchors,b);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(a){var b,
d=this.element.parent();"fill"===a?(b=d.height(),b-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var a=c(this),d=a.css("position");"absolute"!==d&&"fixed"!==d&&(b-=a.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){b-=c(this).outerHeight(!0)}),this.panels.each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+c(this).height()))}).css("overflow","auto")):"auto"===a&&(b=0,this.panels.each(function(){b=Math.max(b,
c(this).height("").height())}).height(b))},_eventHandler:function(a){var b=this.options,d=this.active,e=c(a.currentTarget).closest("li"),f=e[0]===d[0],g=f&&b.collapsible,h=g?c():this._getPanelForTab(e),k=d.length?this._getPanelForTab(d):c(),d={oldTab:d,oldPanel:k,newTab:g?c():e,newPanel:h};a.preventDefault();e.hasClass("ui-state-disabled")||e.hasClass("ui-tabs-loading")||this.running||f&&!b.collapsible||!1===this._trigger("beforeActivate",a,d)||(b.active=g?!1:this.tabs.index(e),this.active=f?c():
e,this.xhr&&this.xhr.abort(),k.length||h.length||c.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(e),a),this._toggle(a,d))},_toggle:function(a,b){function d(){f.running=!1;f._trigger("activate",a,b)}function e(){b.newTab.closest("li").addClass("ui-tabs-active ui-state-active");g.length&&f.options.show?f._show(g,f.options.show,d):(g.show(),d())}var f=this,g=b.newPanel,h=b.oldPanel;this.running=!0;h.length&&this.options.hide?this._hide(h,this.options.hide,
function(){b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");e()}):(b.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h.hide(),e());h.attr("aria-hidden","true");b.oldTab.attr({"aria-selected":"false","aria-expanded":"false"});g.length&&h.length?b.oldTab.attr("tabIndex",-1):g.length&&this.tabs.filter(function(){return 0===c(this).attr("tabIndex")}).attr("tabIndex",-1);g.attr("aria-hidden","false");b.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},
_activate:function(a){a=this._findActive(a);a[0]!==this.active[0]&&(a.length||(a=this.active),a=a.find(".ui-tabs-anchor")[0],this._eventHandler({target:a,currentTarget:a,preventDefault:c.noop}))},_findActive:function(a){return!1===a?c():this.tabs.eq(a)},_getIndex:function(a){"string"===typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']")));return a},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");
this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tablist.unbind(this.eventNamespace);this.tabs.add(this.panels).each(function(){c.data(this,"ui-tabs-destroy")?c(this).remove():c(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});
this.tabs.each(function(){var a=c(this),b=a.data("ui-tabs-aria-controls");b?a.attr("aria-controls",b).removeData("ui-tabs-aria-controls"):a.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(a){var b=this.options.disabled;!1!==b&&(void 0===a?b=!1:(a=this._getIndex(a),b=c.isArray(b)?c.map(b,function(b){return b!==a?b:null}):c.map(this.tabs,function(b,c){return c!==a?c:null})),this._setupDisabled(b))},disable:function(a){var b=
this.options.disabled;if(!0!==b){if(void 0===a)b=!0;else{a=this._getIndex(a);if(-1!==c.inArray(a,b))return;b=c.isArray(b)?c.merge([a],b).sort():[a]}this._setupDisabled(b)}},load:function(a,b){a=this._getIndex(a);var d=this,e=this.tabs.eq(a),f=e.find(".ui-tabs-anchor"),g=this._getPanelForTab(e),h={tab:e,panel:g},k=function(a,b){"abort"===b&&d.panels.stop(!1,!0);e.removeClass("ui-tabs-loading");g.removeAttr("aria-busy");a===d.xhr&&delete d.xhr};this._isLocal(f[0])||(this.xhr=c.ajax(this._ajaxSettings(f,
b,h)))&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),g.attr("aria-busy","true"),this.xhr.done(function(a,c,e){setTimeout(function(){g.html(a);d._trigger("load",b,h);k(e,c)},1)}).fail(function(a,b){setTimeout(function(){k(a,b)},1)}))},_ajaxSettings:function(a,b,d){var e=this;return{url:a.attr("href"),beforeSend:function(a,g){return e._trigger("beforeLoad",b,c.extend({jqXHR:a,ajaxSettings:g},d))}}},_getPanelForTab:function(a){a=c(a).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+
a))}});c.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var a=c(this).attr("title")||"";return c("<a>").text(a).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(a,b){var d=(a.attr("aria-describedby")||"").split(/\s+/);d.push(b);a.data("ui-tooltip-id",b).attr("aria-describedby",c.trim(d.join(" ")))},_removeDescribedBy:function(a){var b=
a.data("ui-tooltip-id"),d=(a.attr("aria-describedby")||"").split(/\s+/),b=c.inArray(b,d);-1!==b&&d.splice(b,1);a.removeData("ui-tooltip-id");(d=c.trim(d.join(" ")))?a.attr("aria-describedby",d):a.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable();this.liveRegion=c("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},
_setOption:function(a,b){var d=this;"disabled"===a?(this[b?"_disable":"_enable"](),this.options[a]=b):(this._super(a,b),"content"===a&&c.each(this.tooltips,function(a,b){d._updateContent(b.element)}))},_disable:function(){var a=this;c.each(this.tooltips,function(b,d){var e=c.Event("blur");e.target=e.currentTarget=d.element[0];a.close(e,!0)});this.element.find(this.options.items).addBack().each(function(){var a=c(this);a.is("[title]")&&a.data("ui-tooltip-title",a.attr("title")).removeAttr("title")})},
_enable:function(){this.element.find(this.options.items).addBack().each(function(){var a=c(this);a.data("ui-tooltip-title")&&a.attr("title",a.data("ui-tooltip-title"))})},open:function(a){var b=this,d=c(a?a.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),a&&"mouseover"===a.type&&d.parents().each(function(){var a=c(this),d;a.data("ui-tooltip-open")&&(d=c.Event("blur"),d.target=
d.currentTarget=this,b.close(d,!0));a.attr("title")&&(a.uniqueId(),b.parents[this.id]={element:this,title:a.attr("title")},a.attr("title",""))}),this._registerCloseHandlers(a,d),this._updateContent(d,a))},_updateContent:function(a,b){var c;c=this.options.content;var e=this,f=b?b.type:null;if("string"===typeof c)return this._open(b,a,c);(c=c.call(a[0],function(c){e._delay(function(){a.data("ui-tooltip-open")&&(b&&(b.type=f),this._open(b,a,c))})}))&&this._open(b,a,c)},_open:function(a,b,d){function e(a){k.of=
a;g.is(":hidden")||g.position(k)}var f,g,h,k=c.extend({},this.options.position);d&&((f=this._find(b))?f.tooltip.find(".ui-tooltip-content").html(d):(b.is("[title]")&&(a&&"mouseover"===a.type?b.attr("title",""):b.removeAttr("title")),f=this._tooltip(b),g=f.tooltip,this._addDescribedBy(b,g.attr("id")),g.find(".ui-tooltip-content").html(d),this.liveRegion.children().hide(),d.clone&&(d=d.clone(),d.removeAttr("id").find("[id]").removeAttr("id")),c("<div>").html(d).appendTo(this.liveRegion),this.options.track&&
a&&/^mouse/.test(a.type)?(this._on(this.document,{mousemove:e}),e(a)):g.position(c.extend({of:b},this.options.position)),g.hide(),this._show(g,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){g.is(":visible")&&(e(k.of),clearInterval(h))},c.fx.interval)),this._trigger("open",a,{tooltip:g})))},_registerCloseHandlers:function(a,b){var d={keyup:function(a){a.keyCode===c.ui.keyCode.ESCAPE&&(a=c.Event(a),a.currentTarget=b[0],this.close(a,!0))}};b[0]!==
this.element[0]&&(d.remove=function(){this._removeTooltip(this._find(b).tooltip)});a&&"mouseover"!==a.type||(d.mouseleave="close");a&&"focusin"!==a.type||(d.focusout="close");this._on(!0,b,d)},close:function(a){var b,d=this,e=c(a?a.currentTarget:this.element),f=this._find(e);f?(b=f.tooltip,f.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&!e.attr("title")&&e.attr("title",e.data("ui-tooltip-title")),this._removeDescribedBy(e),f.hiding=!0,b.stop(!0),this._hide(b,this.options.hide,
function(){d._removeTooltip(c(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),a&&"mouseleave"===a.type&&c.each(this.parents,function(a,b){c(b.element).attr("title",b.title);delete d.parents[a]}),f.closing=!0,this._trigger("close",a,{tooltip:b}),f.hiding||(f.closing=!1))):e.removeData("ui-tooltip-open")},_tooltip:function(a){var b=c("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+
(this.options.tooltipClass||"")),d=b.uniqueId().attr("id");c("<div>").addClass("ui-tooltip-content").appendTo(b);b.appendTo(this.document[0].body);return this.tooltips[d]={element:a,tooltip:b}},_find:function(a){return(a=a.data("ui-tooltip-id"))?this.tooltips[a]:null},_removeTooltip:function(a){a.remove();delete this.tooltips[a.attr("id")]},_destroy:function(){var a=this;c.each(this.tooltips,function(b,d){var e=c.Event("blur"),f=d.element;e.target=e.currentTarget=f[0];a.close(e,!0);c("#"+b).remove();
f.data("ui-tooltip-title")&&(f.attr("title")||f.attr("title",f.data("ui-tooltip-title")),f.removeData("ui-tooltip-title"))});this.liveRegion.remove()}})});
$(document).ready(function(){function c(){var c=$('div[data-spy="affix"]');c.width(c.parent().width()-40);var h=$(window).scrollTop();110<=h?$(".wrapper .section").each(function(m){$(this).offset().top-110-1<=h&&$("a",c).eq(m).addClass("active").siblings().removeClass("active")}):$("a",c).find(".active").removeClass("active").end().find(":first").addClass("active")}c();$(window).on("scroll resize",function(){c()})});
(function(c){function g(c,g,a){var b=c[0],d=/er/.test(a)?_indeterminate:/bl/.test(a)?M:R,e=a==_update?{checked:b[R],disabled:b[M],indeterminate:"true"==c.attr(_indeterminate)||"false"==c.attr(_determinate)}:b[d];if(/^(ch|di|in)/.test(a)&&!e)h(c,d);else if(/^(un|en|de)/.test(a)&&e)m(c,d);else if(a==_update)for(var f in e)e[f]?h(c,f,!0):m(c,f,!0);else if(!g||"toggle"==a){if(!g)c[_callback]("ifClicked");e?b[_type]!==F&&m(c,d):h(c,d)}}function h(g,h,a){var b=g[0],d=g.parent(),e=h==R,f=h==_indeterminate,
k=h==M,z=f?_determinate:e?N:"enabled",J=u(g,z+r(b[_type])),Z=u(g,h+r(b[_type]));if(!0!==b[h]){if(!a&&h==R&&b[_type]==F&&b.name){var A=g.closest("form"),x='input[name="'+b.name+'"]',x=A.length?A.find(x):c(x);x.each(function(){this!==b&&c(this).data(y)&&m(c(this),h)})}f?(b[h]=!0,b[R]&&m(g,R,"force")):(a||(b[h]=!0),e&&b[_indeterminate]&&m(g,_indeterminate,!1));s(g,e,h,a)}b[M]&&u(g,_cursor,!0)&&d.find("."+C).css(_cursor,"default");d[_add](Z||u(g,h)||"");d.attr("role")&&!f&&d.attr("aria-"+(k?M:R),"true");
d[_remove](J||u(g,z)||"")}function m(c,g,a){var b=c[0],d=c.parent(),e=g==R,f=g==_indeterminate,h=g==M,k=f?_determinate:e?N:"enabled",m=u(c,k+r(b[_type])),F=u(c,g+r(b[_type]));if(!1!==b[g]){if(f||!a||"force"==a)b[g]=!1;s(c,e,k,a)}!b[M]&&u(c,_cursor,!0)&&d.find("."+C).css(_cursor,"pointer");d[_remove](F||u(c,g)||"");d.attr("role")&&!f&&d.attr("aria-"+(h?M:R),"false");d[_add](m||u(c,k)||"")}function k(g,h){if(g.data(y)){g.parent().html(g.attr("style",g.data(y).s||""));if(h)g[_callback](h);g.off(".i").unwrap();
c(_label+'[for="'+g[0].id+'"]').add(g.closest(_label)).off(".i")}}function u(c,g,a){if(c.data(y))return c.data(y).o[g+(a?"":"Class")]}function r(c){return c.charAt(0).toUpperCase()+c.slice(1)}function s(c,g,a,b){if(!b){if(g)c[_callback]("ifToggled");c[_callback]("ifChanged")[_callback]("if"+r(a))}}var y="iCheck",C=y+"-helper",F="radio",R="checked",N="un"+R,M="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);c.fn[y]=function(r,w){var a='input[type="checkbox"], input[type="'+F+'"]',b=c(),d=function(d){d.each(function(){var d=c(this);b=d.is(a)?b.add(d):b.add(d.find(a))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(r))return r=r.toLowerCase(),d(this),b.each(function(){var a=
c(this);"destroy"==r?k(a,"ifDestroyed"):g(a,!0,r);c.isFunction(w)&&w()});if("object"!=typeof r&&r)return this;var e=c.extend({checkedClass:R,disabledClass:M,indeterminateClass:_indeterminate,labelHover:!0},r),f=e.handle,p=e.hoverClass||"hover",s=e.focusClass||"focus",u=e.activeClass||"active",N=!!e.labelHover,A=e.labelHoverClass||"hover",x=(""+e.increaseArea).replace("%","")|0;if("checkbox"==f||f==F)a='input[type="'+f+'"]';-50>x&&(x=-50);d(this);return b.each(function(){var a=c(this);k(a);var b=this,
d=b.id,f=-x+"%",w=100+2*x+"%",w={position:"absolute",top:f,left:f,display:"block",width:w,height:w,margin:0,padding:0,background:"#fff",border:0,opacity:0},f=_mobile?{position:"absolute",visibility:"hidden"}:x?w:{position:"absolute",opacity:0},q="checkbox"==b[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+F,r=c(_label+'[for="'+d+'"]').add(a.closest(_label)),H=!!e.aria,I=y+"-"+Math.random().toString(36).substr(2,6),E='<div class="'+q+'" '+(H?'role="'+b[_type]+'" ':"");H&&r.each(function(){E+=
'aria-labelledby="';this.id?E+=this.id:(this.id=I,E+=I);E+='"'});E=a.wrap(E+"/>")[_callback]("ifCreated").parent().append(e.insert);w=c('<ins class="'+C+'"/>').css(w).appendTo(E);a.data(y,{o:e,s:a.attr("style")}).css(f);e.inheritClass&&E[_add](b.className||"");e.inheritID&&d&&E.attr("id",y+"-"+d);"static"==E.css("position")&&E.css("position","relative");g(a,!0,_update);if(r.length)r.on(_click+".i mouseover.i mouseout.i "+_touch,function(d){var e=d[_type],f=c(this);if(!b[M]){if(e==_click){if(c(d.target).is("a"))return;
g(a,!1,!0)}else N&&(/ut|nd/.test(e)?(E[_remove](p),f[_remove](A)):(E[_add](p),f[_add](A)));if(_mobile)d.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(c){var d=c[_type];c=c.keyCode;if(d==_click)return!1;if("keydown"==d&&32==c)return b[_type]==F&&b[R]||(b[R]?m(a,R):h(a,R)),!1;if("keyup"==d&&b[_type]==F)!b[R]&&h(a,R);else if(/us|ur/.test(d))E["blur"==d?_remove:_add](s)});w.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(c){var d=
c[_type],e=/wn|up/.test(d)?u:p;if(!b[M]){if(d==_click)g(a,!1,!0);else{if(/wn|er|in/.test(d))E[_add](e);else E[_remove](e+" "+u);if(r.length&&N&&e==p)r[/ut|nd/.test(d)?_remove:_add](A)}if(_mobile)c.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);var xt1Value="undefined"===typeof xtSiteDomain?".fastjobs.sg":xtSiteDomain;
window.Xtconf={xt1:xt1Value,xtLogDom:".ati-host.net/hit.xiti",xtfirst:!1,xt2:"1",xt3:365,xt4sec:"20",xt4rss:"20",xt4epr:"20",xt4erec:"20",xt4adi:"20",xt4adc:"20",xt4al:"20",xtsds:"https://logws1348",xtsd:"http://logw348",xtsts:0,xtsite:function(c){return c},xtscript:"",xtpreview:!1,xtnocookies:!1,xtcode:"",xt46:"1",xt50:"1",xt48:"",xt54:!1,xt58:!1,xtdocl:!1,xttredir:500,xtkwv:"xtmc",xtkwp:"xtnp",idcExp:397,idcType:"fixed",weboAccountId:0};window.ATInternet=window.ATInternet||{};
window.ATInternet.Utils=new function(){var c=this;c.getCookie=function(c){return(c=RegExp("(?:^| )"+c+"=([^;]+)").exec(document.cookie)||null)&&1<c.length?c[1]:null};c.setCookie=function(c,h,m,k,u){var r=new Date;r.setTime(r.getTime()+1E3*m);m="expires="+r.toGMTString();document.cookie=c+"="+h+";"+m+";path="+(u?u:"/")+";domain="+(k?k:"")};c.serialJSON=function(g,h){var m=typeof g;if("object"!==m||null===g)return"string"===m&&(g=h?encodeURIComponent('"'+g+'"'):'"'+g+'"'),String(g);var k,u,r=[],s=g&&
g.constructor===Array;for(k in g)g.hasOwnProperty(k)&&(u=g[k],m=typeof u,"function"!==m&&("string"===m?u=h?encodeURIComponent('"'+u.replace(/[^\\]"/g,'\\"')+'"'):'"'+u.replace(/[^\\]"/g,'\\"')+'"':"object"===m&&null!==u&&(u=c.serialJSON(u,h)),r.push((s?"":h?encodeURIComponent('"'+k+'":'):'"'+k+'":')+String(u))));return(s?"[":"{")+String(r)+(s?"]":"}")};c.parseJSON=function(c){return null===c?c:"string"===typeof c?(new Function("return "+c))():!1}};
window.Xtcore=function(){function c(a){return"undefined"!==typeof a}function g(a){return ATInternet.Utils.serialJSON(a,!0)}function h(a){return a.replace(/%3C/g,"<").replace(/%3E/g,">").replace(/[<>]/g,"")}function m(a,b,c,d,e){b=0===e?b:encodeURIComponent(b);D||(X.cookie=a+"="+b+";expires="+c.toGMTString()+";path=/"+d)}function k(a,b,d){var e;try{e=E.location.href}catch(f){e=q.location.href}b=null!==b&&c(b)?b:h(e.toLowerCase().replace(/%3d/g,"="));if(0<b.indexOf(a+"=")){b=b.substr(1);a=b.substr(b.indexOf(a+
"="));if(2!=d){if(1!=d)try{a=decodeURIComponent(a)}catch(g){a=unescape(a)}if(b=a.match(/(\[[^\]]*\])/g))for(var l=0,k=b.length;l<k;l++)e=b[l].substring(1,b[l].length-1),a=a.replace(e,encodeURIComponent(e))}b=a.indexOf("#");e=a.search(/&.[^&]+=/gi);e=-1==e?-1==b?a.length:b:0<b&&b<e?b:e;return 1==d?decodeURIComponent(a.substring(a.indexOf("=")+1,e)):2==d?a.substring(a.indexOf("=")+1,e):a.substring(a.indexOf("=")+1,e).replace("&","%26")}return null}function u(b,d,e,f){0!==ta&&3!=ta&&"C"==b||"P"==b||
(P&&"0"==a&&"F"==b?(va=va.replace("&p="+k("p",va,2),""),va=va.replace("&s2="+k("s2",va),""),AT_hit.isPreviewOrPrerendering()||AT_hit.sendTag(b,null,null,d),P=!1):AT_hit.sendTag(b,d));null!==e&&c(e)&&"M"!=b&&(""===f||null===f?X.location=e:window.open(e,"xfen","").focus())}function r(a){a-=100*Math.floor(a/100);return 10>a?"0"+a:a}function s(a){return Math.floor(Math.random()*Math.pow(10,a))}var y=this;y.sentHits=[];var C=Xtconf.xt1,F=Xtconf.xtscript,R=window.xtLogDom=Xtconf.xtLogDom,N=Xtconf.xtpreview,
M=Xtconf.xtfirst,D=Xtconf.xtnocookies,w=Xtconf.xtcode,a=Xtconf.xt46,b=Xtconf.xt50,d=Xtconf.xt48,e=Xtconf.xt54,f=Xtconf.xt58,p=Xtconf.xtdocl,z=Xtconf.xt2,J=Xtconf.xt3;window.xttredir=Xtconf.xttredir;var Z=Xtconf.xtkwv,A=Xtconf.xtkwp,x=[],v=[];v.sec=Xtconf.xt4sec;v.rss=Xtconf.xt4rss;v.epr=Xtconf.xt4epr;v.erec=Xtconf.xt4erec;v.adi=Xtconf.xt4adi;v.adc=Xtconf.xt4adc;v.al=Xtconf.xt4al;v.es=Xtconf.xt4epr;v.ad=Xtconf.xt4adi;var aa=[],P=!0,n=!1,T=null,q=window.xw=window,X=window.xd=document,H=navigator,I=
window.xtv=q.xtczv?"4.6.4-"+q.xtczv:"4.6.4",C=window.xt1=q.xtdmc?";domain="+q.xtdmc:""!==C?";domain="+C:"",E=q.xtnv?q.xtnv:X,V=window.xt7=q.xtsdi?q.xtsdi:q.xtsd?q.xtsd+R:("https:"===X.location.protocol?Xtconf.xtsds:Xtconf.xtsd)+R,K=q.xtsts?q.xtsts:Xtconf.xtsts,Q="";if(e){var da="";try{da=E.location.href}catch(ea){da=q.location.href}var t=/#.*/,B=null;try{B=da.match(t)[0]}catch(Y){B=null}Q=(Q=B)?"&sta="+encodeURIComponent(h(Q)):""}"undefined"!==typeof window.ATTvTracking&&window.ATTvTracking.init(q.Xtconf);
var ha=q.xtcustom?g(q.xtcustom):"",L=window.xt8=q.xtsite?q.xtsite:0,S=window.xt9=q.xtn2?"&s2="+q.xtn2:"",l=window.xt8b=(0===L?"":"s="+L)+(0===K?"":0===L?"sts="+K:"&sts="+K),ra=window.xtp=q.xtpage?q.xtpage:"",fb=q.xto_force?q.xto_force.toLowerCase():null,wa="redirect"===L,Sa=q.xtdi?"&di="+q.xtdi:"",xa=q.xtidp?"&idpays="+q.xtidp:"",gb=q.xtidprov?"&idprov="+q.xtidprov:"",ca=q.xtparam?q.xtparam:"",a=q.xtnopage&&"1"===q.xtnopage?"0":a,b=q.xtergo&&"0"===q.xtergo?"0":b,ta=q.scriptOnClickZone&&"1"===b?q.scriptOnClickZone:
0,za=""!==w?"&code="+w:"",qb=[],hb=[],Ta=[],pa=[],bb=[],ua=[];window.xt44=q.xtprod_load?"&pdtl="+q.xtprod_load:"";q.addEventListener?q.addEventListener("unload",function(){},!1):q.attachEvent&&q.attachEvent("onunload",function(){});X.addEventListener?(X.addEventListener("keydown",function(){n=!0},!1),X.addEventListener("keyup",function(){n=!1},!1)):X.attachEvent&&(X.attachEvent("onkeydown",function(){n=!0}),X.attachEvent("onkeyup",function(){n=!1}));var ya=q.roimt&&0>ca.indexOf("&roimt",0)?"&roimt="+
q.roimt:"",O=0>ca.indexOf("&mc=",0)?q.xtmc?"&mc="+q.xtmc:k(Z)?"&mc="+k(Z):k("xtmc")?"&mc="+k("xtmc"):"":"",ia=k("xtcr")?"&mcrg="+k("xtcr"):"",Pb=q.xtac&&0>ca.indexOf("&ac=",0)?"&ac="+q.xtac:"",Ob=q.xtat&&0>ca.indexOf("&at=",0)?"&at="+q.xtat:"",Ua=q.xtan&&0>ca.indexOf("&an=",0)?"&an="+q.xtan:"",Ea=0>ca.indexOf("&np=",0)?q.xtnp?"&np="+q.xtnp:k(A)?"&np="+k(A):k("xtnp")?"&np="+k("xtnp"):"":"",Qa=q.xtprm&&0>ca.indexOf("&x",0)?q.xtprm:"",ca=ca+(ya+O+ia+Pb+(""!==Ua?Ua:Ob)+Ea+Qa+Q),ib="";try{ib=top.document.referrer}catch(Vb){try{ib=
E.referrer}catch(Wb){}}var Va=screen,ma=window.xt21=new Date,rb=ma.getTime()/36E5,fa=window.xtf1=function(a,b){if(D)return null;b=null!==b&&c(b)?b:"0";var d=RegExp("(?:^| )"+a+"=([^;]+)").exec(X.cookie)||null;if(d&&(d=h(d[1]),"1"!=b))try{d=decodeURIComponent(d)}catch(e){d=unescape(d)}return d};window.xt_addchain=function(a,b){var c=b?b:"abmv",d=x[c]?x[c]:0;d++;ca+="&"+c+""+d+"="+a;x[c]=d};"function"===typeof xt_adch&&xt_adch();window.wck=m;window.xtf3=k;window.xt_mvt=function(a,b,c,d,e){if(d)for(var f=
1;f<d.length+1;f++)c+="&"+(e?e:"abmv")+f+"="+d[f-1];u("","&p="+a+"&s2="+b+"&abmvc="+c+"&type=mvt")};window.xt_med=function(a,b,d,e,f,h,l,k){e="F"!=a||null!==e&&c(e)?"M"==a?"&a="+e+"&m1="+f+"&m2="+h+"&m3="+l+"&m4="+k:"&clic="+e+(l?"&stc="+g(l):""):l?"&stc="+g(l):"";u(a,"&s2="+b+"&p="+d+e,f,h)};if(M=window.xtfirst=-1!=H.userAgent.indexOf("Safari")&&0>H.userAgent.indexOf("Chrome")||-1!=H.userAgent.indexOf("iPhone")||-1!=H.userAgent.indexOf("iPod")||-1!=H.userAgent.indexOf("iPad")||M||q.xtidc||D){var jb=
q.xtidc,sb=fa("xtidc"),Ia="",Ia=jb?jb:sb?sb:(new Date).getTime()+""+s(7);if("relative"==Xtconf.idcType||jb||!sb&&!jb){var kb=new Date;kb.setTime(kb.getTime()+864E5*Xtconf.idcExp);m("xtidc",Ia,kb,C,1)}var Db=fa("xtidc"),Ia=Ia+(q.xtidc||null!==Db&&Db==Ia?"":"-NO")}window.xt_ad=function(a,b,c,d){u("AT","&atc="+a+"&type=AT&patc="+q.xtpage+"&s2atc="+q.xtn2+(d?"&stc="+g(d):""),b,c)};window.xt_adi=function(a,b,c){u("AT","&ati="+a+"&type=AT",b,c)};window.xt_adc=function(a,b,c,d,e){u("AT","&atc="+b+"&type=AT&patc="+
q.xtpage+"&s2atc="+q.xtn2+(e?"&stc="+g(e):""));return AT_click.do_navig(a,c,d?"_blank":null,!0)};window.xt_click=function(a,b,d,e,f,h,l,k){f=("F"!=b||null!==f&&c(f)?"&clic="+f:"")+(k?"&stc="+g(k):"");u(b,"&s2="+d+"&p="+e+f);return AT_click.do_navig(a,h,l?"_blank":null,!0)};window.xt_form=function(a,b,d,e,f,h,l){f=("F"!=b||null!==f&&c(f)?"&clic="+f:"")+(l?"&stc="+g(l):"");u(b,"&s2="+d+"&p="+e+f);return AT_click.do_submit(a,!0,h)};window.xt_rm=function(a,b,c,d,e,f,g,h,l,k,m,t,n,B){u(a,"&p="+c+"&s2="+
b+"&type="+a+"&a="+d+"&m5="+m+"&m6="+t+(null!==e&&"0"!=e?"&"+e:"")+(null!==g&&"pause"!=d&&"stop"!=d?"&m1="+g+"&"+h+"&m3="+l+"&m4="+k+"&m7="+n+"&m8="+B+"&prich="+q.xtpage+"&s2rich="+q.xtn2:"")+(null!==f&&"0"!=f&&null!==g?"&rfsh="+f:""));e=new Date;null===f||"0"==f||"play"!=d&&"play&buf=1"!=d&&"refresh"!=d?"pause"!=d&&"stop"!=d||null===aa||(q.clearTimeout(aa[a]),"stop"==d?qb[a]=0:ua[a]=e.getTime()):(ua[a]&&18E5<e.getTime()-ua[a]&&(Ta[a]=0),"play"!=d&&"play&buf=1"!=d||Ta[a]?"refresh"==d&&("live"==t||
!pa[a]||300<pa[a]&&2>100*qb[a]/pa[a])&&(d=ua[a]?bb[a]:e.getTime()/1E3-Ta[a],5>100*hb[a]/(d+30)&&(hb[a]=(d+30)/100*5),ua[a]&&(ua[a]=!1,Ta[a]=e.getTime()/1E3-bb[a]),bb[a]=d):(Ta[a]=e.getTime()/1E3,pa[a]=parseInt(g),d=Math.floor(f),d=1500<d?1500:5>d?5:d,qb[a]=d,hb[a]=d,ua[a]=!1),aa[a]=q.setTimeout("xt_rm('"+a+"','"+b+"','"+c+"','refresh','0','"+f+"',null,'"+h+"','"+l+"','"+k+"','"+m+"','"+t+"')",1E3*hb[a]))};var tb=window.xtidpg=r(ma.getHours())+""+r(ma.getMinutes())+""+r(ma.getSeconds())+""+s(7),ba=
0,Pa=0;window.xt16="";window.xt_addProduct=function(a,b,c,d,e,f){ba++;q.xt16+="&pdt"+ba+"=";q.xt16+=a?a+"::":"";q.xt16+=b?b:"";q.xt16+=c?"&qte"+ba+"="+c:"";q.xt16+=d?"&mt"+ba+"="+d:"";q.xt16+=e?"&dsc"+ba+"="+e:"";q.xt16+=f?"&pcode"+ba+"="+f:""};window.xt_rd=s;window.xt_addProduct_v2=function(a,b,c,d,e,f,g,h,l){ba++;q.xt16+="&pdt"+ba+"=";q.xt16+=a?a+"::":"";q.xt16+=b?b:"";q.xt16+=c?"&qte"+ba+"="+c:"";q.xt16+=d?"&mt"+ba+"="+d:"";q.xt16+=e?"&mtht"+ba+"="+e:"";q.xt16+=f?"&dsc"+ba+"="+f:"";q.xt16+=g?"&dscht"+
ba+"="+g:"";q.xt16+=l?"&roimt"+ba+"="+l:"";q.xt16+=h?"&pcode"+ba+"="+h:""};window.xt_addProduct_load=function(a,b,c){b&&(Pa++,q.xt44+=1==Pa?"&pdtl=":"|",q.xt44+=a?a+"::":"",q.xt44+=b,q.xt44+=c?";"+c:"")};"function"==typeof xt_cart?xt_cart():q.xt16="";window.xt_ParseUrl=function(a,b,c){AT_hit.sendTag(c?"F":"old",b)};window.xt_ParseUrl3=function(a,b,c,d,e){AT_hit.sendTag("&ati="==e?"AT":"PDT",b,null,"&type="+("&ati="==e?"AT":"PDT"))};window.AT_click={id:0,objs:[],elem:function(a,b,d,e,f,h,l,k){var m=
{};m.urlDest=f;m.type=a;m.n2=b;m.label=d;m.typeClick=e;m.target=h;m.submit=!1!==f;m.redir=c(l)?l:!0;m.xtcust=c(k)?"&stc="+g(k):"";return m},addListener:function(a,b,c){window.addEventListener?a.addEventListener(b,c,!1):window.attachEvent&&a.attachEvent("on"+b,c)},tag:function(a,b,c,d,e,f,g,h,l){if(a&&"function"==typeof a.setAttribute)this.addElem(a,b,c,d,e,f,g,h,l);else if("object"==typeof a)for(var k in a)a.hasOwnProperty(k)&&"function"==typeof a[k].setAttribute&&this.addElem(a[k],b,c,d,e,f,g,h,
l)},addElem:function(a,b,c,d,e,f,g,h,l){this.id++;a.setAttribute("data-xtclickid",this.id);this.objs[this.id]=this.elem(b,c,d,e,f,g,h,l);"FORM"!=a.nodeName?this.addListener(a,"click",this.on_click_submit):this.addListener(a,"submit",this.on_click_submit)},on_click_submit:function(a){try{var b=a.target||a.srcElement,c=b.getAttribute("data-xtclickid"),d={},e="",f=a.defaultPrevented,g=window.AT_click;if(!c)for(var h=b.parentNode;h;){if(h.getAttribute("data-xtclickid")){c=h.getAttribute("data-xtclickid");
break}h=h.parentNode}c&&(d=g.objs[c],"AT"!=d.type?e+="&p="+d.label+("C"==d.type?"&clic="+d.typeClick:""):"AT"==d.type&&(e+="&type=AT&atc="+d.label),e+=d.xtcust,u(d.type,"&s2="+d.n2+e),!f&&d.redir&&(a.preventDefault(),"FORM"!=b.nodeName?g.do_navig(b,d.urlDest,d.target):g.do_submit(b,null,d.submit)))}catch(l){}},do_navig:function(a,b,c,d){var e=null;if("A"!=a.nodeName)for(var f=a.parentNode;f;){if("A"==f.nodeName){e=f;break}f=f.parentNode}else e=a;if(e){if(e.target=c||a.target||"_self",e.href=b||a.href||
e.href,!d||d&&!n)if(a=e.href.split('"').join('\\"'),0>e.href.indexOf("mailto:"))if("_self"==e.target.toLowerCase()){if(setTimeout('self.location.href="'+a+'"',q.xttredir),d)return!1}else if("_top"==e.target.toLowerCase()){if(setTimeout('top.location.href="'+a+'"',q.xttredir),d)return!1}else if("_parent"==e.target.toLowerCase()){if(setTimeout('parent.location.href="'+a+'"',q.xttredir),d)return!1}else return!0;else if(setTimeout('AT_click.mail_to("'+a+'");',q.xttredir),d)return!1}else if(b||a.href)if(b=
b?b:a.href,0>b.indexOf("mailto:"))if("_blank"==c)setTimeout('(xw.open("'+b.split('"').join('\\"')+'","_blank")).focus();',1);else{if(setTimeout('self.location.href="'+b.split('"').join('\\"')+'"',q.xttredir),d)return!1}else if(setTimeout('AT_click.mail_to("'+b.split('"').join('\\"')+'");',q.xttredir),d)return!1;if(d)return n=!1,!0},do_submit:function(a,b,c){if(c&&(setTimeout(function(){a.submit()},500),b&&c))return!1},mail_to:function(a){window.location=a}};window.AT_hit={first:!0,referrer:("acc_dir"==
k("xtref")?"":null!==k("xtref")?k("xtref"):"acc_dir"==fa("xtref")?"":fa("xtref")||ib.replace(/[<>]/g,"")||"").replace(/[<>]/g,"").substring(0,1600),parse:function(a,b,c,d){var e=[""];if(1600>=b.length)e[0]=b;else{a=AT_hit.first&&"F"==a?tb:tb.substring(0,6)+s(8);var f="",g="",h,l={},m=0;0<=b.indexOf("&ref=")&&(f=b.substring(b.indexOf("&ref=")),b=b.replace(f,""));if(d)for(var t in d)d.hasOwnProperty(t)&&0<=b.indexOf("&"+t+"=")&&1600<(g=k(t,b,2)).length&&(b=b.replace("&"+t+"="+g,""),h=RegExp("["+d[t]+
"]","gi"),l[t]=g.replace(/&/g,"%26").split(h));h=RegExp("["+c+"]","gi");h=b.split(h);for(var n in h)h.hasOwnProperty(n)&&(1600>=e[m].length+h[n].length+1?e[m]+=""!==h[n]?"&"+h[n]:"":(e.push(""),m++,e[m]=1600>h[n].length?e[m]+(""!==h[n]?"&"+h[n]:""):e[m]+("&mherr=1&"+h[n].substring(0,1600))));for(var B in l)if(l.hasOwnProperty(B))for(b="&"+B+"=",c=!1,t=l[B].length,n=0;n<t;n++)1600>=e[m].length+l[B][n].length+1?(c||(e[m]+=b,c=!0),e[m]+=""!==l[B][n]?l[B][n]+("stc"===B&&t-1===n?"":d[B]):""):(e.push(b),
c=!0,m++,e[m]=1600>l[B][n].length?e[m]+(""!==l[B][n]?l[B][n]+("stc"===B&&t-1===n?"":d[B]):""):e[m]+("mherr=1"+d[B]));f&&(1600>=e[m].length+f.length||(e.push(""),m++),e[m]+=f);for(d=0;d<e.length;d++)e[d]="&mh="+(d+1)+"-"+e.length+"-"+a+e[d]}return e},sendTag:function(a,b,c,d){"undefined"!=typeof window.ATTvTracking&&window.ATTvTracking.update();"undefined"!=typeof window.ATTagWebo&&ATTagWebo.update();var e=[];c=c||Yb+l;c+=q.xtfirst?"&idclient="+Ia:"";a=a||"F";b=b||va;b+=(d?d:"")+"&vtag="+I+AT_hit.localHour()+
AT_hit.resolution()+"&rn="+(new Date).getTime();AT_hit.first&&"F"==a&&(b+=ha&&0>b.indexOf("&stc=")?"&stc="+ha:"",b+="&ref="+AT_hit.referrer.replace(/&/g,"$"));"C"===a&&(b+="&pclick="+q.xtpage+"&s2click="+(q.xtn2?q.xtn2:""));e=AT_hit.parse(a,b,"&",{ati:",",atc:",",pdtl:"|",stc:",",dz:"|"});for(b=0;b<e.length;b++)AT_hit.loadImage(c+e[b]);AT_hit.first&&"F"==a&&""!==F&&AT_hit.loadFile("script",F,!0,"text/javascript");"F"==a&&(AT_hit.first=!1)},loadImage:function(a){var b=new Image;b.src=a;y.sentHits instanceof
Array&&y.sentHits.push(a);b.onload=function(){b.onload=null}},loadFile:function(a,b,c,d,e){a=document.createElement(a);a.type=d;a.async=c;a.src=b;(e||document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]||document.getElementsByTagName("script")[0].parentNode).insertBefore(a,null)},localHour:function(a){a=a?a:new Date;return"&hl="+a.getHours()+"x"+a.getMinutes()+"x"+a.getSeconds()},resolution:function(){if(4<=parseFloat(H.appVersion))try{var a;a="undefined"!==typeof window.devicePixelRatio?
window.devicePixelRatio:1;return"&r="+Va.width*a+"x"+Va.height*a+"x"+Va.pixelDepth+"x"+Va.colorDepth}catch(b){}return""},prerenderDisplaying:function(){AT_hit.first&&(AT_hit.sendTag("F"),""!==xt44&&AT_hit.sendTag("PDT",xt44,null,"&type=PDT&p="+ra+(q.xt_pageID?"&pid="+q.xt_pageID+"&pchap="+(q.xt_chap||"")+"&pidt="+(q.xt_pageDate||""):"")))},isPreviewOrPrerendering:function(){return window.navigator&&"preview"===window.navigator.loadPurpose&&-1!=H.userAgent.indexOf("Safari")&&0>H.userAgent.indexOf("Chrome")?
(N&&(AT_hit.sendTag("F",null,null,"&pvw=1"),""!==xt44&&AT_hit.sendTag("PDT",xt44,null,"&type=PDT&p="+ra+(q.xt_pageID?"&pid="+q.xt_pageID+"&pchap="+(q.xt_chap||"")+"&pidt="+(q.xt_pageDate||""):""))),!0):"prerender"==X.webkitVisibilityState?(X.addEventListener("webkitvisibilitychange",AT_hit.prerenderDisplaying,!1),!0):!1}};if(0!==L||0!==K||wa){var Oa="";if(""!==d){(Oa=fa("xtvid"))||(T=Oa=ma.getTime()+""+s(6));var db=new Date;db.setMinutes(db.getMinutes()+30);m("xtvid",Oa,db,"",1)}window.xtvid=Oa;var cb=
Xtconf.xtsite("xtor"),Ha=Xtconf.xtsite("xtdate"),Jb=Xtconf.xtsite("xtocl"),ob=Xtconf.xtsite("xtan"),ub=Xtconf.xtsite("xtat"),Wa=Xtconf.xtsite("xtant"),Aa=k("xtor"),eb=k("xtdt"),ja=k("xtan"),na=k("xtat"),vb=k("an",ca),lb=k("at",ca),Kb=k("ac",ca),Ra=fa(Jb),Fa=fa("xtgo"),mb=fa("xtord"),Ja=fa("xtvrn"),Xa=null!==Ra?Ra:"$",wb="0"===Fa?mb:null,xb=null!==Fa?Fa:"0",Ka=null!==Ja?Ja:"$",nb=ma.getTime()/6E4,sa=null===eb||k("xts")!=L&&!wa?xb:30>nb-eb&&0<=nb-eb?"2":"1",Ba="1"==xb?"&pgt="+mb:"1"==sa&&null!==Aa?
"&pgt="+Aa:"",La=null!==fb?fb:null!==Aa&&"0"==sa?Aa:wa?null:wb,La=0>Xa.indexOf("$"+La+"$")||"$"==Xa?La:null,oa="0"==sa?La:"2"==xb?mb:"2"==sa?Aa:null,Ma,yb;null!==oa?(yb=oa.substring(0,oa.indexOf("-")),Ma=v[yb]):Ma="1";null!==Ma&&c(Ma)||(Ma=v.ad);null===ja&&!wa&&(ja=fa("xtanrd"));null===na&&!wa&&(na=fa("xtatrd"));var Lb=fa(ob),zb=fa(ub),Ya=fa(Wa),la=new Date,qa=window.xt29=new Date,Mb=new Date;wa?la.setTime(la.getTime()+3E4):la.setTime(la.getTime()+864E5*Ma);Mb.setTime(Mb.getTime()+18E5);qa.setTime(qa.getTime()+
864E5*J);var Ab=null!==ja?ja.indexOf("-"):0,pb=null!==na?na.indexOf("-"):0,Bb=null!==vb?"":null!==ja&&0<Ab?"&ac="+ja.substring(0,Ab)+"&ant=0&an="+ja.substring(Ab+1,ja.length):null!==Lb?"&anc="+Lb+"&anct="+Ya:"",Sb=null!==lb?"":null!==na&&0<pb?"&ac="+na.substring(0,pb)+"&ant=0&at="+na.substring(pb+1,na.length):null!==zb?"&attc="+zb+"&anct="+Ya:"",Ca=0>Ka.indexOf("$"+L+"$")?"&vrn=1":"",Tb=null!==k("xtatc")&&null===k("atc",ca)?"&atc="+k("xtatc"):"";""!==Ca&&m("xtvrn",141>Ka.length?Ka+L+"$":Ka.substring(0,
141),qa,C,0);Ca+=null===La?"":"&xto="+La;Ca+=(""!==Bb?Bb:Sb)+Ba+Tb;null!==vb?(m(ob,Kb+"-"+vb,qa,C,1),m(Wa,"1",qa,C,1)):null!==ja&&"1"!=Ya&&(m(ob,ja,qa,C,1),m(Wa,"0",qa,C,1));null!==lb?(m(ub,Kb+"-"+lb,qa,C,1),m(Wa,"1",qa,C,1)):null!==na&&"1"!=Ya&&(m(ub,na,qa,C,1),m(Wa,"0",qa,C,1));var Na=fa(cb),Za=fa(Ha),Za=(/[a-zA-Z]/.test(Za)?(new Date(Za)).getTime()/36E5:parseFloat(fa(Ha)))||(new Date).getTime()/36E5,$a=0<=Math.floor(rb-Za)?Math.floor(rb-Za):0,Ca=Ca+(null===Na?"":"&xtor="+Na+"&roinbh="+$a);if(wa)m("xtgo",
sa,la,C,1),null!==Aa&&m("xtord",Aa,la,C,1),null!==ja&&m("xtanrd",ja,la,C,1),null!==na&&m("xtatrd",na,la,C,1),m("xtref",AT_hit.referrer?AT_hit.referrer.replace(/&/g,"$"):"acc_dir",la,C,0),q.xtloc&&(E.location=q.xtloc);else{null!==oa&&(0>Xa.indexOf("$"+encodeURIComponent(oa)+"$")||"$"==Xa)&&m(Jb,Xa+oa+"$",Mb,C,1);var ab=H.appName+" "+H.appVersion,Da=ab.indexOf("MSIE"),Ga;0<=Da?(Ga=parseInt(ab.substr(Da+5)),Da=!0):(Ga=parseFloat(H.appVersion),Da=!1);var Nb=0<=ab.indexOf("Netscape"),Ub=0<=ab.indexOf("Mac"),
Cb=0<=H.userAgent.indexOf("Opera"),G="",W="",U="",ka="";if(Da&&5<=Ga&&!Ub&&!Cb&&!wa)try{X.body.addBehavior("#default#clientCaps"),G="&cn="+X.body.connectionType,G+="&ul="+X.body.UserLanguage,X.body.addBehavior("#default#homePage"),W=X.body.isHomePage(location.href)?"&hm=1":"&hm=0",ka="&re="+X.body.offsetWidth+"x"+X.body.offsetHeight}catch(Zb){}else 5<=Ga&&(ka="&re="+q.innerWidth+"x"+q.innerHeight);Nb&&4<=Ga||Cb?U="&lng="+H.language:Da&&4<=Ga&&!Cb&&(U="&lng="+H.userLanguage);m("xtord","",ma,C,1);null===
oa||null!==Na&&"1"!=z||(m(cb,oa,la,C,1),m(Ha,ma.getTime()/36E5,la,C,1));var Xb=p?"&docl="+encodeURIComponent(E.location.href.replace(/&/g,"#ec#")):"",va=S+"&p="+ra+Sa+xa+gb+Ca+Xb+za+ca+G+W+U+"&idp="+tb,Qb=fa("xtvalCZ",1);if(null!==Qb){var va=va+decodeURIComponent(Qb.replace(/%at1%/g,"-").replace(/%at2%/g,"_").replace(/%at3%/g,".").replace(/%at4%/g,"!").replace(/%at5%/g,"~").replace(/%at6%/g,"*").replace(/%at7%/g,"'").replace(/%at8%/g,"(").replace(/%at9%/g,")")).replace("&c=","&current=").replace("&b=",
"&before=").replace("&a=","&after="),Rb=new Date;Rb.setTime(Rb.getTime()-36E5);m("xtvalCZ",Qb,Rb,C,1)}var Yb=window.Xt_id=V+"?",Eb=fa("xtide");if(null!==oa)switch(yb.toLowerCase()){case "erec":case "epr":case "es":var Fb=null;try{var Gb=oa.match(/(\[[^\]]*\])|([^\-]+)|(-)/g),Hb=0,Ib;for(Ib in Gb)"-"==Gb[Ib]&&Hb++,5==Hb&&"-"!=Gb[Ib]&&(Fb=Gb[Ib])}catch($b){Fb=null}null!==Fb&&(Eb=Fb,m("xtide",Eb,qa,"",1))}va+="&jv="+(H.javaEnabled()?"1":"0")+ka+xt16+(null!==Eb?"&ide="+Eb:"");T&&(va+="&lnk="+d+"&vid="+
T);"0"!=a&&!AT_hit.isPreviewOrPrerendering()&&(AT_hit.sendTag("F"),""!==xt44&&AT_hit.sendTag("PDT",xt44,null,"&type=PDT&p="+ra+(q.xt_pageID?"&pid="+q.xt_pageID+"&pchap="+(q.xt_chap||"")+"&pidt="+(q.xt_pageDate||""):"")))}}0<ta&&"function"==typeof xtNodesload&&(f?q.addEventListener?q.addEventListener("load",xtNodesload,!1):q.attachEvent&&q.attachEvent("onload",xtNodesload):xtNodesload())};window.Xtconf.weboAccountId||(window.attag=new Xtcore);
window.ATWebo=function(){var c=this,g=("https:"==document.location.protocol?"https://":"http://")+"aimfr.solution.weborama.fr/fcgi-bin/dispatch.fcgi?g.wr=1&a.A=la",h={},m={},k=!1,u=!1;c.init=function(k){h=k;g+="&a.si="+h.weboAccountId+"&a.cb=ATTagWebo.callback&_="+Math.random();k=null;h.xtnocookies?(c.initInfoWebo(),m.info.message="xtnocookies",c.setXtcore()):(k=ATInternet.Utils.getCookie("atwebo"))?(m=ATInternet.Utils.parseJSON(k),c.setXtcore()):(c.initInfoWebo(),c.run())};c.update=function(){var c=
ATInternet.Utils.getCookie("atwebo");c&&ATInternet.Utils.setCookie("atwebo",c,1800,h.xt1)};c.run=function(){var h=document.createElement("script");h.type="text/javascript";h.async=!0;h.src=g;h.onerror=c.setScriptError;(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]||document.getElementsByTagName("script")[0].parentNode).insertBefore(h,null);setTimeout(c.setTimeoutError,500)};c.initInfoWebo=function(){m.info={version:"1.0.0",accountid:h.weboAccountId,message:"",
error:[]}};c.setDataWebo=function(c){m.data={accountid:h.weboAccountId,code:c}};c.setCookieWebo=function(){var c=ATInternet.Utils.serialJSON(m);ATInternet.Utils.setCookie("atwebo",c,1800,h.xt1);ATInternet.Utils.getCookie("atwebo")||(m.info.error.push("cookieError"),m={info:m.info})};c.setXtcore=function(){k||(window.xtcustom=window.xtcustom||{},window.xtcustom.wbo=m,window.attag=new Xtcore,k=!0)};c.setScriptError=function(){m.info.error.push("noScript");c.setCookieWebo();c.setXtcore()};c.setTimeoutError=
function(){u=!0;k||(m.info.error.push("timeout"),c.setCookieWebo(),c.setXtcore())};c.callback=function(g){u||("string"===typeof g?0!==g.length?c.setDataWebo(g):m.info.message="noAction":m.info.error.push("codeError"),c.setCookieWebo(),c.setXtcore())}};window.Xtconf.weboAccountId&&(window.ATTagWebo=new ATWebo,ATTagWebo.init(window.Xtconf));
(function(c){c.fn.unveil=function(g,h){function m(){y=s.filter(function(){var g=c(this);if(!g.is(":hidden")){var h=k.scrollTop(),m=h+k.height(),s=g.offset().top;return s+g.height()>=h-u&&s<=m+u}}).trigger("unveil");s=s.not(y)}var k=c(window),u=g||0,r=1<window.devicePixelRatio?"data-src-retina":"data-src",s=this,y;this.one("unveil",function(){var g=c(this),k=this.getAttribute(r);if(k=k||this.getAttribute("data-src"))g.is("img")?(g.attr("src",k),this.setAttribute("src",k)):(g.css("background-image",
"url('"+k+"')"),this.setAttribute("data-original-src",k),k=this.getAttribute("data-bg-size"),null!==k&&g.css("background-size",k)),"function"===typeof h&&h.call(this)});k.on("scroll.unveil resize.unveil lookup.unveil",m);m();return this}})(window.jQuery||window.Zepto);
!function(c,g){"function"==typeof define&&define.amd?define([],g(c)):"object"==typeof exports?module.exports=g(c):c.iziToast=g(c)}("undefined"!=typeof global?global:window||this.window||this.global,function(c){var g={},h=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),m=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),k="undefined"!=typeof InstallTrigger,u="ontouchstart"in document.documentElement,r="bottomRight bottomLeft bottomCenter topRight topLeft topCenter center".split(" "),
s={},y={id:null,"class":"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,rtl:!1,position:"bottomRight",target:"",targetFirst:!0,toastOnce:!1,timeout:5E3,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",
overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent)c=function(c,a){a=a||{bubbles:!1,cancelable:!1,detail:void 0};var b=
document.createEvent("CustomEvent");return b.initCustomEvent(c,a.bubbles,a.cancelable,a.detail),b},c.prototype=window.Event.prototype,window.CustomEvent=c;var C=function(c,a,b){if("[object Object]"===Object.prototype.toString.call(c))for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&a.call(b,c[d],d,c);else if(c){d=0;for(var e=c.length;e>d;d++)a.call(b,c[d],d,c)}},F=function(c,a){var b={};return C(c,function(a,e){b[e]=c[e]}),C(a,function(c,e){b[e]=a[e]}),b},R=function(c){var a=document.createDocumentFragment(),
b=document.createElement("div");for(b.innerHTML=c;b.firstChild;)a.appendChild(b.firstChild);return a},N=function(c){return"#"==c.substring(0,1)||"rgb"==c.substring(0,3)||"hsl"==c.substring(0,3)},M=function(c){try{return btoa(atob(c))==c}catch(a){return!1}},D=function(){return{move:function(c,a,b,d){var e;0!==d&&(c.classList.add("iziToast-dragged"),c.style.transform="translateX("+d+"px)",0<d?(e=(180-d)/180,.3>e&&a.hide(c,F(b,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),"drag")):
(e=(180+d)/180,.3>e&&a.hide(c,F(b,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),"drag")),c.style.opacity=e,.3>e&&((m||k)&&(c.style.left=d+"px"),c.parentNode.style.opacity=.3,this.stopMoving(c,null)))},startMoving:function(c,a,b,d){d=d||window.event;d=u?d.touches[0].clientX:d.clientX;var e=c.style.transform.replace("px)",""),e=e.replace("translateX(",""),f=d-e;c.classList.remove(b.transitionIn);c.classList.remove(b.transitionInMobile);c.style.transition="";u?document.ontouchmove=
function(d){d.preventDefault();d=d||window.event;D.move(c,a,b,d.touches[0].clientX-f)}:document.onmousemove=function(d){d.preventDefault();d=d||window.event;D.move(c,a,b,d.clientX-f)}},stopMoving:function(c,a){u?document.ontouchmove=function(){}:document.onmousemove=function(){};c.style.opacity="";c.style.transform="";c.classList.contains("iziToast-dragged")&&(c.classList.remove("iziToast-dragged"),c.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout(function(){c.style.transition=
""},400))}}}();return g.destroy=function(){C(document.querySelectorAll(".iziToast-wrapper"),function(c,a){c.remove()});C(document.querySelectorAll(".iziToast"),function(c,a){c.remove()});document.removeEventListener("iziToast-opened",{},!1);document.removeEventListener("iziToast-opening",{},!1);document.removeEventListener("iziToast-closing",{},!1);document.removeEventListener("iziToast-closed",{},!1);document.removeEventListener("keyup",{},!1);s={}},g.settings=function(c){g.destroy();s=c;y=F(y,c||
{})},C({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},function(c,a){g[a]=function(a){a=F(s,a||{});a=F(c,a||{});this.show(a)}}),g.progress=function(c,a,b){var d=this,e=F(d.settings,a||{}),f=c.querySelector(".iziToast-progressbar div");return{start:function(){null!==f&&(f.style.transition="width "+e.timeout+"ms "+e.progressBarEasing,f.style.width=
"0%");e.TIME.START=(new Date).getTime();e.TIME.END=e.TIME.START+e.timeout;e.TIME.TIMER=setTimeout(function(){clearTimeout(e.TIME.TIMER);c.classList.contains("iziToast-closing")||(d.hide(c,e,"timeout"),"function"==typeof b&&b.apply(d))},e.timeout)},pause:function(){if(e.TIME.REMAINING=e.TIME.END-(new Date).getTime(),clearTimeout(e.TIME.TIMER),null!==f){var a=window.getComputedStyle(f).getPropertyValue("width");f.style.transition="none";f.style.width=a}"function"==typeof b&&setTimeout(function(){b.apply(d)},
10)},resume:function(){null!==f&&(f.style.transition="width "+e.TIME.REMAINING+"ms "+e.progressBarEasing,f.style.width="0%");e.TIME.END=(new Date).getTime()+e.TIME.REMAINING;e.TIME.TIMER=setTimeout(function(){clearTimeout(e.TIME.TIMER);c.classList.contains("iziToast-closing")||(d.hide(c,e,"timeout"),"function"==typeof b&&b.apply(d))},e.TIME.REMAINING)},reset:function(){clearTimeout(e.TIME.TIMER);null!==f&&(f.style.transition="none",f.style.width="100%");"function"==typeof b&&setTimeout(function(){b.apply(d)},
10)}}},g.hide=function(c,a,b){var d=F(this.settings,a||{});b=b||null;"object"!=typeof c&&(c=document.querySelector(c));c.classList.add("iziToast-closing");d.closedBy=b;d.REF=c.getAttribute("data-iziToast-ref");(function(){var a=document.querySelector(".iziToast-overlay");if(null!==a){var b=a.getAttribute("data-iziToast-ref"),b=b.split(","),c=b.indexOf(d.REF);-1!==c&&b.splice(c,1);a.setAttribute("data-iziToast-ref",b.join());0===b.length&&(a.classList.remove("fadeIn"),a.classList.add("fadeOut"),setTimeout(function(){a.remove()},
700))}})();(d.transitionIn||d.transitionInMobile)&&(c.classList.remove(d.transitionIn),c.classList.remove(d.transitionInMobile));h||568>=window.innerWidth?d.transitionOutMobile&&c.classList.add(d.transitionOutMobile):d.transitionOut&&c.classList.add(d.transitionOut);c.parentNode.style.height=c.parentNode.offsetHeight+"px";c.style.pointerEvents="none";(!h||568<window.innerWidth)&&(c.parentNode.style.transitionDelay="0.2s");try{d.closedBy=b;var e=new CustomEvent("iziToast-closing",{detail:d,bubbles:!0,
cancelable:!0});document.dispatchEvent(e)}catch(f){console.warn(f)}setTimeout(function(){c.parentNode.style.height="0px";c.parentNode.style.overflow="";setTimeout(function(){c.parentNode.remove();try{d.closedBy=b;var a=new CustomEvent("iziToast-closed",{detail:d,bubbles:!0,cancelable:!0});document.dispatchEvent(a)}catch(e){console.warn(e)}"undefined"!=typeof d.onClosed&&d.onClosed.apply(null,[d,c,b])},1E3)},200);"undefined"!=typeof d.onClosing&&d.onClosing.apply(null,[d,c,b])},g.show=function(c){var a=
this,b=F(s,c||{});if(b=F(y,b),b.TIME={},b.toastOnce&&b.id&&0<document.querySelectorAll(".iziToast#"+b.id).length)return!1;b.REF=(new Date).getTime()+Math.floor(1E7*Math.random()+1);document.querySelector("body");var d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("div"),g=document.createElement("div"),k=document.createElement("div"),m=document.createElement("i");c=document.createElement("div");var Z=document.createElement("div"),A=null,x,v,aa,P,n;e.setAttribute("data-iziToast-ref",
b.REF);e.appendChild(f);k.appendChild(e);(function(){if(e.classList.add("iziToast"),e.classList.add("iziToast-opening"),k.classList.add("iziToast-capsule"),f.classList.add("iziToast-body"),g.classList.add("iziToast-texts"),h||568>=window.innerWidth?b.transitionInMobile&&e.classList.add(b.transitionInMobile):b.transitionIn&&e.classList.add(b.transitionIn),b["class"]){var a=b["class"].split(" ");C(a,function(a,b){e.classList.add(a)})}b.id&&(e.id=b.id);b.rtl&&e.classList.add("iziToast-rtl");1<b.layout&&
e.classList.add("iziToast-layout"+b.layout);b.balloon&&e.classList.add("iziToast-balloon");b.maxWidth&&(isNaN(b.maxWidth)?e.style.maxWidth=b.maxWidth:e.style.maxWidth=b.maxWidth+"px");""===b.theme&&"light"===b.theme||e.classList.add("iziToast-theme-"+b.theme);b.color&&(N(b.color)?e.style.background=b.color:e.classList.add("iziToast-color-"+b.color));b.backgroundColor&&(e.style.background=b.backgroundColor,b.balloon&&(e.style.borderColor=b.backgroundColor))})();b.image&&(c.classList.add("iziToast-cover"),
c.style.width=b.imageWidth+"px",M(b.image.replace(/ /g,""))?c.style.backgroundImage="url(data:image/png;base64,"+b.image.replace(/ /g,"")+")":c.style.backgroundImage="url("+b.image+")",b.rtl?f.style.marginRight=b.imageWidth+10+"px":f.style.marginLeft=b.imageWidth+10+"px",e.appendChild(c));(function(){b.close?(x=document.createElement("button"),x.classList.add("iziToast-close"),x.addEventListener("click",function(c){c.target;a.hide(e,b,"button")}),e.appendChild(x)):b.rtl?e.style.paddingLeft="20px":
e.style.paddingRight="20px"})();(function(){b.timeout&&(b.progressBar&&(v=document.createElement("div"),aa=document.createElement("div"),v.classList.add("iziToast-progressbar"),aa.style.background=b.progressBarColor,v.appendChild(aa),e.appendChild(v)),b.pauseOnHover&&!b.resetOnHover&&(e.addEventListener("mouseenter",function(c){this.classList.add("iziToast-paused");a.progress(e,b).pause()}),e.addEventListener("mouseleave",function(c){this.classList.remove("iziToast-paused");a.progress(e,b).resume()})),
b.resetOnHover&&(e.addEventListener("mouseenter",function(c){this.classList.add("iziToast-reseted");a.progress(e,b).reset()}),e.addEventListener("mouseleave",function(c){this.classList.remove("iziToast-reseted");a.progress(e,b).start()})))})();b.icon&&(m.setAttribute("class","iziToast-icon "+b.icon),b.iconText&&m.appendChild(document.createTextNode(b.iconText)),b.rtl?f.style.paddingRight="33px":f.style.paddingLeft="33px",b.iconColor&&(m.style.color=b.iconColor),f.appendChild(m));0<b.title.length&&
(P=document.createElement("strong"),P.classList.add("iziToast-title"),P.appendChild(R(b.title)),g.appendChild(P),b.titleColor&&(P.style.color=b.titleColor),b.titleSize&&(isNaN(b.titleSize)?P.style.fontSize=b.titleSize:P.style.fontSize=b.titleSize+"px"),b.titleLineHeight&&(isNaN(b.titleSize)?P.style.lineHeight=b.titleLineHeight:P.style.lineHeight=b.titleLineHeight+"px"));0<b.message.length&&(n=document.createElement("p"),n.classList.add("iziToast-message"),n.appendChild(R(b.message)),g.appendChild(n),
b.messageColor&&(n.style.color=b.messageColor),b.messageSize&&(isNaN(b.titleSize)?n.style.fontSize=b.messageSize:n.style.fontSize=b.messageSize+"px"),b.messageLineHeight&&(isNaN(b.titleSize)?n.style.lineHeight=b.messageLineHeight:n.style.lineHeight=b.messageLineHeight+"px"));0<b.title.length&&0<b.message.length&&(b.rtl?P.style.marginLeft="10px":2===b.layout||b.rtl||(P.style.marginRight="10px"));f.appendChild(g);(function(){0<b.buttons.length&&(Z.classList.add("iziToast-buttons"),0<b.title.length&&
0===b.message.length&&(b.rtl?P.style.marginLeft="15px":P.style.marginRight="15px"),0<b.message.length&&(b.rtl?n.style.marginLeft="15px":n.style.marginRight="15px",n.style.marginBottom="0"),C(b.buttons,function(b,c){Z.appendChild(R(b[0]));var d=Z.childNodes;d[c].classList.add("iziToast-buttons-child");b[2]&&setTimeout(function(){d[c].focus()},300);d[c].addEventListener("click",function(c){c.preventDefault();return(0,b[1])(a,e)})}));f.appendChild(Z)})();(function(){k.style.visibility="hidden";setTimeout(function(){var c=
e.offsetHeight,d=e.currentStyle||window.getComputedStyle(e),f=d.marginTop,f=f.split("px"),f=parseInt(f[0]),d=d.marginBottom,d=d.split("px"),d=parseInt(d[0]);k.style.visibility="";k.style.height=c+d+f+"px";setTimeout(function(){k.style.height="auto";b.target&&(k.style.overflow="visible")},500);b.timeout&&a.progress(e,b).start()},100)})();(function(){var a=b.position;if(b.target)A=document.querySelector(b.target),A.classList.add("iziToast-target"),b.targetFirst?A.insertBefore(k,A.firstChild):A.appendChild(k);
else{if(-1==r.indexOf(b.position))return void console.warn("[iziToast] Incorrect position.\nIt can be \u203a "+r);a=h||568>=window.innerWidth?"bottomLeft"==b.position||"bottomRight"==b.position||"bottomCenter"==b.position?"iziToast-wrapper-bottomCenter":"topLeft"==b.position||"topRight"==b.position||"topCenter"==b.position?"iziToast-wrapper-topCenter":"iziToast-wrapper-center":"iziToast-wrapper-"+a;(A=document.querySelector(".iziToast-wrapper."+a))||(A=document.createElement("div"),A.classList.add("iziToast-wrapper"),
A.classList.add(a),document.body.appendChild(A));"topLeft"==b.position||"topCenter"==b.position||"topRight"==b.position?A.insertBefore(k,A.firstChild):A.appendChild(k)}isNaN(b.zindex)?console.warn("[iziToast] Invalid zIndex."):A.style.zIndex=b.zindex})();(function(){b.overlay&&(null!==document.querySelector(".iziToast-overlay.fadeIn")?(d=document.querySelector(".iziToast-overlay"),d.setAttribute("data-iziToast-ref",d.getAttribute("data-iziToast-ref")+","+b.REF),isNaN(b.zindex)||null===b.zindex||(d.style.zIndex=
b.zindex-1)):(d.classList.add("iziToast-overlay"),d.classList.add("fadeIn"),d.style.background=b.overlayColor,d.setAttribute("data-iziToast-ref",b.REF),isNaN(b.zindex)||null===b.zindex||(d.style.zIndex=b.zindex-1),document.querySelector("body").appendChild(d)),b.overlayClose?(d.removeEventListener("click",{}),d.addEventListener("click",function(c){a.hide(e,b,"overlay")})):d.removeEventListener("click",{}))})();(function(){if(b.animateInside){e.classList.add("iziToast-animateInside");var a=[200,100,
300];if("bounceInLeft"==b.transitionIn&&(a=[400,200,400]),0<b.title.length&&setTimeout(function(){P.classList.add("slideIn")},a[0]),0<b.message.length&&setTimeout(function(){n.classList.add("slideIn")},a[1]),b.icon&&setTimeout(function(){m.classList.add("revealIn")},a[2]),0<b.buttons.length&&Z){var c=150;C(Z.childNodes,function(a,b){setTimeout(function(){a.classList.add("revealIn")},c);c+=150})}}})();b.onOpening.apply(null,[b,e]);try{var T=new CustomEvent("iziToast-opening",{detail:b,bubbles:!0,cancelable:!0});
document.dispatchEvent(T)}catch(q){console.warn(q)}setTimeout(function(){e.classList.remove("iziToast-opening");e.classList.add("iziToast-opened");try{var a=new CustomEvent("iziToast-opened",{detail:b,bubbles:!0,cancelable:!0});document.dispatchEvent(a)}catch(c){console.warn(c)}b.onOpened.apply(null,[b,e])},1E3);b.drag&&(u?(e.addEventListener("touchstart",function(c){D.startMoving(this,a,b,c)},!1),e.addEventListener("touchend",function(a){D.stopMoving(this,a)},!1)):(e.addEventListener("mousedown",
function(c){c.preventDefault();D.startMoving(this,a,b,c)},!1),e.addEventListener("mouseup",function(a){a.preventDefault();D.stopMoving(this,a)},!1)));b.closeOnEscape&&document.addEventListener("keyup",function(c){c=c||window.event;27==c.keyCode&&a.hide(e,b,"esc")});a.toast=e},g});
!function(c,g){"function"==typeof define&&define.amd?define(["jquery"],g):"object"==typeof exports?module.exports=g(require("jquery")):c.bootbox=g(c.jQuery)}(this,function a$$1(g,h){function m(a,b,d){a.stopPropagation();a.preventDefault();g.isFunction(d)&&!1===d.call(b,a)||b.modal("hide")}function k(a){var b,d=0;for(b in a)d++;return d}function u(a,b){var d=0;g.each(a,function(a,f){b(a,f,d++)})}function r(a){var b,d;if("object"!=typeof a)throw Error("Please supply an object of options");if(!a.message)throw Error("Please specify a message");
return a=g.extend({},M,a),a.buttons||(a.buttons={}),b=a.buttons,d=k(b),u(b,function(a,f,h){if(g.isFunction(f)&&(f=b[a]={callback:f}),"object"!==g.type(f))throw Error("button with key "+a+" must be an object");f.label||(f.label=a);f.className||(f.className=2>=d&&h===d-1?"btn-primary":"btn-default")}),a}function s(a,b){var d=a.length,e={};if(1>d||2<d)throw Error("Invalid argument length");return 2===d||"string"==typeof a[0]?(e[b[0]]=a[0],e[b[1]]=a[1]):e=a[0],e}function y(a,b,d){return g.extend(!0,{},
a,s(b,d))}function C(a,b,d,e){a={className:"bootbox-"+a,buttons:F.apply(null,b)};return R(y(a,e,d),b)}function F(){for(var a={},b=0,d=arguments.length;d>b;b++){var e=arguments[b],f=e.toLowerCase(),e=e.toUpperCase(),g=w[M.locale];a[f]={label:g?g[e]:w.en[e]}}return a}function R(a,b){var d={};return u(b,function(a,b){d[b]=!0}),u(a.buttons,function(a){if(d[a]===h)throw Error("button key "+a+" is not allowed (options are "+b.join("\n")+")");}),a}var N={text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",
textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",
time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"},M={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},D={alert:function(){var a;if(a=C("alert",["ok"],["message","callback"],arguments),
a.callback&&!g.isFunction(a.callback))throw Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return g.isFunction(a.callback)?a.callback.call(this):!0},D.dialog(a)},confirm:function(){var a;if(a=C("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,!1)},a.buttons.confirm.callback=function(){return a.callback.call(this,!0)},!g.isFunction(a.callback))throw Error("confirm requires a callback");
return D.dialog(a)},prompt:function(){var a,b,d,e,f,k,m;if(e=g("<form class='bootbox-form'></form>"),b={className:"bootbox-prompt",buttons:F("cancel","confirm"),value:"",inputType:"text"},a=R(y(b,arguments,["title","callback"]),["cancel","confirm"]),k=a.show===h?!0:a.show,a.message=e,a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,null)},a.buttons.confirm.callback=function(){var b;switch(a.inputType){case "text":case "textarea":case "email":case "select":case "date":case "time":case "number":case "password":b=
f.val();break;case "checkbox":var d=f.find("input:checked");b=[];u(d,function(a,d){b.push(g(d).val())})}return a.callback.call(this,b)},a.show=!1,!a.title)throw Error("prompt requires a title");if(!g.isFunction(a.callback))throw Error("prompt requires a callback");if(!N[a.inputType])throw Error("invalid prompt type");switch(f=g(N[a.inputType]),a.inputType){case "text":case "textarea":case "email":case "date":case "time":case "number":case "password":f.val(a.value);break;case "select":var s={};if(m=
a.inputOptions||[],!g.isArray(m))throw Error("Please pass an array of input options");if(!m.length)throw Error("prompt with select requires options");u(m,function(a,b){var d=f;if(b.value===h||b.text===h)throw Error("given options in wrong format");b.group&&(s[b.group]||(s[b.group]=g("<optgroup/>").attr("label",b.group)),d=s[b.group]);d.append("<option value='"+b.value+"'>"+b.text+"</option>")});u(s,function(a,b){f.append(b)});f.val(a.value);break;case "checkbox":var r=g.isArray(a.value)?a.value:[a.value];
if(m=a.inputOptions||[],!m.length)throw Error("prompt with checkbox requires options");if(!m[0].value||!m[0].text)throw Error("given options in wrong format");f=g("<div/>");u(m,function(b,d){var e=g(N[a.inputType]);e.find("input").attr("value",d.value);e.find("label").append(d.text);u(r,function(a,b){b===d.value&&e.find("input").prop("checked",!0)});f.append(e)})}return a.placeholder&&f.attr("placeholder",a.placeholder),a.pattern&&f.attr("pattern",a.pattern),a.maxlength&&f.attr("maxlength",a.maxlength),
e.append(f),e.on("submit",function(a){a.preventDefault();a.stopPropagation();d.find(".btn-primary").click()}),d=D.dialog(a),d.off("shown.bs.modal"),d.on("shown.bs.modal",function(){f.focus()}),!0===k&&d.modal("show"),d},dialog:function(a){a=r(a);var b=g("<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>"),d=b.find(".modal-dialog"),e=b.find(".modal-body"),f=a.buttons,
k="",s={onEscape:a.onEscape};if(g.fn.modal===h)throw Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(u(f,function(a,b){k+="<button data-bb-handler='"+a+"' type='button' class='btn "+b.className+"'>"+b.label+"</button>";s[a]=b.callback}),e.find(".bootbox-body").html(a.message),!0===a.animate&&b.addClass("fade"),a.className&&b.addClass(a.className),"large"===a.size?d.addClass("modal-lg"):
"small"===a.size&&d.addClass("modal-sm"),a.title&&e.before("<div class='modal-header'><h4 class='modal-title'></h4></div>"),a.closeButton)d=g("<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>"),a.title?b.find(".modal-header").prepend(d):d.css("margin-top","-10px").prependTo(e);return a.title&&b.find(".modal-title").html(a.title),k.length&&(e.after("<div class='modal-footer'></div>"),b.find(".modal-footer").html(k)),b.on("hidden.bs.modal",
function(a){a.target===this&&b.remove()}),b.on("shown.bs.modal",function(){b.find(".btn-primary:first").focus()}),"static"!==a.backdrop&&b.on("click.dismiss.bs.modal",function(a){b.children(".modal-backdrop").length&&(a.currentTarget=b.children(".modal-backdrop").get(0));a.target===a.currentTarget&&b.trigger("escape.close.bb")}),b.on("escape.close.bb",function(a){s.onEscape&&m(a,b,s.onEscape)}),b.on("click",".modal-footer button",function(a){var d=g(this).data("bb-handler");m(a,b,s[d])}),b.on("click",
".bootbox-close-button",function(a){m(a,b,s.onEscape)}),b.on("keyup",function(a){27===a.which&&b.trigger("escape.close.bb")}),g(a.container).append(b),b.modal({backdrop:a.backdrop?"static":!1,keyboard:!1,show:!1}),a.show&&b.modal("show"),b},setDefaults:function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0];g.extend(M,a)},hideAll:function(){return g(".bootbox").modal("hide"),D}},w={bg_BG:{OK:"\u041e\u043a",CANCEL:"\u041e\u0442\u043a\u0430\u0437",CONFIRM:"\u041f\u043e\u0442\u0432\u044a\u0440\u0436\u0434\u0430\u0432\u0430\u043c"},
br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zru\u0161it",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"\u0395\u03bd\u03c4\u03ac\u03be\u03b5\u03b9",CANCEL:"\u0391\u03ba\u03cd\u03c1\u03c9\u03c3\u03b7",CONFIRM:"\u0395\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",
CONFIRM:"OK"},fa:{OK:"\u0642\u0628\u0648\u0644",CANCEL:"\u0644\u063a\u0648",CONFIRM:"\u062a\u0627\u06cc\u06cc\u062f"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"\u05d0\u05d9\u05e9\u05d5\u05e8",CANCEL:"\u05d1\u05d9\u05d8\u05d5\u05dc",CONFIRM:"\u05d0\u05d9\u05e9\u05d5\u05e8"},hu:{OK:"OK",CANCEL:"M\u00e9gsem",CONFIRM:"Meger\u0151s\u00edt"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",
CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"\u30ad\u30e3\u30f3\u30bb\u30eb",CONFIRM:"\u78ba\u8a8d"},lt:{OK:"Gerai",CANCEL:"At\u0161aukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprin\u0101t"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierd\u017a"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"\u041e\u0442\u043c\u0435\u043d\u0430",CONFIRM:"\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c"},
sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"\u0e15\u0e01\u0e25\u0e07",CANCEL:"\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01",CONFIRM:"\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19"},tr:{OK:"Tamam",CANCEL:"\u0130ptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"\u53d6\u6d88",CONFIRM:"\u786e\u8ba4"},zh_TW:{OK:"OK",CANCEL:"\u53d6\u6d88",CONFIRM:"\u78ba\u8a8d"}};return D.addLocale=function(a,b){return g.each(["OK","CANCEL","CONFIRM"],function(a,e){if(!b[e])throw Error("Please supply a translation for '"+
e+"'");}),w[a]={OK:b.OK,CANCEL:b.CANCEL,CONFIRM:b.CONFIRM},D},D.removeLocale=function(a){return delete w[a],D},D.setLocale=function(a){return D.setDefaults("locale",a)},D.init=function(a){return a$$1(a||g)},D});
var fastjobsToast={success:function(c){if(c&&c.message){var g=c.message||"";"undefined"!==typeof iziToast?this._simpleiziToast("success",c):"undefined"===typeof bootbox&&alert(g)}},error:function(c){if(c&&c.message){var g=c.message||"";"undefined"!==typeof iziToast?this._simpleiziToast("error",c):"undefined"===typeof bootbox&&alert(g)}},info:function(c){if(c&&c.message){var g=c.message||"";"undefined"!==typeof iziToast?this._simpleiziToast("info",c):"undefined"===typeof bootbox&&alert(g)}},warning:function(c){if(c&&
c.message){var g=c.message||"";"undefined"!==typeof iziToast?this._simpleiziToast("warning",c):"undefined"===typeof bootbox&&alert(g)}},show:function(c){if(c&&c.message){var g=c.title||"",h=c.message||"";"undefined"!==typeof iziToast?this._iziToastShow({title:g,titleColor:c.titleColor||"",titleSize:c.titleSize||"",titleLineHeight:c.titleLineHeight||"",message:h,messageColor:c.messageColor||"",messageSize:c.messageSize||"",messageLineHeight:c.messageLineHeight||"",position:c.position||"topRight",layout:c.layout||
1,theme:c.theme||"dark","class":c["class"]||"",backgroundColor:c.backgroundColor||"",color:c.color||"",icon:c.icon||"",iconColor:c.iconColor||"",target:c.target||"",balloon:"undefined"!==typeof c.balloon?c.balloon:!1,timeout:"undefined"!==typeof c.timeout?c.timeout:3E3,progressBarColor:c.progressBarColor||"",buttons:c.buttons||{},transitionIn:c.transitionIn||"bounceInLeft",transitionOut:c.transitionOut||"fadeOut"}):"undefined"===typeof bootbox&&alert(h)}},destroy:function(){"undefined"!==typeof iziToast&&
iziToast.destroy()},_simpleiziToast:function(c,g){if(g&&g.message&&"undefined"!==typeof iziToast){var h=g.title||"OK",m=g.message||"",k=g.position||"topRight",u=g.timeout||3E3,r,s;switch(c||"info"){case "success":r="green";s="fa fa-check-circle";break;case "error":r="red";s="fa fa-times-circle";break;case "warning":r="yellow";s="ico-warning";break;default:r="blue",s="ico-info"}this._iziToastShow({title:h,message:m,position:k,color:r,icon:s,timeout:u,transitionIn:g.transitionIn||"bounceInLeft",transitionOut:g.transitionOut||
"fadeOut"})}},_iziToastShow:function(c){c&&c.message&&"undefined"!==typeof iziToast&&iziToast.show(c)}};
(function(){!function(c,g){return"function"==typeof define&&define.amd?define(function(){return g()}):"object"==typeof exports?module.exports=g():c.ifvisible=g()}(this,function(){var c,g,h,m,k,u,r,s,y,C,F,R,N;return s={},h=document,C=!1,F="active",u=6E4,k=!1,g=function(){var c,g,h,a;return h={},c=function(a,c,e){return a.__ceGUID=void 0,a.__ceGUID||(a.__ceGUID="ifvisible.object.event.identifier"),h[a.__ceGUID]||(h[a.__ceGUID]={}),h[a.__ceGUID][c]||(h[a.__ceGUID][c]=[]),h[a.__ceGUID][c].push(e)},g=
function(a,c,e){var f,g,k;if(a.__ceGUID&&h[a.__ceGUID]&&h[a.__ceGUID][c]){g=h[a.__ceGUID][c];k=[];c=0;for(f=g.length;c<f;c++)a=g[c],k.push(a(e||{}));return k}},a=function(a,c,e){var f,g,k,m,s;if(e){if(a.__ceGUID&&h[a.__ceGUID]&&h[a.__ceGUID][c])for(s=h[a.__ceGUID][c],g=k=0,m=s.length;k<m;g=++k)if(f=s[g],f===e)return h[a.__ceGUID][c].splice(g,1),f}else if(a.__ceGUID&&h[a.__ceGUID]&&h[a.__ceGUID][c])return delete h[a.__ceGUID][c]},{add:c,remove:a,fire:g}}(),c=function(){var c;return c=!1,function(g,
h,a){return c||(c=g.addEventListener?function(a,c,e){return a.addEventListener(c,e,!1)}:g.attachEvent?function(a,c,e){return a.attachEvent("on"+c,e,!1)}:function(a,c,e){return a["on"+c]=e}),c(g,h,a)}}(),r=function(){var c,g,k,a;a=3;k=h.createElement("div");c=k.getElementsByTagName("i");for(g=function(){return k.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0]};g(););return 4<a?a:void 0}(),m=!1,N=void 0,"undefined"!=typeof h.hidden?(m="hidden",N="visibilitychange"):"undefined"!=typeof h.mozHidden?
(m="mozHidden",N="mozvisibilitychange"):"undefined"!=typeof h.msHidden?(m="msHidden",N="msvisibilitychange"):"undefined"!=typeof h.webkitHidden&&(m="webkitHidden",N="webkitvisibilitychange"),R=function(){var g,m;return g=[],m=function(){return g.map(clearTimeout),"active"!==F&&s.wakeup(),k=+new Date,g.push(setTimeout(function(){if("active"===F)return s.idle()},u))},m(),c(h,"mousemove",m),c(h,"keyup",m),c(h,"touchstart",m),c(window,"scroll",m),s.focus(m),s.wakeup(m)},y=function(){var g;return!!C||
(!1===m?(g="blur",9>r&&(g="focusout"),c(window,g,function(){return s.blur()}),c(window,"focus",function(){return s.focus()})):c(h,N,function(){return h[m]?s.blur():s.focus()},!1),C=!0,R())},s={setIdleDuration:function(c){return u=1E3*c},getIdleDuration:function(){return u},getIdleInfo:function(){var c,g;return c=+new Date,g={},"idle"===F?(g.isIdle=!0,g.idleFor=c-k,g.timeLeft=0,g.timeLeftPer=100):(g.isIdle=!1,g.idleFor=c-k,g.timeLeft=k+u-c,g.timeLeftPer=(100-100*g.timeLeft/u).toFixed(2)),g},focus:function(c){return"function"==
typeof c?this.on("focus",c):(F="active",g.fire(this,"focus"),g.fire(this,"wakeup"),g.fire(this,"statusChanged",{status:F})),this},blur:function(c){return"function"==typeof c?this.on("blur",c):(F="hidden",g.fire(this,"blur"),g.fire(this,"idle"),g.fire(this,"statusChanged",{status:F})),this},idle:function(c){return"function"==typeof c?this.on("idle",c):(F="idle",g.fire(this,"idle"),g.fire(this,"statusChanged",{status:F})),this},wakeup:function(c){return"function"==typeof c?this.on("wakeup",c):(F="active",
g.fire(this,"wakeup"),g.fire(this,"statusChanged",{status:F})),this},on:function(c,h){return y(),g.add(this,c,h),this},off:function(c,h){return y(),g.remove(this,c,h),this},onEvery:function(c,g){var h,a;return y(),h=!1,g&&(a=setInterval(function(){if("active"===F&&!1===h)return g()},1E3*c)),{stop:function(){return clearInterval(a)},pause:function(){return h=!0},resume:function(){return h=!1},code:a,callback:g}},now:function(c){return y(),F===(c||"active")}}})}).call(this);
!function(c,g){"function"==typeof define&&define.amd?define([],g()):"object"==typeof exports?module.exports=g():c.SendBird=g()}(this,function(){var c="wss://ws.sendbird.com",g="https://api.sendbird.com",h="";try{var m=window.console||{log:function(){}}}catch(k){m={log:function(){}}}var u="undefined";try{u=navigator.userAgent.replace(/,/g,".")}catch(r){u="undefined"}var s="JS,"+u+",3.0.9,",y=function(c,g,k,m,r){m.hasOwnProperty("SendBird")||(m.SendBird=s+ +h);var u;try{u="undefined"==typeof window?
require("xhr2"):null}catch(a){u=null}if(u){var b=require("agentkeepalive"),d=require("agentkeepalive").HttpsAgent;try{var e={},f=new b({keepAlive:!0,timeout:6E4,keepAliveTimeout:6E4});e.httpAgent=f;var p=new d({keepAlive:!0,timeout:6E4,keepAliveTimeout:6E4});e.httpsAgent=p;u.nodejsSet(e)}catch(z){}}var y=u?new u:new XMLHttpRequest,b=function(){try{if("undefined"==typeof navigator||"undefined"==typeof navigator.userAgent)return!1;var a=navigator.userAgent.toLowerCase();return-1!=a.indexOf("msie")?
parseInt(a.split("msie")[1]):!1}catch(b){return!1}}();if(!("withCredentials"in y)&&b&&10>b){y=new XDomainRequest;y.withCredentials=!0;y.open(k,c);for(var C in m)g[C]=m[C];y.onload=function(){var a=JSON.parse(y.responseText);a.error?r(null,{status:y.status,statusText:y.statusText}):r(a)};y.onerror=function(){r(null,{status:404,statusText:"There was a connection error"})}}else{try{y=u?new u:new XMLHttpRequest,y.open(k,c),y.onload=function(){200<=y.status&&400>y.status?"function"==typeof r&&r(JSON.parse(y.responseText),
null):r(null,{status:y.status,statusText:y.statusText})},y.onerror=function(){r(null,{status:404,statusText:"There was a connection error"})}}catch(A){y=new ActiveXObject("Microsoft.XMLHTTP"),y.open(k,c),y.onreadystatechange=function(){4==y.readyState&&(200<=y.status&&400>y.status?r(JSON.parse(y.responseText)):r(null,{status:y.status,statusText:y.statusText}))}}try{for(C in y.setRequestHeader("Content-Type","application/json; charset=utf-8"),m)y.setRequestHeader(C,m[C]?m[C]:"sendbird")}catch(x){}}try{switch(k){case "get":case "GET":y.send();
break;default:y.send(JSON.stringify(g))}}catch(v){}},C=function(){var c=function(){};return function(g,h){c.prototype=new g;h.prototype=new c;h["super"]=g.prototype;h.prototype.constructor=h}}();return function(){var k=function(a){this.isOpenChannel=function(){return this.channelType==D.CHANNEL_TYPE_OPEN};this.isGroupChannel=function(){return this.channelType==D.CHANNEL_TYPE_GROUP};this.isUserMessage=function(){return this.messageType==k.MESSAGE_TYPE_USER};this.isAdminMessage=function(){return this.messageType==
k.MESSAGE_TYPE_ADMIN};this.isFileMessage=function(){return this.messageType==k.MESSAGE_TYPE_FILE};this._update=function(a){this.messageId=a.hasOwnProperty("msg_id")?parseInt(a.msg_id):0;this.channelUrl=a.hasOwnProperty("channel_url")?String(a.channel_url):"";this.createdAt=a.hasOwnProperty("ts")?parseInt(a.ts):0;this.channelType=a.hasOwnProperty("channel_type")?String(a.channel_type):D.CHANNEL_TYPE_GROUP};this.messageType=k.MESSAGE_TYPE_BASE;a&&this._update(a)};k.build=function(a,b){var c,d,f,g,h;
switch(a.type){case "MESG":return c=new e(a.user),d=parseInt(a.message_id),f=String(a.message),g=String(a.data),h=parseInt(a.created_at),new N(N.build("",d,c,b,f,g,h));case "FILE":c=new e(a.user);d=parseInt(a.message_id);g=String(a.data);h=parseInt(a.created_at);var k=a.file;f=String(k.url);var m=String(k.name),n=String(k.type),k=parseInt(k.size);return new M(M.build("",d,c,b,f,m,n,k,g,h));case "BRDM":case "ADMM":return d=parseInt(a.message_id),f=String(a.message),g=String(a.data),h=parseInt(a.created_at),
new r(r.build(d,b,f,g,h))}return null};k.MESSAGE_TYPE_BASE="base";k.MESSAGE_TYPE_ADMIN="admin";k.MESSAGE_TYPE_USER="user";k.MESSAGE_TYPE_FILE="file";var r=function(a){this.messageType=k.MESSAGE_TYPE_ADMIN;a&&(this._update(a),this.message=String(a.message),this.data=a.hasOwnProperty("data")?String(a.data):"")};C(k,r);r.build=function(a,b,c,d,e){return{msg_id:a,channel_url:b.url,channel_type:b.isOpenChannel()?D.CHANNEL_TYPE_OPEN:D.CHANNEL_TYPE_GROUP,ts:e,message:c,data:d}};var N=function(a){this.messageType=
k.MESSAGE_TYPE_USER;a&&(this._update(a),this.message=String(a.message),this.data=a.hasOwnProperty("data")?String(a.data):"",this.sender=new e(a.user),this.reqId=a.hasOwnProperty("req_id")?String(a.req_id):"")};C(k,N);N.build=function(a,b,c,d,e,f,g){var h={};h.req_id=a;h.msg_id=b;h.channel_url=d.url;h.channel_type=d.channelType==D.CHANNEL_TYPE_OPEN?D.CHANNEL_TYPE_OPEN:D.CHANNEL_TYPE_GROUP;h.ts=g;h.message=e;f&&(h.data=f);a={};return a.user_id=c.userId,a.nickname=c.nickname,a.profile_url=c.profileUrl,
h.user=a,h};var M=function(a){this.messageType=k.MESSAGE_TYPE_FILE;a&&(this._update(a),this.sender=new e(a.user),this.url=String(a.url),this.name=a.hasOwnProperty("name")?a.name:"File",this.size=parseInt(a.size),this.type=String(a.type),this.data=String(a.custom),this.reqId=a.hasOwnProperty("req_id")?String(a.req_id):"")};C(k,M);M.build=function(a,b,c,d,e,f,g,h,k,m){var n={};n.req_id=a;n.message_id=b;n.channel_url=d.url;n.channel_type=d.channelType==D.CHANNEL_TYPE_OPEN?D.CHANNEL_TYPE_OPEN:D.CHANNEL_TYPE_GROUP;
n.ts=m;n.url=e;n.name=f;n.type=g;n.size=h;n.custom=k;a={};return a.user_id=c.userId,a.nickname=c.nickname,a.profile_url=c.profileUrl,n.user=a,n};var D=function(a){this._update=function(a){this.url=String(a.channel_url);this.name=String(a.name);this.coverUrl=String(a.cover_url);this.createdAt=a.hasOwnProperty("created_at")?1E3*a.created_at:0;this.data=String(a.data)};this.isGroupChannel=function(){return this.channelType==D.CHANNEL_TYPE_GROUP};this.isOpenChannel=function(){return this.channelType==
D.CHANNEL_TYPE_OPEN};this.createPreviousMessageListQuery=function(){return new Z(this)};this.createMessageListQuery=function(){return new z(this)};this._sendFileCommand=function(a,b,c,d,e,g,h){var k=f.generateRequestId();a=f.bFile(k,a,b,c,d,e,g);q.getInstance().sendCommand(a,function(a,b){if(b)return void(h&&h(null,b));var c=new M(a.getJsonElement());h&&h(c)})};this.sendFileMessage=function(){var a=this,b="",c="",d="",e="",f="",g="";switch(arguments.length){case 2:b=arguments[0];c=arguments[1];"string"==
typeof b?(d="",e="",f=""):(d=b.name,e=b.type,f=b.size);break;case 3:b=arguments[0];g=arguments[1];c=arguments[2];"string"==typeof b?(d="",e="",f=""):(d=b.name,e=b.type,f=b.size);break;case 6:b=arguments[0],d=arguments[1],e=arguments[2],f=arguments[3],g=arguments[4],c=arguments[5]}var h=a.url;"string"==typeof b?a._sendFileCommand(h,b,d,e,f,g,c):n.getInstance().uploadFile(b,function(b,k){if(k)return void(c&&c(null,k));var m=JSON.parse(b).url;a._sendFileCommand(h,m,d,e,f,g,c)})};this.sendUserMessage=
function(a,b,c){"function"==typeof b&&(c=b,b=null);var d=f.bMessage(this.url,a,b,[]);a=N.build(d.requestId,0,q.getInstance().currentUser,this,a,b,(new Date).getTime());a=new N(a);return q.getInstance().sendCommand(d,function(a,b){if(b)return void(c&&c(null,b));var d=new N(a.getJsonElement());c&&c(d)}),a};this.createMetaCounters=function(a,b){n.getInstance().createMetaCounters(this.isOpenChannel(),this.url,a,function(a,c){return c?void b(null,c):void(b&&b(a))})};this.updateMetaCounters=function(a,
b,c){n.getInstance().updateMetaCounters(this.isOpenChannel(),this.url,a,b,n.UPDATE_META_COUNTER_MODE_SET,function(a,b){return b?void c(null,b):void(c&&c(a))})};this.increaseMetaCounters=function(a,b){n.getInstance().updateMetaCounters(this.isOpenChannel(),this.url,a,!1,n.UPDATE_META_COUNTER_MODE_INC,function(a,c){return c?void b(null,c):void(b&&b(a))})};this.decreaseMetaCounters=function(a,b){n.getInstance().updateMetaCounters(this.isOpenChannel(),this.url,a,!1,n.UPDATE_META_COUNTER_MODE_DEC,function(a,
c){if(c)return void b(null,c);var d={},e;for(e in a)d[e]=a[e];"function"==typeof b&&b(d,null)})};this.getMetaCounters=function(a,b){n.getInstance().getMetaCounters(this.isOpenChannel(),this.url,a,function(a,c){return c?void b(null,c):void("function"==typeof b&&b(a,null))})};this.getAllMetaCounters=function(a){n.getInstance().getAllMetaCounters(this.isOpenChannel(),this.url,function(b,c){return c?void a(null,c):void("function"==typeof a&&a(b,null))})};this.deleteMetaCounter=function(a,b){n.getInstance().deleteMetaCounter(this.isOpenChannel(),
this.url,a,function(a,c){return c?void b(null,c):void(b&&b(a,null))})};this.deleteAllMetaCounters=function(a){n.getInstance().deleteAllMetaCounters(this.isOpenChannel(),this.url,function(b,c){return c?void(a&&a(null,c)):void(a&&a(b,null))})};this.createMetaData=function(a,b){n.getInstance().createMetaData(this.isOpenChannel(),this.url,a,function(a,c){return c?void b(null,c):void(b&&b(a,null))})};this.updateMetaData=function(a,b,c){n.getInstance().updateMetaData(this.isOpenChannel(),this.url,a,b,function(a,
b){return b?void c(null,b):void(c&&c(a,null))})};this.getMetaData=function(a,b){n.getInstance().getMetaData(this.isOpenChannel(),this.url,a,function(a,c){return c?void b(null,c):void(b&&b(a,null))})};this.getAllMetaData=function(a){n.getInstance().getAllMetaData(this.isOpenChannel(),this.url,function(b,c){return c?void a(null,c):void(a&&a(b,null))})};this.deleteMetaData=function(a,b){n.getInstance().deleteMetaData(this.isOpenChannel(),this.url,a,function(a,c){return c?void b(null,c):void(b&&b(a,null))})};
this.deleteAllMetaData=function(a){n.getInstance().deleteAllMetaData(this.isOpenChannel(),this.url,function(b,c){return c?void(a&&a(null,c)):void(a&&a(b,null))})};this.deleteMessage=function(a,b){return a?void n.getInstance().deleteMessage(this.isOpenChannel(),this.url,a.messageId,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void(b&&b(null,new v("Invalid arguments.",x.INVALID_PARAMETER)))};this.channelType=D.CHANNEL_TYPE_BASE;a&&this._update(a)};D.CHANNEL_TYPE_OPEN="open";D.CHANNEL_TYPE_GROUP=
"group";D.CHANNEL_TYPE_BASE="base";var w=function(a){this.parse=function(a){if(a.hasOwnProperty("participant_count")&&(this.participantCount=parseInt(a.participant_count)),a.hasOwnProperty("operators")&&a.operators){this.operators=[];for(var b in a.operators){var c=new e(a.operators[b]);this.operators.push(c)}}};this.refresh=function(a){w.getChannelWithoutCache(this.url,function(b,c){return c?void(a&&a(null,c)):void(a&&a())})};this.update=function(a){this._update(a);this.parse(a)};this.enter=function(a){var b=
this,c=f.bEnter(b.url);q.getInstance().sendCommand(c,function(c,d){return d?void(a&&a(null,d)):(w.enteredChannels[b.url]=b,void(a&&a(null)))})};this.exit=function(a){var b=this,c=f.bExit(b.url);q.getInstance().sendCommand(c,function(c,d){return d?void(a&&a(null,d)):(delete w.enteredChannels[b.url],void(a&&a(null)))})};this.createParticipantListQuery=function(){return new A(A.PARTICIPANT,this)};this.createMutedUserListQuery=function(){return new A(A.MUTED_USER,this)};this.createBannedUserListQuery=
function(){return new A(A.BANNED_USER,this)};this.banUser=function(a,b,c){return!a||0>parseInt(b)?void(c&&c(null,new v("Invalid parameter.",x.INVALID_PARAMETER))):void this.banUserWithUserId(a.userId,b,c)};this.banUserWithUserId=function(a,b,c){return!a||0>parseInt(b)?void(c&&c(null,new v("Invalid parameter.",x.INVALID_PARAMETER))):void n.getInstance().banUser(this.url,a,null,b,function(a,b){return b?void(c&&c(null,b)):void(c&&c())})};this.unbanUser=function(a,b){return a?void this.unbanUserWithUserId(a.userId,
b):void(b&&b(null,new v("Invalid parameter.",x.INVALID_PARAMETER)))};this.unbanUserWithUserId=function(a,b){return a?void n.getInstance().unbanUser(this.url,a,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void(b&&b(null,new v("Invalid parameter.",x.INVALID_PARAMETER)))};this.muteUser=function(a,b){return a?void this.muteUserWithUserId(a.userId,b):void(b&&b(null,new v("Invalid parameter.",x.INVALID_PARAMETER)))};this.muteUserWithUserId=function(a,b){return a?void n.getInstance().muteUser(this.url,
a,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void(b&&b(null,new v("Invalid parameter.",x.INVALID_PARAMETER)))};this.unmuteUser=function(a,b){return a?void this.unmuteUserWithUserId(a.userId,b):void(b&&b(null,new v("Invalid parameter.",x.INVALID_PARAMETER)))};this.unmuteUserWithUserId=function(a,b){return a?void n.getInstance().unmuteUser(this.url,a,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void(b&&b(null,new v("Invalid parameter.",x.INVALID_PARAMETER)))};this.isOperator=
function(a){return a?this.isOperatorWithUserId(a.userId):!1};this.isOperatorWithUserId=function(a){for(var b in this.operators)if(this.operators[b].userId==a)return!0;return!1};this.channelType=D.CHANNEL_TYPE_OPEN;this.participantCount=0;this.operators=[];a&&(this._update(a),this.parse(a))};C(D,w);w.enteredChannels={};w.clearEnteredChannels=function(){w.enteredChannels={}};w.createOpenChannelListQuery=function(){return new J};w.createChannel=function(){var a,b,c,d,e;switch(arguments.length){case 1:e=
arguments[0];break;case 4:a=arguments[0];b=arguments[1];c=arguments[2];e=arguments[3];break;case 5:a=arguments[0],b=arguments[1],c=arguments[2],d=arguments[3],e=arguments[4]}w.createChannelWithOperatorUserIds(a,b,c,d,e)};w.upsert=function(a){var b=new w(a);return w.cachedChannels.hasOwnProperty(b.url)?w.cachedChannels[b.url].update(a):w.cachedChannels[b.url]=b,w.cachedChannels[b.url]};w.createChannelWithOperatorUserIds=function(a,b,c,d,e){n.getInstance().createOpenChannel(a,b,c,d,function(a,b){if(b)return void(e&&
e(null,b));var c=w.upsert(a);e&&e(c)})};w.cachedChannels={};w.getChannel=function(a,b){w.cachedChannels.hasOwnProperty(a)?b&&b(w.cachedChannels[a]):w.getChannelWithoutCache(a,b)};w.getChannelWithoutCache=function(a,b){n.getInstance().getOpenChannel(a,function(c,d){return d?void(b&&b(null,d)):(w.upsert(c),void(b&&b(w.cachedChannels[a],null)))})};var a=function(b){var c,d,g={},h=!1;this.parse=function(a){var b=this;if(b.isDistinct=!!a.is_distinct,b.unreadMessageCount=parseInt(a.unread_message_count),
a.hasOwnProperty("read_receipt")){b.cachedReadReceiptStatus={};for(var c in a.read_receipt)b.updateReadReceipt(c,parseInt(a.read_receipt[c]))}a.hasOwnProperty("members")&&(b.members=[],b.memberMap={},a.members.forEach(function(a){a=new e(a);b.members.push(a);b.memberMap[a.userId]=a}),b.memberCount=b.members.length);a.hasOwnProperty("member_count")&&(b.memberCount=parseInt(a.member_count));a.hasOwnProperty("last_message")&&"object"==typeof a.last_message&&a.last_message?b.lastMessage=k.build(a.last_message,
b):b.lastMessage=null};this.refresh=function(b){a.getChannelWithoutCache(this.url,function(a,c){return c?void(b&&b(null,c)):void(b&&b())})};this.update=function(a){this._update(a);this.parse(a)};var p=function(a){var b=[];return a instanceof e?(b=[],b.push(a.userId),b):Array.isArray(a)?(b=[],a.forEach(function(a){a instanceof e&&b.push(a.userId);0<parseInt(a)&&b.push(a)}),b):0<parseInt(a)?(b=[],b.push(a),b):void 0};this.invite=function(a,b){var c=p(a);this.inviteWithUserIds(c,b)};this.inviteWithUserIds=
function(b,c){n.getInstance().groupChannelInvite(this.url,b,function(b,d){return d?void(c&&c(null,d)):(a.upsert(b),void(c&&c(null)))})};this.hide=function(a){n.getInstance().groupChannelHide(this.url,q.getInstance().currentUser.userId,function(b,c){return c?void(a&&a(null,c)):void(a&&a(b))})};this.leave=function(a){n.getInstance().groupChannelLeave(this.url,q.getInstance().currentUser.userId,function(b,c){return c?void(a&&a(null,c)):void(a&&a())})};this.markAsRead=function(){h=!0};this.fireMarkAsRead=
function(){h&&(h=!1,this.sendMarkAsRead(function(a,b){}))};this.sendMarkAsRead=function(a,b){var c=this;return q.getInstance().currentUser?void n.getInstance().groupChannelMarkAsRead(c.url,q.getInstance().currentUser.userId,a,function(a,d){return d?void(b&&b(d)):(c.unreadMessageCount=0,void(b&&b()))}):void b(null,new v("Connection must be made before you mark as read.",x.CONNECTION_REQUIRED))};this.getReadReceipt=function(a){if(a instanceof k||m.log("message is not BaseMessage instance"),a.messageType==
a.MESSAGE_TYPE_ADMIN)return 0;var b=q.getInstance().currentUser,c=0;a=a.createdAt;var d=this.members,e;for(e in d){var f=d[e].userId;b.userId!=f&&a>this.cachedReadReceiptStatus[f]&&c++}return c};this.getReadStatus=function(){var a={};if(!q.getInstance().currentUser)return a;var b=this.members,c;for(c in b){var d=b[c],e=d.userId;d.userId!=q.getInstance().currentUser.userId&&(a[e]={user:d,last_seen_at:parseInt(this.cachedReadReceiptStatus[e])})}return a};this.updateReadReceipt=function(a,b){var c=this.cachedReadReceiptStatus[a];
(!c||b>c)&&(this.cachedReadReceiptStatus[a]=b)};this.startTyping=function(){var a=(new Date).getTime();1E3>a-c||(d=0,c=a,a=f.bTypeStart(this.url,c),q.getInstance().sendCommand(a,null))};this.endTyping=function(){var a=(new Date).getTime();1E3>a-d||(c=0,d=a,a=f.bTypeEnd(this.url,d),q.getInstance().sendCommand(a,null))};this.invalidateTypingStatus=function(){var a=!1,b=(new Date).getTime(),c;for(c in g)1E4<=b-g[c]&&(delete g[c],a=!0);return a};this.updateTypingStatus=function(a,b){b?g[a.userId]=(new Date).getTime():
delete g[a.userId]};this.isTyping=function(){return 0!=Object.keys(g).length};this.getTypingMembers=function(){var a=[],b;for(b in g){var c=this.memberMap[b];this.memberMap[b]&&a.push(c)}return a};this.addMember=function(a){this.removeMember(a);this.memberMap[a.userId]=a;this.members.push(a);this.memberCount++;this.updateReadReceipt(a.userId,0)};this.removeMember=function(a){var b=a.userId;if(this.memberMap.hasOwnProperty(a.userId)){delete this.memberMap[a.userId];for(var c in this.members)if(this.members[c].userId==
b){this.members.splice(c,1);break}this.memberCount--}};this.setPushPreference=function(a,b){return q.getInstance().currentUser?void n.getInstance().setPushPreference(q.getInstance().currentUser.userId,this.url,a,function(a,c){return c?void(b&&b(null,c)):void(b&&b(a))}):void(b&&b(null,new v("Connection must be made before you set push preference setting for this channel.",x.CONNECTION_REQUIRED)))};this.getPushPreference=function(a){return q.getInstance().currentUser?void n.getInstance().getPushPreference(q.getInstance().currentUser.userId,
this.url,function(b,c){if(c)return void(a&&a(null,c));if(a){var d;try{d=b.enable}catch(e){d=!1}a(d)}}):void(a&&a(null,new v("Connection must be made before you get push preference setting for this channel.",x.CONNECTION_REQUIRED)))};this.channelType=D.CHANNEL_TYPE_GROUP;this.isDistinct=!1;this.unreadMessageCount=0;this.members=[];this.memberMap={};this.lastMessage={};this.memberCount=0;this.cachedReadReceiptStatus={};b&&(this._update(b),this.parse(b))};C(D,a);a.createMyGroupChannelListQuery=function(){return new p(q.getInstance().currentUser)};
a.getTotalUnreadMessageCount=function(a){return q.getInstance().currentUser?void n.getInstance().getTotalUnreadMessageCount(q.getInstance().currentUser.userId,function(b,c){if(c)return void(a&&a(null,c));var d=parseInt(b.unread_count);a&&a(d)}):void(a&&a(null,new v("Connection must be made before you get total unread message count.",x.CONNECTION_REQUIRED)))};a.createChannel=function(){var b=null,c=null,d=null,e=null,f=null,g=null;switch(arguments.length){case 3:b=arguments[0];c=arguments[1];g=arguments[2];
break;case 6:b=arguments[0],c=arguments[1],d=arguments[2],e=arguments[3],f=arguments[4],g=arguments[5]}var h=[];b.forEach(function(a){h.push(a.userId)});a.createChannelWithUserIds(h,c,d,e,f,g)};a.createChannelWithUserIds=function(b,c,d,e,f,g){b=b.filter(function(a,b,c){return b==c.indexOf(a)});var h=q.getInstance().currentUser;b.push(h.userId);n.getInstance().createGroupChannel(b,c,d,e,f,function(b,c){if(c)return void(g&&g(null,c));var d=new a(b);a.cachedChannels[d.url]=d;g&&g(d,null)})};a.cachedChannels=
{};a.clearCache=function(){a.cachedChannels={}};a.upsert=function(b){var c=new a(b);return a.cachedChannels.hasOwnProperty(c.url)?a.cachedChannels[c.url].update(b):a.cachedChannels[c.url]=c,a.cachedChannels[c.url]};a.getChannelWithoutCache=function(b,c){n.getInstance().getGroupChannel(b,!0,!0,function(d,e){return e?void(c&&c(null,e)):(a.upsert(d),void(c&&c(a.cachedChannels[b],null)))})};a.getChannel=function(b,c){if(a.cachedChannels.hasOwnProperty(b)){if(c)return void c(a.cachedChannels[b],null)}else a.getChannelWithoutCache(b,
c)};a.markAsReadAllLastSentAt;a.markAsReadAll=function(b){var c=(new Date).getTime();return 1E3>c-a.markAsReadAllLastSentAt?void(b&&b(new v("MarkAsRead rate limit exceeded.",x.MARK_AS_READ_RATE_LIMIT_EXCEEDED))):(a.markAsReadAllLastSentAt=c,void n.getInstance().groupChannelMarkAsReadAll(q.getInstance().currentUser.userId,function(c,d){if(d)return void(b&&b(d));for(var e in a.cachedChannels)a.cachedChannels[e].unreadMessageCount=0;b&&b(null)}))};var b=function(a){a&&(this.category=a.hasOwnProperty("cat")?
parseInt(a.cat):0,this.data=a.hasOwnProperty("data")?a.data:null,this.channelUrl=a.hasOwnProperty("channel_url")?String(a.channel_url):"",this.channelType=a.hasOwnProperty("channel_type")?String(a.channel_type):D.CHANNEL_TYPE_GROUP);this.isGroupChannel=function(){return this.channelType==D.CHANNEL_TYPE_GROUP};this.isOpenChannel=function(){return this.channelType==D.CHANNEL_TYPE_OPEN}};b.CATEGORY_NONE=0;b.CATEGORY_CHANNEL_ENTER=10102;b.CATEGORY_CHANNEL_EXIT=10103;b.CATEGORY_USER_CHANNEL_MUTE=10201;
b.CATEGORY_USER_CHANNEL_UNMUTE=10200;b.CATEGORY_USER_CHANNEL_BAN=10601;b.CATEGORY_USER_CHANNEL_UNBAN=10600;b.CATEGORY_CHANNEL_FREEZE=10701;b.CATEGORY_CHANNEL_UNFREEZE=10700;b.CATEGORY_TYPING_START=10900;b.CATEGORY_TYPING_END=10901;b.CATEGORY_CHANNEL_JOIN=1E4;b.CATEGORY_CHANNEL_LEAVE=10001;b.CATEGORY_CHANNEL_PROP_CHANGED=11E3;b.CATEGORY_CHANNEL_DELETED=12E3;var d=function(a){a&&(this.reader=new e(a.user),this.timestamp=parseInt(a.ts),this.channelUrl=a.hasOwnProperty("channel_url")?String(a.channel_url):
"",this.channelType=a.hasOwnProperty("channel_type")?String(a.channel_type):D.CHANNEL_TYPE_GROUP)},e=function(a){this.userId=this.profileUrl=this.nickname="";this.connectionStatus;this.lastSeenAt=null;if(a)try{a.hasOwnProperty("guest_id")&&(this.userId=String(a.guest_id)),a.hasOwnProperty("user_id")&&(this.userId=String(a.user_id)),a.hasOwnProperty("name")&&(this.nickname=String(a.name)),a.hasOwnProperty("nickname")&&(this.nickname=String(a.nickname)),a.hasOwnProperty("image")&&(this.profileUrl=String(a.image)),
a.hasOwnProperty("profile_url")&&(this.profileUrl=String(a.profile_url)),a.hasOwnProperty("is_online")?this.connectionStatus=a.is_online?e.ONLINE:e.OFFLINE:this.connectionStatus=e.NON_AVAILABLE,a.hasOwnProperty("last_seen_at")?this.lastSeenAt=parseInt(a.last_seen_at):this.lastSeenAt=0}catch(b){m.log(b)}};e.NON_AVAILABLE="nonavailable";e.ONLINE="online";e.OFFLINE="offline";e.build=function(a,b,c,d,e){return{user_id:a,nickname:b,profile_url:c,is_online:d,last_seen_at:e}};var f=function(a,b,c){this.isAckRequired=
function(){return"MESG"==this.command||"FILE"==this.command||"ENTR"==this.command||"EXIT"==this.command};this.encode=function(){return this.command+this.payload+"\n"};this.decode=function(a){a=a.trim();this.command=a.substring(0,4);this.payload=a.substring(4)};this.getJsonElement=function(){return JSON.parse(this.payload)};this.isRequestIdCommand=function(){return this.isAckRequired()||"EROR"==this.command};this.command;this.payload;this.requestId;if(0!=arguments.length){var d;switch(arguments.length){case 1:d=
arguments[0];if(!d||4>=d.length)return this.command="NOOP",void(this.payload="{}");(d=d.trim(),this.command=d.substring(0,4),this.payload=d.substring(4),this.isRequestIdCommand())&&(d=this.getJsonElement())&&(this.requestId=d.hasOwnProperty("req_id")?d.req_id:"");break;case 3:d=arguments[2];case 2:var e=arguments[0],g=arguments[1];this.command=e;(this.requestId=d?d:"")||this.isRequestIdCommand()&&(this.requestId=f.generateRequestId());g.req_id=this.requestId;this.payload=JSON.stringify(g)}}};f.bMessage=
function(a,b,c,d,e){d={};d.channel_url=a;d.message=b;d.data=c;d.mentioned=[];for(var g in e)d.mentioned.push(String(e[g]));return new f("MESG",d)};f.bTypeStart=function(a,b){var c={};return c.channel_url=a,c.time=b,new f("TPST",c)};f.bTypeEnd=function(a,b){var c={};return c.channel_url=a,c.time=b,new f("TPEN",c)};f.bFile=function(a,b,c,d,e,g,h){var k={};return k.channel_url=b,k.url=c,k.name=d,k.type=e,k.size=g,k.custom=h,new f("FILE",k,a)};f.bPing=function(){var a={};return a.id=(new Date).getTime(),
new f("PING",a)};f.bEnter=function(a){var b={};return b.channel_url=a,new f("ENTR",b)};f.bExit=function(a){var b={};return b.channel_url=a,new f("EXIT",b)};f.requestIdSeed=(new Date).getTime();f.generateRequestId=function(){return f.requestIdSeed++,String(f.requestIdSeed)};var p=function(b){this.isLoading=!1;this.limit=20;this.includeEmpty=!1;this.order=p.ORDER_LATEST_LAST_MESSAGE;this.hasNext=!0;var c="",d=this;this.next=function(e){return d.hasNext?(d.isLoading&&e(null,new v("Query in progress.",
x.QUERY_IN_PROGRESS)),d.isLoading=!0,void n.getInstance().loadUserGroupChannelList(b.userId,c,d.limit,d.includeEmpty,d.order,function(b,f){if(f)return d.isLoading=!1,void(e&&e(null,f));c=String(b.next);(!c||0>=c.length)&&(d.hasNext=!1);var g=b.channels,h=[],k;for(k in g){var m=a.upsert(g[k]);h.push(m)}d.isLoading=!1;e&&e(h,null)})):void e([],null)}};p.ORDER_LATEST_LAST_MESSAGE="latest_last_message";p.ORDER_CHRONOLOGICAL="chronological";var z=function(a){this.isLoading=!1;var b=this;this.next=function(c,
d,e,f){return b.isLoading?void f(null,new v("Query in progress.",x.QUERY_IN_PROGRESS)):(b.isLoading=!0,void n.getInstance().messageList(a.isOpenChannel(),a.url,c,0,d,!1,e,function(c,d){if(d)return b.isLoading=!1,void(f&&f(null,d));var e=c.messages,g=[],h;for(h in e){var m=k.build(e[h],a);m&&g.push(m)}b.isLoading=!1;f&&f(g)}))};this.prev=function(c,d,e,f){return b.isLoading?void f(null,new v("Query in progress.",x.QUERY_IN_PROGRESS)):(b.isLoading=!0,void n.getInstance().messageList(a.isOpenChannel(),
a.url,c,d,0,!1,e,function(c,d){if(d)return b.isLoading=!1,void(f&&f(null,d));var e=c.messages,g=[],h;for(h in e){var m=k.build(e[h],a);m&&g.push(m)}b.isLoading=!1;f&&f(g)}))};this.load=function(c,d,e,f,g){return b.isLoading?void g(null,new v("Query in progress.",x.QUERY_IN_PROGRESS)):(b.isLoading=!0,void n.getInstance().messageList(a.isOpenChannel(),a.url,c,d,e,!0,f,function(c,d){if(d)return b.isLoading=!1,void(g&&g(null,d));var e=c.messages,f=[],h;for(h in e){var m=k.build(e[h],a);m&&f.push(m)}b.isLoading=
!1;g&&g(f)}))}},J=function(){var a="";this.limit=20;this.isLoading=!1;this.hasNext=!0;this.urlKeyword=this.nameKeyword="";var b=this;this.next=function(c){return this.hasNext?this.isLoading?void c(null,new v("WS connection closed.",x.QUERY_IN_PROGRESS)):(b.isLoading=!0,void n.getInstance().loadOpenChannelList(a,b.limit,b.nameKeyword,b.urlKeyword,function(d,e){if(e)return b.isLoading=!1,void(c&&c(null,e));try{a=String(d.next)}catch(f){a=""}a||(b.hasNext=!1);var g=[];d.channels.forEach(function(a){a=
w.upsert(a);g.push(a)});b.isLoading=!1;c(g,null)})):void c([],null)}},Z=function(a){var b=0x7fffffffffffffff;this.hasMore=!0;this.isLoading=!1;var c=this;this.load=function(d,e,f){if(c.hasMore){if(c.isLoading)return void f(null,new v("WS connection closed.",x.QUERY_IN_PROGRESS));c.isLoading=!0;n.getInstance().messageList(a.isOpenChannel(),a.url,b,d,0,!1,e,function(e,g){if(g)return c.isLoading=!1,void(f&&f(null,g));var h=e.messages,m=[],n;for(n in h){var p=k.build(h[n],a);p&&(m.push(p),p.createdAt<=
b&&(b=p.createdAt))}(0>=m.length||m.length<d)&&(c.hasMore=!1);c.isLoading=!1;f&&f(m)})}}},A=function(a,b){var c,d,f="";this.hasNext=!0;this.limit=20;this.isLoading=!1;this.userIds=[];var g=this;switch(b&&(c=b),a){case A.ALL_USER:case A.BLOCKED_USER:d="users";break;case A.FILTERED_USER:this.userIds=b;d="users";break;case A.PARTICIPANT:d="participants";break;case A.MUTED_USER:d="muted_list";break;case A.BANNED_USER:d="banned_list"}this.next=function(b){if(!g.hasNext)return void(b&&b([],null));if(g.isLoading)return void(b&&
b(null,new v("Query in progress.",x.QUERY_IN_PROGRESS)));g.isLoading=!0;var h=function(c,h){if(h)return g.isLoading=!1,void(b&&b(null,h));(f=c.next)||(g.hasNext=!1);var k=c[d],m=[],n;for(n in k)a==A.BANNED_USER?m.push(new e(k[n].user)):m.push(new e(k[n]));g.isLoading=!1;b&&b(m,null)};switch(a){case A.ALL_USER:n.getInstance().loadUserList(f,g.limit,h);break;case A.FILTERED_USER:n.getInstance().loadUserList(f,g.limit,g.userIds,h);break;case A.BLOCKED_USER:if(!q.getInstance().currentUser)return void(b&&
b(null,new v("Connection must be made before you request the list.",x.INVALID_INITIALIZATION)));n.getInstance().loadBlockedUserList(q.getInstance().currentUser.userId,f,g.limit,h);break;case A.PARTICIPANT:n.getInstance().loadOpenChannelParticipantList(c.url,f,g.limit,h);break;case A.MUTED_USER:n.getInstance().loadOpenChannelMutedList(c.url,f,g.limit,h);break;case A.BANNED_USER:n.getInstance().loadOpenChannelBanList(c.url,f,g.limit,h)}}};A.ALL_USER="alluser";A.FILTERED_USER="filtereduser";A.BLOCKED_USER=
"blockeduser";A.PARTICIPANT="participant";A.MUTED_USER="muteduser";A.BANNED_USER="banneduser";var x=function(){};x.INVALID_INITIALIZATION=800100;x.CONNECTION_REQUIRED=800101;x.INVALID_PARAMETER=800110;x.NETWORK_ERROR=800120;x.NETWORK_ROUTING_ERROR=800121;x.MALFORMED_DATA=800130;x.MALFORMED_ERROR_DATA=800140;x.WRONG_CHANNEL_TYPE=800150;x.MARK_AS_READ_RATE_LIMIT_EXCEEDED=800160;x.QUERY_IN_PROGRESS=800170;x.ACK_TIMEOUT=800180;x.LOGIN_TIMEOUT=800190;x.WEBSOCKET_CONNECTION_CLOSED=800200;x.WEBSOCKET_CONNECTION_FAILED=
800210;x.REQUEST_FAILED=800220;var v=function(a,b){return this.code=b?b:0,this.message=a,this},aa=function(a){var b=aa.getInstance();if(b)return b;var c,d,e,g,k,m=!1,t=3E3,B=0,p=!1;a||(a=new aa.WSClientHandler);t=3E3;B=0;this.getConnectionState=function(){return 1==d.readyState?q.getInstance().connectionState.OPEN:q.getInstance().connectionState.CLOSED};var s=function(){r.stop();aa.getInstance().disconnect(!1);p||(a.onReconnectStarted(),p=!0);5==B?a.onReconnectFailed():(clearTimeout(c),c=setTimeout(function(){aa.getInstance().connect(e,
g);B++;t*=2},t))},r=new function(a){var b,c;this.ping=function(){this.stop();b=setTimeout(function(){var b=f.bPing();aa.getInstance().send(b);c=setTimeout(function(){a()},2E3)},15E3)};this.stop=function(){clearTimeout(b);clearTimeout(c)}}(s);this.connect=function(b,c,f){e=b;g=c;k=f;b=null;try{b="undefined"==typeof WebSocket?require("websocket").w3cwebsocket:WebSocket}catch(q){b=WebSocket}try{var v="/?p=JS&pv="+encodeURIComponent(u)+"&sv="+encodeURIComponent("3.0.9")+"&ai="+encodeURIComponent(h)+"&key="+
encodeURIComponent(n.getInstance().sessionKey);d=new b(g+v)}catch(x){return void(k&&k(null,x))}d.onopen=function(b){if(r.ping(),p){for(var c in w.enteredChannels)w.enteredChannels[c].enter();a.onReconnectSucceeded(e);t=3E3;B=0}else a.onOpen(b);!p&&k&&k(e)};d.onmessage=function(b){(new Date).getTime();b=b.data.split("\n");for(var c in b){var d=b[c];if(d&&"string"==typeof d){try{if("PONG"==d.substring(0,4)){r.ping();continue}}catch(e){}a.onMessage(d)}}};d.onclose=function(b){m?r.stop():s();m=!1;a.onClose(m)};
d.onerror=function(b){a.onError(b)}};this.disconnect=function(b){r.stop();m=1==b;d.close();m?a.onClose():a.onErrorClose()};this.send=function(a,b){1!=d.readyState?b&&b(null,new v("WS connection closed.",x.WEBSOCKET_CONNECTION_CLOSED)):(d.send(a.encode()),b&&b(null))}},P=null;aa.getInstance=function(){return null===P?null:P};aa.WSClientHandler=function(){this.isOpened=!1;this.onReady=function(){};this.onOpen=function(){};this.onClose=function(){};this.onErrorClose=function(){};this.onMessage=function(){};
this.onError=function(){};this.onReconnectFailed=function(){};this.onReconnectStarted=function(){};this.onReconnectSucceeded=function(){}};var n=function(){var a=n.getInstance();if(a)return a;this.sessionKey;var b=0;this.getTotalUnreadMessageCount=function(a,b){var c=n.API_USERS_USERID_UNREADCOUNT.replace("%s",encodeURIComponent(a));k(c,b)};this.checkRouting=function(a){var d=(new Date).getTime()/1E3;0==b||300<b-d?y(n.API_ROUTING_URL.replace("%s",h),{},"GET",{SendBird:s+h},function(e,f){return f?
void a(null,new v("Server is unreachable.",x.NETWORK_ROUTING_ERROR)):(c=e.ws_server,g=e.api_server,b=d,void("function"==typeof a&&a({API_HOST:g,WS_HOST:c})))},function(b,c){a(null,new v(c,b))}):a(null,null)};var d=function(a,b,c,d){n.getInstance().checkRouting(function(b,e){if(e)d(null,new v("Request failed.",x.REQUEST_FAILED));else{var f=new XMLHttpRequest;f.open("POST",g+a,!0);f.setRequestHeader("SendBird",s+h);f.setRequestHeader("Session-Key",n.getInstance().sessionKey);var k=new FormData;k.append("file",
c);f.onload=function(){d(f.response)};f.onerror=function(a){d(null,new v(f.statusText,x.REQUEST_FAILED))};f.send(k)}})},e=function(a,b,c){"function"==typeof b&&(c=b,b={});n.getInstance().checkRouting(function(d,e){e?c(null,new v("Request failed.",x.REQUEST_FAILED)):y(g+a,b,"DELETE",{"Session-Key":n.getInstance().sessionKey,SendBird:s+h},c)})},f=function(a){var b="",c;for(c in a)var d=encodeURIComponent(a[c]),b=b+(d+",");return 1<b.length&&(b=b.substring(0,b.length-1)),b},k=function(a,b,c){"function"==
typeof b&&(c=b,b={});var d,e="";if(b){for(var f in b)""!=e&&(e+="&"),e+=f+"="+b[f];d=g+a+"?"+e}else d=g+a;n.getInstance().checkRouting(function(a,e){e?c(null,new v("Request failed.",x.REQUEST_FAILED)):y(d,b,"GET",{"Session-Key":n.getInstance().sessionKey,SendBird:s+h},c)})},p=function(a,b,c){"function"==typeof b&&(c=b,b={});n.getInstance().checkRouting(function(d,e){e||y(g+a,b,"POST",{"Session-Key":n.getInstance().sessionKey,SendBird:s+h},c)})},q=function(a,b,c){"function"==typeof b&&(c=b,b={});n.getInstance().checkRouting(function(d,
e){e||y(g+a,b,"PUT",{"Session-Key":n.getInstance().sessionKey,SendBird:s+h},c)})};this.groupChannelInvite=function(a,b,c){a=n.API_GROUPCHANNELS_CHANNELURL_INVITE.replace("%s",encodeURIComponent(a));var d={},e=[];try{Array.isArray(b)?e=b:e.push(b)}catch(f){m.log(f),c(null,new v("Invalid parameter.",x.INVALID_PARAMETER))}d.user_ids=e;p(a,d,c)};this.groupChannelHide=function(a,b,c){a=n.API_GROUPCHANNELS_CHANNELURL_HIDE.replace("%s",encodeURIComponent(a));var d={};d.user_id=b;q(a,d,c)};this.groupChannelLeave=
function(a,b,c){a=n.API_GROUPCHANNELS_CHANNELURL_LEAVE.replace("%s",encodeURIComponent(a));var d={};d.user_id=b;q(a,d,c)};this.groupChannelMarkAsRead=function(a,b,c,d){a=n.API_GROUPCHANNELS_CHANNELURL_MESSAGES_MARKASREAD.replace("%s",encodeURIComponent(a));var e={};e.user_id=b;e.ts=c;q(a,e,d)};this.groupChannelMarkAsReadAll=function(a,b){var c=n.API_USERS_USERID_MARKASREADALL.replace("%s",encodeURIComponent(a));q(c,{},b)};this.messageList=function(a,b,c,d,e,f,g,h){a=a?String(n.API_OPENCHANNELS_CHANNELURL_MESSAGES.replace("%s",
b)):String(n.API_GROUPCHANNELS_CHANNELURL_MESSAGES.replace("%s",b));b={is_sdk:"true"};b.message_ts=String(c);b.prev_limit=String(d);b.next_limit=String(e);b.include=String(f);b.reverse=String(g);k(a,b,h)};this.login=function(a,b,c){a=n.API_USERS_USERID_LOGIN.replace("%s",encodeURIComponent(a));var d={};d.app_id=h;b&&(d.access_token=b);p(a,d,function(a,b){b?c(null,b):(n.getInstance().sessionKey=a.key,c(a,b))})};this.updateUserInfo=function(a,b,c,d){var e={};b&&(e.nickname=b);c&&(e.profile_url=c);a=
String(n.API_USERS_USERID).replace("%s",encodeURIComponent(a));q(a,e,d)};this.getGroupChannel=function(a,b,c,d){a=n.API_GROUPCHANNELS_CHANNELURL.replace("%s",encodeURIComponent(a));k(a,{member:String(b),read_receipt:String(c)},d)};this.getOpenChannel=function(a,b){var c=n.API_OPENCHANNELS_CHANNELURL.replace("%s",encodeURIComponent(a));k(c,b)};this.createGroupChannel=function(a,b,c,d,e,f){var g=n.API_GROUPCHANNELS,h={},k=[];"string"==typeof a?k.push(a):a.forEach(function(a){k.push(a)});h.user_ids=
k;h.is_distinct=b;c&&(h.name=c);d&&(h.cover_url=d);e&&(h.data=e);p(g,h,f)};this.createOpenChannel=function(a,b,c,d,e){var f=String(n.API_OPENCHANNELS),g={};a&&(g.name=a);b&&(g.cover_url=b);c&&(g.data=c);d&&(Array.isArray(d)?g.operators=d:g.operators=[d]);p(f,g,e)};this.createMetaCounters=function(a,b,c,d){a=a?n.API_OPENCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b));b={};b.metacounter=c;p(a,b,d)};this.updateMetaCounters=
function(a,b,c,d,e,f){a=a?n.API_OPENCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b));b={};switch(b.metacounter=c,b.upsert=d,e){case n.UPDATE_META_COUNTER_MODE_SET:b.mode="set";break;case n.UPDATE_META_COUNTER_MODE_INC:b.mode="increase";break;case n.UPDATE_META_COUNTER_MODE_DEC:b.mode="decrease"}q(a,b,f)};this.getAllMetaCounters=function(a,b,c){this.getMetaCounters(a,b,{},c)};this.getMetaCounters=function(a,
b,c,d){a=a?n.API_OPENCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b));c={keys:f(c)};k(a,c,d)};this.deleteMetaCounter=function(a,b,c,d){var f="",f=a?n.API_OPENCHANNELS_CHANNELURL_METACOUNTER_KEY.replace("%s",encodeURIComponent(b)).replace("%s",c):n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER_KEY.replace("%s",encodeURIComponent(b)).replace("%s",c);e(f,{},d)};this.deleteAllMetaCounters=function(a,b,c){var d=
"",d=a?n.API_OPENCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER.replace("%s",encodeURIComponent(b));e(d,{},c)};this.createMetaData=function(a,b,c,d){var e="",e=a?n.API_OPENCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b));a={};b={};for(var f in c)b[f]=c[f];a.metadata=b;p(e,a,d)};this.updateMetaData=function(a,b,c,d,e){var f="",f=a?n.API_OPENCHANNELS_CHANNELURL_METADATA.replace("%s",
encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b));a={};b={};for(var g in c)b[g]=c[g];a.metadata=b;a.upsert=d;q(f,a,e)};this.getAllMetaData=function(a,b,c){this.getMetaData(a,b,{},c)};this.getMetaData=function(a,b,c,d){var e="",e=a?n.API_OPENCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b));a={keys:f(c)};k(e,a,d)};this.deleteMetaData=function(a,b,c,d){var f="",
f=a?n.API_OPENCHANNELS_CHANNELURL_METADATA_KEY.replace("%s",encodeURIComponent(b)).replace("%s",c):n.API_GROUPCHANNELS_CHANNELURL_METADATA_KEY.replace("%s",encodeURIComponent(b)).replace("%s",c);e(f,{},d)};this.deleteAllMetaData=function(a,b,c){var d="",d=a?n.API_OPENCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b)):n.API_GROUPCHANNELS_CHANNELURL_METADATA.replace("%s",encodeURIComponent(b));e(d,{},c)};this.loadUserList=function(a,b,c,d){var e=n.API_USERS;a={token:encodeURIComponent(a),
limit:String(b)};if("function"==typeof c)d=c;else try{b="";for(var f in c)b+=c[f]+",";1<b.length&&(b=b.substring(0,b.length-1));a.user_ids=b}catch(g){}k(e,a,d)};this.loadBlockedUserList=function(a,b,c,d){a=n.API_USERS_USERID_BLOCK.replace("%s",encodeURIComponent(a));b={token:encodeURIComponent(b),limit:String(c)};k(a,b,d)};this.loadOpenChannelList=function(a,b,c,d,e){var f=n.API_OPENCHANNELS;a={token:encodeURIComponent(a),limit:String(b)};c&&(a.name_contains=encodeURIComponent(c));d&&(a.url_contains=
encodeURIComponent(d));k(f,a,e)};this.uploadFile=function(a,b){d(n.API_STORAGE_FILE,{},a,b)};this.uploadProfileImage=function(a,b){d(n.API_STORAGE_PROFILE,{},a,b)};this.loadUserGroupChannelList=function(a,b,c,d,e,f){var g=n.API_GROUPCHANNELS;a={user_id:a,token:encodeURIComponent(b),limit:String(c),member:!0,show_empty:String(d),order:e};k(g,a,f)};this.loadOpenChannelParticipantList=function(a,b,c,d){a=n.API_OPENCHANNELS_CHANNELURL_PARTICIPANTS.replace("%s",a);b={token:encodeURIComponent(b),limit:String(c)};
k(a,b,d)};this.loadOpenChannelMutedList=function(a,b,c,d){a=n.API_OPENCHANNELS_CHANNELURL_MUTE.replace("%s",a);b={token:encodeURIComponent(b),limit:String(c)};k(a,b,d)};this.loadOpenChannelBanList=function(a,b,c,d){a=n.API_OPENCHANNELS_CHANNELURL_BAN.replace("%s",a);b={token:encodeURIComponent(b),limit:String(c)};k(a,b,d)};this.setDoNotDisturb=function(a,b,c,d,e,f,g,h){a=n.API_USERS_USERID_PUSHPREFERENCE.replace("%s",encodeURIComponent(a));q(a,{do_not_disturb:b,start_hour:c,start_min:d,end_hour:e,
end_min:f,timezone:g},h)};this.getDoNotDisturb=function(a,b){var c=n.API_USERS_USERID_PUSHPREFERENCE.replace("%s",encodeURIComponent(a));k(c,b)};this.setPushPreference=function(a,b,c,d){a=n.API_USERS_USERID_PUSHPREFERENCE_CHANNELURL.replace("%s",encodeURIComponent(a)).replace("%s",encodeURIComponent(b));b={};b.enable=c;q(a,b,d)};this.getPushPreference=function(a,b,c){a=n.API_USERS_USERID_PUSHPREFERENCE_CHANNELURL.replace("%s",encodeURIComponent(a)).replace("%s",encodeURIComponent(b));k(a,c)};this.registerGCMPushToken=
function(a,b,c){a=n.API_USERS_USERID_PUSH_GCM.replace("%s",encodeURIComponent(a));p(a,{gcm_reg_token:b},c)};this.unregisterGCMPushToken=function(a,b,c){a=n.API_USERS_USERID_PUSH_GCM_TOKEN.replace("%s",encodeURIComponent(a)).replace("%s",encodeURIComponent(b));e(a,c)};this.unregisterGCMPushTokenAll=function(a,b){var c=n.API_USERS_USERID_PUSH_GCM.replace("%s",encodeURIComponent(a));e(c,b)};this.registerAPNSPushToken=function(a,b,c){a=n.API_USERS_USERID_PUSH_APNS.replace("%s",encodeURIComponent(a));
p(a,{gcm_reg_token:b},c)};this.unregisterAPNSPushToken=function(a,b,c){a=n.API_USERS_USERID_PUSH_APNS_TOKEN.replace("%s",encodeURIComponent(a)).replace("%s",encodeURIComponent(b));q(a,c)};this.unregisterAPNSPushTokenAll=function(a,b,c){a=n.API_USERS_USERID_PUSH_APNS.replace("%s",encodeURIComponent(a));e(a,c)};this.blockUser=function(a,b,c){a=n.API_USERS_USERID_BLOCK.replace("%s",encodeURIComponent(a));p(a,{target_id:b},c)};this.unblockUser=function(a,b,c){a=n.API_USERS_USERID_BLOCK_TARGETID.replace("%s",
encodeURIComponent(a)).replace("%s",encodeURIComponent(b));e(a,{},c)};this.banUser=function(a,b,c,d,e){a=n.API_OPENCHANNELS_CHANNELURL_BAN.replace("%s",encodeURIComponent(a));b={user_id:b};c&&(b.description=c);b.seconds=String(d);p(a,b,e)};this.unbanUser=function(a,b,c){a=n.API_OPENCHANNELS_CHANNELURL_BAN_USERID.replace("%s",encodeURIComponent(a)).replace("%s",encodeURIComponent(b));e(a,{},c)};this.muteUser=function(a,b,c){a=n.API_OPENCHANNELS_CHANNELURL_MUTE.replace("%s",encodeURIComponent(a));p(a,
{user_id:b},c)};this.unmuteUser=function(a,b,c){a=n.API_OPENCHANNELS_CHANNELURL_MUTE_USERID.replace("%s",encodeURIComponent(a)).replace("%s",encodeURIComponent(b));e(a,{},c)};this.deleteMessage=function(a,b,c,d){var f="",f=a?n.API_OPENCHANNELS_CHANNELURL_MESSAGES_MESSAGEID.replace("%s",encodeURIComponent(b)).replace("%s",encodeURIComponent(c)):n.API_GROUPCHANNELS_CHANNELURL_MESSAGES_MESSAGEID.replace("%s",encodeURIComponent(b)).replace("%s",encodeURIComponent(c));e(f,{},d)}},T=null;n.getInstance=
function(){return null===T?null:T};n.API_VERSION="v3";n.API_ROUTING_URL="https://api.sendbird.com/routing/%s";n.API_USERS="/%v/users".replace("%v",n.API_VERSION);n.API_USERS_USERID_LOGIN="/%v/users/%s/login".replace("%v",n.API_VERSION);n.API_USERS_USERID="/%v/users/%s".replace("%v",n.API_VERSION);n.API_USERS_USERID_UNREADCOUNT="/%v/users/%s/unread_count".replace("%v",n.API_VERSION);n.API_USERS_USERID_MARKASREADALL="/%v/users/%s/mark_as_read_all".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSH_GCM_TOKEN=
"/%v/users/%s/push/gcm/%s".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSH_GCM="/%v/users/%s/push/gcm".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSHPREFERENCE_CHANNELURL="/%v/users/%s/push_preference/%s".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSHPREFERENCE="/%v/users/%s/push_preference/".replace("%v",n.API_VERSION);n.API_USERS_USERID_BLOCK="/%v/users/%s/block".replace("%v",n.API_VERSION);n.API_USERS_USERID_BLOCK_TARGETID="/%v/users/%s/block/%s".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSH_APNS_TOKEN=
"/%v/users/%s/push/apns/%s".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSH_APNS="/%v/users/%s/push/apns".replace("%v",n.API_VERSION);n.API_USERS_USERID_PUSH="/%v/users/%s/push".replace("%v",n.API_VERSION);n.API_OPENCHANNELS="/%v/open_channels".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL="/%v/open_channels/%s".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_MESSAGES="/%v/open_channels/%s/messages".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_MESSAGES_MESSAGEID=
"/%v/open_channels/%s/messages/%s".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_PARTICIPANTS="/%v/open_channels/%s/participants".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_METADATA="/%v/open_channels/%s/metadata".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_METADATA_KEY="/%v/open_channels/%s/metadata/%s".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_METACOUNTER="/%v/open_channels/%s/metacounter".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_METACOUNTER_KEY=
"/%v/open_channels/%s/metacounter/%s".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_BAN="/%v/open_channels/%s/ban".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_BAN_USERID="/%v/open_channels/%s/ban/%s".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_MUTE="/%v/open_channels/%s/mute".replace("%v",n.API_VERSION);n.API_OPENCHANNELS_CHANNELURL_MUTE_USERID="/%v/open_channels/%s/mute/%s".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS="/%v/group_channels".replace("%v",n.API_VERSION);
n.API_GROUPCHANNELS_CHANNELURL="/%v/group_channels/%s".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_INVITE="/%v/group_channels/%s/invite".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_HIDE="/%v/group_channels/%s/hide".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_LEAVE="/%v/group_channels/%s/leave".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_MESSAGES="/%v/group_channels/%s/messages".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_MESSAGES_MARKASREAD=
"/%v/group_channels/%s/messages/mark_as_read".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_MESSAGES_TOTALCOUNT="/%v/group_channels/%s/messages/total_count".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_MESSAGES_UNREADCOUNT="/%v/group_channels/%s/messages/unread_count".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_MESSAGES_MESSAGEID="/%v/group_channels/%s/messages/%s".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_MEMBERS="/%v/group_channels/%s/members".replace("%v",
n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_METADATA="/%v/group_channels/%s/metadata".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_METADATA_KEY="/%v/group_channels/%s/metadata/%s".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER="/%v/group_channels/%s/metacounter".replace("%v",n.API_VERSION);n.API_GROUPCHANNELS_CHANNELURL_METACOUNTER_KEY="/%v/group_channels/%s/metacounter/%s".replace("%v",n.API_VERSION);n.API_STORAGE_FILE="/%v/storage/file".replace("%v",n.API_VERSION);
n.API_STORAGE_PROFILE="/%v/storage/profile".replace("%v",n.API_VERSION);n.UPDATE_META_COUNTER_MODE_SET=0;n.UPDATE_META_COUNTER_MODE_INC=1;n.UPDATE_META_COUNTER_MODE_DEC=2;var q=function(g){var k=q.getInstance();if(k)return k;try{if(!g.hasOwnProperty("appId"))return m.log("Must be set appId"),{}}catch(p){return m.log("Must be set appId"),{}}this.APNSPushToken=this.GCMPushToken="";this.pushTokenRegistrationState={SUCCESS:"success",PENDING:"pending",ERROR:"error"};this.loginTimer;this.globalTimer;this.currentUser=
null;this.connectionState={CONNECTING:"CONNECTING",OPEN:"OPEN",CLOSING:"CLOSING",CLOSED:"CLOSED"};this.OpenChannel=w;this.GroupChannel=a;this.UserMessage=N;this.channelHandlers={};this.connectionHandlers={};var s={};h=g.appId;X=this;(T=n.getInstance())||(T=new n);this.ChannelHandler=function(){this.onMessageReceived=function(a,b){};this.onMessageDeleted=function(a,b){};this.onReadReceiptUpdated=function(a){};this.onTypingStatusUpdated=function(a){};this.onUserJoined=function(a,b){};this.onUserLeft=
function(a,b){};this.onUserEntered=function(a,b){};this.onUserExited=function(a,b){};this.onUserMuted=function(a,b){};this.onUserUnmuted=function(a,b){};this.onUserBanned=function(a,b){};this.onUserUnbanned=function(a,b){};this.onChannelFrozen=function(a){};this.onChannelUnfrozen=function(a){};this.onChannelChanged=function(a){};this.onChannelDeleted=function(a){}};this.addChannelHandler=function(a,b){q.getInstance().channelHandlers[a]=b};this.removeChannelHandler=function(a){delete q.getInstance().channelHandlers[a]};
this.ConnectionHandler=function(){this.onReconnectStarted=function(){};this.onReconnectSucceeded=function(){};this.onReconnectFailed=function(){}};this.addConnectionHandler=function(a,b){q.getInstance().connectionHandlers[a]=b};this.removeConnectionHandler=function(a){delete q.getInstance().connectionHandlers[a]};this.createUserListQuery=function(a){return a?new A(A.FILTERED_USER,a):new A(A.ALL_USER)};this.createBlockedUserListQuery=function(){return new A(A.BLOCKED_USER)};this.getApplicationId=function(){return h};
this.getConnectionState=function(){if(!q.getInstance())return this.connectionState.CLOSED;try{return aa.getInstance()?aa.getInstance().getConnectionState():q.getInstance().connectionState.CLOSED}catch(a){return q.getInstance().connectionState.CLOSED}};var u=function(a){return s.hasOwnProperty(a)?s[a]:null},y=function(b){b=new f(b);if(b.requestId){var c=u(b.requestId);if(null!=c){clearTimeout(c.timer);var e=c.handler;e&&("EROR"==b.command?(c=b.getJsonElement(),e(b,new v(c.message,c.code))):e(b,null))}}else switch(b.command){case "LOGI":clearTimeout(q.getInstance().loginTimer);
break;case "MESG":case "FILE":case "BRDM":case "ADMM":var g="";if(g="MESG"==b.command?new N(b.getJsonElement()):"FILE"==b.command?new M(b.getJsonElement()):new r(b.getJsonElement()),!g)break;g.isGroupChannel()?a.getChannel(g.channelUrl,function(a,b){if(b)return void(e&&e(null,b));a.lastMessage=g;a.unreadMessageCount++;for(var c in q.getInstance().channelHandlers)q.getInstance().channelHandlers[c].onMessageReceived(a,g)}):w.getChannel(g.channelUrl,function(a,b){if(b)return void(e&&e(null,b));for(var c in q.getInstance().channelHandlers)q.getInstance().channelHandlers[c].onMessageReceived(a,
g)});break;case "READ":var h=new d(b.getJsonElement());a.getChannel(h.channelUrl,function(a,b){if(b)return void(e&&e(null,b));a.updateReadReceipt(h.reader.userId,h.timestamp);for(var c in q.getInstance().channelHandlers)q.getInstance().channelHandlers[c].onReadReceiptUpdated(a)});break;case "SYEV":z(b);break;case "DELM":b=b.getJsonElement();var c=String(b.channel_url),k=String(b.msg_id);switch(String(b.channel_type)){case D.CHANNEL_TYPE_OPEN:w.getChannel(c,function(a,b){if(b)return void m.log("Discard a command.");
for(var c in q.getInstance().channelHandlers)q.getInstance().channelHandlers[c].onMessageDeleted(a,k)});break;case D.CHANNEL_TYPE_GROUP:a.getChannel(c,function(a,b){if(b)return void m.log("Discard a command.");for(var c in q.getInstance().channelHandlers)q.getInstance().channelHandlers[c].onMessageDeleted(a,k)})}}},z=function(c){var d=new b(c.getJsonElement());switch(d.category){case b.CATEGORY_CHANNEL_JOIN:case b.CATEGORY_CHANNEL_LEAVE:a.getChannel(d.channelUrl,function(a,f){if(f)return void m.log("Discard a command: "+
c.command+":"+d.category);var g=new e(d.data);if(d.category==b.CATEGORY_CHANNEL_JOIN){a.addMember(g);for(var h in q.getInstance().channelHandlers){var k=q.getInstance().channelHandlers[h];k.onUserJoined(a,g)}}else for(h in a.removeMember(g),q.getInstance().channelHandlers)k=q.getInstance().channelHandlers[h],k.onUserLeft(a,g)});break;case b.CATEGORY_TYPING_START:case b.CATEGORY_TYPING_END:a.getChannel(d.channelUrl,function(a,f){if(f)return void m.log("Discard a command: "+c.command+":"+d.category);
var g=new e(d.data);d.category==b.CATEGORY_TYPING_START?a.updateTypingStatus(g,!0):a.updateTypingStatus(g,!1);for(var h in q.getInstance().channelHandlers)q.getInstance().channelHandlers[h].onTypingStatusUpdated(a)});break;case b.CATEGORY_CHANNEL_ENTER:case b.CATEGORY_CHANNEL_EXIT:w.getChannel(d.channelUrl,function(a,f){if(f)return void m.log("Discard a command: "+c.command+":"+d.category);d.data.hasOwnProperty("participant_count")&&(a.participantCount=d.data.participant_count);var g=new e(d.data);
if(d.category==b.CATEGORY_CHANNEL_ENTER)for(var h in q.getInstance().channelHandlers){var k=q.getInstance().channelHandlers[h];k.onUserEntered(a,g)}else for(h in q.getInstance().channelHandlers)k=q.getInstance().channelHandlers[h],k.onUserExited(a,g)});break;case b.CATEGORY_USER_CHANNEL_MUTE:case b.CATEGORY_USER_CHANNEL_UNMUTE:w.getChannel(d.channelUrl,function(a,f){if(f)return void m.log("Discard a command: "+c.command+":"+d.category);var g=new e(d.data);if(d.category==b.CATEGORY_USER_CHANNEL_MUTE)for(var h in q.getInstance().channelHandlers){var k=
q.getInstance().channelHandlers[h];k.onUserMuted(a,g)}else for(h in q.getInstance().channelHandlers)k=q.getInstance().channelHandlers[h],k.onUserUnmuted(a,g)});break;case b.CATEGORY_USER_CHANNEL_BAN:case b.CATEGORY_USER_CHANNEL_UNBAN:w.getChannel(d.channelUrl,function(a,f){if(f)return void m.log("Discard a command: "+c.command+":"+d.category);var g=new e(d.data);if(d.category==b.CATEGORY_USER_CHANNEL_BAN)for(var h in q.getInstance().channelHandlers){var k=q.getInstance().channelHandlers[h];k.onUserBanned(a,
g)}else for(h in q.getInstance().channelHandlers)k=q.getInstance().channelHandlers[h],k.onUserUnbanned(a,g)});break;case b.CATEGORY_CHANNEL_FREEZE:case b.CATEGORY_CHANNEL_UNFREEZE:w.getChannel(d.channelUrl,function(a,e){if(e)return void m.log("Discard a command: "+c.command+":"+d.category);if(d.category==b.CATEGORY_CHANNEL_FREEZE)for(var f in q.getInstance().channelHandlers){var g=q.getInstance().channelHandlers[f];g.onChannelFrozen(a)}else for(f in q.getInstance().channelHandlers)g=q.getInstance().channelHandlers[f],
g.onChannelUnfrozen(a)});break;case b.CATEGORY_CHANNEL_DELETED:if(d.isGroupChannel())for(var f in q.getInstance().channelHandlers){var g=q.getInstance().channelHandlers[f];g.onChannelDeleted(d.channelUrl,"group")}else for(f in q.getInstance().channelHandlers)g=q.getInstance().channelHandlers[f],g.onChannelDeleted(d.channelUrl,"open");break;case b.CATEGORY_CHANNEL_PROP_CHANGED:d.isOpenChannel()?w.getChannelWithoutCache(d.channelUrl,function(a,b){if(b)return void m.log("Discard a command: "+c.command+
":"+d.category);for(var e in q.getInstance().channelHandlers)q.getInstance().channelHandlers[e].onChannelChanged(a)}):a.getChannelWithoutCache(d.channelUrl,function(a,b){if(b)return void m.log("Discard a command: "+c.command+":"+d.category);for(var e in q.getInstance().channelHandlers)q.getInstance().channelHandlers[e].onChannelChanged(a)})}};this.connect=function(a,b,c){var d=this;"function"==typeof b&&(c=b,b=null);d.currentUser&&d.currentUser.userId==a?C(d.currentUser,c):n.getInstance().login(a,
b,function(a,b){if(b)d.clearTimerAndUser(),c&&c(null,b);else{var f=new e(a);C(f,c)}})};this.disconnect=function(a){aa.getInstance().disconnect(!0);this.clearTimerAndUser(a)};this.clearTimerAndUser=function(a){clearTimeout(this.globalTimer);clearTimeout(this.loginTimer);this.currentUser=null;a&&a()};var C=function(b,d){if(q.getInstance().currentUser=b,!aa.getInstance()){var e=new aa.WSClientHandler;e.onMessage=function(a){y(a)};e.onOpen=function(b){e.isOpened=!0;q.getInstance().loginTimer=setTimeout(function(){q.getInstance().disconnect(null);
d&&d(null,new v("Connection timeout.",x.LOGIN_TIMEOUT))},1E4);clearTimeout(q.getInstance().globalTimer);var c=function(){if(a.cachedChannels)for(var b in a.cachedChannels){var d=a.cachedChannels[b];if(d.fireMarkAsRead(),d.invalidateTypingStatus())for(var e in q.getInstance().channelHandlers)q.getInstance().channelHandlers[e].onTypingStatusUpdated(d)}q.getInstance().globalTimer=setTimeout(function(){c()},1E3)};c()};e.onError=function(a){m.log("WSClientHandler.onError",a)};e.onClose=function(){e.isOpened=
!1;q.getInstance().clearTimerAndUser()};e.onErrorClose=function(a){e.isOpened=!1};e.onReconnectStarted=function(){for(var a in q.getInstance().connectionHandlers)q.getInstance().connectionHandlers[a].onReconnectStarted(a)};e.onReconnectFailed=function(){for(var a in q.getInstance().connectionHandlers)q.getInstance().connectionHandlers[a].onReconnectFailed(a)};e.onReconnectSucceeded=function(a){q.getInstance().currentUser=a;for(var b in q.getInstance().connectionHandlers)q.getInstance().connectionHandlers[b].onReconnectSucceeded(b)};
P=new aa(e)}n.getInstance().checkRouting(function(a,e){aa.getInstance().connect(b,c,d)})};this.sendCommand=function(a,b){if(null==aa.getInstance()||aa.getInstance().getConnectionState()!=q.getInstance().connectionState.OPEN)return void(b&&b(null,new v("WS connection closed.",x.WEBSOCKET_CONNECTION_CLOSED)));if(a.isAckRequired()){var c=a.requestId,d={handler:b,timer:setTimeout(function(){b(null,new v("Command received no ack.",x.ACK_TIMEOUT));delete s[c]},1E4)};s[c]=d;aa.getInstance().send(a,function(a,
c){return c?(clearTimeout(d.timer),void b(null,c)):void 0})}else aa.getInstance().send(a,b)};this.updateCurrentUserInfoWithProfileImage=function(a,b,c){var d=this;return d.currentUser?void(b?n.getInstance().uploadProfileImage(b,function(b,e){if(e)return void(c&&c(e));d.updateCurrentUserInfo(a,b.url,c)}):d.updateCurrentUserInfo(a,null,c)):void(c&&c(null,new v("Connection must be made before you update user information.",x.INVALID_INITIALIZATION)))};this.updateCurrentUserInfo=function(a,b,c){var d=
this;return d.currentUser?void n.getInstance().updateUserInfo(d.currentUser.userId,a,b,function(e,f){return f?void(c&&c(null,f)):(a&&(d.currentUser.nickname=a),b&&(d.currentUser.profileUrl=b),void(c&&c()))}):void(c&&c(null,new v("Connection must be made before you update user information.",x.INVALID_INITIALIZATION)))};this.registerGCMPushTokenForCurrentUser=function(a,b){var c=this;return a?this.currentUser?void n.getInstance().registerGCMPushToken(this.currentUser.userId,a,function(a,d){return d?
void(b&&b(c.pushTokenRegistrationState.ERROR,d)):(c.GCMPushToken="",void(b&&b(c.pushTokenRegistrationState.SUCCESS)))}):(c.GCMPushToken=a,void b(c.pushTokenRegistrationState.PENDING)):void b(c.pushTokenRegistrationState.ERROR,new v("Invalid token",x.INVALID_PARAMETER))};this.unregisterGCMPushTokenForCurrentUser=function(a,b){return this.currentUser?a?void n.getInstance().unregisterGCMPushToken(this.currentUser.userId,a,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void b(null,new v("Invalid token",
x.INVALID_PARAMETER)):void b(null,new v("Connection must be made before you unregister push token.",x.INVALID_INITIALIZATION))};this.unregisterGCMPushTokenAllForCurrentUser=function(a){return this.currentUser?void n.getInstance().unregisterGCMPushTokenAll(this.currentUser.userId,function(b,c){return c?void(a&&a(null,c)):void(a&&a())}):void a(null,new v("Connection must be made before you unregister push token.",x.INVALID_INITIALIZATION))};this.registerAPNSPushTokenForCurrentUser=function(a,b){var c=
this;return a?this.currentUser?void n.getInstance().registerAPNSPushToken(this.currentUser.userId,a,function(a,d){return d?void(b&&b(c.pushTokenRegistrationState.ERROR,d)):(c.APNSPushToken="",void(b&&b(c.pushTokenRegistrationState.SUCCESS)))}):(c.APNSPushToken=a,void b(c.pushTokenRegistrationState.PENDING)):void b(c.pushTokenRegistrationState.ERROR,new v("Invalid token",x.INVALID_PARAMETER))};this.unregisterAPNSPushTokenForCurrentUser=function(a,b){return this.currentUser?void n.getInstance().unregisterAPNSPushToken(this.currentUser.userId,
a,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void b(null,new v("Connection must be made before you unregister push token.",x.INVALID_INITIALIZATION))};this.unregisterAPNSPushTokenAllForCurrentUser=function(a){return this.currentUser?void n.getInstance().unregisterAPNSPushTokenAll(this.currentUser.userId,function(b,c){return c?void(a&&a(null,c)):void(a&&a())}):void a(null,new v("Connection must be made before you unregister push token.",x.INVALID_INITIALIZATION))};this.setDoNotDisturb=
function(a,b,c,d,e,f,g){return this.currentUser?0>b||23<b||0>c||59<c||0>d||23<d||0>e||59<e?void(g&&g(null,new v("Invalid arguments.",x.INVALID_PARAMETER))):void n.getInstance().setDoNotDisturb(this.currentUser.userId,a,b,c,d,e,f,function(a,b){return b?void(g&&g(null,b)):void(g&&g())}):void(g&&g(null,new v("Connection must be made before you set do-not-disturb.",x.INVALID_INITIALIZATION)))};this.getDoNotDisturb=function(a){return this.currentUser?void n.getInstance().getDoNotDisturb(this.currentUser.userId,
function(b,c){if(c)return void(a&&a(null,c));var d={doNotDisturbOn:b.do_not_disturb,startHour:b.start_hour,startMin:b.start_min,endHour:b.end_hour,endMin:b.end_min,timezone:b.timezone};a&&a(d)}):void(a&&a(null,new v("Connection must be made before you get do-not-disturb setting.",x.INVALID_INITIALIZATION)))};this.blockUser=function(a,b){return this.currentUser&&this.currentUser.userId!=a.userId?void this.blockUserWithUserId(a.userId,b):void(b&&b(null,new v("Invalid operation.",x.INVALID_INITIALIZATION)))};
this.blockUserWithUserId=function(a,b){return this.currentUser&&this.currentUser.userId!=a?void n.getInstance().blockUser(this.currentUser.userId,a,function(a,c){return c?void(b&&b(null,c)):void(b&&b(new e(a)))}):void(b&&b(null,new v("Invalid operation.",x.INVALID_INITIALIZATION)))};this.unblockUser=function(a,b){return this.currentUser?void this.unblockUserWithUserId(a.userId,b):void(b&&b(null,new v("Connection must be made before you unblock users.",x.INVALID_INITIALIZATION)))};this.unblockUserWithUserId=
function(a,b){return this.currentUser?void n.getInstance().unblockUser(this.currentUser.userId,a,function(a,c){return c?void(b&&b(null,c)):void(b&&b())}):void(b&&b(null,new v("Connection must be made before you unblock users.",x.INVALID_INITIALIZATION)))}},X=null;return q.getInstance=function(){return null===X?null:X},{SendBird:q}}().SendBird});String.prototype.isEmpty=function(){return!(null!=this&&void 0!=this&&0!=this.length)};
String.prototype.format=function(){var c=0,g=arguments;return this.replace(/{}/g,function(){return"undefined"!=typeof g[c]?g[c++]:""})};function getUrlVars(){for(var c=[],g,h=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),m=0;m<h.length;m++)g=h[m].split("="),c.push(g[0]),c[g[0]]=g[1];return c}
function notifyMe(){window.Notification&&"granted"===Notification.permission?console.log("Notification is already granted."):window.Notification&&"denied"!==Notification.permission&&Notification.requestPermission(function(c){Notification.permission!==c&&(Notification.permission=c);"granted"===c?console.log("Notification is granted."):console.log("Notification is denied.")})}function notifyMessage(c,g,h){"undefined"!==typeof h&&h?notifyJobseekerForMessage(c,g):notifyEmployerForMessage(c,g)}
function notifyEmployerForMessage(c,g){if(window.Notification&&"granted"===Notification.permission){var h=jQuery.parseJSON(c.data);if(g.sender.userId==h.usrid){var m="https://employer.fastjobs.sg/p/messages/list";(new Notification(c.name+" | FastJobs",{icon:"https://www.fastjobs.sg/img/frontend/fastjobs-square.jpg",body:h.usrfullm+": "+g.message,tag:c.url})).onclick=function(){m+="?jid="+h.jobid+"&coyid="+h.coyid+"&uid="+h.usrid+"&appid="+h.appid;openWindowOnce(m,"FastJobs Chat").focus()}}}}
function notifyJobseekerForMessage(c,g){var h=""!==c.coverUrl?c.coverUrl:"https://www.fastjobs.sg/img/frontend/fastjobs-square.jpg";if(window.Notification&&"granted"===Notification.permission){var m=jQuery.parseJSON(c.data);if(g.sender.userId==m.eusrid){var k="https://www.fastjobs.sg/p/message/list";(new Notification(c.name+" | FastJobs",{icon:h,body:m.coydispm+": "+g.message,tag:c.url})).onclick=function(){k+="?jid="+m.jobid+"&appid="+m.appid;openWindowOnce(k,"FastJobs Messages").focus()}}}}
function truncateMessageText(c,g,h){null==g&&(g=100);null==h&&(h="...");return c.length>g?c.substring(0,g-h.length)+h:c}function isCurrentUser(c){return getUserId()==c?!0:!1}function checkUserId(c){c?setCookieUserId(c):c=getUserId();0==c.trim().length&&(c=generateUUID());return c}function getUserId(){for(var c=document.cookie.split(";"),g=0;g<c.length;g++){var h=c[g];if(h){for(;" "==h.charAt(0);)h=h.substring(1);if(0==h.indexOf("user_id="))return h.substring(8,h.length)}}return""}
function generateUUID(){var c=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(g){var h=(c+16*Math.random())%16|0;c=Math.floor(c/16);return("x"==g?h:h&3|8).toString(16)})}function setCookieUserId(c){document.cookie="user_id="+c+"; expires=Fri, 31 Dec 9999 23:59:59 GMT";return c}function nameInjectionCheck(c){try{return c=c.replace(/</g,"&lt;"),c=c.replace(/>/g,"&gt;")}catch(g){return""}}
function convertLinkMessage(c){var g="";try{c=c.replace(/</g,"&lt;"),c=c.replace(/>/g,"&gt;")}catch(h){c=""}return g=/(http|ftp|https):\/\/[a-z0-9-_]+(.[a-z0-9-_]+)+([a-z0-9-.,@?^=%&;:/~+#]*[a-z0-9-@?^=%&;/~+#])?/i.test(c)?g+('<a href="'+c+'" target="_blank">'+c+"</a>"):g+c}function openWindowOnce(c,g){var h=window.open("",g,"",!0);"about:blank"===h.location.href&&(h.location.href=c);return h}
var atinternet={trackEvent:function(c){c.xtc_name&&c.xt_click&&this.trackClickEvent(c)},trackClickEvent:function(c){c.xtc_name&&(c.xtn2||(c.xtn2=5),c.xtc_type||(c.xtc_type="A"),c.xtc_name=c.xtc_name.replace(/[&@\*$!\[\]]/g,""),"F"===c.xtc_type?xt_click(this,"F",c.xtn2,c.xtc_name):xt_click(this,"C",c.xtn2,c.xtc_name,c.xtc_type))}},ganalytics={trackEvent:function(c){c.category&&c.action&&(c.label||(c.label=""),c.action=c.action.replace(/[&@\*$!\[\]]/g,""),ga("send","event",c.category,c.action,c.label))},
trackPage:function(){ga("send","pageview")},trackVirtualPage:function(c,g){c&&g&&ga("send",{hitType:"pageview",title:c,page:g})}},frontendInterviewNotifier={notifyPending:function(c){if(c&&c.url&&!$.trim(c.url).isEmpty()){var g=$('meta[name="csrf-token"]').attr("content");$.ajax({method:"POST",url:c.url,data:{_csrf:g,sts:c.sts||""},cache:!1,dataType:"json",xhrFields:{withCredentials:!0},success:function(c){c=c&&c.count?parseInt(c.count):0;if(0<c&&$("#navInterview").length){var g=9<c?"9+":c;$("#navInterview").append('<span id="navInterviewCount" class="interview-count animated infinite jello">'+
g+"</span>")}"undefined"!==typeof fastjobsToast&&0<c&&fastjobsToast.show({theme:"dark","class":"new-interview-toast",title:"You've got interview invitation!",titleSize:"18px",titleLineHeight:"22px",message:"You have "+c+" pending interview invitation"+(1<c?"s":"")+".",messageSize:"16px",messageLineHeight:"20px",position:"topRight",backgroundColor:"#01579B",icon:"fa fa-calendar",timeout:5E3,balloon:!0,buttons:[['<button class="pull-left">View Interview Details</button>',function(c,g){var h=$("#navInterview").length?
$("#navInterview").find("a").attr("href"):"/p/interview/list";window.location.href=h}]]})},error:function(){}})}}},userProfile={submit:function(c,g){if(c){var h=c.attr("action");$.ajax({method:"POST",url:h,cache:!1,data:c.serialize(),dataType:"json",xhrFields:{withCredentials:!0},success:function(c){"function"===typeof g&&g(c)},error:function(c){"function"===typeof g&&g(c)}});return!1}},buildProfileReminder:function(c,g){c&&$.ajax({method:"POST",url:c,cache:!1,dataType:"html",xhrFields:{withCredentials:!0},
success:function(c){"function"===typeof g&&g(c)},error:function(c){"function"===typeof g&&g(c)}})}};
$(function(){var c=$("body");$("#modal-signup-success").on("show.bs.modal",function(){$("#modal-signup").modal("hide");atinternet.trackEvent({xt_click:!0,xtn2:"9",xtc_type:"F",xtc_name:"Registration_Successful"});ganalytics.trackVirtualPage("Registration Successful","/jobseeker/signup-success")});$("#modal-signup").on("show.bs.modal",function(){$("#modal-login").modal("hide");atinternet.trackEvent({xt_click:!0,xtn2:"9",xtc_type:"F",xtc_name:"Registration"});ganalytics.trackVirtualPage("Registration",
"/jobseeker/signup")});$("#modal-login").on("show.bs.modal",function(){$("#modal-signup").modal("hide");$("#modal-signup-success").modal("hide");atinternet.trackEvent({xt_click:!0,xtn2:"7",xtc_type:"F",xtc_name:"Login"});ganalytics.trackVirtualPage("Jobseeker Login","/jobseeker/login")});$("#modal-forgot-pass").on("show.bs.modal",function(){$("#modal-login").modal("hide")});$("#btn-forgot-pass").on("click",function(c){c.preventDefault();$("#modal-forgot-pass").modal("hide");$("#modal-loader").modal("show")});
$(".jobfeed input, #signup-form input, #profile-form input, #modal-profile-skills-form input").iCheck({checkboxClass:"icheckbox_minimal",radioClass:"iradio_minimal",increaseArea:"20%"});$("#modal-login").length&&("1"===$("#modal-login").attr("data-login-error")&&$("#modal-login").modal("show"),$("#modal-login-cancel").on("click",function(c){c.preventDefault();$("#modal-login .alert").hide();$("#modal-login").modal("hide");c=$(location).attr("href").replace(/&?error=([^&]$|[^&]*)/i,"");"undefined"!==
typeof history.pushState&&(c={Page:"Search Jobs",Title:"Part Time Jobs in Singapore",Url:c},history.pushState(c,c.Page,c.Url))}));$("#modal-btn-signup").on("click",function(c){c.preventDefault();$(this).hide();$("#signup-progress").fadeIn();$("#signup-form-error").slideUp("fast");c=$("#signup-form");userProfile.submit(c,function(c){if(1===c.isSuccess||"1"===c.isSuccess)$("#signup-form-error").slideUp("fast",function(){$("#modal-signup").modal("hide");$("#registered-email").text($("#signup-email").val());
$("#modal-signup-success").modal("show")});else{var g="",g=g+'<ul class="form-error">';$.each(c.message,function(c,h){g+="<li>"+h+"</li>"});g+="</ul>";$("#signup-msg-error").html(g);$("#signup-form-error").slideDown(150,function(){$("#signup-progress").slideUp("fast");$("#modal-btn-signup").show()});atinternet.trackEvent({xt_click:!0,xtn2:"9",xtc_type:"F",xtc_name:"Registration_Error"});ganalytics.trackVirtualPage("Registration Error","/jobseeker/signup")}});return!1});$("#modal-signup").length&&
("1"===$("#modal-signup").attr("data-signup-error")&&$("#modal-signup").modal("show"),$("#modal-signup-cancel").on("click",function(c){c.preventDefault();$("#modal-signup .alert").hide();$("#modal-signup").modal("hide");c=$(location).attr("href").replace(/&?error=([^&]$|[^&]*)/i,"");"undefined"!==typeof history.pushState&&(c={Page:"Search Jobs",Title:"Part Time Jobs in Singapore",Url:c},history.pushState(c,c.Page,c.Url))}));var g=$(".fj-back-top");g.length&&($(window).scroll(function(){300<$(this).scrollTop()?
g.addClass("cd-is-visible"):g.removeClass("cd-is-visible cd-fade-out");1200<$(this).scrollTop()&&g.addClass("cd-fade-out")}),g.on("click",function(c){c.preventDefault();$("body,html").animate({scrollTop:0},700);atinternet.trackEvent({xt_click:!0,xtn2:"2",xtc_type:"A",xtc_name:"Find_Jobs::Back_to_top"})}));c.on("click",".option-box-radio",function(){var c=$(this).closest("form");c.find(".radio").removeClass("selected");c.find("span.glyphicon").removeClass("glyphicon-ok-sign");c=$(this).closest("div");
c.children("span.glyphicon").addClass("glyphicon-ok-sign");c.addClass("selected")});c.on("show.bs.modal","#modal-strengthen-profile",function(){atinternet.trackEvent({xt_click:!0,xtn2:"8",xtc_type:"F",xtc_name:"Build_Profile"});ganalytics.trackVirtualPage("Build Profile","/profile/showstrengthenprofile")});c.on("click","#btn-modal-update-empstatus",function(c){c.preventDefault();c=$("#modal-update-empsts-form");if(void 0===$("input[name='emp_status']:checked").val())return $("#modal-update-empsts-form-error").slideDown(),
!1;$("#modal-update-empsts-form-error").slideUp();userProfile.submit(c,function(c){"1"===c.isSuccess||1===c.isSuccess?(atinternet.trackEvent({xt_click:!0,xtn2:"8",xtc_type:"A",xtc_name:"Profile::Build_Empsts"}),ganalytics.trackEvent({category:"Profile",action:"Build_Profile",label:"Employment Status"}),void 0!==$("#item-emp-status").attr("data-next-item")&&""!==$("#item-emp-status").attr("data-next-item")?(c=parseInt($("#item-emp-status").attr("data-next-item")),$("#strengthen-profile-carousel").carousel(c)):
$("#modal-strengthen-profile").modal("hide")):$("#modal-strengthen-profile").modal("hide")});return!1});c.on("click","#btn-modal-update-workexp",function(c){c.preventDefault();c=$("#modal-update-workexp-form");$("#exp_company").closest(".form-group").removeClass("has-error");$("#exp_company_help").html("");$("#exp_job").closest(".form-group").removeClass("has-error");$("#exp_job_help").html("");userProfile.submit(c,function(c){"1"===c.isSuccess||1===c.isSuccess?(atinternet.trackEvent({xt_click:!0,
xtn2:"8",xtc_type:"A",xtc_name:"Profile::Build_Workexp"}),ganalytics.trackEvent({category:"Profile",action:"Build_Profile",label:"Work Experience"}),void 0!==$("#item-work-exp").attr("data-next-item")&&""!==$("#item-work-exp").attr("data-next-item")?(c=parseInt($("#item-work-exp").attr("data-next-item")),$("#strengthen-profile-carousel").carousel(c)):$("#modal-strengthen-profile").modal("hide")):$.each(c.message,function(c,g){$("#"+c).length&&($("#"+c).closest(".form-group").addClass("has-error"),
$("#"+c+"_help").html("<small>"+g+"</small>"))})});return!1});c.on("click","#btn-modal-update-education",function(c){c.preventDefault();c=$("#modal-update-education-form");if(void 0===$("input[name='education']:checked").val())return $("#modal-update-education-form-error").slideDown(),!1;$("#modal-update-education-form-error").slideUp();userProfile.submit(c,function(c){atinternet.trackEvent({xt_click:!0,xtn2:"8",xtc_type:"A",xtc_name:"Profile::Build_Education"});ganalytics.trackEvent({category:"Profile",
action:"Build_Profile",label:"Education"});$("#modal-strengthen-profile").modal("hide")});return!1})});
var chatApp={settings:{appId:null,userId:null,userToken:null,userData:{},messageLimit:15,channelLimit:15,jobChannelsCounter:0,chatNotificationPriming:$("#messagesTooltip"),chatNotificationUnread:$("#unreadMessagesTooltip"),chatLoading:$("#chatLoading"),chatEmpty:$("#chatEmpty"),chatList:$("#chatList"),messageBox:$("#messageBox"),chatBox:$("#chatBox"),chatBoxPhoto:$("#chatBoxPhoto"),chatBoxInfo:$("#chatBoxInfo"),chatCanvas:$("#chatCanvas"),chatTextarea:$("#chatTextarea"),chatUserTyping:$("#chatUserTyping"),
chatJobBox:$("#chatJobBox"),chatJobInfo:$("#chatJobInfo"),chatInterviewInvitation:$("#chatInterviewInvitation"),isInit:!1,isNeedRefresh:!1,currentUser:null,currChannelUrl:null,currChannelInfo:null,isUserTyping:!1,shouldShowUnreadMsgTooltip:!0},chatInstance:{},GroupChannelListQuery:null,PreviousMessageListQuery:null,SendMessageHandler:null,groupChannelLastMessageList:{},channelMessageList:{},askNotificationPriming:function(){if("localStorage"in window&&null!==window.localStorage){var c=Date.now(),
g=localStorage.getItem("notifyMeNotNow_expiresIn");if(void 0===g||null===g)g=0;if(g<c)try{localStorage.removeItem("notifyMeNotNow"),localStorage.removeItem("notifyMeNotNow_expiresIn")}catch(h){}else try{return null===localStorage.getItem("notifyMeNotNow")?!0:!1}catch(m){}}return!0},showNotificationPriming:function(){window.Notification&&"granted"===Notification.permission?this.settings.shouldShowUnreadMsgTooltip=!0:window.Notification&&"denied"!==Notification.permission&&this.askNotificationPriming()&&
(this.settings.shouldShowUnreadMsgTooltip=!1,this.settings.chatNotificationPriming.length&&this.settings.chatNotificationPriming.fadeIn())},unreadMsgNotifyMe:function(c){if(c&&c.url){var g=this;this.getUnreadMsgCount(c.url,function(c){c&&0<c&&("undefined"!==typeof fastjobsToast&&g.settings.shouldShowUnreadMsgTooltip&&fastjobsToast.show({theme:"dark","class":"new-msg-toast",title:"You have a message!",titleSize:"18px",titleLineHeight:"22px",message:"You have "+c+" unread message"+(1<c?"s":"")+".",
messageSize:"16px",messageLineHeight:"20px",position:"topRight",backgroundColor:"#1E88E5",icon:"fa fa-comments",timeout:5E3,balloon:!0,buttons:[['<button class="pull-left">Read Message</button>',function(c,g){var h=$("#navMsg").length?$("#navMsg").find("a").attr("href"):"/p/message/list";window.location.href=h}]]}),$("#navMsg").length&&(c=9<c?"9+":c,$("#navMsg").append('<span id="navUnreadMsgCount" class="unread-msg-count animated infinite jello">'+c+"</span>")))})}},notifyMe:function(){this.settings.chatNotificationPriming.length&&
this.settings.chatNotificationPriming.fadeOut();notifyMe()},initialize:function(c){if(c&&c.appId&&c.userId&&c.token){var g=c.appId,h=c.userId,m=c.token,k=c.userData?c.userData:null,u=c.isChatPage?c.isChatPage:0,r=1===u||"1"===u?!0:!1;this.chatInstance=new SendBird({appId:g});var s=this;this.chatInstance.connect(h,m,function(c,g){g||y(c)});var y=function(u){s.settings.isInit=!0;s.settings.currentUser=u;s.settings.appId=g;s.settings.userId=h;s.settings.userToken=m;null!==k?(s.settings.userData=k,s.chatInstance.updateCurrentUserInfo(k.name,
k.photo,function(c,g){})):s.settings.userData={};setTimeout(function(){s.monitorUserVisibility(s.chatInstance,c)},500);r&&(s.resetChat(),s.list(),setTimeout(function(){s.updateAllChatList()},500))},u=new this.chatInstance.ConnectionHandler;u.onReconnectStarted=function(c){console.log("onReconnectStarted")};u.onReconnectSucceeded=function(c){console.log("onReconnectSucceeded");s.settings.isInit||y(s.settings.currentUser);s.settings.isNeedRefresh=!0};u.onReconnectFailed=function(c){console.log("onReconnectFailed")};
this.chatInstance.addConnectionHandler("FJ_JSR_ConnectionHandler_ID",u);r?this.addChannelHandler():(u=new this.chatInstance.ChannelHandler,u.onMessageReceived=function(c,g){notifyMessage(c,g,!0)},this.chatInstance.addChannelHandler("FJ_JSR_CHANNEL_ID",u))}},resetChat:function(){this.PreviousMessageListQuery=this.GroupChannelListQuery=null;this.groupChannelLastMessageList={};this.channelMessageList={};this.loadChatCanvas(!1);this.settings.currChannelUrl=null;this.settings.currChannelInfo=null;this.settings.messageBox.attr("data-jobid",
"").attr("data-appid","");this.settings.chatList.html("");this.settings.chatJobInfo.html("");this.settings.chatCanvas.html("");this.settings.chatUserTyping.hide().html("");this.settings.chatInterviewInvitation.html("")},list:function(c){null===this.GroupChannelListQuery&&(this.GroupChannelListQuery=this.chatInstance.GroupChannel.createMyGroupChannelListQuery(),this.GroupChannelListQuery.limit=30,this.GroupChannelListQuery.includeEmpty=!1);var g=this;this.GroupChannelListQuery.next(function(h,m){m||
(h.forEach(function(c){if("2"!=jQuery.parseJSON(c.data).sts){g.addChannel(c);var h=c.url,m=9<c.unreadMessageCount?"9+":c.unreadMessageCount;0!==m&&$.each($(".left-nav-channel"),function(c,k){$(k).data("channel-url")===h&&g.addUnreadCount(k,m,h)});g.settings.jobChannelsCounter++}}),0>=g.settings.jobChannelsCounter&&g.showEmptyMessage(),"function"===typeof c&&c())})},nextList:function(){if("undefined"!==typeof this.GroupChannelListQuery&&this.GroupChannelListQuery.hasNext){this.list();var c=this;setTimeout(function(){c.updateAllChatList()},
500)}else $.trim(this.settings.chatList.html()).isEmpty()&&this.showEmptyMessage()},addChannel:function(c){var g=jQuery.parseJSON(c.data),h=c.url,g=g.coydispm;$(".left-nav-channel-group[data-channel-url="+h+"]");var m=$.trim(c.coverUrl).isEmpty()?"/img/frontend/default-logo-company.png":c.coverUrl;this.groupChannelLastMessageList[h]=c.lastMessage;15<g.length&&(g=g.substring(0,20)+"...");this.settings.chatList.append('<div class="message-contact left-nav-channel left-nav-channel-group"      data-channel-url="'+
h+'"     data-channel-name="'+g+'"><div class="row"><div class="col-xs-3 col-sm-3 col-md-4 col-lg-3 hidden-xs hidden-sm"><div class="message-contact-photo"><img src="'+m+'" class="img-responsive" alt="'+g+'" /></div></div><div class="col-sm-12 col-md-8 col-lg-9 message-contact-info"><h5>'+g+'<span class="pull-right left-nav-channel-lastmessagetime hidden-md"></span></h5><h4>'+truncateMessageText(c.name,25)+'</h4><p class="left-nav-channel-lastmessage">&nbsp;</p></div></div>')},jobInfo:function(c,
g){var h="undefined"!==typeof c?c:"",m="undefined"!==typeof g?g:"",k=this.settings.chatJobBox.data("job-details-url"),u=this,r=this.settings.chatJobBox.attr("data-panel-state");this.settings.chatJobInfo.html(this.getAjaxLoader());$.trim(k).isEmpty()?this.settings.chatJobInfo.html(""):$.ajax({method:"GET",url:k,data:{jid:h,appid:m},cache:!1,dataType:"html",xhrFields:{withCredentials:!0},success:function(c){u.settings.chatJobInfo.html(c);$.trim(c).isEmpty()&&"shown"===r?(u.toggleJobInfo(),$("#jobInfoToggle").hide()):
$.trim(c).isEmpty()||"hidden"!==r||($("#jobInfoToggle").show(),u.toggleJobInfo())},error:function(){u.settings.chatJobInfo.html("")}})},interviewInvitation:function(c,g){var h="undefined"!==typeof c?c:"",m="undefined"!==typeof g?g:"",k=this.settings.chatInterviewInvitation.data("interview-schedule-url"),u=this,r=$('meta[name="csrf-token"]').attr("content");this.settings.chatInterviewInvitation.hide().html("");this.settings.chatCanvas.removeClass("with-interview");$.trim(k).isEmpty()||$.ajax({method:"POST",
url:k,data:{_csrf:r,jid:h,appid:m},cache:!1,dataType:"html",xhrFields:{withCredentials:!0},success:function(c){$.trim(c).isEmpty()||(u.settings.chatCanvas.addClass("with-interview"),u.settings.chatInterviewInvitation.html(c).fadeIn())},error:function(){}})},openChatChannel:function(c){if($.trim(c).isEmpty())this.settings.chatTextarea.val("").attr("disabled",!0);else{var g=this.settings.messageBox,h=this;this.settings.currChannelInfo=null;this.settings.currChannelUrl=null;this.settings.chatCanvas.html("");
this.settings.messageBox.attr("data-jobid","").attr("data-appid","");this.PreviousMessageListQuery=null;this.chatInstance.GroupChannel.getChannel(c,function(m,k){if(k)900100===k.code&&alert("Oops...You got banned out from this channel."),console.log(k),h.settings.chatTextarea.val("").attr("disabled",!0);else{h.settings.isNeedRefresh&&(m.refresh(function(){}),h.settings.isNeedRefresh=!1);m.markAsRead();h.settings.currChannelInfo=m;h.settings.currChannelUrl=c;h.settings.chatTextarea.val("").attr("disabled",
!1);$.each($(".left-nav-channel-group"),function(g,h){c===$(h).data("channel-url")?($(h).addClass("left-nav-channel-group--active"),$(h).find('div[class="left-nav-channel__unread"]').remove()):$(h).removeClass("left-nav-channel-group--active")});var u=jQuery.parseJSON(m.data);g.attr("data-jobid",u.jobid).attr("data-appid",u.appid);h.loadMessages(h.scrollToLatestMessage);h.updateCurrentChatInfo(m.name,m.coverUrl,u.coydispm);h.setLeftGroupMessageIfNeeded(m);h.jobInfo(u.jobid,u.appid);h.interviewInvitation(u.jobid,
u.appid)}})}},updateCurrentChatInfo:function(c,g,h){var m="";g='<div class="chat-top-photo"><img src="'+($.trim(g).isEmpty()?"/img/frontend/default-logo-company.png":g)+'" alt="'+c+'" class="img-responsive" /></div>';$.trim(c).isEmpty()||(m="<h5>"+truncateMessageText(h,30)+' <span id="chatUserTyping"></span></h5><h4>'+truncateMessageText(c,30)+'&nbsp;&nbsp;<a href="#" id="jobInfoToggle" class="hidden-xs hidden-sm"><span class="glyphicon glyphicon-info-sign"></span></a><span class="pull-right"><a href="#" id="leaveChat"><span class="glyphicon glyphicon-log-out"></span> Leave Chat</a></span>',
"</h4>");this.settings.chatBoxInfo.html(m);this.settings.chatBoxPhoto.html(g)},loadMessages:function(c){this.PreviousMessageListQuery||(this.PreviousMessageListQuery=this.settings.currChannelInfo.createPreviousMessageListQuery());var g=this,h=this.settings.chatCanvas;this.PreviousMessageListQuery.load(this.settings.messageLimit,!0,function(m,k){k?console.log(k):(m.forEach(function(c){h.prepend(chatApp.messageList(c));g.updateChannelMessageCache(null,c)}),"function"===typeof c&&(g.loadChatCanvas(0<
m.length?!0:!1),g.scrollToLatestMessage()))})},loadChatCanvas:function(c){this.settings.chatLoading.fadeOut();"undefined"!==typeof c&&c?(this.settings.chatEmpty.hide(),this.settings.chatBox.fadeIn("slow")):(this.settings.chatEmpty.fadeIn("slow"),this.settings.chatBox.hide(),this.settings.chatCanvas.html(""),this.settings.chatJobInfo.html(""),this.settings.chatBoxPhoto.html(""),this.settings.chatBoxInfo.html(""),this.settings.chatTextarea.val("").attr("disabled",!0))},showEmptyMessage:function(){this.settings.chatList.html('<div class="message-contact"><div class="row"><div class="col-sm-12"><br/><br/><h4 class="text-center">No messages yet.</h4></div></div></div>');
this.settings.chatEmpty.find("h2").text("Employers have not yet started any chats with you.")},toggleJobInfo:function(){var c=this.settings.chatJobBox,g=this.settings.messageBox;"shown"===c.attr("data-panel-state")?(c.hide(),g.css("width","75%"),c.attr("data-panel-state","hidden")):(c.show(),g.css("width","50%"),c.attr("data-panel-state","shown"))},unreadCountUpdate:function(c){var g=c.url,h=c.unreadMessageCount;c="undefined"!==typeof c.lastMessage&&null!==c.lastMessage&&c.lastMessage.sender.userId==
this.settings.userId?!0:!1;var m=this;0<h&&!c&&$.each($(".left-nav-channel"),function(c,u){$(u).data("channel-url")==g&&m.addUnreadCount(u,h,g)})},addUnreadCount:function(c,g,h){h==this.settings.currChannelUrl&&document.hasFocus()||(0!=$(c).find('div[class="left-nav-channel__unread"]').length?$(c).find('div[class="left-nav-channel__unread"]').html(g):$('<div class="left-nav-channel__unread">'+g+"</div>").prependTo(".left-nav-channel-group[data-channel-url="+h+"]"))},setSysMessage:function(c){this.settings.chatCanvas.append('<div class="chat-channel-notice"><span class="alert alert-info">'+
c.message+".</span></div>");this.scrollToLatestMessage()},moveToTopGroupChat:function(c){$(".left-nav-channel-group[data-channel-url="+c+"]").prependTo(this.settings.chatList)},refreshList:function(c){var g=$("#chatList").find(".left-nav-channel-group--active");this.GroupChannelListQuery=null;this.groupChannelLastMessageList={};this.settings.chatList.html("");var h=this;this.list(function(){if(g.length){var m=g.attr("data-channel-url"),m=$(".left-nav-channel-group[data-channel-url="+m+"]");m.length&&
(m.addClass("left-nav-channel-group--active"),m.find(".left-nav-channel__unread").remove())}c&&c.isGroupChannel()&&h.moveToTopGroupChat(c.url)});setTimeout(function(){h.updateAllChatList()},500)},addChannelHandler:function(){var c=new this.chatInstance.ChannelHandler,g=this;c.onMessageReceived=function(c,m){var k=!1;g.settings.currChannelInfo==c&&(k=!0);c.refresh(function(){});k&&c.isGroupChannel()?c.markAsRead():g.unreadCountUpdate(c);document.hasFocus()||notifyMessage(c,m,!0);m.isUserMessage()&&
k&&(g.setChatMessage(m),k=jQuery.parseJSON(c.data),g.jobInfo(k.jobid,k.appid),g.interviewInvitation(k.jobid,k.appid));g.refreshList()};this.SendMessageHandler=function(c,m){if(m){if(900050==m.code){g.setSysMessage({message:"This channel is freeze."});return}if(900041==m.code){g.setSysMessage({message:"You are muted."});return}}g.groupChannelLastMessageList.hasOwnProperty(c.channelUrl)&&(g.groupChannelLastMessageList[c.channelUrl]=c,g.updateChatListLastMessage(c));c.isUserMessage()&&g.setChatMessage(c)};
c.onMessageDeleted=function(c,g){};c.onReadReceiptUpdated=function(c){g.updateChannelMessageCacheAll(c)};c.onTypingStatusUpdated=function(c){c==g.settings.currChannelInfo&&g.typingStatus(c)};c.onChannelFrozen=function(c){};c.onChannelUnfrozen=function(c){};c.onChannelDeleted=function(c){g.deleteChannel(c)};this.chatInstance.addChannelHandler("FJ_JSR_ChannelHandler_ID",c)},leaveChannel:function(){if(this.settings.currChannelInfo){var c=this.settings.currChannelInfo,g=this;bootbox.confirm({className:"modal-interview-prompt",
onEscape:!0,backdrop:!0,size:"small",title:"Leave Chat",message:"Are you sure you want to leave this conversation?<br/>This will remove the chat thread. You cannot undo this.",buttons:{confirm:{label:'<span class="glyphicon glyphicon-remove"></span>&nbsp; Leave Chat',className:"btn-danger pull-right"},cancel:{label:"Close",className:"btn-default"}},callback:function(h){h&&g.deleteChannel(c)}})}},deleteChannel:function(c){var g=c.url;$(".left-nav-channel-group[data-channel-url="+g+"]").remove();try{delete this.groupChannelLastMessageList[g],
delete this.channelMessageList[g]}catch(h){}c.isGroupChannel()&&this.settings.currChannelInfo==c&&this.leaveChatChannel(c)},leaveChatChannel:function(c){var g=this.settings,h=this;c.isGroupChannel()&&g.currChannelInfo==c&&c.leave(function(m,k){k?console.log(k):(h.setChannelLeaveStatus(c),h.loadChatCanvas(!1),g.currChannelUrl=null,g.currChannelInfo=null,g.jobChannelsCounter--,0>=g.jobChannelsCounter&&h.showEmptyMessage())})},setChannelLeaveStatus:function(c){if(c){var g=jQuery.parseJSON(c.data),h=
this.settings.messageBox.attr("data-leave-channel-url"),m=$('meta[name="csrf-token"]').attr("content");$.ajax({method:"POST",url:h,data:{channelUrl:c.url,appid:g.appid,_csrf:m},cache:!1,dataType:"html",xhrFields:{withCredentials:!0},success:function(c){console.log(c)},error:function(){console.log("error updating the channel status")}})}},setLeftGroupMessageIfNeeded:function(c){c&&(c=jQuery.parseJSON(c.data),c.sts&&"3"==c.sts?(this.settings.chatCanvas.append('<div class="chat-channel-notice"><span class="alert alert-danger"><strong>'+
c.coydispm+"</strong> already left the conversation.</span></div>"),this.settings.chatTextarea.val("").attr("disabled",!0)):!c.sts||"2"!=c.sts&&"3"!=c.sts?this.settings.chatTextarea.val("").attr("disabled",!1):this.settings.chatTextarea.val("").attr("disabled",!0))},startTyping:function(){var c=this.settings.currChannelInfo;c&&c.isGroupChannel()&&c.startTyping()},endTyping:function(){var c=this.settings.currChannelInfo;c&&(console.log("user ended typing"),c.endTyping())},typingStatus:function(c){c.isGroupChannel()&&
(c.isTyping()?$("#chatUserTyping").show().html("<small> is typing...</small>"):$("#chatUserTyping").hide().text(""))},setChatMessage:function(c){this.settings.chatCanvas.append(this.messageList(c));this.updateChannelMessageCache(null,c);this.scrollToLatestMessage()},messageList:function(c){var g=c.sender,h=jQuery.parseJSON(this.settings.currChannelInfo.data),m=h.usrid==c.sender.userId?" from-jobseeker":" from-employer",k=this.formatMessageDate(c.createdAt),u="";c.MESSAGE_TYPE===c.MESSAGE_TYPE_FILE&&
"undefined"!==typeof c.type&&(u=c.type.match(/^image\/.+$/)?'<p><a href="'+c.url+'" target="_blank">'+c.name+'<img src="'+c.url+'" class="img-responsive"> </a> </p>':'<p><span class="candidate-info-label">File:</span><a href="'+c.url+'" target="_blank">'+c.name+"</a> </p>");var r=c.message;$.trim(r).isEmpty()||(r=r.replace(/(?:\r\n|\r|\n)/g,"<br />"));h='<div class="message-bubble'+m+'" data-userid="%userid%"><p class="senttime">'+k+'</p><span class="bubble-tip"></span></p><div class="message" data-messageid="%messageid%">'+
r+u+"</div></div>"+(h.usrid==c.sender.userId?"":'<br class="clear"/>');return h=h.replace("%userid%",g.userId).replace("%messageid%",c.messageId)},formatMessageDate:function(c){var g=new Date(c);return jQuery.datepicker.formatDate("d M",new Date(c))+" "+g.getHours()+":"+g.getMinutes()},sendMessage:function(c,g){if(!$.trim(g).isEmpty()){c.preventDefault();"none"===this.settings.chatBox.css("display")&&(this.settings.chatEmpty.hide(),this.settings.chatBox.fadeIn("slow"));var h=this.encodeHTMLInput(g);
this.settings.currChannelInfo.sendUserMessage($.trim(h),'{"srctyp": "2"}',this.SendMessageHandler)}},updateAllChatList:function(){for(var c in this.groupChannelLastMessageList)this.updateChatListLastMessage(this.groupChannelLastMessageList[c])},updateChatListLastMessage:function(c){var g="",h="";c&&(g=truncateMessageText(c.message,70),h=((new Date).getTime()-c.createdAt)/1E3,60>h?(h=parseInt(h),h=1>=h?"just now":h+" secs ago"):60>h/60?(h=parseInt(h/60),h=1==h?h+" min ago":h+" mins ago"):24>h/3600?
(h=parseInt(h/3600),h=1==h?h+" hour ago":h+" hours ago"):(h=parseInt(h/86400),h=1==h?h+" day ago":this.formatMessageDate(c.createdAt)),h&&(h='<div><span class=""></span> <span> '+h+"</span></div>"),$(".left-nav-channel-group[data-channel-url="+c.channelUrl+"] .left-nav-channel-lastmessage").html(g),$(".left-nav-channel-group[data-channel-url="+c.channelUrl+"] .left-nav-channel-lastmessagetime").html(h))},updateChannelMessageCacheAll:function(c){for(var g in this.channelMessageList[c.url])this.updateChannelMessageCache(c,
this.channelMessageList[c.url][g].message)},updateChannelMessageCache:function(c,g){var h=null===c?this.settings.currChannelInfo:c;h.isGroupChannel()&&h.getReadReceipt(g);this.channelMessageList.hasOwnProperty(h.url)||(this.channelMessageList[h.url]={});this.channelMessageList[h.url].hasOwnProperty(g.messageId)||(this.channelMessageList[h.url][g.messageId]={});this.channelMessageList[h.url][g.messageId].message=g},scrollToLatestMessage:function(){var c=this.settings.chatCanvas,g=$(c)[0].scrollHeight;
$(c).animate({scrollTop:g},1E3)},getUnreadMsgCount:function(c,g){if(c){var h=$('meta[name="csrf-token"]').attr("content");$.ajax({method:"POST",url:c,data:{_csrf:h},cache:!1,dataType:"html",xhrFields:{withCredentials:!0},success:function(c){"function"===typeof g&&g(c)},error:function(){"function"===typeof g&&g(0)}})}},sentLog:function(c){var g=this.settings.messageBox.attr("data-appid"),h=this.settings.messageBox.attr("data-sentlog-url"),m=$('meta[name="csrf-token"]').attr("content");$.ajax({method:"POST",
url:h,data:{msg:c.message,msgid:c.messageId,usrid:c.sender.userId,appid:g,_csrf:m},cache:!1,dataType:"json",xhrFields:{withCredentials:!0},success:function(c){},error:function(){}})},getAjaxLoader:function(){return'<br/><br/><p class="text-center"><img src="/img/ajax-loader-ring.gif" alt="Loading..." width="48" height="48" /></p>'},encodeHTMLInput:function(c){if(!$.trim(c).isEmpty())return c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},monitorUserVisibility:function(c,
g){"undefined"===typeof ifvisible?console.log("ifvisible plugin missing"):(ifvisible.setIdleDuration(300),ifvisible.idle(function(){"undefined"!==typeof c&&chatApp.settings.isInit&&(console.log("idle. disconnect from send bird"),chatApp.settings.isInit=!1,c.disconnect())}),ifvisible.wakeup(function(){"undefined"===typeof c||chatApp.settings.isInit||(console.log("user becomes active. re-initialize send bird"),chatApp.settings.isInit=!0,"undefined"!==typeof g&&chatApp.initialize(g),"undefined"!==typeof bootbox&&
bootbox.hideAll())}))}};$(function(){var c=$("body");c.on("click",".btn-allow-notification",function(c){c.preventDefault();chatApp.notifyMe();chatApp.settings.shouldShowUnreadMsgTooltip=!0});c.on("click",".btn-close-notification",function(c){c.preventDefault();if("localStorage"in window&&null!==window.localStorage){c=Date.now()+864E5;try{localStorage.setItem("notifyMeNotNow","1"),localStorage.setItem("notifyMeNotNow_expiresIn",c)}catch(h){}}$("#messagesTooltip").fadeOut()})});
