{"size": 318286, "ext": "js", "max_stars_repo_path": "src/main/resources/static/js/lib/alopex/alopex-ext.min.js", "max_stars_repo_name": "lay126/zcp-portal-ui", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/main/resources/static/js/lib/alopex/alopex-ext.min.js", "max_issues_repo_name": "lay126/zcp-portal-ui", "max_issues_repo_issues_event_min_datetime": "2020-01-29T13:01:19.000Z", "max_issues_repo_issues_event_max_datetime": "2020-01-29T13:01:19.000Z", "max_forks_repo_path": "src/main/resources/static/js/lib/alopex/alopex-ext.min.js", "max_forks_repo_name": "zcp-aks-lab/zcp-portal-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 24483.5384615385, "max_line_length": 317856, "alphanum_fraction": 0.7090038519}
/**
 * Alopex UI v2.10.7
 * http://ui.alopex.io
 *
 * Copyright (c) 2018 SK Holdings C&C. All rights reserved.
 *
 * This software is the confidential and proprietary information of SK Holdings C&C
 * You shall not disclose such confidential information and shall use it only in
 * accordance with the terms of the license agreement you entered into with SK Holdings C&C.
 *
 * Date : 2018-05-31 19:50:34 GMT+0900 (대한민국 표준시)
 **/
!function(t){if(void 0===t.fn.inputmask){function e(t){var e=document.createElement("input"),i="on"+t,s=i in e;return s||(e.setAttribute(i,"return;"),s="function"==typeof e[i]),e=null,s}function i(e,s,n){var a=n.aliases[e];return!!a&&(a.alias&&i(a.alias,void 0,n),t.extend(!0,n,a),t.extend(!0,n,s),!0)}function s(e){var i=void 0;function s(i,s){if(void 0!=i&&""!=i){if(1==i.length&&0==e.greedy&&0!=e.repeat&&(e.placeholder=""),e.repeat>0||"*"==e.repeat||"+"==e.repeat){var n="*"==e.repeat?0:"+"==e.repeat?1:e.repeat;i=e.groupmarker.start+i+e.groupmarker.end+e.quantifiermarker.start+n+","+e.repeat+e.quantifiermarker.end}return void 0==t.inputmask.masksCache[i]&&(t.inputmask.masksCache[i]={mask:i,maskToken:function(i){var s=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g,n=!1;function a(t,e,i,s){this.matches=[],this.isGroup=t||!1,this.isOptional=e||!1,this.isQuantifier=i||!1,this.isAlternator=s||!1,this.quantifier={min:1,max:1}}function o(i,s,a){var o=e.definitions[s],r=0==i.matches.length;if(a=void 0!=a?a:i.matches.length,o&&!n){o.placeholder=t.isFunction(o.placeholder)?o.placeholder.call(this,e):o.placeholder;for(var l=o.prevalidator,h=l?l.length:0,c=1;c<o.cardinality;c++){var u=h>=c?l[c-1]:[],d=u.validator,p=u.cardinality;i.matches.splice(a++,0,{fn:d?"string"==typeof d?new RegExp(d):new function(){this.test=d}:new RegExp("."),cardinality:p||1,optionality:i.isOptional,newBlockMarker:r,casing:o.casing,def:o.definitionSymbol||s,placeholder:o.placeholder,mask:s})}i.matches.splice(a++,0,{fn:o.validator?"string"==typeof o.validator?new RegExp(o.validator):new function(){this.test=o.validator}:new RegExp("."),cardinality:o.cardinality,optionality:i.isOptional,newBlockMarker:r,casing:o.casing,def:o.definitionSymbol||s,placeholder:o.placeholder,mask:s})}else i.matches.splice(a++,0,{fn:null,cardinality:0,optionality:i.isOptional,newBlockMarker:r,casing:null,def:s,placeholder:void 0,mask:s}),n=!1}for(var r,l,h,c,u,d,p=new a,f=[],m=[];r=s.exec(i);)switch((l=r[0]).charAt(0)){case e.optionalmarker.end:case e.groupmarker.end:if(h=f.pop(),f.length>0){if((c=f[f.length-1]).matches.push(h),c.isAlternator){u=f.pop();for(var g=0;g<u.matches.length;g++)u.matches[g].isGroup=!1;f.length>0?(c=f[f.length-1]).matches.push(u):p.matches.push(u)}}else p.matches.push(h);break;case e.optionalmarker.start:f.push(new a(!1,!0));break;case e.groupmarker.start:f.push(new a(!0));break;case e.quantifiermarker.start:var v=new a(!1,!1,!0),b=(l=l.replace(/[{}]/g,"")).split(","),_=isNaN(b[0])?b[0]:parseInt(b[0]),y=1==b.length?_:isNaN(b[1])?b[1]:parseInt(b[1]);if("*"!=y&&"+"!=y||(_="*"==y?0:1),v.quantifier={min:_,max:y},f.length>0){var w=f[f.length-1].matches;(r=w.pop()).isGroup||((k=new a(!0)).matches.push(r),r=k),w.push(r),w.push(v)}else{var k;(r=p.matches.pop()).isGroup||((k=new a(!0)).matches.push(r),r=k),p.matches.push(r),p.matches.push(v)}break;case e.escapeChar:n=!0;break;case e.alternatormarker:(d=f.length>0?(c=f[f.length-1]).matches.pop():p.matches.pop()).isAlternator?f.push(d):((u=new a(!1,!1,!1,!0)).matches.push(d),f.push(u));break;default:if(f.length>0){if((c=f[f.length-1]).matches.length>0&&(d=c.matches[c.matches.length-1]).isGroup&&(d.isGroup=!1,o(d,e.groupmarker.start,0),o(d,e.groupmarker.end)),o(c,l),c.isAlternator){for(u=f.pop(),g=0;g<u.matches.length;g++)u.matches[g].isGroup=!1;f.length>0?(c=f[f.length-1]).matches.push(u):p.matches.push(u)}}else p.matches.length>0&&(d=p.matches[p.matches.length-1]).isGroup&&(d.isGroup=!1,o(d,e.groupmarker.start,0),o(d,e.groupmarker.end)),o(p,l)}return p.matches.length>0&&((d=p.matches[p.matches.length-1]).isGroup&&(d.isGroup=!1,o(d,e.groupmarker.start,0),o(d,e.groupmarker.end)),m.push(p)),m}(i),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:s}),t.extend(!0,{},t.inputmask.masksCache[i])}}function n(t){if(t=t.toString(),e.numericInput){t=t.split("").reverse();for(var i=0;i<t.length;i++)t[i]==e.optionalmarker.start?t[i]=e.optionalmarker.end:t[i]==e.optionalmarker.end?t[i]=e.optionalmarker.start:t[i]==e.groupmarker.start?t[i]=e.groupmarker.end:t[i]==e.groupmarker.end&&(t[i]=e.groupmarker.start);t=t.join("")}return t}if(t.isFunction(e.mask)&&(e.mask=e.mask.call(this,e)),t.isArray(e.mask)){if(e.mask.length>1){e.keepStatic=void 0==e.keepStatic||e.keepStatic;var a="(";return t.each(e.mask,function(e,i){a.length>1&&(a+=")|("),void 0==i.mask||t.isFunction(i.mask)?a+=n(i):a+=n(i.mask)}),s(a+=")",e.mask)}e.mask=e.mask.pop()}return e.mask&&(i=void 0==e.mask.mask||t.isFunction(e.mask.mask)?s(n(e.mask),e.mask):s(n(e.mask.mask),e.mask)),i}var n=navigator.userAgent,a=null!==n.match(new RegExp("iphone","i")),o=(n.match(new RegExp("android.*safari.*","i")),n.match(new RegExp("android.*chrome.*","i")),null!==n.match(new RegExp("android.*firefox.*","i"))),r=(/Kindle/i.test(n)||/Silk/i.test(n)||/KFTT/i.test(n)||/KFOT/i.test(n)||/KFJWA/i.test(n)||/KFJWI/i.test(n)||/KFSOWI/i.test(n)||/KFTHWA/i.test(n)||/KFTHWI/i.test(n)||/KFAPWA/i.test(n)||/KFAPWI/i.test(n),e("paste")?"paste":e("input")?"input":"propertychange");function l(i,s,n){var l,h,c,u,d,p=!1,f=!1,m=!1,g=!1,v=!0;function b(t,e,i){e=e||0;var s,n,a,o=[],r=0;do{if(!0===t&&_().validPositions[r]){var l=_().validPositions[r];n=l.match,s=l.locator.slice(),o.push(!0===i?l.input:W(r,n))}else n=(a=C(r,s,r-1)).match,s=a.locator.slice(),o.push(W(r,n));r++}while((void 0==d||r-1<d)&&null!=n.fn||null==n.fn&&""!=n.def||e>=r);return o.pop(),o}function _(){return s}function y(t){var e=_();e.buffer=void 0,e.tests={},!0!==t&&(e._buffer=void 0,e.validPositions={},e.p=0)}function w(t){var e=-1,i=_().validPositions;void 0==t&&(t=-1);var s=e,n=e;for(var a in i){var o=parseInt(a);-1!=t&&null==i[o].match.fn||(o<=t&&(s=o),o>=t&&(n=o))}return e=-1!=s&&t-s>1||n<t?s:n}function k(e,i,s){if(n.insertMode&&void 0!=_().validPositions[e]&&void 0==s){var a,o=t.extend(!0,{},_().validPositions),r=w();for(a=e;a<=r;a++)delete _().validPositions[a];_().validPositions[e]=i;var l,h=!0;for(a=e;a<=r;a++){var c=o[a];if(void 0!=c){var u=_().validPositions;h=P(l=!n.keepStatic&&u[a]&&(void 0!=u[a+1]&&T(a+1,u[a].locator.slice(),a).length>1||void 0!=u[a].alternation)?a+1:O(a),c.match.def)?h&&!1!==E(l,c.input,!0,!0):null==c.match.fn}if(!h)break}if(!h)return _().validPositions=t.extend(!0,{},o),!1}else _().validPositions[e]=i;return!0}function x(t,e,i,s){var a,o=t;_().p=t,void 0!=_().validPositions[t]&&_().validPositions[t].input==n.radixPoint&&(e++,o++);for(a=o;a<e;a++)void 0!=_().validPositions[a]&&(!0!==i&&0==n.canClearPosition(_(),a,w(),s,n)||delete _().validPositions[a]);for(y(!0),a=o+1;a<=w();){for(;void 0!=_().validPositions[o];)o++;var r=_().validPositions[o];a<o&&(a=o+1);var l=_().validPositions[a];void 0!=l&&void 0==r?(P(o,l.match.def)&&!1!==E(o,l.input,!0)&&(delete _().validPositions[a],a++),o++):a++}var h=w();t<=h&&void 0!=_().validPositions[h]&&_().validPositions[h].input==n.radixPoint&&delete _().validPositions[h],y(!0)}function C(t,e,i){for(var s,a=T(t,e,i),o=w(),r=_().validPositions[o]||T(0)[0],l=void 0!=r.alternation?r.locator[r.alternation].split(","):[],h=0;h<a.length&&!((s=a[h]).match&&(n.greedy&&!0!==s.match.optionalQuantifier||(!1===s.match.optionality||!1===s.match.newBlockMarker)&&!0!==s.match.optionalQuantifier)&&(void 0==r.alternation||void 0!=s.locator[r.alternation]&&A(s.locator[r.alternation].toString().split(","),l)));h++);return s}function D(t){return _().validPositions[t]?_().validPositions[t].match:T(t)[0].match}function P(t,e){for(var i=!1,s=T(t),n=0;n<s.length;n++)if(s[n].match&&s[n].match.def==e){i=!0;break}return i}function T(e,i,s){var n=_().maskToken,a=i?s:0,o=i||[0],r=[],l=!1;function h(i,s,n,o){function c(n,o,d){if(a>1e4)return alert("jquery.inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+_().mask),!0;if(a==e&&void 0==n.matches)return r.push({match:n,locator:o.reverse()}),!0;if(void 0!=n.matches){if(n.isGroup&&!0!==d){if(n=c(i.matches[u+1],o))return!0}else if(n.isOptional){var p=n;if(n=h(n,s,o,d)){var f=r[r.length-1].match;0==t.inArray(f,p.matches)&&(l=!0),a=e}}else if(n.isAlternator){var m,g=n,v=[],b=r.slice(),y=o.length,w=s.length>0?s.shift():-1;if(-1==w||"string"==typeof w){var k,x=a,C=s.slice();"string"==typeof w&&(k=w.split(","));for(var D=0;D<g.matches.length;D++){r=[],n=c(g.matches[D],[D].concat(o),d)||n,m=r.slice(),a=x,r=[];for(var P=0;P<C.length;P++)s[P]=C[P];for(var T=0;T<m.length;T++)for(var S=m[T],M=0;M<v.length;M++){var I=v[M];if(S.match.mask==I.match.mask&&("string"!=typeof w||-1!=t.inArray(S.locator[y].toString(),k))){m.splice(T,1),I.locator[y]=I.locator[y]+","+S.locator[y],I.alternation=y;break}}v=v.concat(m)}"string"==typeof w&&(v=t.map(v,function(e,i){if(isFinite(i)){var s=e.locator[y].toString().split(",");e.locator[y]=void 0,e.alternation=void 0;for(var n=0;n<s.length;n++)-1!=t.inArray(s[n],k)&&(void 0!=e.locator[y]?(e.locator[y]+=",",e.alternation=y,e.locator[y]+=s[n]):e.locator[y]=parseInt(s[n]));if(void 0!=e.locator[y])return e}})),r=b.concat(v),l=!0}else n=c(g.matches[w],[w].concat(o),d);if(n)return!0}else if(n.isQuantifier&&!0!==d)for(var A=n,E=s.length>0&&!0!==d?s.shift():0;E<(isNaN(A.quantifier.max)?E+1:A.quantifier.max)&&a<=e;E++){var z=i.matches[t.inArray(A,i.matches)-1];if(n=c(z,[E].concat(o),!0)){if((f=r[r.length-1].match).optionalQuantifier=E>A.quantifier.min-1,0==t.inArray(f,z.matches)){if(E>A.quantifier.min-1){l=!0,a=e;break}return!0}return!0}}else if(n=h(n,s,o,d))return!0}else a++}for(var u=s.length>0?s.shift():0;u<i.matches.length;u++)if(!0!==i.matches[u].isQuantifier){var d=c(i.matches[u],[u].concat(n),o);if(d&&a==e)return d;if(a>e)break}}if(void 0==i){for(var c,u=e-1;void 0==(c=_().validPositions[u])&&u>-1;)u--;if(void 0!=c&&u>-1)a=u,o=c.locator.slice();else{for(u=e-1;void 0==(c=_().tests[u])&&u>-1;)u--;void 0!=c&&u>-1&&(a=u,o=c[0].locator.slice())}}for(var d=o.shift();d<n.length;d++){if(h(n[d],o,[d])&&a==e||a>e)break}return(0==r.length||l)&&r.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]}),_().tests[e]=t.extend(!0,[],r),_().tests[e]}function S(){return void 0==_()._buffer&&(_()._buffer=b(!1,1)),_()._buffer}function M(){return void 0==_().buffer&&(_().buffer=b(!0,w(),!0)),_().buffer}function I(t,e,i){if(i=i||M().slice(),!0===t)y(),t=0,e=i.length;else for(var s=t;s<e;s++)delete _().validPositions[s],delete _().tests[s];for(s=t;s<e;s++)i[s]!=n.skipOptionalPartCharacter&&E(s,i[s],!0,!0)}function A(e,i){for(var s=n.greedy?i:i.slice(0,1),a=!1,o=0;o<e.length;o++)if(-1!=t.inArray(e[o],s)){a=!0;break}return a}function E(e,i,s,a){function o(e,i,s,a){var o=!1;return t.each(T(e),function(r,l){for(var h,c=l.match,u=i?1:0,d="",p=(M(),c.cardinality);p>u;p--)d+=(h=e-(p-1),void 0==_().validPositions[h]?W(h):_().validPositions[h].input);if(i&&(d+=i),!1!==(o=null!=c.fn?c.fn.test(d,_(),e,s,n):(i==c.def||i==n.skipOptionalPartCharacter)&&""!=c.def&&{c:c.def,pos:e})){var f=void 0!=o.c?o.c:i;f=f==n.skipOptionalPartCharacter&&null===c.fn?c.def:f;var m=e;if(void 0!=o.remove&&x(o.remove,o.remove+1,!0),o.refreshFromBuffer){var g=o.refreshFromBuffer;if(s=!0,I(!0===g?g:g.start,g.end),void 0==o.pos&&void 0==o.c)return o.pos=w(),!1;if((m=void 0!=o.pos?o.pos:e)!=e)return o=t.extend(o,E(m,f,!0)),!1}else if(!0!==o&&void 0!=o.pos&&o.pos!=e&&(m=o.pos,I(e,m),m!=e))return o=t.extend(o,E(m,f,!0)),!1;return(1==o||void 0!=o.pos||void 0!=o.c)&&(r>0&&y(!0),k(m,t.extend({},l,{input:function(t,e){switch(e.casing){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase()}return t}(f,c)}),a)||(o=!1),!1)}}),o}function r(e,i){for(var s=_().validPositions[i].locator,n=s.length,a=e;a<i;a++)if(!z(a)){var o=T(a),r=o[0],l=-1;t.each(o,function(t,e){for(var i=0;i<n;i++)e.locator[i]&&A(e.locator[i].toString().split(","),s[i].toString().split(","))&&l<i&&(l=i,r=e)}),k(a,t.extend({},r,{input:r.match.def}),!0)}}s=!0===s;for(var l=M(),h=e-1;h>-1&&!_().validPositions[h];h--);for(h++;h<e;h++)void 0==_().validPositions[h]&&((!z(h)||l[h]!=W(h))&&T(h).length>1||l[h]==n.radixPoint||"0"==l[h]&&t.inArray(n.radixPoint,l)<h)&&o(h,l[h],!0);var c=e,u=!1,d=t.extend(!0,{},_().validPositions);if(c<F()&&(u=o(c,i,s,a),!s&&!1===u)){var p=_().validPositions[c];if(!p||null!=p.match.fn||p.match.def!=i&&i!=n.skipOptionalPartCharacter){if((n.insertMode||void 0==_().validPositions[O(c)])&&!z(c))for(var f=c+1,m=O(c);f<=m;f++)if(!1!==(u=o(f,i,s,a))){r(c,f),c=f;break}}else u={caret:O(c)}}if((!1===u&&n.keepStatic&&U(l)&&(u=function(e,i,s,a){var o,r,l=t.extend(!0,{},_().validPositions);for(o=w();o>=0;o--)if(_().validPositions[o]&&void 0!=_().validPositions[o].alternation){r=_().validPositions[o].alternation;break}if(void 0!=r)for(var h in _().validPositions)if(parseInt(h)>parseInt(o)&&void 0===_().validPositions[h].alternation){for(var c=_().validPositions[h].locator[r],u=_().validPositions[o].locator[r].split(","),d=0;d<u.length;d++)if(c<u[d]){for(var p,f,m=h-1;m>=0;m--)if(void 0!=(p=_().validPositions[m])){f=p.locator[r],p.locator[r]=u[d];break}if(c!=p.locator[r]){for(var g=M().slice(),v=h;v<w()+1;v++)delete _().validPositions[v],delete _().tests[v];for(y(!0),n.keepStatic=!n.keepStatic,v=h;v<g.length;v++)g[v]!=n.skipOptionalPartCharacter&&E(w()+1,g[v],!1,!0);p.locator[r]=f;var b=E(e,i,s,a);if(n.keepStatic=!n.keepStatic,b)return b;y(),_().validPositions=t.extend(!0,{},l)}}break}return!1}(e,i,s,a)),!0===u&&(u={pos:c}),t.isFunction(n.postValidation)&&0!=u&&!s)&&(y(!0),!n.postValidation(M(),n)))return y(!0),_().validPositions=t.extend(!0,{},d),!1;return u}function z(t){var e=D(t);return null!=e.fn&&e.fn}function F(){var t;-1==(d=u.prop("maxLength"))&&(d=void 0);var e,i=w(),s=_().validPositions[i],n=void 0!=s?s.locator.slice():void 0;for(e=i+1;void 0==s||null!=s.match.fn||null==s.match.fn&&""!=s.match.def;e++)n=(s=C(e,n,e-1)).locator.slice();return t=e,void 0==d||t<d?t:d}function O(t){var e=F();if(t>=e)return e;for(var i=t;++i<e&&!z(i)&&(!0!==n.nojumps||n.nojumpsThreshold>i););return i}function H(t){var e=t;if(e<=0)return 0;for(;--e>0&&!z(e););return e}function N(e,i,s,a,o){if(a&&t.isFunction(n.onBeforeWrite)){var r=n.onBeforeWrite.call(e,a,i,s,n);if(r){if(r.refreshFromBuffer){var l=r.refreshFromBuffer;I(!0===l?l:l.start,l.end,r.buffer),y(!0),i=M()}s=r.caret||s}}e._valueSet(i.join("")),void 0!=s&&B(e,s),!0===o&&(m=!0,t(e).trigger("input"))}function W(t,e){return void 0!=(e=e||D(t)).placeholder?e.placeholder:null==e.fn?e.def:n.placeholder.charAt(t%n.placeholder.length)}function j(e,i,s,n){var a=void 0!=n?n.slice():e._valueGet().split(""),o="",r=0;y(),_().p=O(-1),i&&e._valueSet("");var l=S().slice(0,O(-1)).join(""),h=a.join("").match(new RegExp(function(e){return t.inputmask.escapeRegex.call(this,e)}(l),"g"));h&&h.length>0&&(a.splice(0,h.length*l.length),r=O(r)),t.each(a,function(i,n){var a=t.Event("keypress");a.which=n.charCodeAt(0),o+=n;var l=w(),h=_().validPositions[l],c=C(l+1,h?h.locator.slice():void 0,l);if(!function(){var t=!1,e=S().slice(r,O(r)).join("").indexOf(o);if(-1!=e&&!z(r)){t=!0;for(var i=S().slice(r,r+e),s=0;s<i.length;s++)if(" "!=i[s]){t=!1;break}}return t}()||s){var u=s?i:null==c.match.fn&&c.match.optionality&&l+1<_().p?l+1:_().p;V.call(e,a,!0,!1,s,u),r=u+1,o=""}else V.call(e,a,!0,!1,!0,l+1)}),i&&N(e,M(),t(e).is(":focus")?O(w(0)):void 0,t.Event("checkval"))}function R(e){if(e.data("_inputmask")&&!e.hasClass("hasDatepicker")){var i=[],s=_().validPositions;for(var a in s)s[a].match&&null!=s[a].match.fn&&i.push(s[a].input);var o=(p?i.reverse():i).join(""),r=(p?M().slice().reverse():M()).join("");return t.isFunction(n.onUnMask)&&(o=n.onUnMask.call(e,r,o,n)||o),o}return e[0]._valueGet()}function L(t){!p||"number"!=typeof t||n.greedy&&""==n.placeholder||(t=M().length-t);return t}function B(e,i,s){var a,o=e.jquery&&e.length>0?e[0]:e;if("number"!=typeof i)return o.setSelectionRange?(i=o.selectionStart,s=o.selectionEnd):document.selection&&document.selection.createRange&&(s=(i=0-(a=document.selection.createRange()).duplicate().moveStart("character",-1e5))+a.text.length),{begin:L(i),end:L(s)};if(i=L(i),s="number"==typeof(s=L(s))?s:i,t(o).is(":visible")){var r=t(o).css("font-size").replace("px","")*s;o.scrollLeft=r>o.scrollWidth?r:0,0==n.insertMode&&i==s&&s++,o.setSelectionRange?(o.selectionStart=i,o.selectionEnd=s):o.createTextRange&&((a=o.createTextRange()).collapse(!0),a.moveEnd("character",s),a.moveStart("character",i),a.select())}}function Y(e){var i,s,n=M(),a=n.length,o=w(),r={},l=_().validPositions[o],h=void 0!=l?l.locator.slice():void 0;for(i=o+1;i<n.length;i++)h=(s=C(i,h,i-1)).locator.slice(),r[i]=t.extend(!0,{},s);var c=l&&void 0!=l.alternation?l.locator[l.alternation].split(","):[];for(i=a-1;i>o&&(((s=r[i].match).optionality||s.optionalQuantifier||l&&void 0!=l.alternation&&void 0!=r[i].locator[l.alternation]&&-1!=t.inArray(r[i].locator[l.alternation].toString(),c))&&n[i]==W(i,s));i--)a--;return e?{l:a,def:r[a]?r[a].match:void 0}:a}function K(t){for(var e=Y(),i=t.length-1;i>e&&!z(i);i--);t.splice(e,i+1-e)}function U(e){if(t.isFunction(n.isComplete))return n.isComplete.call(u,e,n);if("*"!=n.repeat){var i=!1,s=Y(!0),a=H(s.l);w();if(void 0==s.def||s.def.newBlockMarker||s.def.optionalQuantifier){i=!0;for(var o=0;o<=a;o++){var r=z(o),l=D(o);if(r&&void 0==_().validPositions[o]&&!0!==l.optionality&&!0!==l.optionalQuantifier||!r&&e[o]!=W(o)){i=!1;break}}}return i}}function q(e,i,s,a){if((n.numericInput||p)&&(i==t.inputmask.keyCode.BACKSPACE?i=t.inputmask.keyCode.DELETE:i==t.inputmask.keyCode.DELETE&&(i=t.inputmask.keyCode.BACKSPACE),p)){var o=s.end;s.end=s.begin,s.begin=o}if(i==t.inputmask.keyCode.BACKSPACE&&(s.end-s.begin<1||0==n.insertMode)?s.begin=H(s.begin):i==t.inputmask.keyCode.DELETE&&s.begin==s.end&&(s.end=z(s.end)?s.end+1:O(s.end)+1),x(s.begin,s.end,!1,a),!0!==a){!function(){if(n.keepStatic){y(!0);var i,s=[];for(i=w();i>=0;i--)if(_().validPositions[i]){if(void 0!=_().validPositions[i].alternation)break;s.push(_().validPositions[i].input),delete _().validPositions[i]}if(i>0)for(;s.length>0;){_().p=O(w());var a=t.Event("keypress");a.which=s.pop().charCodeAt(0),V.call(e,a,!0,!1,!1,_().p)}}}();var r=w(s.begin);r<s.begin?(-1==r&&y(),_().p=O(r)):_().p=s.begin}}function G(i){var s=this,o=t(s),r=i.keyCode,h=B(s);r==t.inputmask.keyCode.BACKSPACE||r==t.inputmask.keyCode.DELETE||a&&127==r||i.ctrlKey&&88==r&&!e("cut")?(i.preventDefault(),88==r&&(l=M().join("")),q(s,r,h),N(s,M(),_().p,i,l!=M().join("")),s._valueGet()==S().join("")?o.trigger("cleared"):!0===U(M())&&o.trigger("complete"),n.showTooltip&&o.prop("title",_().mask)):r==t.inputmask.keyCode.END||r==t.inputmask.keyCode.PAGE_DOWN?setTimeout(function(){var t=O(w());n.insertMode||t!=F()||i.shiftKey||t--,B(s,i.shiftKey?h.begin:t,t)},0):r==t.inputmask.keyCode.HOME&&!i.shiftKey||r==t.inputmask.keyCode.PAGE_UP?B(s,0,i.shiftKey?h.begin:0):(n.undoOnEscape&&r==t.inputmask.keyCode.ESCAPE||90==r&&i.ctrlKey)&&!0!==i.altKey?(j(s,!0,!1,l.split("")),o.click()):r!=t.inputmask.keyCode.INSERT||i.shiftKey||i.ctrlKey?0!=n.insertMode||i.shiftKey||(r==t.inputmask.keyCode.RIGHT?setTimeout(function(){var t=B(s);B(s,t.begin)},0):r==t.inputmask.keyCode.LEFT&&setTimeout(function(){var t=B(s);B(s,p?t.begin+1:t.begin-1)},0)):(n.insertMode=!n.insertMode,B(s,n.insertMode||h.begin!=F()?h.begin:h.begin-1)),n.onKeyDown.call(this,i,M(),B(s).begin,n),g=-1!=t.inArray(r,n.ignorables)}function V(e,i,s,a,o){var r,l,h=t(this),c=e.which||e.charCode||e.keyCode;if(!(!0===i||e.ctrlKey&&e.altKey)&&(e.ctrlKey||e.metaKey||g))return!0;if(c){46==c&&0==e.shiftKey&&","==n.radixPoint&&(c=44);var u,d=i?{begin:o,end:o}:B(this),f=String.fromCharCode(c),m=(r=d.begin,l=d.end,p?r-l>1||r-l==1&&n.insertMode:l-r>1||l-r==1&&n.insertMode);m&&(_().undoPositions=t.extend(!0,{},_().validPositions),q(this,t.inputmask.keyCode.DELETE,d,!0),d.begin=_().p,n.insertMode||(n.insertMode=!n.insertMode,k(d.begin,a),n.insertMode=!n.insertMode),m=!n.multi),_().writeOutBuffer=!0;var v=p&&!m?d.end:d.begin,b=E(v,f,a);if(!1!==b){if(!0!==b&&(v=void 0!=b.pos?b.pos:v,f=void 0!=b.c?b.c:f),y(!0),void 0!=b.caret)u=b.caret;else{var w=_().validPositions;u=!n.keepStatic&&(void 0!=w[v+1]&&T(v+1,w[v].locator.slice(),v).length>1||void 0!=w[v].alternation)?v+1:O(v)}_().p=u}if(!1!==s){var x=this;if(setTimeout(function(){n.onKeyValidation.call(x,b,n)},0),_().writeOutBuffer&&!1!==b){var C=M();N(this,C,i?void 0:n.numericInput?H(u):u,e,!0!==i),!0!==i&&setTimeout(function(){!0===U(C)&&h.trigger("complete")},0)}else m&&(_().buffer=void 0,_().validPositions=_().undoPositions)}else m&&(_().buffer=void 0,_().validPositions=_().undoPositions);if(n.showTooltip&&h.prop("title",_().mask),i&&t.isFunction(n.onBeforeWrite)){var D=n.onBeforeWrite.call(this,e,M(),u,n);if(D&&D.refreshFromBuffer){var P=D.refreshFromBuffer;I(!0===P?P:P.start,P.end,D.buffer),y(!0),D.caret&&(_().p=D.caret)}}e.preventDefault()}}function Q(e){var i=this,s=t(i),a=i._valueGet(!0),o=B(i);if("propertychange"==e.type&&i._valueGet().length<=F())return!0;if("paste"==e.type){var r=a.substr(0,o.begin),l=a.substr(o.end,a.length);r==S().slice(0,o.begin).join("")&&(r=""),l==S().slice(o.end).join("")&&(l=""),window.clipboardData&&window.clipboardData.getData?a=r+window.clipboardData.getData("Text")+l:e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.getData&&(a=r+e.originalEvent.clipboardData.getData("text/plain")+l)}var h=a;if(t.isFunction(n.onBeforePaste)){if(!1===(h=n.onBeforePaste.call(i,a,n)))return e.preventDefault(),!1;h||(h=a)}return j(i,!0,!1,p?h.split("").reverse():h.split("")),s.click(),!0===U(M())&&s.trigger("complete"),!1}function X(e){j(this,!0,!1),!0===U(M())&&t(this).trigger("complete"),e.preventDefault()}function $(t){l=M().join(""),""!=c&&0==t.originalEvent.data.indexOf(c)||(h=B(this))}function J(e){var i=this,s=h||B(i);0==e.originalEvent.data.indexOf(c)&&(y(),s={begin:0,end:0});var a=e.originalEvent.data;B(i,s.begin,s.end);for(var o=0;o<a.length;o++){var r=t.Event("keypress");r.which=a.charCodeAt(o),f=!1,g=!1,V.call(i,r)}setTimeout(function(){var t=_().p;N(i,M(),n.numericInput?H(t):t)},0),c=e.originalEvent.data}function Z(t){}if(void 0!=i)switch(i.action){case"isComplete":return u=t(i.el),s=u.data("_inputmask").maskset,n=u.data("_inputmask").opts,U(i.buffer);case"unmaskedvalue":return u=i.$input,s=u.data("_inputmask").maskset,n=u.data("_inputmask").opts,p=i.$input.data("_inputmask").isRTL,R(i.$input);case"mask":l=M().join(""),function(e){if((u=t(e)).is(":input")&&function(t){var e="text"==t||"tel"==t;if(!e){var i=document.createElement("input");i.setAttribute("type",t),e="text"===i.type,i=null}return e}(u.attr("type"))){if(u.data("_inputmask",{maskset:s,opts:n,isRTL:!1}),n.showTooltip&&u.prop("title",_().mask),("rtl"==e.dir||n.rightAlign)&&u.css("text-align","right"),"rtl"==e.dir||n.numericInput){e.dir="ltr",u.removeAttr("dir");var i=u.data("_inputmask");i.isRTL=!0,u.data("_inputmask",i),p=!0}u.unbind(".inputmask"),u.closest("form").bind("submit",function(t){l!=M().join("")&&u.change(),u[0]._valueGet&&u[0]._valueGet()==S().join("")&&u[0]._valueSet(""),n.removeMaskOnSubmit&&u.inputmask("remove")}).bind("reset",function(){setTimeout(function(){u.triggerHandler("setvalue.inputmask")},0)}),u.bind("mouseenter.inputmask",function(){!t(this).is(":focus")&&n.showMaskOnHover&&this._valueGet()!=M().join("")&&N(this,M())}).bind("blur.inputmask",function(e){var i=t(this);if(i.data("_inputmask")){var s=this._valueGet(),a=M().slice();v=!0,l!=a.join("")&&setTimeout(function(){i.change(),l=a.join("")},0),""!=s&&(n.clearMaskOnLostFocus&&(s==S().join("")?a=[]:K(a)),!1===U(a)&&(i.trigger("incomplete"),n.clearIncomplete&&(y(),a=n.clearMaskOnLostFocus?[]:S().slice())),N(this,a,void 0,e))}}).bind("focus.inputmask",function(e){t(this);var i=this._valueGet();n.showMaskOnFocus&&(!n.showMaskOnHover||n.showMaskOnHover&&""==i)&&this._valueGet()!=M().join("")&&N(this,M(),O(w())),l=M().join("")}).bind("mouseleave.inputmask",function(){var e=t(this);if(n.clearMaskOnLostFocus){var i=M().slice(),s=this._valueGet();e.is(":focus")||s==e.attr("placeholder")||""==s||(s==S().join("")?i=[]:K(i),N(this,i))}}).bind("click.inputmask",function(){if(t(this).is(":focus")){var e=B(this);if(e.begin==e.end)if(n.radixFocus&&""!=n.radixPoint&&-1!=t.inArray(n.radixPoint,M())&&(v||M().join("")==S().join("")))B(this,t.inArray(n.radixPoint,M())),v=!1;else{var i=p?L(e.begin):e.begin,s=O(w(i));B(this,i<s?z(i)?i:O(i):s)}}}).bind("dblclick.inputmask",function(){var t=this;setTimeout(function(){B(t,0,O(w()))},0)}).bind(r+".inputmask dragdrop.inputmask drop.inputmask",Q).bind("setvalue.inputmask",function(){j(this,!0,!1),l=M().join(""),(n.clearMaskOnLostFocus||n.clearIncomplete)&&this._valueGet()==S().join("")&&this._valueSet("")}).bind("cut.inputmask",function(e){m=!0;var i=this,s=t(i),a=B(i);q(i,t.inputmask.keyCode.DELETE,a),N(i,M(),_().p,e,l!=M().join("")),i._valueGet()==S().join("")&&s.trigger("cleared"),n.showTooltip&&s.prop("title",_().mask)}).bind("complete.inputmask",n.oncomplete).bind("incomplete.inputmask",n.onincomplete).bind("cleared.inputmask",n.oncleared),u.bind("keydown.inputmask",G).bind("keypress.inputmask",V),o||u.bind("compositionstart.inputmask",$).bind("compositionupdate.inputmask",J).bind("compositionend.inputmask",Z),"paste"===r&&u.bind("input.inputmask",X),function(e){var i,s;function a(){var e=t(this),s=t(this).data("_inputmask");return s?s.opts.autoUnmask?e.inputmask("unmaskedvalue"):i.call(this)!=S().join("")?i.call(this):"":i.call(this)}function o(e){var i=t(this).data("_inputmask");i?(s.call(this,t.isFunction(i.opts.onBeforeMask)&&i.opts.onBeforeMask.call(at,e,i.opts)||e),t(this).triggerHandler("setvalue.inputmask")):s.call(this,e)}if(!e._valueGet){if(Object.getOwnPropertyDescriptor)var r=Object.getOwnPropertyDescriptor(e,"value");r&&r.configurable,document.__lookupGetter__&&e.__lookupGetter__("value")?(i=e.__lookupGetter__("value"),s=e.__lookupSetter__("value"),e.__defineGetter__("value",a),e.__defineSetter__("value",o)):(i=function(){return e.value},s=function(t){e.value=t},function(e){if(void 0==t.valHooks[e]||1!=t.valHooks[e].inputmaskpatch){var i=t.valHooks[e]&&t.valHooks[e].get?t.valHooks[e].get:function(t){return t.value},s=t.valHooks[e]&&t.valHooks[e].set?t.valHooks[e].set:function(t,e){return t.value=e,t};t.valHooks[e]={get:function(e){var s=t(e);if(s.data("_inputmask")){if(s.data("_inputmask").opts.autoUnmask)return s.inputmask("unmaskedvalue");var n=i(e),a=s.data("_inputmask").maskset._buffer;return n!=(a=a?a.join(""):"")?n:""}return i(e)},set:function(e,i){var n,a=t(e),o=a.data("_inputmask");return o?(n=s(e,t.isFunction(o.opts.onBeforeMask)&&o.opts.onBeforeMask.call(at,i,o.opts)||i),a.triggerHandler("setvalue.inputmask")):n=s(e,i),n},inputmaskpatch:!0}}}(e.type),function(e){t(e).bind("mouseenter.inputmask",function(e){var i=t(this),s=this._valueGet();""!=s&&s!=M().join("")&&(this._valueSet(t.isFunction(n.onBeforeMask)&&n.onBeforeMask.call(at,s,n)||s),i.triggerHandler("setvalue.inputmask"))});var i=t._data(e).events.mouseover;if(i){for(var s=i[i.length-1],a=i.length-1;a>0;a--)i[a]=i[a-1];i[0]=s}}(e)),e._valueGet=function(t){return p&&!0!==t?i.call(this).split("").reverse().join(""):i.call(this)},e._valueSet=function(t){s.call(this,p?t.split("").reverse().join(""):t)}}}(e),j(e,!0,!1,(t.isFunction(n.onBeforeMask)&&n.onBeforeMask.call(e,e._valueGet(),n)||e._valueGet()).split(""));var a,h=M().slice();l=h.join("");try{a=document.activeElement}catch(t){}!1===U(h)&&n.clearIncomplete&&y(),n.clearMaskOnLostFocus&&(h.join("")==S().join("")?h=[]:K(h)),N(e,h),a===e&&B(e,O(w())),c=e,d=t._data(c).events,t.each(d,function(e,i){t.each(i,function(t,e){if("inputmask"==e.namespace&&"setvalue"!=e.type){var i=e.handler;e.handler=function(t){if(!this.disabled&&(!this.readOnly||"keydown"==t.type&&t.ctrlKey&&67==t.keyCode)){switch(t.type){case"input":if(!0===m)return m=!1,t.preventDefault();break;case"keydown":f=!1;break;case"keypress":if(!0===f)return t.preventDefault();f=!0;break;case"compositionstart":break;case"compositionupdate":m=!0}return i.apply(this,arguments)}t.preventDefault()}}})})}var c,d}(i.el);break;case"format":(u=t({})).data("_inputmask",{maskset:s,opts:n,isRTL:n.numericInput}),n.numericInput&&(p=!0);var tt=(t.isFunction(n.onBeforeMask)&&n.onBeforeMask.call(u,i.value,n)||i.value).split("");return j(u,!1,!1,p?tt.reverse():tt),t.isFunction(n.onBeforeWrite)&&n.onBeforeWrite.call(this,void 0,M(),0,n),i.metadata?{value:p?M().slice().reverse().join(""):M().join(""),metadata:u.inputmask("getmetadata")}:p?M().slice().reverse().join(""):M().join("");case"isValid":(u=t({})).data("_inputmask",{maskset:s,opts:n,isRTL:n.numericInput}),n.numericInput&&(p=!0);tt=i.value.split("");j(u,!1,!0,p?tt.reverse():tt);for(var et=M(),it=Y(),st=et.length-1;st>it&&!z(st);st--);return et.splice(it,st+1-it),U(et)&&i.value==et.join("");case"getemptymask":return u=t(i.el),s=u.data("_inputmask").maskset,n=u.data("_inputmask").opts,S();case"remove":var nt,at=i.el;u=t(at),s=u.data("_inputmask").maskset,n=u.data("_inputmask").opts,at._valueSet(R(u)),u.unbind(".inputmask"),u.removeData("_inputmask"),Object.getOwnPropertyDescriptor&&(nt=Object.getOwnPropertyDescriptor(at,"value")),nt&&nt.get?at._valueGet&&Object.defineProperty(at,"value",{get:at._valueGet,set:at._valueSet}):document.__lookupGetter__&&at.__lookupGetter__("value")&&at._valueGet&&(at.__defineGetter__("value",at._valueGet),at.__defineSetter__("value",at._valueSet));try{delete at._valueGet,delete at._valueSet}catch(t){at._valueGet=void 0,at._valueSet=void 0}break;case"getmetadata":if(u=t(i.el),s=u.data("_inputmask").maskset,n=u.data("_inputmask").opts,t.isArray(s.metadata)){for(var ot,rt=w(),lt=rt;lt>=0;lt--)if(_().validPositions[lt]&&void 0!=_().validPositions[lt].alternation){ot=_().validPositions[lt].alternation;break}return void 0!=ot?s.metadata[_().validPositions[rt].locator[ot]]:s.metadata[0]}return s.metadata}}t.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:t.noop,onincomplete:t.noop,oncleared:t.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:t.noop,onBeforeMask:void 0,onBeforePaste:void 0,onBeforeWrite:void 0,onUnMask:void 0,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:t.noop,skipOptionalPartCharacter:" ",showTooltip:!1,numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixFocus:!1,nojumps:!1,nojumpsThreshold:0,keepStatic:void 0,definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:void 0,canClearPosition:t.noop,postValidation:void 0},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},masksCache:{},escapeRegex:function(t){return t.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},format:function(e,n,a){var o=t.extend(!0,{},t.inputmask.defaults,n);return i(o.alias,n,o),l({action:"format",value:e,metadata:a},s(o),o)},isValid:function(e,n){var a=t.extend(!0,{},t.inputmask.defaults,n);return i(a.alias,n,a),l({action:"isValid",value:e},s(a),a)}},t.fn.inputmask=function(e,n){function a(e,s,n){var a=t(e);for(var o in a.data("inputmask-alias")&&i(a.data("inputmask-alias"),{},s),s){var r=a.data("inputmask-"+o.toLowerCase());void 0!=r&&("mask"==o&&0==r.indexOf("[")?(s[o]=r.replace(/[\s[\]]/g,"").split("','"),s[o][0]=s[o][0].replace("'",""),s[o][s[o].length-1]=s[o][s[o].length-1].replace("'","")):s[o]="boolean"==typeof r?r:r.toString(),n&&(n[o]=s[o]))}return s}var o,r=t.extend(!0,{},t.inputmask.defaults,n);if("string"==typeof e)switch(e){case"mask":return i(r.alias,n,r),void 0==(o=s(r))?this:this.each(function(){l({action:"mask",el:this},t.extend(!0,{},o),a(this,r))});case"unmaskedvalue":var h=t(this);return h.data("_inputmask")?l({action:"unmaskedvalue",$input:h}):h.val();case"remove":return this.each(function(){t(this).data("_inputmask")&&l({action:"remove",el:this})});case"getemptymask":return this.data("_inputmask")?l({action:"getemptymask",el:this}):"";case"hasMaskedValue":return!!this.data("_inputmask")&&!this.data("_inputmask").opts.autoUnmask;case"isComplete":return!this.data("_inputmask")||l({action:"isComplete",buffer:this[0]._valueGet().split(""),el:this});case"getmetadata":return this.data("_inputmask")?l({action:"getmetadata",el:this}):void 0;default:return i(r.alias,n,r),i(e,n,r)||(r.mask=e),void 0==(o=s(r))?this:this.each(function(){l({action:"mask",el:this},t.extend(!0,{},o),a(this,r))})}else{if("object"==typeof e)return i((r=t.extend(!0,{},t.inputmask.defaults,e)).alias,e,r),void 0==(o=s(r))?this:this.each(function(){l({action:"mask",el:this},t.extend(!0,{},o),a(this,r))});if(void 0==e)return this.each(function(){var e=t(this).attr("data-inputmask");if(e&&""!=e)try{e=e.replace(new RegExp("'","g"),'"');var s=t.parseJSON("{"+e+"}");t.extend(!0,s,n),i((r=a(this,r=t.extend(!0,{},t.inputmask.defaults,s))).alias,s,r),r.alias=void 0,t(this).inputmask("mask",r)}catch(t){}if(t(this).attr("data-inputmask-mask")||t(this).attr("data-inputmask-alias")){var o={};i((r=a(this,r=t.extend(!0,{},t.inputmask.defaults,{}),o)).alias,o,r),r.alias=void 0,t(this).inputmask("mask",r)}})}}}t.fn.inputmask}(jQuery),function(t){t.extend(t.inputmask.defaults.aliases,{numeric:{mask:function(t){function e(e){for(var i="",s=0;s<e.length;s++)i+=t.definitions[e[s]]?"\\"+e[s]:e[s];return i}if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator==t.radixPoint&&("."==t.radixPoint?t.groupSeparator=",":","==t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=void 0),t.autoGroup=t.autoGroup&&""!=t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var i=Math.floor(t.integerDigits/t.groupSize),s=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0==s?i-1:i)}t.radixFocus=t.radixFocus&&"0"==t.placeholder,t.definitions[";"]=t.definitions["~"];var n=e(t.prefix);return n+="[+]",n+="~{1,"+t.integerDigits+"}",void 0!=t.digits&&(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?n+="["+(t.decimalProtect?":":t.radixPoint)+";{"+t.digits+"}]":n+=(t.decimalProtect?":":t.radixPoint)+";{"+t.digits+"}"),n+=e(t.suffix),n+="[-]",t.greedy=!1,n},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,groupSeparator:"",radixPoint:".",radixFocus:!0,groupSize:3,autoGroup:!1,allowPlus:!0,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:void 0,max:void 0,postFormat:function(e,i,s,n){var a=!1;e.length>=n.suffix.length&&e.join("").indexOf(n.suffix)==e.length-n.suffix.length&&(e.length=e.length-n.suffix.length,a=!0);var o=!1,r=e[i=i>=e.length?e.length-1:i<n.prefix.length?n.prefix.length:i];if(""==n.groupSeparator||-1!=t.inArray(n.radixPoint,e)&&i>=t.inArray(n.radixPoint,e)||new RegExp("[-+]").test(r)){if(a)for(var l=0,h=n.suffix.length;l<h;l++)e[e.length+l]=n.suffix.charAt(l);return{pos:i}}var c=e.slice();r==n.groupSeparator&&(c.splice(i--,1),r=c[i]),s?c[i]="?":c.splice(i,0,"?");var u=c.join(""),d=u;if(u.length>0&&n.autoGroup||s&&-1!=u.indexOf(n.groupSeparator)){var p=t.inputmask.escapeRegex.call(this,n.groupSeparator);o=0==u.indexOf(n.groupSeparator);var f=(u=u.replace(new RegExp(p,"g"),"")).split(n.radixPoint);if((u=""==n.radixPoint?u:f[0])!=n.prefix+"?0"&&u.length>=n.groupSize+n.prefix.length)for(var m=new RegExp("([-+]?[\\d?]+)([\\d?]{"+n.groupSize+"})");m.test(u);)u=(u=u.replace(m,"$1"+n.groupSeparator+"$2")).replace(n.groupSeparator+n.groupSeparator,n.groupSeparator);""!=n.radixPoint&&f.length>1&&(u+=n.radixPoint+f[1])}o=d!=u,e.length=u.length;for(l=0,h=u.length;l<h;l++)e[l]=u.charAt(l);var g=t.inArray("?",e);if(s?e[g]=r:e.splice(g,1),!o&&a)for(l=0,h=n.suffix.length;l<h;l++)e[e.length+l]=n.suffix.charAt(l);return{pos:g,refreshFromBuffer:o,buffer:e}},onBeforeWrite:function(e,i,s,n){if(e&&"blur"==e.type){var a=i.join("").replace(n.prefix,"");if(a=(a=(a=a.replace(n.suffix,"")).replace(new RegExp(t.inputmask.escapeRegex.call(this,n.groupSeparator),"g"),"")).replace(t.inputmask.escapeRegex.call(this,n.radixPoint),"."),isFinite(a)&&isFinite(n.min)&&parseFloat(a)<parseFloat(n.min))return n.postFormat((n.prefix+n.min).split(""),0,!0,n);var o=""!=n.radixPoint?i.join("").split(n.radixPoint):[i.join("")],r=o[0].match(n.regex.integerPart(n)),l=2==o.length?o[1].match(n.regex.integerNPart(n)):void 0;r&&"-0"==r[0]&&(void 0==l||l[0].match(/^0+$/))&&i.splice(r.index,1);var h=t.inArray(n.radixPoint,i);if(-1!=h&&isFinite(n.digits)&&!n.digitsOptional){for(var c=1;c<=n.digits;c++)void 0!=i[h+c]&&i[h+c]!=n.placeholder.charAt(0)||(i[h+c]="0");return{refreshFromBuffer:!0,buffer:i}}}if(n.autoGroup){var u=n.postFormat(i,s-1,!0,n);return u.caret=s<=n.prefix.length?u.pos:u.pos+1,u}},regex:{integerPart:function(t){return new RegExp("["+t.negationSymbol.front+"+]?\\d+")},integerNPart:function(e){return new RegExp("[\\d"+t.inputmask.escapeRegex.call(this,e.groupSeparator)+"]+")}},signHandler:function(t,e,i,s,n){if(!s&&n.allowMinus&&"-"===t||n.allowPlus&&"+"===t){var a=e.buffer.join("").match(n.regex.integerPart(n));if(a&&a[0].length>0)return e.buffer[a.index]==("-"===t?"+":n.negationSymbol.front)?{pos:a.index,c:"-"===t?n.negationSymbol.front:"+",remove:a.index,caret:i}:e.buffer[a.index]==("-"===t?n.negationSymbol.front:"+")?{remove:a.index,caret:i-1}:{pos:a.index,c:"-"===t?n.negationSymbol.front:"+",caret:i+1}}return!1},radixHandler:function(e,i,s,n,a){if(!n&&e===a.radixPoint&&a.digits>0){var o=t.inArray(a.radixPoint,i.buffer),r=i.buffer.join("").match(a.regex.integerPart(a));if(-1!=o&&i.validPositions[o])return i.validPositions[o-1]?{caret:o+1}:{pos:r.index,c:r[0],caret:o+1};if(!r||"0"==r[0]&&r.index+1!=s)return i.buffer[r?r.index:s]="0",{pos:(r?r.index:s)+1}}return!1},leadingZeroHandler:function(e,i,s,n,a){var o=i.buffer.join("").match(a.regex.integerNPart(a)),r=t.inArray(a.radixPoint,i.buffer);if(o&&!n&&(-1==r||s<=r))if(0==o[0].indexOf("0")){s<a.prefix.length&&(s=o.index);var l=t.inArray(a.radixPoint,i._buffer),h=i._buffer&&i.buffer.slice(r).join("")==i._buffer.slice(l).join("")||0==parseInt(i.buffer.slice(r+1).join("")),c=i._buffer&&i.buffer.slice(o.index,r).join("")==i._buffer.slice(a.prefix.length,l).join("")||"0"==i.buffer.slice(o.index,r).join("");if(-1==r||h&&c)return i.buffer.splice(o.index,1),{pos:s=s>o.index?s-1:o.index,remove:o.index};if(o.index+1==s||"0"==e)return i.buffer.splice(o.index,1),{pos:s=o.index,remove:o.index}}else if("0"===e&&s<=o.index)return!1;return!0},postValidation:function(e,i){var s=!0,n=e.join("").replace(i.prefix,"");return n=(n=(n=n.replace(i.suffix,"")).replace(new RegExp(t.inputmask.escapeRegex.call(this,i.groupSeparator),"g"),"")).replace(t.inputmask.escapeRegex.call(this,i.radixPoint),"."),isFinite(n)&&isFinite(i.max)&&(s=parseFloat(n)<=parseFloat(i.max)),s},definitions:{"~":{validator:function(e,i,s,n,a){var o=a.signHandler(e,i,s,n,a);if(!o&&!(o=a.radixHandler(e,i,s,n,a))&&!0===(o=n?new RegExp("[0-9"+t.inputmask.escapeRegex.call(this,a.groupSeparator)+"]").test(e):new RegExp("[0-9]").test(e))&&!0===(o=a.leadingZeroHandler(e,i,s,n,a))){var r=t.inArray(a.radixPoint,i.buffer);o=!1===a.digitsOptional&&s>r&&!n?{pos:s,remove:s}:{pos:s}}return o},cardinality:1,prevalidator:null},"+":{validator:function(t,e,i,s,n){var a=n.signHandler(t,e,i,s,n);return!a&&(s&&n.allowMinus&&t===n.negationSymbol.front||n.allowMinus&&"-"==t||n.allowPlus&&"+"==t)&&(a=!0),a},cardinality:1,prevalidator:null,placeholder:""},"-":{validator:function(t,e,i,s,n){var a=n.signHandler(t,e,i,s,n);return!a&&s&&n.allowMinus&&t===n.negationSymbol.back&&(a=!0),a},cardinality:1,prevalidator:null,placeholder:""},":":{validator:function(e,i,s,n,a){var o=a.signHandler(e,i,s,n,a);if(!o){var r="["+t.inputmask.escapeRegex.call(this,a.radixPoint)+"]";(o=new RegExp(r).test(e))&&i.validPositions[s]&&i.validPositions[s].match.placeholder==a.radixPoint&&(o={caret:s+1})}return o},cardinality:1,prevalidator:null,placeholder:function(t){return t.radixPoint}}},insertMode:!0,autoUnmask:!1,onUnMask:function(e,i,s){var n=e.replace(s.prefix,"");return n=(n=n.replace(s.suffix,"")).replace(new RegExp(t.inputmask.escapeRegex.call(this,s.groupSeparator),"g"),"")},isComplete:function(e,i){var s=e.join(""),n=e.slice();if(i.postFormat(n,0,!0,i),n.join("")!=s)return!1;var a=s.replace(i.prefix,"");return a=(a=a.replace(i.suffix,"")).replace(new RegExp(t.inputmask.escapeRegex.call(this,i.groupSeparator),"g"),""),","===i.radixPoint&&(a=a.replace(t.inputmask.escapeRegex.call(this,i.radixPoint),".")),isFinite(a)},onBeforeMask:function(e,i){if(""!=i.radixPoint&&isFinite(e))e=e.toString().replace(".",i.radixPoint);else{var s=e.match(/,/g),n=e.match(/\./g);e=n&&s?n.length>s.length?(e=e.replace(/\./g,"")).replace(",",i.radixPoint):s.length>n.length?(e=e.replace(/,/g,"")).replace(".",i.radixPoint):e.indexOf(".")<e.indexOf(",")?e.replace(/\./g,""):e=e.replace(/,/g,""):e.replace(new RegExp(t.inputmask.escapeRegex.call(this,i.groupSeparator),"g"),"")}return 0==i.digits&&(-1!=e.indexOf(".")?e=e.substring(0,e.indexOf(".")):-1!=e.indexOf(",")&&(e=e.substring(0,e.indexOf(",")))),e},canClearPosition:function(e,i,s,n,a){var o=e.validPositions[i].input,r=o!=a.radixPoint&&isFinite(o)||i==s||o==a.groupSeparator||o==a.negationSymbol.front||o==a.negationSymbol.back;if(r&&isFinite(o)){var l=e.buffer.join("").substr(0,i).match(a.regex.integerNPart(a));if(!n){var h=i+1;if(null==l||0==parseInt(l[0].replace(new RegExp(t.inputmask.escapeRegex.call(this,a.groupSeparator),"g"),"")))for(;e.validPositions[h]&&(e.validPositions[h].input==a.groupSeparator||"0"==e.validPositions[h].input);)delete e.validPositions[h],h++}var c=[];for(var u in e.validPositions)c.push(e.validPositions[u].input);l=c.join("").match(a.regex.integerNPart(a));var d=t.inArray(a.radixPoint,e.buffer);if(l&&(-1==d||i<=d))if(0==l[0].indexOf("0"))r=l.index!=i||-1==d;else{var p=parseInt(l[0].replace(new RegExp(t.inputmask.escapeRegex.call(this,a.groupSeparator),"g"),""));-1!=d&&p<10&&"0"==a.placeholder.charAt(0)&&(e.validPositions[i].input="0",e.p=a.prefix.length+1,r=!1)}}return r}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:"0",radixPoint:""}}),t.fn.inputmask}(jQuery),function(t,e){var i,s,n=0,a=/^ui-id-\d+$/;function o(e,i){var s,n,a,o=e.nodeName.toLowerCase();return"area"===o?(n=(s=e.parentNode).name,!(!e.href||!n||"map"!==s.nodeName.toLowerCase())&&(!!(a=t("img[usemap='#"+n+"']")[0])&&r(a))):(/input|select|textarea|button|object/.test(o)?!e.disabled:"a"===o&&e.href||i)&&r(e)}function r(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:(i=t.fn.focus,function(e,s){return"number"==typeof e?this.each(function(){var i=this;setTimeout(function(){t(i).focus(),s&&s.call(i)},e)}):i.apply(this,arguments)}),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,s,n=t(this[0]);n.length&&n[0]!==document;){if(("absolute"===(i=n.css("position"))||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return o(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var i=t.attr(e,"tabindex"),s=isNaN(i);return(s||i>=0)&&o(e,!s)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){var s="Width"===i?["Left","Right"]:["Top","Bottom"],n=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};function o(e,i,n,a){return t.each(s,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),a&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(n,o(this,e)+"px")})},t.fn["outer"+i]=function(e,s){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(n,o(this,e,!0,s)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=(s=t.fn.removeData,function(e){return arguments.length?s.call(this,t.camelCase(e)):s.call(this)})),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,a=t.ui[e].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;s<n.length;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s,n=i&&"left"===i?"scrollLeft":"scrollTop";return e[n]>0||(e[n]=1,s=e[n]>0,e[n]=0,s)}})}(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(t){}n(e)},t.widget=function(e,i,s){var n,a,o,r,l={},h=e.split(".")[0];e=e.split(".")[1],n=h+"-"+e,s||(s=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[h]=t[h]||{},a=t[h][e],o=t[h][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,a,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),(r=new i).options=t.widget.extend({},r.options),t.each(s,function(e,s){var n,a;t.isFunction(s)?l[e]=(n=function(){return i.prototype[e].apply(this,arguments)},a=function(t){return i.prototype[e].apply(this,t)},function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=a,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}):l[e]=s}),o.prototype=t.widget.extend(r,{widgetEventPrefix:a&&r.widgetEventPrefix||e},l,{constructor:o,namespace:h,widgetName:e,widgetFullName:n}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o)},t.widget.extend=function(i){for(var n,a,o=s.call(arguments,1),r=0,l=o.length;r<l;r++)for(n in o[r])a=o[r][n],o[r].hasOwnProperty(n)&&a!==e&&(t.isPlainObject(a)?i[n]=t.isPlainObject(i[n])?t.widget.extend({},i[n],a):t.widget.extend({},a):i[n]=a);return i},t.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;t.fn[i]=function(o){var r="string"==typeof o,l=s.call(arguments,1),h=this;return o=!r&&l.length?t.widget.extend.apply(null,[o].concat(l)):o,r?this.each(function(){var s,n=t.data(this,a);return n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(s=n[o].apply(n,l))!==n&&s!==e?(h=s&&s.jquery?h.pushStack(s.get()):s,!1):void 0:t.error("no such method '"+o+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+o+"'")}):this.each(function(){var e=t.data(this,a);e?e.option(o||{})._init():t.data(this,a,new n(o,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.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:t.noop,widget:function(){return this.element},option:function(i,s){var n,a,o,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},i=(n=i.split(".")).shift(),n.length){for(a=r[i]=t.widget.extend({},this.options[i]),o=0;o<n.length-1;o++)a[n[o]]=a[n[o]]||{},a=a[n[o]];if(i=n.pop(),1===arguments.length)return a[i]===e?null:a[i];a[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i,s){var n,a=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,o){function r(){if(e||!0!==a.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof o?a[o]:o).apply(a,arguments)}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||t.guid++);var l=s.match(/^(\w+)\s*(.*)$/),h=l[1]+a.eventNamespace,c=l[2];c?n.delegate(c,h,r):i.bind(h,r)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,a,o=this.options[e];if(s=s||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(t.isFunction(o)&&!1===o.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?!0===n||"number"==typeof n?i:n.effect||i:e;"number"==typeof(n=n||{})&&(n={duration:n}),o=!t.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){t(this)[e](),a&&a.call(s[0]),i()})}})}(jQuery),function(t,e){var i=!1;t(document).mouseup(function(){i=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!i){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var s=this,n=1===e.which,a=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!a&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0))}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t,e){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.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||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(t(!0===i.iframeFix?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0))},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp({}),!1;this.position=s.position}return 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"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),!("original"===this.options.helper&&!t.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==i._trigger("stop",e)&&i._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1)},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_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 e,i,s,n=this.options;n.containment?"window"!==n.containment?"document"!==n.containment?n.containment.constructor!==Array?("parent"===n.containment&&(n.containment=this.helper[0].parentNode),(s=(i=t(n.containment))[0])&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i)):this.containment=n.containment:this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():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},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),!1!==n&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,_=b+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)l=(r=p.snapElements[u].left)+p.snapElements[u].width,c=(h=p.snapElements[u].top)+p.snapElements[u].height,v<r-m||g>l+m||_<h-m||b>c+m||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(h-_)<=m,n=Math.abs(c-b)<=m,a=Math.abs(r-v)<=m,o=Math.abs(l-g)<=m,s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=Math.abs(h-b)<=m,n=Math.abs(c-_)<=m,a=Math.abs(r-g)<=m,o=Math.abs(l-v)<=m,s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t,e){function i(t,e,i){return t>e&&t<e+i}t.widget("ui.droppable",{version:"1.10.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 e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];e<i.length;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");if(e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance))return n=!0,!1}),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,e,s){if(!e.offset)return!1;var n,a=(t.positionAbs||t.position.absolute).left,o=(t.positionAbs||t.position.absolute).top,r=a+t.helperProportions.width,l=o+t.helperProportions.height,h=e.offset.left,c=e.offset.top,u=h+e.proportions().width,d=c+e.proportions().height;switch(s){case"fit":return h<=a&&r<=u&&c<=o&&l<=d;case"intersect":return h<a+t.helperProportions.width/2&&r-t.helperProportions.width/2<u&&c<o+t.helperProportions.height/2&&l-t.helperProportions.height/2<d;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,i((t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,c,e.proportions().height)&&i(n,h,e.proportions().width);case"touch":return(o>=c&&o<=d||l>=c&&l<=d||o<c&&l>d)&&(a>=h&&a<=u||r>=h&&r<=u||a<h&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;s<a.length;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;n<r.length;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,(a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n})).length&&((s=t.data(a[0],"ui-droppable")).greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t,e){function i(t){return parseInt(t,10)||0}function s(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.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},_create:function(){var e,i,s,n,a=this,o=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<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.data("ui-resizable")),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=o.handles||(t(".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.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i<e.length;i++)s=t.trim(e[i]),(n=t("<div class='ui-resizable-handle "+("ui-resizable-"+s)+"'></div>")).css({zIndex:o.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){o.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var s,n,a,o=this.options,r=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=i(this.helper.css("left")),n=i(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),l.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,l=this.position.left,h=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return!!p&&(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==l&&(n.left=this.position.left+"px"),this.size.width!==h&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,l,h=this.options,c=this;return this._helper&&(n=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(o,{top:l,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,i,n,a,o,r=this.options;o={minWidth:s(r.minWidth)?r.minWidth:0,maxWidth:s(r.maxWidth)?r.maxWidth:1/0,minHeight:s(r.minHeight)?r.minHeight:0,maxHeight:s(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),a<o.maxHeight&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),s(t.left)&&(this.position.left=t.left),s(t.top)&&(this.position.top=t.top),s(t.height)&&(this.size.height=t.height),s(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return s(t.height)?t.width=t.height*this.aspectRatio:s(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=s(t.width)&&e.maxWidth&&e.maxWidth<t.width,a=s(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=s(t.width)&&e.minWidth&&e.minWidth>t.width,r=s(t.height)&&e.minHeight&&e.minHeight>t.height,l=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=l-e.minWidth),n&&c&&(t.left=l-e.maxWidth),r&&u&&(t.top=h-e.minHeight),a&&u&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;t<this._proportionallyResizeElements.length;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;e<i.length;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<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:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-o},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,s,n,a,o,r,l,h=t(this).data("ui-resizable"),c=h.options,u=h.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(h.containerElement=t(p),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=i(e.css("padding"+n))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-s[3],width:e.innerWidth()-s[1]},n=h.containerOffset,a=h.containerSize.height,o=h.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,l=t.ui.hasScroll(p)?p.scrollHeight:a,h.parentData={element:p,left:n.left,top:n.top,width:r,height:l}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,l=o.containerOffset,h=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=l),h.left<(o._helper?l.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-l.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?l.left:0),h.top<(o._helper?l.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-l.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?l.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper,o.offset.left-u.left+o.sizeDiff.width)),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-l.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),l=o.outerWidth()-e.sizeDiff.width,h=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable").options,i=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof e.alsoResize||e.alsoResize.parentNode?i(e.alsoResize):e.alsoResize.length?(e.alsoResize=e.alsoResize[0],i(e.alsoResize)):t.each(e.alsoResize,function(t){i(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},l=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?l(n.alsoResize):t.each(n.alsoResize,function(t,e){l(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidth<d,m=i.maxHeight&&i.maxHeight<p,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=l),v&&(p+=h),f&&(d-=l),m&&(p-=h),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-h>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=h,e.position.top=a.top+n.height-h),d-l>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=l,e.position.left=a.left+n.width-l))}}),t.ui.plugin.add("resizable","iframeFix",{start:function(e,i){var s=t(this).data("ui-resizable").options;t(!0===s.iframeFix?"iframe":s.iframeFix).each(function(){t('<div class="ui-resizable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")})},stop:function(e,i){t("div.ui-resizable-iframeFix").each(function(){this.parentNode.removeChild(this)})}})}(jQuery),function(t,e){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.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 e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){(e=t(i.options.filter,i.element[0])).addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<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(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");if(n)return s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||i.right<a||i.top>l||i.bottom<o):"fit"===n.tolerance&&(h=i.left>a&&i.right<r&&i.top>o&&i.bottom<l),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t,e){function i(t,e,i){return t>e&&t<e+i}function s(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.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},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.axis||s(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,a.widgetName+"-item")===a)return s=t(this),!1}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),!!s&&(!(this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.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(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),!1!==r&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),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"),i=this.items.length-1;i>=0;i--)if(n=(s=this.items[i]).item[0],(a=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&!(n===this.currentItem[0]||this.placeholder[1===a?"next":"prev"]()[0]===n||t.contains(this.placeholder[0],n)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],n))){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);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 e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return 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(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>r&&s+h<l,d="y"===this.options.axis||e+c>a&&e+c<o,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:a<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<o&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||i(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||i(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=e&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return!!n&&(this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1))},_intersectsWithSides:function(t){var e=i(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=i(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(s=(n=t(l[i])).length-1;s>=0;s--)(a=t.data(n[s],this.widgetFullName))&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);function h(){o.push(this)}for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(h);return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,l,h,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(s=(n=t(d[i])).length-1;s>=0;s--)(a=t.data(n[s],this.widgetFullName))&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],s=0,h=(r=u[i][0]).length;s<h;s++)(l=t(r[s])).data(this.widgetName+"-item",o),c.push({item:l,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,s,n,a;for(this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,s=(e=e||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){i&&!s.forcePlaceholderSize||(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(e){var n,a,o,r,l,h,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",e,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,l=(p=f.floating||s(this.currentItem))?"left":"top",h=p?"width":"height",c=this.positionAbs[l]+this.offset.click[l],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(p&&!i(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height)||(u=this.items[a].item.offset()[l],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][h]-c)&&(d=!0,u+=this.items[a][h]),Math.abs(u-c)<o&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down")));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[m].element,!0),this._trigger("change",e,this._uiHash()),this.containers[m]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",e,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),s[0].style.width&&!i.forceHelperSize||s.width(this.currentItem.width()),s[0].style.height&&!i.forceHelperSize||s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),"document"!==n.containment&&"window"!==n.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();function n(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(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,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i,s="ui-effects-";t.effects={effect:{}},function(t,e){var i,s=/^([\-+])=\s*(\d+\.?\d*)/,n=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],a=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},o={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"}}}},r={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},l=a.support={},h=t("<p>")[0],c=t.each;function u(t,e,i){var s=r[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:s.max<t?s.max:t)}function d(e){var s=a(),r=s._rgba=[];return e=e.toLowerCase(),c(n,function(t,i){var n,a=i.re.exec(e),l=a&&i.parse(a),h=i.space||"rgba";if(l)return n=s[h](l),s[o[h].cache]=n[o[h].cache],r=s._rgba=n._rgba,!1}),r.length?("0,0,0,0"===r.join()&&t.extend(r,i.transparent),s):i[e]}function p(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}h.style.cssText="background-color:rgba(1,1,1,.5)",l.rgba=h.style.backgroundColor.indexOf("rgba")>-1,c(o,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),a.fn=t.extend(a.prototype,{parse:function(s,n,r,l){if(s===e)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=t(s).css(n),n=e);var h=this,p=t.type(s),f=this._rgba=[];return n!==e&&(s=[s,n,r,l],p="array"),"string"===p?this.parse(d(s)||i._default):"array"===p?(c(o.rgba.props,function(t,e){f[e.idx]=u(s[e.idx],e)}),this):"object"===p?(c(o,s instanceof a?function(t,e){s[e.cache]&&(h[e.cache]=s[e.cache].slice())}:function(e,i){var n=i.cache;c(i.props,function(t,e){if(!h[n]&&i.to){if("alpha"===t||null==s[t])return;h[n]=i.to(h._rgba)}h[n][e.idx]=u(s[t],e,!0)}),h[n]&&t.inArray(null,h[n].slice(0,3))<0&&(h[n][3]=1,i.from&&(h._rgba=i.from(h[n])))}),this):void 0},is:function(t){var e=a(t),i=!0,s=this;return c(o,function(t,n){var a,o=e[n.cache];return o&&(a=s[n.cache]||n.to&&n.to(s._rgba)||[],c(n.props,function(t,e){if(null!=o[e.idx])return i=o[e.idx]===a[e.idx]})),i}),i},_space:function(){var t=[],e=this;return c(o,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=a(t),s=i._space(),n=o[s],l=0===this.alpha()?a("transparent"):this,h=l[n.cache]||n.to(l._rgba),d=h.slice();return i=i[n.cache],c(n.props,function(t,s){var n=s.idx,a=h[n],o=i[n],l=r[s.type]||{};null!==o&&(null===a?d[n]=o:(l.mod&&(o-a>l.mod/2?a+=l.mod:a-o>l.mod/2&&(a-=l.mod)),d[n]=u((o-a)*e+a,s)))}),this[s](d)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=a(e)._rgba;return a(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),a.fn.parse.prototype=a.fn,o.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:u<=.5?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},o.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],n=t[3],a=s<=.5?s*(1+i):s+i-s*i,o=2*s-a;return[Math.round(255*p(o,a,e+1/3)),Math.round(255*p(o,a,e)),Math.round(255*p(o,a,e-1/3)),n]},c(o,function(i,n){var o=n.props,r=n.cache,l=n.to,h=n.from;a.fn[i]=function(i){if(l&&!this[r]&&(this[r]=l(this._rgba)),i===e)return this[r].slice();var s,n=t.type(i),d="array"===n||"object"===n?i:arguments,p=this[r].slice();return c(o,function(t,e){var i=d["object"===n?t:e.idx];null==i&&(i=p[e.idx]),p[e.idx]=u(i,e)}),h?((s=a(h(p)))[r]=p,s):a(p)},c(o,function(e,n){a.fn[e]||(a.fn[e]=function(a){var o,r=t.type(a),l="alpha"===e?this._hsla?"hsla":"rgba":i,h=this[l](),c=h[n.idx];return"undefined"===r?c:("function"===r&&(a=a.call(this,c),r=t.type(a)),null==a&&n.empty?this:("string"===r&&(o=s.exec(a))&&(a=c+parseFloat(o[2])*("+"===o[1]?1:-1)),h[n.idx]=a,this[l](h)))})})}),a.hook=function(e){var i=e.split(" ");c(i,function(e,i){t.cssHooks[i]={set:function(e,s){var n,o,r="";if("transparent"!==s&&("string"!==t.type(s)||(n=d(s)))){if(s=a(n||s),!l.rgba&&1!==s._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(t){}s=s.blend(r&&"transparent"!==r?r:"_default")}s=s.toRgbaString()}try{e.style[i]=s}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=a(e.elem,i),e.end=a(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},a.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return c(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},i=t.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"}}(jQuery),function(){var e,i,s,n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)"string"==typeof n[i=n[s]]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,i,s,r){var l=t.speed(i,s,r);return this.queue(function(){var i,s=t(this),r=s.attr("class")||"",h=l.children?s.find("*").addBack():s;h=h.map(function(){return{el:t(this),start:o(this)}}),(i=function(){t.each(n,function(t,i){e[i]&&s[i+"Class"](e[i])})})(),h=h.map(function(){return this.end=o(this.el[0]),this.diff=function(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||!t.fx.step[s]&&isNaN(parseFloat(n))||(o[s]=n));return o}(this.start,this.end),this}),s.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){i(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:(s=t.fn.addClass,function(e,i,n,a){return i?t.effects.animateClass.call(this,{add:e},i,n,a):s.apply(this,arguments)}),removeClass:(i=t.fn.removeClass,function(e,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:e},s,n,a):i.apply(this,arguments)}),toggleClass:(e=t.fn.toggleClass,function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,a)}),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}var n,a,o;t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var i=0;i<e.length;i++)null!==e[i]&&t.data(s+e[i],t[0].style[e[i]])},restore:function(t,e){var i,n;for(n=0;n<e.length;n++)null!==e[n]&&(void 0===(i=t.data(s+e[n]))&&(i=""),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(t){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){var i=e.apply(this,arguments),s=i.mode,n=i.queue,a=t.effects.effect[i.effect];if(t.fx.off||!a)return s?this[s](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)});function o(e){var s=t(this),n=i.complete,o=i.mode;function r(){t.isFunction(n)&&n.call(s[0]),t.isFunction(e)&&e()}(s.is(":hidden")?"hide"===o:"show"===o)?(s[o](),r()):a.call(s[0],i,r)}return!1===n?this.each(o):this.queue(n||"fx",o)},show:(o=t.fn.show,function(t){if(i(t))return o.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}),hide:(a=t.fn.hide,function(t){if(i(t))return a.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}),toggle:(n=t.fn.toggle,function(t){if(i(t)||"boolean"==typeof t)return n.apply(this,arguments);var s=e.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),i={},t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){i[e]=function(e){return Math.pow(e,t+2)}}),t.extend(i,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(i,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}})}(jQuery),function(t,e){var i=0,s={},n={};s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="hide",n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.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},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset 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").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e)):this._activate(e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var e,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++i);this.active=this._findActive(s.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(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).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(s.event),"fill"===n?(e=a.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),l={oldHeader:s,oldPanel:s.next(),newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||!1===this._trigger("beforeActivate",e,l)||(i.active=!o&&this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(t,e,i){var a,o,r,l=this,h=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){l._toggleComplete(i)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(s,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(n,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?h+=i.now:"content"!==l.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-h),h=0)}})):e.animate(s,r,o,p):t.animate(n,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t,e){t.widget("ui.autocomplete",{version:"1.10.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 e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=!!a||!o&&this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){if(s)return s=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),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(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t,e){var i,s="ui-button ui-widget ui-state-default ui-corner-all",n="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",a=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},o=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.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,a),"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 e=this,n=this.options,r="checkbox"===this.type||"radio"===this.type,l=r?"":"ui-state-active";null===n.label&&(n.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(s).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){n.disabled||this===i&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){n.disabled||t(this).removeClass(l)}).bind("click"+this.eventNamespace,function(t){n.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),r&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];o(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(n.disabled)return!1;t(this).addClass("ui-state-active"),i=this,e.document.one("mouseup",function(){i=null})}).bind("mouseup"+this.eventNamespace,function(){if(n.disabled)return!1;t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){if(n.disabled)return!1;e.keyCode!==t.ui.keyCode.SPACE&&e.keyCode!==t.ui.keyCode.ENTER||t(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",n.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;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?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),(i=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(s+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){if(this._super(t,e),"disabled"===t)return this.element.prop("disabled",!!e),void(e&&this.buttonElement.removeClass("ui-state-focus"));this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?o(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(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){var e=this.buttonElement.removeClass(n),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,a=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(a?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(a?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}else this.options.label&&this.element.val(this.options.label)}}),t.widget("ui.buttonset",{version:"1.10.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(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){t.extend(t.ui,{datepicker:{version:"1.10.4"}});var i,s="datepicker";function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!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"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],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},t.extend(this._defaults,this.regional[""]),this.dpDiv=a(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(e){var s="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(s,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(s,"mouseover",function(){t.datepicker._isDisabledDatepicker(i.inline?e.parent()[0]:i.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function o(e,i){for(var s in t.extend(e,i),i)null==i[s]&&(e[s]=i[s]);return e}t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;n="div"===(s=e.nodeName.toLowerCase())||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(a=this._newInst(t(e),n)).settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,s,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=t("<span class='"+this._appendClass+"'>"+o+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),"focus"!==(s=this._get(i,"showOn"))&&"both"!==s||e.focus(this._showDatepicker),"button"!==s&&"both"!==s||(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),o=this._get(t,"dateFormat");o.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,s,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,a,r){var l,h,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+l+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),(p=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],s,p)),o(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],s,p),this},_destroyDatepicker:function(e){var i,n=t(e),a=t.data(e,s);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,s),"input"===i?(a.append.remove(),a.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,n,a=t(e),o=t.data(e,s);a.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||((n=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,a=t(e),o=t.data(e,s);a.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||((n=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,s)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,n){var a,r,l,h,c=this._getInst(i);if(2===arguments.length&&"string"==typeof s)return"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null;a=s||{},"string"==typeof s&&((a={})[s]=n),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,"min"),h=this._getMinMaxDate(c,"max"),o(c.settings,a),null!==l&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,l)),null!==h&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,h)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),o=!1;break;case 13:return(n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv))[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),(i=t.datepicker._get(a,"onSelect"))?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),o=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),o=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),o=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),o=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),o=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),o=e.ctrlKey||e.metaKey;break;default:o=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):o=!1;o&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);if(t.datepicker._get(n,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||s<" "||!i||i.indexOf(s)>-1},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(t){}return!0},_showDatepicker:function(e){var i,s,n,a,r,l,h;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e)||(i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(n=(s=t.datepicker._get(i,"beforeShow"))?s.apply(e,[e,i]):{})&&(o(i.settings,n),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return!(a|="fixed"===t(this).css("position"))}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(l=t.datepicker._get(i,"showAnim"),h=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?i.dpDiv.show(l,t.datepicker._get(i,"showOptions"),h):i.dpDiv[l||"show"](l?h:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i)))},_updateDatepicker:function(e){this.maxRows=4,i=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var s,n=this._getNumberOfMonths(e),a=n[1];e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),a>1&&e.dpDiv.addClass("ui-datepicker-multi-"+a).css("width",17*a+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(s=e.yearshtml,setTimeout(function(){s===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),s=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),o=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-o:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+a>h&&h>a?Math.abs(a+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},_hideDatepicker:function(e){var i,n,a,o,r=this._curInst;!r||e&&r!==t.data(e,s)||this._datepickerShowing&&(i=this._get(r,"showAnim"),n=this._get(r,"duration"),a=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),n,a):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,a),i||a(),this._datepickerShowing=!1,(o=this._get(r,"onClose"))&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===s)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,o=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||((a=this._getInst(o[0])).selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),(s=this._get(a,"onSelect"))?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var n,a,o,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,b=-1,_=!1,y=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s=new RegExp("^\\d{1,"+("@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2)+"}"),n=i.substring(l).match(s);if(!n)throw"Missing number at position "+l;return l+=n[0].length,parseInt(n[0],10)},k=function(e,s,n){var a=-1,o=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,e){var s=e[1];if(i.substr(l,s.length).toLowerCase()===s.toLowerCase())return a=e[0],l+=s.length,!1}),-1!==a)return a+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;n<e.length;n++)if(_)"'"!==e.charAt(n)||y("'")?x():_=!1;else switch(e.charAt(n)){case"d":v=w("d");break;case"D":k("D",u,d);break;case"o":b=w("o");break;case"m":g=w("m");break;case"M":g=k("M",p,f);break;case"y":m=w("y");break;case"@":m=(r=new Date(w("@"))).getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":m=(r=new Date((w("!")-this._ticksTo1970)/1e4)).getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":y("'")?x():_=!0;break;default:x()}if(l<i.length&&(o=i.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=c?0:-100)),b>-1)for(g=1,v=b;;){if(v<=(a=this._getDaysInMonth(m,g-1)))break;g++,v-=a}if((r=this._daylightSavingAdjust(new Date(m,g-1,v))).getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;s.length<i;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;s<t.length;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),o,r);break;case"y":u+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=e+1<t.length&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;e<t.length;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,o=this._getFormatConfig(t);try{a=this.parseDate(i,s,o)||n}catch(t){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n,a,o=null==i||""===i?s:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var s=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,n=s.getFullYear(),a=s.getMonth(),o=s.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=r.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(n,a));break;case"y":case"Y":n+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(n,a))}l=r.exec(i)}return new Date(n,a,o)}(i):"number"==typeof i?isNaN(i)?s:(n=i,(a=new Date).setDate(a.getDate()+n),a):new Date(i.getTime());return(o=o&&"Invalid Date"===o.toString()?s:o)&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,o=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=o.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=o.getMonth(),t.drawYear=t.selectedYear=t.currentYear=o.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,o,r,l,h,c,u,d,p,f,m,g,v,b,_,y,w,k,x,C,D,P,T,S,M,I,A,E,z,F,O,H,N,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),Y=this._get(t,"showButtonPanel"),K=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),q=this._getNumberOfMonths(t),G=this._get(t,"showCurrentAtPos"),V=this._get(t,"stepMonths"),Q=1!==q[0]||1!==q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-G,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-q[0]*q[1]+1,J.getDate())),e=$&&e<$?$:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-V,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":K?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+V,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":K?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",o=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?X:L,o=U?this.formatDate(o,r,this._getFormatConfig(t)):o,l=t.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(t,"closeText")+"</button>",h=Y?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),y="",k=0;k<q[0];k++){for(x="",this.maxRows=4,C=0;C<q[1];C++){if(D=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),P=" ui-corner-all",T="",Q){if(T+="<div class='ui-datepicker-group",q[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",P=" ui-corner-"+(B?"right":"left");break;case q[1]-1:T+=" ui-datepicker-group-last",P=" ui-corner-"+(B?"left":"right");break;default:T+=" ui-datepicker-group-middle",P=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+P+"'>"+(/all|left/.test(P)&&0===k?B?a:s:"")+(/all|right/.test(P)&&0===k?B?s:a:"")+this._generateMonthYearHeader(t,Z,tt,$,J,k>0||C>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)M=(w+c)%7,S+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),A=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,E=Math.ceil((A+I)/7),z=Q&&this.maxRows>E?this.maxRows:E,this.maxRows=z,F=this._daylightSavingAdjust(new Date(tt,Z,1-A)),O=0;O<z;O++){for(T+="<tr>",H=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(F)+"</td>":"",w=0;w<7;w++)N=g?g.apply(t.input?t.input[0]:null,[F]):[!0,""],j=(W=F.getMonth()!==Z)&&!b||!N[0]||$&&F<$||J&&F>J,H+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(F.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||_.getTime()===F.getTime()&&_.getTime()===D.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+N[1]+(F.getTime()===X.getTime()?" "+this._currentClass:"")+(F.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!N[2]?"":" title='"+N[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===L.getTime()?" ui-state-highlight":"")+(F.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);T+=H+"</tr>"}++Z>11&&(Z=0,tt++),x+=T+="</tbody></table>"+(Q?"</div>"+(q[0]>0&&C===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=x}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,o,r){var l,h,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),b=this._get(t,"showMonthAfterYear"),_="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+o[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(b||(_+=y+(!a&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",a||!v)_+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=m;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",_+=t.yearshtml,t.yearshtml=null}return _+=this._get(t,"yearSuffix"),b&&(_+=(!a&&g&&v?"":"&#xa0;")+y),_+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),o=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),o=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!o||e.getFullYear()>=o)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.4"}(jQuery),function(t,e){var i={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},s={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.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(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},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},_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&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;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),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i,s=this;if(this._isOpen&&!1!==this._trigger("beforeClose",e)){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{(i=this.document[0].activeElement)&&"body"!==i.nodeName.toLowerCase()&&t(i).blur()}catch(t){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"))},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement;this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<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(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<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(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var e=this,i=this.options;function s(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,n){t(this).addClass("ui-dialog-dragging"),e._blockFrames(),e._trigger("dragStart",i,s(n))},drag:function(t,i){e._trigger("drag",t,s(i))},stop:function(n,a){i.position=[a.position.left-e.document.scrollLeft(),a.position.top-e.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),e._unblockFrames(),e._trigger("dragStop",n,s(a))}})},_makeResizable:function(){var e=this,i=this.options,s=i.resizable,n=this.uiDialog.css("position"),a="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";function o(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:a,start:function(i,s){t(this).addClass("ui-dialog-resizing"),e._blockFrames(),e._trigger("resizeStart",i,o(s))},resize:function(t,i){e._trigger("resize",t,o(i))},stop:function(s,n){i.height=t(this).height(),i.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),e._unblockFrames(),e._trigger("resizeStop",s,o(n))}}).css("position",n)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var n=this,a=!1,o={};t.each(e,function(t,e){n._setOption(t,e),t in i&&(a=!0),t in s&&(o[t]=e)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&((i=n.is(":data(ui-draggable)"))&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((s=n.is(":data(ui-resizable)"))&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(1===(s=i.split?i.split(" "):[i[0],i[1]]).length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(n[0]<0?n[0]:"+"+n[0])+" "+s[1]+(n[1]<0?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,(e=this.uiDialog.is(":visible"))||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t,e){var i=/up|down|vertical/,s=/up|left|vertical|horizontal/;t.effects.effect.blind=function(e,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,e.mode||"hide"),u=e.direction||"up",d=i.test(u),p=d?"height":"width",f=d?"top":"left",m=s.test(u),g={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),o=(a=t.effects.createWrapper(l).css({overflow:"hidden"}))[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}}(jQuery),function(t,e){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",b="up"===u||"left"===u,_=o.queue(),y=_.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&((a={opacity:1})[v]=0,o.css("opacity",0).css(v,b?2*-d:2*d).animate(a,m,g)),h&&(d/=Math.pow(2,p-1)),(a={})[v]=0,s=0;s<p;s++)(n={})[v]=(b?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=h?2*d:d/2;h&&((n={opacity:0})[v]=(b?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&_.splice.apply(_,[1,0].concat(_.splice(y,f+1))),o.dequeue()}}(jQuery),function(t,e){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l="show"===t.effects.setMode(o,e.mode||"hide"),h="vertical"===(e.direction||"vertical"),c=h?"height":"width",u=h?"top":"left",d={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),a=(n="IMG"===o[0].tagName?s:o)[c](),l&&(n.css(c,0),n.css(u,a/2)),d[c]=l?a:0,d[u]=l?0:a/2,n.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}}(jQuery),function(t,e){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t,e){t.effects.effect.explode=function(e,i){var s,n,a,o,r,l,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,c=h,u=t(this),d="show"===t.effects.setMode(u,e.mode||"hide"),p=u.show().css("visibility","hidden").offset(),f=Math.ceil(u.outerWidth()/c),m=Math.ceil(u.outerHeight()/h),g=[];function v(){g.push(this),g.length===h*c&&function(){u.css({visibility:"visible"}),t(g).remove(),d||u.hide();i()}()}for(s=0;s<h;s++)for(o=p.top+s*m,l=s-(h-1)/2,n=0;n<c;n++)a=p.left+n*f,r=n-(c-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*f,top:-s*m}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:m,left:a+(d?r*f:0),top:o+(d?l*m:0),opacity:d?0:1}).animate({left:a+(d?0:r*f),top:o+(d?0:l*m),opacity:d?1:0},e.duration||500,e.easing,v)}}(jQuery),function(t,e){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t,e){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}}(jQuery),function(t,e){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t,e){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),u=1),s=1;s<h;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}}(jQuery),function(t,e){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c="horizontal"!==r?o/100:1,u="vertical"!==r?o/100:1;n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c,width:h.width*u,outerHeight:h.outerHeight*c,outerWidth:h.outerWidth*u},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["width","height","overflow"],h=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],d=t.effects.setMode(o,e.mode||"effect"),p=e.restore||"effect"!==d,f=e.scale||"both",m=e.origin||["middle","center"],g=o.css("position"),v=p?r:["position","top","bottom","left","right","overflow","opacity"],b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===d&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===d?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===d?b:s),o.to=e.to||("hide"===d?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},"box"!==f&&"both"!==f||(a.from.y!==a.to.y&&(v=v.concat(c),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),a.from.x!==a.to.x&&(v=v.concat(u),o.from=t.effects.setTransition(o,u,a.from.x,o.from),o.to=t.effects.setTransition(o,u,a.to.x,o.to))),"content"!==f&&"both"!==f||a.from.y!==a.to.y&&(v=v.concat(h).concat(l),o.from=t.effects.setTransition(o,h,a.from.y,o.from),o.to=t.effects.setTransition(o,h,a.to.y,o.to)),t.effects.save(o,v),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),"content"!==f&&"both"!==f||(c=c.concat(["marginTop","marginBottom"]).concat(h),u=u.concat(["marginLeft","marginRight"]),l=r.concat(c).concat(u),o.find("*[width]").each(function(){var i=t(this),s=i.height(),n=i.width(),o=i.outerHeight(),r=i.outerWidth();p&&t.effects.save(i,l),i.from={height:s*a.from.y,width:n*a.from.x,outerHeight:o*a.from.y,outerWidth:r*a.from.x},i.to={height:s*a.to.y,width:n*a.to.x,outerHeight:s*a.to.y,outerWidth:n*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,c,a.from.y,i.from),i.to=t.effects.setTransition(i,c,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,u,a.from.x,i.from),i.to=t.effects.setTransition(i,u,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){p&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===d&&o.hide(),t.effects.restore(o,v),p||("static"===g?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}}(jQuery),function(t,e){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),b=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,m[d]=(p?"+=":"-=")+2*l,g[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;s<h;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),b>1&&v.splice.apply(v,[1,0].concat(v.splice(b,c+1))),n.dequeue()}}(jQuery),function(t,e){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t,e){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t,e){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left 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 ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(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(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").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").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var i,s,n,a,o,r=!0;function l(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:r=!1,s=this.previousFilter||"",n=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,o=new RegExp("^"+l(n),"i"),i=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(t(this).children("a").text())}),(i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(n=String.fromCharCode(e.keyCode),o=new RegExp("^"+l(n),"i"),i=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(t(this).children("a").text())})),i.length?(this.focus(e,i),i.length>1?(this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}r&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),(e=s.add(this.element)).children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),n<0?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},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(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;this.active?this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-s-n<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var i,s,n;this.active?this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){t.ui=t.ui||{};var i,s=Math.max,n=Math.abs,a=Math.round,o=/left|center|right/,r=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,c=/%$/,u=t.fn.position;function d(t,e,i){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.test(t[1])?i/100:1)]}function p(e,i){return parseInt(t.css(e,i),10)||0}t.position={scrollbarWidth:function(){if(void 0!==i)return i;var e,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),e=a.offsetWidth,n.css("overflow","scroll"),e===(s=a.offsetWidth)&&(s=n[0].clientWidth),n.remove(),i=e-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,isDocument:!!i[0]&&9===i[0].nodeType,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return u.apply(this,arguments);e=t.extend({},e);var i,c,f,m,g,v,b,_,y=t(e.of),w=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(w),x=(e.collision||"flip").split(" "),C={};return v=9===(_=(b=y)[0]).nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:t.isWindow(_)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:_.preventDefault?{width:0,height:0,offset:{top:_.pageY,left:_.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()},y[0].preventDefault&&(e.at="left top"),c=v.width,f=v.height,m=v.offset,g=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=o.test(s[0])?s.concat(["center"]):r.test(s[0])?["center"].concat(s):["center","center"]),s[0]=o.test(s[0])?s[0]:"center",s[1]=r.test(s[1])?s[1]:"center",t=l.exec(s[0]),i=l.exec(s[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[h.exec(s[0])[0],h.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?g.left+=c:"center"===e.at[0]&&(g.left+=c/2),"bottom"===e.at[1]?g.top+=f:"center"===e.at[1]&&(g.top+=f/2),i=d(C.at,c,f),g.left+=i[0],g.top+=i[1],this.each(function(){var o,r,l=t(this),h=l.outerWidth(),u=l.outerHeight(),v=p(this,"marginLeft"),b=p(this,"marginTop"),_=h+v+p(this,"marginRight")+k.width,D=u+b+p(this,"marginBottom")+k.height,P=t.extend({},g),T=d(C.my,l.outerWidth(),l.outerHeight());"right"===e.my[0]?P.left-=h:"center"===e.my[0]&&(P.left-=h/2),"bottom"===e.my[1]?P.top-=u:"center"===e.my[1]&&(P.top-=u/2),P.left+=T[0],P.top+=T[1],t.support.offsetFractions||(P.left=a(P.left),P.top=a(P.top)),o={marginLeft:v,marginTop:b},t.each(["left","top"],function(s,n){t.ui.position[x[s]]&&t.ui.position[x[s]][n](P,{targetWidth:c,targetHeight:f,elemWidth:h,elemHeight:u,collisionPosition:o,collisionWidth:_,collisionHeight:D,offset:[i[0]+T[0],i[1]+T[1]],my:e.my,at:e.at,within:w,elem:l})}),e.using&&(r=function(t){var i=m.left-P.left,a=i+c-h,o=m.top-P.top,r=o+f-u,d={target:{element:y,left:m.left,top:m.top,width:c,height:f},element:{element:l,left:P.left,top:P.top,width:h,height:u},horizontal:a<0?"left":i>0?"right":"center",vertical:r<0?"top":o>0?"bottom":"middle"};c<h&&n(i+a)<c&&(d.horizontal="center"),f<u&&n(o+r)<f&&(d.vertical="middle"),s(n(i),n(a))>s(n(o),n(r))?d.important="horizontal":d.important="vertical",e.using.call(this,t,d)}),l.offset(t.extend(P,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,a=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,r=t.left-e.collisionPosition.marginLeft,l=a-r,h=r+e.collisionWidth-o-a;e.collisionWidth>o?l>0&&h<=0?(i=t.left+l+e.collisionWidth-o-a,t.left+=l-i):t.left=h>0&&l<=0?a:l>h?a+o-e.collisionWidth:a:l>0?t.left+=l:h>0?t.left-=h:t.left=s(t.left-r,t.left)},top:function(t,e){var i,n=e.within,a=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,l=a-r,h=r+e.collisionHeight-o-a;e.collisionHeight>o?l>0&&h<=0?(i=t.top+l+e.collisionHeight-o-a,t.top+=l-i):t.top=h>0&&l<=0?a:l>h?a+o-e.collisionHeight:a:l>0?t.top+=l:h>0?t.top-=h:t.top=s(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,a=e.within,o=a.offset.left+a.scrollLeft,r=a.width,l=a.isWindow?a.scrollLeft:a.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?((i=t.left+d+p+f+e.collisionWidth-r-o)<0||i<n(c))&&(t.left+=d+p+f):u>0&&((s=t.left-e.collisionPosition.marginLeft+d+p+f-l)>0||n(s)<u)&&(t.left+=d+p+f)},top:function(t,e){var i,s,a=e.within,o=a.offset.top+a.scrollTop,r=a.height,l=a.isWindow?a.scrollTop:a.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,f=-2*e.offset[1];c<0?(s=t.top+d+p+f+e.collisionHeight-r-o,t.top+d+p+f>c&&(s<0||s<n(c))&&(t.top+=d+p+f)):u>0&&(i=t.top-e.collisionPosition.marginTop+d+p+f-l,t.top+d+p+f>u&&(i>0||n(i)<u)&&(t.top+=d+p+f))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");for(a in e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"}),s)e.style[a]=s[a];e.appendChild(r),(i=o||document.documentElement).insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&n<11,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.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=t("<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(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t,e){t.widget("ui.slider",t.ui.mouse,{version:"1.10.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},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),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 e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;e<i;e++)a.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.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=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_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(e){var i,s,n,a,o,r,l,h=this,c=this.options;return!c.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-h.values(e));(n>i||n===i&&(e===h._lastChangedValue||h.values(e)===c.min))&&(n=i,a=t(this),o=e)}),!1!==this._start(e,o)&&(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),r=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-r.left-a.width()/2,top:e.pageY-r.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(s=i/e)>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&!0===this.options.range&&(0===e&&i>s||1===e&&i<s)&&(i=s),i!==this.values(e)&&((n=this.values())[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),!1!==a&&this.values(e,i))):i!==this.value()&&!1!==(a=this._trigger("slide",t,{handle:this.handles[e],value:i}))&&this.value(i)},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;a<s.length;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;s<n;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=!this._animateOff&&r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=(l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?(s-n)/(a-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(e){var i,s,n,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),!1===this._start(e,a)))return}switch(n=this.options.step,i=s=this.options.values&&this.options.values.length?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:s=this._valueMin();break;case t.ui.keyCode.END:s=this._valueMax();break;case t.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/5);break;case t.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/5);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;s=this._trimAlignValue(i+n);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;s=this._trimAlignValue(i-n)}this._slide(e,a,s)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.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 e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){var i;function s(){this.element[0]===this.document[0].activeElement||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),s.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,s.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=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=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!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(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return i=t-(e=null!==s.min?s.min:0),t=e+(i=Math.round(i/s.step)*s.step),t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&t<s.min?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),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:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());e(this._value).call(this,t)},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){var i=0,s=/#.*$/;function n(t){return(t=t.cloneNode(!1)).hash.length>1&&decodeURIComponent(t.href.replace(s,""))===decodeURIComponent(location.href.replace(s,""))}t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){if(t(n).attr("aria-controls")===s)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==e&&-1!==e||(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s!==this.options.active&&s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){var s=this.tabs.length-1;for(;-1!==t.inArray((e>s&&(e=0),e<0&&(e=s),e),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){"active"!==t?"disabled"!==t?(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._setupDisabled(e):this._activate(e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+ ++i},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),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",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),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 t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,s){var a,o,r,l=t(s).uniqueId().attr("id"),h=t(s).closest("li"),c=h.attr("aria-controls");n(s)?(a=s.hash,o=e.element.find(e._sanitizeSelector(a))):(a="#"+(r=e._tabId(h)),(o=e.element.find(a)).length||(o=e._createPanel(r)).insertAfter(e.panels[i-1]||e.tablist),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&h.data("ui-tabs-aria-controls",c),h.attr({"aria-controls":a.substring(1),"aria-labelledby":l}),o.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)!0===e||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget).closest("li"),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():this._getPanelForTab(n),l=s.length?this._getPanelForTab(s):t(),h={oldTab:s,oldPanel:l,newTab:o?t():n,newPanel:r};e.preventDefault(),n.hasClass("ui-state-disabled")||n.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||!1===this._trigger("beforeActivate",e,h)||(i.active=!o&&this.tabs.index(n),this.active=a?t():n,this.xhr&&this.xhr.abort(),l.length||r.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(n),e),this._toggle(e,h))},_toggle:function(e,i){var s=this,n=i.newPanel,a=i.oldPanel;function o(){s.running=!1,s._trigger("activate",e,i)}function r(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),n.length&&s.options.show?s._show(n,s.options.show,o):(n.show(),o())}this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),r()),a.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),n.length&&a.length?i.oldTab.attr("tabIndex",-1):n.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),n.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_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.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(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 e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setupDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setupDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),l={tab:a,panel:r};n(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),s._trigger("load",i,l)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&s.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){var e=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).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},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;if("disabled"===e)return this[i?"_disable":"_enable"](),void(this.options[e]=i);this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)})},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&((e=t.Event("blur")).target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;if("string"==typeof s)return this._open(e,t,s);(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}))&&this._open(e,t,i)},_open:function(e,i,s){var n,a,o,r,l,h,c=t.extend({},this.options.position);s&&((n=this._find(i)).length?n.find(".ui-tooltip-content").html(s):(i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),n=this._tooltip(i),r=i,l=n.attr("id"),(h=(r.attr("aria-describedby")||"").split(/\s+/)).push(l),r.data("ui-tooltip-id",l).attr("aria-describedby",t.trim(h.join(" "))),n.find(".ui-tooltip-content").html(s),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:u}),u(e)):n.position(t.extend({of:i},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(u(c.of),clearInterval(o))},t.fx.interval)),this._trigger("open",e,{tooltip:n}),a={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}},remove:function(){this._removeTooltip(n)}},e&&"mouseover"!==e.type||(a.mouseleave="close"),e&&"focusin"!==e.type||(a.focusout="close"),this._on(!0,i,a)));function u(t){c.of=t,n.is(":hidden")||n.position(c)}},close:function(e){var i,s,n,a,o=this,r=t(e?e.currentTarget:this.element),l=this._find(r);this.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&r.attr("title",r.data("ui-tooltip-title")),s=(i=r).data("ui-tooltip-id"),n=(i.attr("aria-describedby")||"").split(/\s+/),-1!==(a=t.inArray(s,n))&&n.splice(a,1),i.removeData("ui-tooltip-id"),(n=t.trim(n.join(" ")))?i.attr("aria-describedby",n):i.removeAttr("aria-describedby"),l.stop(!0),this._hide(l,this.options.hide,function(){o._removeTooltip(t(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete o.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:l}),this.closing=!1)},_tooltip:function(i){var s="ui-tooltip-"+e++,n=t("<div>").attr({id:s,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[s]=i,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery),function(t,e){var i=0,s=t(document);t.widget("ech.multiselect",{options:{header:!0,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,show:null,hide:null,autoOpen:!1,multiple:!0,position:{},appendTo:"body",menuWidth:null,checkedheader:!0},_create:function(){var e=this.element.hide(),s=this.options;this.speed=t.fx.speeds._default,this._isOpen=!1,this._namespaceID=this.eventNamespace||"multiselect"+i;var n=(this.button=t('<button type="button"><span class="ui-icon ui-icon-triangle-1-s"></span></button>')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(s.classes).attr({title:e.attr("title"),"aria-haspopup":!0,tabIndex:e.attr("tabIndex")}).insertAfter(e),a=((this.buttonlabel=t("<span />")).html(s.noneSelectedText).appendTo(n),(this.menu=t("<div />")).addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(s.classes).appendTo(t(s.appendTo))),o=(this.header=t("<div />")).addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(a);(this.headerLinkContainer=t("<ul />")).addClass("ui-helper-reset").html(function(){return!0===s.header?'<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>'+s.checkAllText+'</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>'+s.uncheckAllText+"</span></a></li>":"string"==typeof s.header?"<li>"+s.header+"</li>":""}).append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>').appendTo(o),(this.checkboxContainer=t("<ul />")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(a);this._bindEvents(),this.refresh(!0),s.multiple||a.addClass("ui-multiselect-single"),i++},_init:function(){!1===this.options.header&&this.header.hide(),this.options.multiple||this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide(),this.options.autoOpen&&this.open(),this.element.is(":disabled")&&this.disable()},refresh:function(e){var s=this.element,n=this.options,a=this.menu,o=this.checkboxContainer,r=[],l="",h=s.attr("id")||i++;s.find("option").each(function(e){t(this);var i,s=this.parentNode,a=this.innerHTML,o=this.title,c=this.value,u="ui-multiselect-"+(this.id||h+"-option-"+e),d=this.disabled,p=this.selected,f=["ui-corner-all"],m=(d?"ui-multiselect-disabled ":" ")+this.className;"OPTGROUP"===s.tagName&&(i=s.getAttribute("label"),-1===t.inArray(i,r)&&(l+='<li class="ui-multiselect-optgroup-label '+s.className+'"><a href="#">'+i+"</a></li>",r.push(i))),d&&f.push("ui-state-disabled"),p&&!n.multiple&&f.push("ui-state-active"),l+='<li class="'+m+'">',l+='<label for="'+u+'" title="'+o+'" class="'+f.join(" ")+'">',l+='<input id="'+u+'" name="multiselect_'+h+'" type="'+(n.multiple?"checkbox":"radio")+'" value="'+c+'" title="'+o+'"',p&&(l+=' checked="checked"',l+=' aria-selected="true"'),d&&(l+=' disabled="disabled"',l+=' aria-disabled="true"'),l+=" /><span>"+a+"</span></label></li>"}),o.html(l),this.labels=a.find("label"),this.inputs=this.labels.children("input"),this._setButtonWidth(),this._setMenuWidth(),this.button[0].defaultValue=this.update(),e||this._trigger("refresh")},update:function(){var e,i=this.options,s=this.inputs,n=s.filter(":checked"),a=n.length;return e=0===a?i.noneSelectedText:t.isFunction(i.selectedText)?i.selectedText.call(this,a,s.length,n.get()):/\d/.test(i.selectedList)&&i.selectedList>0&&a<=i.selectedList?i.htmlBind?n.map(function(){return t(this).next().html()}).get().join(", "):n.map(function(){return t(this).next().text()}).get().join(", "):i.selectedText.replace("#",a).replace("#",s.length),this._setButtonValue(e),e},_setButtonValue:function(t){this.buttonlabel.text(t)},_bindEvents:function(){var e=this,i=this.button;function n(){return e[e._isOpen?"close":"open"](),!1}i.find("span").bind("click.multiselect",n),i.bind({click:n,keypress:function(t){switch(t.which){case 27:case 38:case 37:e.close();break;case 39:case 40:e.open()}},mouseenter:function(){i.hasClass("ui-state-disabled")||t(this).addClass("ui-state-hover")},mouseleave:function(){t(this).removeClass("ui-state-hover")},focus:function(){i.hasClass("ui-state-disabled")||t(this).addClass("ui-state-focus")},blur:function(){t(this).removeClass("ui-state-focus")}}),this.header.delegate("a","click.multiselect",function(i){t(this).hasClass("ui-multiselect-close")?e.close():e[t(this).hasClass("ui-multiselect-all")?"checkAll":"uncheckAll"](),i.preventDefault()}),this.menu.delegate("li.ui-multiselect-optgroup-label a","click.multiselect",function(i){i.preventDefault();var s=t(this),n=s.parent().nextUntil("li.ui-multiselect-optgroup-label").find("input:visible:not(:disabled)"),a=n.get(),o=s.parent().text();!1!==e._trigger("beforeoptgrouptoggle",i,{inputs:a,label:o})&&(e._toggleChecked(n.filter(":checked").length!==n.length,n),e._trigger("optgrouptoggle",i,{inputs:a,label:o,checked:a[0].checked}))}).delegate("label","mouseenter.multiselect",function(){t(this).hasClass("ui-state-disabled")||(e.labels.removeClass("ui-state-hover"),t(this).addClass("ui-state-hover").find("input").focus())}).delegate("label","keydown.multiselect",function(i){switch(i.preventDefault(),i.which){case 9:case 27:e.close();break;case 38:case 40:case 37:case 39:e._traverse(i.which,this);break;case 13:t(this).find("input")[0].click()}}).delegate('input[type="checkbox"], input[type="radio"]',"click.multiselect",function(i){var s=t(this),n=this.value,a=this.checked,o=e.element.find("option");this.disabled||!1===e._trigger("click",i,{value:n,text:this.title,checked:a})?i.preventDefault():(s.focus(),s.attr("aria-selected",a),o.each(function(){this.value===n?this.selected=a:e.options.multiple||(this.selected=!1)}),e.options.multiple||(e.labels.removeClass("ui-state-active"),s.closest("label").toggleClass("ui-state-active",a),e.close()),e.element.trigger("change"),setTimeout(t.proxy(e.update,e),10))}),s.bind("mousedown."+this._namespaceID,function(i){var s=i.target;!e._isOpen||s===e.button[0]||s===e.menu[0]||t.contains(e.menu[0],s)||t.contains(e.button[0],s)||e.close()}),t(this.element[0].form).bind("reset.multiselect",function(){setTimeout(t.proxy(e.refresh,e),10)})},_setButtonWidth:function(){var t=this.element.outerWidth(),e=this.options;/\d/.test(e.minWidth)&&t<e.minWidth&&(t=e.minWidth),"auto"===e.minWidth&&(t="100%"),this.button.outerWidth(t)},_setMenuWidth:function(){var t=this.menu,e=this.button.outerWidth()<=0?this.options.minWidth:this.button.outerWidth();this.options.menuWidth="auto"===this.element.outerWidth()?this.element.outerWidth():this.options.menuWidth,t.outerWidth(this.options.menuWidth||e)},_traverse:function(e,i){var s=t(i),n=38===e||37===e,a=s.parent()[n?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)").first();if(a.length)a.find("label").trigger("mouseover");else{var o=this.menu.find("ul").last();this.menu.find("label")[n?"last":"first"]().trigger("mouseover"),o.scrollTop(n?o.height():0)}},_toggleState:function(t,e){return function(){this.disabled||(this[t]=e),e?this.setAttribute("aria-selected",!0):this.removeAttribute("aria-selected")}},_toggleChecked:function(e,i){var s=i&&i.length?i:this.inputs,n=this;s.each(this._toggleState("checked",e)),s.eq(0).focus(),this.update();var a=s.map(function(){return this.value}).get();this.element.find("option").each(function(){!this.disabled&&t.inArray(this.value,a)>-1&&n._toggleState("selected",e).call(this)}),s.length&&this.element.trigger("change")},_toggleDisabled:function(e){this.button.attr({disabled:e,"aria-disabled":e})[e?"addClass":"removeClass"]("ui-state-disabled");var i=this.menu.find("input"),s="ech-multiselect-disabled";(i=e?i.filter(":enabled").data(s,!0):i.filter(function(){return!0===t.data(this,s)}).removeData(s)).attr({disabled:e,"arial-disabled":e}).parent()[e?"addClass":"removeClass"]("ui-state-disabled"),this.element.attr({disabled:e,"aria-disabled":e})},open:function(e){var i=this.button,s=this.menu,n=this.speed,a=this.options,o=[];if(!1!==this._trigger("beforeopen")&&!i.hasClass("ui-state-disabled")&&!this._isOpen){var r=s.find("ul").last(),l=a.show;t.isArray(a.show)&&(l=a.show[0],n=a.show[1]||this.speed),l&&(o=[l,n]),r.scrollTop(0).height(a.height),this.position(),t.fn.show.apply(s,o),this.labels.filter(":not(.ui-state-disabled)").eq(0).trigger("mouseover").trigger("mouseenter").find("input").trigger("focus"),i.addClass("ui-state-active"),this._isOpen=!0,this._trigger("open")}},close:function(){if(!1!==this._trigger("beforeclose")){var e=this.options,i=e.hide,s=this.speed,n=[];t.isArray(e.hide)&&(i=e.hide[0],s=e.hide[1]||this.speed),i&&(n=[i,s]),t.fn.hide.apply(this.menu,n),this.button.removeClass("ui-state-active").trigger("blur").trigger("mouseleave"),this._isOpen=!1,this._trigger("close")}},enable:function(){this._toggleDisabled(!1)},disable:function(){this._toggleDisabled(!0)},checkAll:function(t){this._toggleChecked(!0),this._trigger("checkAll")},uncheckAll:function(){this._toggleChecked(!1),this._trigger("uncheckAll")},getChecked:function(){return this.menu.find("input").filter(":checked")},destroy:function(){return t.Widget.prototype.destroy.call(this),s.unbind(this._namespaceID),this.button.remove(),this.menu.remove(),this.element.show(),this},isOpen:function(){return this._isOpen},widget:function(){return this.menu},getButton:function(){return this.button},position:function(){var e=this.options;if(t.ui.position&&!t.isEmptyObject(e.position))e.position.of=e.position.of||this.button,this.menu.show().position(e.position).hide();else{var i=this.button.offset();this.menu.css({top:i.top+this.button.outerHeight(),left:i.left})}},_setOption:function(e,i){var s=this.menu;switch(e){case"checkedheader":s.find(".ui-multiselect-all")[i?"show":"hide"](),s.find(".ui-multiselect-none")[i?"show":"hide"]();break;case"header":s.find("div.ui-multiselect-header")[i?"show":"hide"]();break;case"checkAllText":s.find("a.ui-multiselect-all span").eq(-1).text(i);break;case"uncheckAllText":s.find("a.ui-multiselect-none span").eq(-1).text(i);break;case"height":s.find("ul").last().height(parseInt(i,10));break;case"menuWidth":case"minWidth":this.options[e]=parseInt(i,10),this._setButtonWidth(),this._setMenuWidth();break;case"selectedText":case"selectedList":case"noneSelectedText":this.options[e]=i,this.update();break;case"classes":s.add(this.button).removeClass(this.options.classes).addClass(i);break;case"multiple":s.toggleClass("ui-multiselect-single",!i),this.options.multiple=i,this.element[0].multiple=i,this.refresh();break;case"position":this.position()}t.Widget.prototype._setOption.apply(this,arguments)}})}(jQuery),function(t){var e=/[\-\[\]{}()*+?.,\\\^$|#\s]/g;t.widget("ech.multiselectfilter",{options:{label:"Filter:",width:null,placeholder:"Enter keywords",autoReset:!1},_create:function(){var e=this.options,i=t(this.element),s=this.instance=i.data("echMultiselect")||i.data("multiselect")||i.data("ech-multiselect"),n=(this.header=s.menu.find(".ui-multiselect-header").addClass("ui-multiselect-hasfilter"),this.wrapper=t('<div class="ui-multiselect-filter">'+(e.label.length?e.label:"")+'<input placeholder="'+e.placeholder+'" type="search"'+(/\d/.test(e.width)?'style="width:'+e.width+'px"':"")+" /></div>").prependTo(this.header));this.inputs=s.menu.find('input[type="checkbox"], input[type="radio"]'),this.input=n.find("input").bind({keydown:function(t){13===t.which&&t.preventDefault()},keyup:t.proxy(this._handler,this),click:t.proxy(this._handler,this)}),this.updateCache(),s._toggleChecked=function(e,i){var n=i&&i.length?i:this.labels.find("input"),a=this,o=s._isOpen?":disabled, :hidden":":disabled";n=n.not(o).each(this._toggleState("checked",e)),this.update();var r=n.map(function(){return this.value}).get();this.element.find("option").filter(function(){!this.disabled&&t.inArray(this.value,r)>-1&&a._toggleState("selected",e).call(this)}),n.length&&this.element.trigger("change")};var a=t(document).bind("multiselectrefresh",t.proxy(function(){this.updateCache(),this._handler()},this));this.options.autoReset&&a.bind("multiselectclose",t.proxy(this._reset,this))},_handler:function(i){var s=t.trim(this.input[0].value.toLowerCase()),n=this.rows,a=this.inputs,o=this.cache;if(s){n.hide();var r=new RegExp(s.replace(e,"\\$&"),"gi");this._trigger("filter",i,t.map(o,function(t,e){return-1!==t.search(r)?(n.eq(e).show(),a.get(e)):null}))}else n.show();this.instance.menu.find(".ui-multiselect-optgroup-label").each(function(){var e=t(this);e[e.nextUntil(".ui-multiselect-optgroup-label").filter(function(){return"none"!==t.css(this,"display")}).length?"show":"hide"]()})},_reset:function(){this.input.val("").trigger("keyup")},updateCache:function(){this.rows=this.instance.menu.find(".ui-multiselect-checkboxes li:not(.ui-multiselect-optgroup-label)"),this.cache=this.element.children().map(function(){var e=t(this);return"optgroup"===this.tagName.toLowerCase()&&(e=e.children()),e.map(function(){return(this&&"OPTION"===this.nodeName?this.innerText:this.innerHTML).toLowerCase()}).get()}).get()},widget:function(){return this.wrapper},destroy:function(){t.Widget.prototype.destroy.call(this),this.input.val("").trigger("keyup"),this.wrapper.remove()}})}(jQuery),function(t,e){var i=0,s=null,n=[],a=null;t.fn.split=function(e){var o,r,l=this.data("splitter");if(l)return l;var h,c=t.extend({limit:100,orientation:"horizontal",position:"50%",invisible:!1,onDragStart:t.noop,onDragEnd:t.noop,onDrag:t.noop},e||{});this.settings=c;var u=this.children();"vertical"==c.orientation?(o=u.first().addClass("left_panel"),r=o.next().addClass("right_panel"),h="vsplitter"):"horizontal"==c.orientation&&(o=u.first().addClass("top_panel"),r=o.next().addClass("bottom_panel"),h="hsplitter"),c.invisible&&(h+=" splitter-invisible");var d=this.width(),p=this.height(),f=i++;this.addClass("splitter_panel");var m,g=t("<div/>").addClass(h).mouseenter(function(){s=f}).mouseleave(function(){s=null}).insertAfter(o);function v(t){if("number"==typeof t)return t;if("string"==typeof t){var e=t.match(/^([0-9]+)(px|%)$/);if(e){if("px"==e[2])return+e[1];if("vertical"==c.orientation)return d*+e[1]/100;if("horizontal"==c.orientation)return p*+e[1]/100}}}var b,_=t.extend(this,{refresh:function(){var t=this.width(),e=this.height();d==t&&p==e||(d=this.width(),p=this.height(),_.position(m))},position:"vertical"==c.orientation?function(t,e){if(void 0===t)return m;m=v(t);var i=g.width(),s=i/2;if(c.invisible){var n=o.width(m).outerWidth();r.width(_.width()-n),g.css("left",n-s)}else n=o.width(m-s).outerWidth(),r.width(_.width()-n-i),g.css("left",n);return e||_.find(".splitter_panel").trigger("splitter.resize"),_}:"horizontal"==c.orientation?function(t,e){if(void 0===t)return m;m=v(t);var i=g.height(),s=i/2;if(c.invisible){var n=o.height(m).outerHeight();r.height(_.height()-n),g.css("top",n-s)}else n=o.height(m-s).outerHeight(),r.height(_.height()-n-i),g.css("top",n);return e||_.find(".splitter_panel").trigger("splitter.resize"),_}:t.noop,orientation:c.orientation,limit:c.limit,isActive:function(){return s===f},destroy:function(){_.removeClass("splitter_panel"),g.unbind("mouseenter"),g.unbind("mouseleave"),"vertical"==c.orientation?(o.removeClass("left_panel"),r.removeClass("right_panel")):"horizontal"==c.orientation&&(o.removeClass("top_panel"),r.removeClass("bottom_panel")),_.unbind("splitter.resize"),_.trigger("splitter.resize"),_.find(".splitter_panel").trigger("splitter.resize"),n[f]=null,n.splice(f,1),i--,g.remove(),_.removeData("splitter");for(var e=!1,s=n.length;s--;)if(null!==n[s]){e=!0;break}e||(t(document.documentElement).unbind(".splitter"),t(window).unbind("resize.splitter"),n=[],i=0)}});return _.bind("splitter.resize",function(t){var e=_.position();"vertical"==_.orientation&&e>_.width()?e=_.width()-_.limit-1:"horizontal"==_.orientation&&e>_.height()&&(e=_.height()-_.limit-1),e<_.limit&&(e=_.limit+1),_.position(e,!0)}),"vertical"==c.orientation?b=b>d-c.limit?d-c.limit:v(c.position):"horizontal"==c.orientation&&(b=b>p-c.limit?p-c.limit:v(c.position)),b<c.limit&&(b=c.limit),_.position(b,!0),0==n.length&&(t(window).bind("resize.splitter",function(){t.each(n,function(t,e){e.refresh()})}),t(document.documentElement).bind("mousedown.splitter",function(e){null!==s&&(e.preventDefault(),a=n[s],setTimeout(function(){t('<div class="splitterMask"></div>').css("cursor",a.children().eq(1).css("cursor")).insertAfter(a)}),a.settings.onDragStart(e))}).bind("mouseup.splitter",function(e){a&&(t(".splitterMask").remove(),a.settings.onDragEnd(e),a=null)}).bind("mousemove.splitter",function(t){if(null!==a){var e=a.limit,i=a.offset();if("vertical"==a.orientation){var s=t.pageX-i.left;s<=a.limit?s=a.limit+1:s>=a.width()-e&&(s=a.width()-e-1),s>a.limit&&s<a.width()-e&&(a.position(s,!0),a.find(".splitter_panel").trigger("splitter.resize"),t.preventDefault())}else if("horizontal"==a.orientation){var n=t.pageY-i.top;n<=a.limit?n=a.limit+1:n>=a.height()-e&&(n=a.height()-e-1),n>a.limit&&n<a.height()-e&&(a.position(n,!0),a.find(".splitter_panel").trigger("splitter.resize"),t.preventDefault())}a.settings.onDrag(t)}})),n.push(_),_.data("splitter",_),_}}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).ajaxSubmit(i))}function i(e){var i=e.target,s=t(i);if(!s.is("[type=submit],[type=image]")){var n=s.closest("[type=submit]");if(0===n.length)return;i=n[0]}var a=this;if(a.clk=i,"image"==i.type)if(void 0!==e.offsetX)a.clk_x=e.offsetX,a.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var o=s.offset();a.clk_x=e.pageX-o.left,a.clk_y=e.pageY-o.top}else a.clk_x=e.pageX-i.offsetLeft,a.clk_y=e.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function s(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var n={};n.fileapi=void 0!==t("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var a=!!t.fn.prop;t.fn.attr2=function(){if(!a)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e){function i(i){function n(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(t){s("cannot get iframe.contentWindow document: "+t)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(i){s("cannot get iframe.contentDocument: "+i),e=t.document}return e}function r(){var e=h.attr2("target"),i=h.attr2("action"),a=h.attr("enctype")||h.attr("encoding")||"multipart/form-data";x.setAttribute("target",m),(!o||/post/i.test(o))&&x.setAttribute("method","POST"),i!=d.url&&x.setAttribute("action",d.url),d.skipEncodingOverride||o&&!/post/i.test(o)||h.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),d.timeout&&(k=setTimeout(function(){w=!0,l(D)},d.timeout));var r=[];try{if(d.extraData)for(var c in d.extraData)d.extraData.hasOwnProperty(c)&&r.push(t.isPlainObject(d.extraData[c])&&d.extraData[c].hasOwnProperty("name")&&d.extraData[c].hasOwnProperty("value")?t('<input type="hidden" name="'+d.extraData[c].name+'">').val(d.extraData[c].value).appendTo(x)[0]:t('<input type="hidden" name="'+c+'">').val(d.extraData[c]).appendTo(x)[0]);d.iframeTarget||g.appendTo("body"),v.attachEvent?v.attachEvent("onload",l):v.addEventListener("load",l,!1),setTimeout(function t(){try{var e=n(v).readyState;s("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(t){s("Server abort: ",t," (",t.name,")"),l(P),k&&clearTimeout(k),k=void 0}},15);try{x.submit()}catch(t){document.createElement("form").submit.apply(x)}}finally{x.setAttribute("action",i),x.setAttribute("enctype",a),e?x.setAttribute("target",e):h.removeAttr("target"),t(r).remove()}}function l(e){if(!b.aborted&&!A){if((I=n(v))||(s("cannot access response document"),e=P),e===D&&b)return b.abort("timeout"),void C.reject(b,"timeout");if(e==P&&b)return b.abort("server abort"),void C.reject(b,"error","server abort");if(I&&I.location.href!=d.iframeSrc||w){v.detachEvent?v.detachEvent("onload",l):v.removeEventListener("load",l,!1);var i,a="success";try{if(w)throw"timeout";var o="xml"==d.dataType||I.XMLDocument||t.isXMLDoc(I);if(s("isXml="+o),!o&&window.opera&&(null===I.body||!I.body.innerHTML)&&--E)return s("requeing onLoad callback, DOM not available"),void setTimeout(l,250);var r=I.body?I.body:I.documentElement;b.responseText=r?r.innerHTML:null,b.responseXML=I.XMLDocument?I.XMLDocument:I,o&&(d.dataType="xml"),b.getResponseHeader=function(t){return{"content-type":d.dataType}[t.toLowerCase()]},r&&(b.status=Number(r.getAttribute("status"))||b.status,b.statusText=r.getAttribute("statusText")||b.statusText);var h=(d.dataType||"").toLowerCase(),c=/(json|script|text)/.test(h);if(c||d.textarea){var u=I.getElementsByTagName("textarea")[0];if(u)b.responseText=u.value,b.status=Number(u.getAttribute("status"))||b.status,b.statusText=u.getAttribute("statusText")||b.statusText;else if(c){var p=I.getElementsByTagName("pre")[0],m=I.getElementsByTagName("body")[0];p?b.responseText=p.textContent?p.textContent:p.innerText:m&&(b.responseText=m.textContent?m.textContent:m.innerText)}}else"xml"==h&&!b.responseXML&&b.responseText&&(b.responseXML=z(b.responseText));try{M=O(b,h,d)}catch(t){a="parsererror",b.error=i=t||a}}catch(t){s("error caught: ",t),a="error",b.error=i=t||a}b.aborted&&(s("upload aborted"),a=null),b.status&&(a=b.status>=200&&b.status<300||304===b.status?"success":"error"),"success"===a?(d.success&&d.success.call(d.context,M,"success",b),C.resolve(b.responseText,"success",b),f&&t.event.trigger("ajaxSuccess",[b,d])):a&&(void 0===i&&(i=b.statusText),d.error&&d.error.call(d.context,b,a,i),C.reject(b,"error",i),f&&t.event.trigger("ajaxError",[b,d,i])),f&&t.event.trigger("ajaxComplete",[b,d]),f&&!--t.active&&t.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,b,a),A=!0,d.timeout&&clearTimeout(k),setTimeout(function(){d.iframeTarget?g.attr("src",d.iframeSrc):g.remove(),b.responseXML=null},100)}}}var c,u,d,f,m,g,v,b,_,y,w,k,x=h[0],C=t.Deferred();if(C.abort=function(t){b.abort(t)},i)for(u=0;u<p.length;u++)c=t(p[u]),a?c.prop("disabled",!1):c.removeAttr("disabled");if((d=t.extend(!0,{},t.ajaxSettings,e)).context=d.context||d,m="jqFormIO"+(new Date).getTime(),d.iframeTarget?(y=(g=t(d.iframeTarget)).attr2("name"))?m=y:g.attr2("name",m):(g=t('<iframe name="'+m+'" src="'+d.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=g[0],b={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";s("aborting upload... "+i),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(t){}g.attr("src",d.iframeSrc),b.error=i,d.error&&d.error.call(d.context,b,i,e),f&&t.event.trigger("ajaxError",[b,d,i]),d.complete&&d.complete.call(d.context,b,i)}},(f=d.global)&&0==t.active++&&t.event.trigger("ajaxStart"),f&&t.event.trigger("ajaxSend",[b,d]),d.beforeSend&&!1===d.beforeSend.call(d.context,b,d))return d.global&&t.active--,C.reject(),C;if(b.aborted)return C.reject(),C;(_=x.clk)&&((y=_.name)&&!_.disabled&&(d.extraData=d.extraData||{},d.extraData[y]=_.value,"image"==_.type&&(d.extraData[y+".x"]=x.clk_x,d.extraData[y+".y"]=x.clk_y)));var D=1,P=2,T=t("meta[name=csrf-token]").attr("content"),S=t("meta[name=csrf-param]").attr("content");S&&T&&(d.extraData=d.extraData||{},d.extraData[S]=T),d.forceSync?r():setTimeout(r,10);var M,I,A,E=50,z=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},F=t.parseJSON||function(t){return window.eval("("+t+")")},O=function(e,i,s){var n=e.getResponseHeader("content-type")||"",a="xml"===i||!i&&n.indexOf("xml")>=0,o=a?e.responseXML:e.responseText;return a&&"parsererror"===o.documentElement.nodeName&&t.error&&t.error("parsererror"),s&&s.dataFilter&&(o=s.dataFilter(o,i)),"string"==typeof o&&("json"===i||!i&&n.indexOf("json")>=0?o=F(o):("script"===i||!i&&n.indexOf("javascript")>=0)&&t.globalEval(o)),o};return C}if(!this.length)return s("ajaxSubmit: skipping submit process - no element selected"),this;var o,r,l,h=this;"function"==typeof e?e={success:e}:void 0===e&&(e={}),o=e.type||this.attr2("method"),(l=(l="string"==typeof(r=e.url||this.attr2("action"))?t.trim(r):"")||window.location.href||"")&&(l=(l.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:l,success:t.ajaxSettings.success,type:o||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var c={};if(this.trigger("form-pre-serialize",[this,e,c]),c.veto)return s("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return s("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var u=e.traditional;void 0===u&&(u=t.ajaxSettings.traditional);var d,p=[],f=this.formToArray(e.semantic,p);if(e.data&&(e.extraData=e.data,d=t.param(e.data,u)),e.beforeSubmit&&!1===e.beforeSubmit(f,this,e))return s("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[f,this,e,c]),c.veto)return s("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var m=t.param(f,u);d&&(m=m?m+"&"+d:d),"GET"==e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+m,e.data=null):e.data=m;var g=[];if(e.resetForm&&g.push(function(){h.resetForm()}),e.clearForm&&g.push(function(){h.clearForm(e.includeHidden)}),!e.dataType&&e.target){var v=e.success||function(){};g.push(function(i){var s=e.replaceTarget?"replaceWith":"html";t(e.target)[s](i).each(v,arguments)})}else e.success&&g.push(e.success);if(e.success=function(t,i,s){for(var n=e.context||this,a=0,o=g.length;o>a;a++)g[a].apply(n,[t,i,s||h,h])},e.error){var b=e.error;e.error=function(t,i,s){var n=e.context||this;b.apply(n,[t,i,s,h])}}if(e.complete){var _=e.complete;e.complete=function(t,i){var s=e.context||this;_.apply(s,[t,i,h])}}var y=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}).length>0,w="multipart/form-data",k=h.attr("enctype")==w||h.attr("encoding")==w,x=n.fileapi&&n.formdata;s("fileAPI :"+x);var C,D=(y||k)&&!x;!1!==e.iframe&&(e.iframe||D)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){C=i(f)}):C=i(f):C=(y||k)&&x?function(i){for(var s=new FormData,n=0;n<i.length;n++)s.append(i[n].name,i[n].value);if(e.extraData){var a=function(i){var s,n,a=t.param(i,e.traditional).split("&"),o=a.length,r=[];for(s=0;o>s;s++)a[s]=a[s].replace(/\+/g," "),n=a[s].split("="),r.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return r}(e.extraData);for(n=0;n<a.length;n++)a[n]&&s.append(a[n][0],a[n][1])}e.data=null;var r=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:o||"POST"});e.uploadProgress&&(r.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload&&i.upload.addEventListener("progress",function(t){var i=0,s=t.loaded||t.position,n=t.total;t.lengthComputable&&(i=Math.ceil(s/n*100)),e.uploadProgress(t,s,n,i)},!1),i}),r.data=null;var l=r.beforeSend;return r.beforeSend=function(t,i){i.data=e.formData?e.formData:s,l&&l.call(this,t,i)},t.ajax(r)}(f):t.ajax(e),h.removeData("jqxhr").data("jqxhr",C);for(var P=0;P<p.length;P++)p[P]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(n){if((n=n||{}).delegation=n.delegation&&t.isFunction(t.fn.on),!n.delegation&&0===this.length){var a={s:this.selector,c:this.context};return!t.isReady&&a.s?(s("DOM not ready, queuing ajaxForm"),t(function(){t(a.s,a.c).ajaxForm(n)}),this):(s("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return n.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,n,e).on("click.form-plugin",this.selector,n,i),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,e).bind("click.form-plugin",n,i)},t.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i){var s=[];if(0===this.length)return s;var a,o,r,l,h,c,u,d,p=this[0],f=this.attr("id"),m=e?p.getElementsByTagName("*"):p.elements;if(m&&!/MSIE [678]/.test(navigator.userAgent)&&(m=t(m).get()),f&&((a=t(':input[form="'+f+'"]').get()).length&&(m=(m||[]).concat(a))),!m||!m.length)return s;for(o=0,u=m.length;u>o;o++)if((l=(c=m[o]).name)&&!c.disabled)if(e&&p.clk&&"image"==c.type)p.clk==c&&(s.push({name:l,value:t(c).val(),type:c.type}),s.push({name:l+".x",value:p.clk_x},{name:l+".y",value:p.clk_y}));else if((h=t.fieldValue(c,!0))&&h.constructor==Array)for(i&&i.push(c),r=0,d=h.length;d>r;r++)s.push({name:l,value:h[r]});else if(n.fileapi&&"file"==c.type){i&&i.push(c);var g=c.files;if(g.length)for(r=0;r<g.length;r++)s.push({name:l,value:g[r],type:c.type});else s.push({name:l,value:"",type:c.type})}else null!==h&&void 0!==h&&(i&&i.push(c),s.push({name:l,value:h,type:c.type,required:c.required}));if(!e&&p.clk){var v=t(p.clk),b=v[0];(l=b.name)&&!b.disabled&&"image"==b.type&&(s.push({name:l,value:v.val()}),s.push({name:l+".x",value:p.clk_x},{name:l+".y",value:p.clk_y}))}return s},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var i=[];return this.each(function(){var s=this.name;if(s){var n=t.fieldValue(this,e);if(n&&n.constructor==Array)for(var a=0,o=n.length;o>a;a++)i.push({name:s,value:n[a]});else null!==n&&void 0!==n&&i.push({name:this.name,value:n})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],s=0,n=this.length;n>s;s++){var a=this[s],o=t.fieldValue(a,e);null===o||void 0===o||o.constructor==Array&&!o.length||(o.constructor==Array?t.merge(i,o):i.push(o))}return i},t.fieldValue=function(e,i){var s=e.name,n=e.type,a=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!s||e.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!e.checked||("submit"==n||"image"==n)&&e.form&&e.form.clk!=e||"select"==a&&-1==e.selectedIndex))return null;if("select"==a){var o=e.selectedIndex;if(0>o)return null;for(var r=[],l=e.options,h="select-one"==n,c=h?o+1:l.length,u=h?o:0;c>u;u++){var d=l[u];if(d.selected){var p=d.value;if(p||(p=d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value),h)return p;r.push(p)}}return r}return t(e).val()},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var s=this.type,n=this.tagName.toLowerCase();i.test(s)||"textarea"==n?this.value="":"checkbox"==s||"radio"==s?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==s?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(!0===e&&/hidden/.test(s)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"==i||"radio"==i)this.checked=e;else if("option"==this.tagName.toLowerCase()){var s=t(this).parent("select");e&&s[0]&&"select-one"==s[0].type&&s.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}),function(t){void 0==t.fn.ajaxForm&&t.getScript(("https:"==document.location.protocol?"https://":"http://")+"malsup.github.io/jquery.form.js");var e={};e.fileapi=void 0!==t("<input type='file'/>").get(0).files,e.formdata=void 0!==window.FormData,t.extend(t.alopex.fileupload,{setup:function(){}}),t.fn.uploadFile=function(i){var s=t.extend({url:"",method:"POST",enctype:"multipart/form-data",returnType:null,allowDuplicates:!0,duplicateStrict:!1,allowedTypes:"*",acceptFiles:"*",fileName:"file",formData:!1,dynamicFormData:!1,maxFileSize:-1,maxFileCount:-1,multiple:!0,dragDrop:!0,autoSubmit:!0,showCancel:!0,showAbort:!0,showDone:!0,showDelete:!0,showError:!0,showStatusAfterSuccess:!0,showStatusAfterError:!0,showFileCounter:!0,fileCounterStyle:"). ",showFileSize:!0,showProgress:!1,nestedForms:!0,showDownload:!1,onLoad:function(t){},onSelect:function(t){return!0},onSubmit:function(t,e){},onSuccess:function(t,e,i,s){},onError:function(t,e,i,s){},onCancel:function(t,e){},onAbort:function(t,e){},downloadCallback:!1,deleteCallback:!1,afterUploadAll:!1,serialize:!0,sequential:!1,sequentialCount:2,customProgressBar:!1,abortButtonClass:"Button ",cancelButtonClass:"",dragDropContainerClass:"ajax-upload-dragdrop",dragDropHoverClass:"state-hover",errorClass:"ajax-file-upload-error",uploadButtonClass:"ajax-file-upload",dragDropStr:"<span><b>Drag &amp; Drop Files</b></span>",uploadStr:"Upload",abortStr:"Abort",cancelStr:"Cancel",deletelStr:"Delete",doneStr:"Done",multiDragErrorStr:"Multiple File Drag &amp; Drop is not allowed.",extErrorStr:"is not allowed. Allowed extensions: ",duplicateErrorStr:"is not allowed. File already exists.",sizeErrorStr:"is not allowed. Allowed Max size: ",uploadErrorStr:"Upload is not allowed",maxFileCountErrorStr:" is not allowed. Maximum allowed files are:",downloadStr:"Download",customErrorKeyStr:"jquery-upload-file-error",showQueueDiv:!1,statusBarWidth:400,dragdropWidth:400,showPreview:!1,previewHeight:"auto",previewWidth:"100%",extraHTML:!1,uploadQueueOrder:"top"},i);this.fileCounter=1,this.selectedFiles=0;var n="ajax-file-upload-"+(new Date).getTime();this.formGroup=n,this.errorLog=t("<div></div>"),this.responses=[],this.existingFileNames=[],e.formdata||(s.dragDrop=!1),e.formdata||(s.multiple=!1),t(this).html("");var a=this,o=t("<div>"+s.uploadStr+"</div>"),r='<button type="button" id="btn_setCheckedAllTrue_'+s.showQueueDiv+'" class="Button">'+s.checkAllStr+"</button>";r+='<button type="button" id="btn_setCheckedAllFalse_'+s.showQueueDiv+'" class="Button">'+s.unCheckAllStr+"</button>",r+='<button type="button" id="btn_cancelChecked_'+s.showQueueDiv+'" class="Button">'+s.checkedDeleteStr+"</button>",t(o).addClass(s.uploadButtonClass),function i(){if(t.fn.ajaxForm){if(s.dragDrop){"advance"==s.selecttype&&(t(a).append(r),d(a)),t(a).append(o);var l=t('<div class="'+s.dragDropContainerClass+'"></div>').width(s.dragdropWidth);t(a).append(l),t(l).append(t(s.dragDropStr)),p(a,s,l)}else"advance"==s.selecttype&&(t(a).append(r),d(a)),t(a).append(o);s.showQueueDiv?a.container=t("#"+s.showQueueDiv):a.container=t("<div class='Container'></div>").insertAfter(t(a)),s.onLoad.call(this,a),function i(s,n,a,o){var r="ajax-upload-id-"+(new Date).getTime();var l=t("<form method='"+a.method+"' action='"+a.url+"' enctype='"+a.enctype+"'></form>");var h="<input type='file' id='"+r+"' name='"+a.fileName+"' accept='"+a.acceptFiles+"'/>";a.multiple&&(a.fileName.indexOf("[]")!=a.fileName.length-2&&(a.fileName+="[]"),h="<input type='file' id='"+r+"' name='"+a.fileName+"' accept='"+a.acceptFiles+"' multiple/>");var c=t(h).appendTo(l);c.change(function(){"basic"==a.selecttype&&(t("form").each(function(e,i){t(this).hasClass(s.formGroup)&&t(this).remove()}),s.reset()),s.errorLog.html("");a.allowedTypes.toLowerCase().split(",");var r=[];if(this.files){for(p=0;p<this.files.length;p++)r.push(this.files[p].name);if(0==a.onSelect(this.files))return}else{var h=t(this).val(),c=[];if(r.push(h),!v(s,a,h))return void(a.showError&&a.onError.call(this,h,"Alert",a.extErrorStr+a.allowedTypes,""));if(c.push({name:h,size:"NA"}),0==a.onSelect(c))return}if(y(a,s),o.unbind("click"),l.hide(),i(s,n,a,o),l.addClass(n),a.serialize&&e.fileapi&&e.formdata){l.removeClass(n);var u=this.files;l.remove(),g(a,s,u)}else{for(var d="",p=0;p<r.length;p++)a.showFileCounter?d+=s.fileCounter+a.fileCounterStyle+r[p]+"<br>":d+=r[p]+"<br>",s.fileCounter++;if(-1!=a.maxFileCount&&s.selectedFiles+r.length>a.maxFileCount)return void(a.showError&&a.onError.call(this,d,"Alert",a.maxFileCountErrorStr+a.maxFileCount,""));s.selectedFiles+=r.length;var f=new w(s,a);f.filename.html(d),k(l,a,f,r,s,null)}});a.nestedForms?(l.css({margin:0,padding:0}),o.css({position:"relative",overflow:"hidden",cursor:"default"}),c.css({position:"absolute",cursor:"pointer",top:"0px",width:"100%",height:"100%",left:"0px","z-index":"100",opacity:"0.0",filter:"alpha(opacity=0)","-ms-filter":"alpha(opacity=0)","-khtml-opacity":"0.0","-moz-opacity":"0.0"}),l.appendTo(o)):(l.appendTo(t("body")),l.css({margin:0,padding:0,display:"block",position:"absolute",left:"-250px"}),-1!=navigator.appVersion.indexOf("MSIE ")?o.attr("for",r):o.click(function(){c.click()}))}(a,n,s,o)}else window.setTimeout(i,10)}(),this.startUpload=function(){t("form").each(function(e,i){t(this).hasClass(a.formGroup)&&l.push(t(this))}),l.length>=1&&u()},this.getFileCount=function(){return a.selectedFiles},this.stopUpload=function(){t("."+s.abortButtonClass).each(function(e,i){t(this).hasClass(a.formGroup)&&t(this).click()}),t("."+s.cancelButtonClass).each(function(e,i){t(this).hasClass(a.formGroup)&&t(this).click()})},this.cancelAll=function(){t("."+s.cancelButtonClass).each(function(e,i){t(this).hasClass(a.formGroup)&&t(this).click()})},this.update=function(e){if(s=t.extend(s,e),void 0!=e.onLoad&&s.onLoad.call(e.onLoad,a),void 0!=e.dragDrop){var i=t('<div class="'+s.dragDropContainerClass+'"></div>').width(s.dragdropWidth);t(a).append(i),t(i).append(t(s.dragDropStr)),p(a,s,i)}},this.reset=function(t){a.fileCounter=1,a.selectedFiles=0,a.errorLog.html(""),0!=t&&a.container.html("")},this.remove=function(){a.container.html(""),t(a).remove()},this.createProgress=function(t,e,i){var n={name:t,path:e,size:i},o=new w(this,s);o.progressDiv.show(),o.progressbar.width("100%");var r="";if(r=s.showFileCounter?a.fileCounter+s.fileCounterStyle+t:t,s.showFileSize&&(r+=" ("+f(i)+")"),o.filename.html(r),a.fileCounter++,a.selectedFiles++,s.showPreview){var l=e;"jpg"!=(l=l.slice(l.lastIndexOf(".")+1).toLowerCase())&&"png"!=l&&"gif"!=l&&"bmp"!=l||(o.preview.attr("src",e),o.preview.show())}return s.showDownload&&(o.download.show(),o.download.click(function(){s.downloadCallback&&s.downloadCallback.call(a,n,o)})),s.showDelete&&(o.del.show(),o.del.click(function(){o.statusbar.hide().remove();s.deleteCallback&&s.deleteCallback.call(this,n,o),a.selectedFiles-=1,y(s,a)})),o},this.getResponses=function(){return this.responses};var l=[],h=[],c=!1;function u(){c||(c=!0,function t(){if(s.sequential||(s.sequentialCount=99999),0==l.length&&0==h.length)s.afterUploadAll&&s.afterUploadAll(a),c=!1;else{if(h.length<s.sequentialCount){var e=l.shift();void 0!=e&&(h.push(e),e.removeClass(a.formGroup),e.submit())}window.setTimeout(t,100)}}())}function d(e){t("#btn_setCheckedAllTrue_"+s.showQueueDiv).on("click",function(){t(e).next().find(".Checkbox").setCheckAll(!0)}),t("#btn_setCheckedAllFalse_"+s.showQueueDiv).on("click",function(){t(e).next().find(".Checkbox").setCheckAll(!1)}),t("#btn_cancelChecked_"+s.showQueueDiv).on("click",function(){for(var i=t(e).next().find("input:checked"),s=0;s<i.length;s++){var n=t(i[s]).closest(".preview-list");t(n).find(".cancel").click(),t(n).find(".del").click()}})}function p(e,i,s){s.on("dragenter",function(e){e.stopPropagation(),e.preventDefault(),t(this).addClass(i.dragDropHoverClass)}),s.on("dragover",function(e){e.stopPropagation(),e.preventDefault();var s=t(this);s.hasClass(i.dragDropContainerClass)&&!s.hasClass(i.dragDropHoverClass)&&s.addClass(i.dragDropHoverClass)}),s.on("drop",function(s){s.preventDefault(),t(this).removeClass(i.dragDropHoverClass),e.errorLog.html("");var n=s.originalEvent.dataTransfer.files;!i.multiple&&n.length>1?i.showError&&i.onError.call(this,n,"Alert",i.multiDragErrorStr,""):0!=i.onSelect(n)&&g(i,e,n)}),s.on("dragleave",function(e){t(this).removeClass(i.dragDropHoverClass)}),t(document).on("dragenter",function(t){t.stopPropagation(),t.preventDefault()}),t(document).on("dragover",function(e){e.stopPropagation(),e.preventDefault();var s=t(this);s.hasClass(i.dragDropContainerClass)||s.removeClass(i.dragDropHoverClass)}),t(document).on("drop",function(e){e.stopPropagation(),e.preventDefault(),t(this).removeClass(i.dragDropHoverClass)})}function f(t){var e="",i=t/1024;parseInt(i)>1024?e=(i/1024).toFixed(2)+" MB":e=i.toFixed(2)+" KB";return e}function m(e){var i,s,n=[],a=(n="string"==jQuery.type(e)?e.split("&"):t.param(e).split("&")).length,o=[];for(i=0;i<a;i++)n[i]=n[i].replace(/\+/g," "),s=n[i].split("="),o.push([decodeURIComponent(s[0]),decodeURIComponent(s[1])]);return o}function g(e,i,s){for(var n=0;n<s.length;n++)if(v(i,e,s[n].name))if(e.allowDuplicates||!b(i,s[n].name))if(-1!=e.maxFileSize&&s[n].size>e.maxFileSize)e.showError&&e.onError.call(this,s[n].name,"Alert",e.sizeErrorStr+f(e.maxFileSize),"");else if(-1!=e.maxFileCount&&i.selectedFiles>=e.maxFileCount)e.showError&&e.onError.call(this,s[n].name,"Alert",e.maxFileCountErrorStr+e.maxFileCount,"");else{i.selectedFiles++,i.existingFileNames.push(s[n].name);var a=e,o=new FormData,r=e.fileName.replace("[]","");o.append(r,s[n]);var l=e.formData;if(l)for(var h=m(l),c=0;c<h.length;c++)h[c]&&o.append(h[c][0],h[c][1]);a.fileData=o;var u=new w(i,e),d="";d=e.showFileCounter?i.fileCounter+e.fileCounterStyle+s[n].name:s[n].name,e.showFileSize&&(d+=" ("+f(s[n].size)+")"),u.filename.html(d);var p=t("<form style='display:block; position:absolute;left: 150px;' class='"+i.formGroup+"' method='"+e.method+"' action='"+e.url+"' enctype='"+e.enctype+"'></form>");p.appendTo("body");var g=[];g.push(s[n].name),k(p,a,u,g,i,s[n]),i.fileCounter++}else e.showError&&e.onError.call(this,s[n].name,"Alert",e.duplicateErrorStr,"");else e.showError&&e.onError.call(this,s[n].name,"Alert",e.extErrorStr+e.allowedTypes,"")}function v(t,e,i){var s=e.allowedTypes.toLowerCase().split(/[\s,]+/g),n=i.split(".").pop().toLowerCase();return!("*"!=e.allowedTypes&&jQuery.inArray(n,s)<0)}function b(t,e){var i=!1;if(t.existingFileNames.length)for(var n=0;n<t.existingFileNames.length;n++)(t.existingFileNames[n]==e||s.duplicateStrict&&t.existingFileNames[n].toLowerCase()==e.toLowerCase())&&(i=!0);return i}function _(t,e){if(t.existingFileNames.length)for(var i=0;i<e.length;i++){var s=t.existingFileNames.indexOf(e[i]);-1!=s&&t.existingFileNames.splice(s,1)}}function y(e,i){if(e.showFileCounter){var s=t(i.container).find(".ajax-file-upload-filename").length;i.fileCounter=s+1,t(i.container).find(".ajax-file-upload-filename").each(function(i,n){var a=t(this).html().split(e.fileCounterStyle),o=(parseInt(a[0]),s+e.fileCounterStyle+a[1]);t(this).html(o),s--})}}function w(e,i){var s=null;return(s=i.customProgressBar?new i.customProgressBar(e,i):new function(e,i){return this.statusbar=t("<div class='ajax-file-upload-statusbar'></div>").width(i.statusBarWidth),this.preview=t("<img class='ajax-file-upload-preview' />").width(i.previewWidth).height(i.previewHeight).appendTo(this.statusbar).hide(),this.filename=t("<div class='ajax-file-upload-filename'></div>").appendTo(this.statusbar),this.progressDiv=t("<div class='ajax-file-upload-progress'>").appendTo(this.statusbar).hide(),this.progressbar=t("<div class='ajax-file-upload-bar'></div>").appendTo(this.progressDiv),this.abort=t("<div>"+i.abortStr+"</div>").appendTo(this.statusbar).hide(),this.cancel=t("<div>"+i.cancelStr+"</div>").appendTo(this.statusbar).hide(),this.done=t("<div>"+i.doneStr+"</div>").appendTo(this.statusbar).hide(),this.download=t("<div>"+i.downloadStr+"</div>").appendTo(this.statusbar).hide(),this.del=t("<div>"+i.deletelStr+"</div>").appendTo(this.statusbar).hide(),this.abort.addClass("ajax-file-upload-red"),this.done.addClass("ajax-file-upload-green"),this.download.addClass("ajax-file-upload-green"),this.cancel.addClass("ajax-file-upload-red"),this.del.addClass("ajax-file-upload-red"),this}(e,i)).abort.addClass(e.formGroup),s.abort.addClass(i.abortButtonClass),s.cancel.addClass(e.formGroup),s.cancel.addClass(i.cancelButtonClass),i.extraHTML&&(s.extraHTML=t("<div class='extrahtml'>"+i.extraHTML()+"</div>").insertAfter(s.filename)),"bottom"==i.uploadQueueOrder?t(e.container).append(s.statusbar):t(e.container).prepend(s.statusbar),s}function k(i,s,n,a,o,r){var c={cache:!1,contentType:!1,processData:!1,forceSync:!1,type:s.method,data:s.formData,formData:s.fileData,dataType:s.returnType,beforeSubmit:function(e,r,h){if(0!=s.onSubmit.call(this,a)){if(s.dynamicFormData){var c=m(s.dynamicFormData());if(c)for(var u=0;u<c.length;u++)c[u]&&(void 0!=s.fileData?h.formData.append(c[u][0],c[u][1]):h.data[c[u][0]]=c[u][1])}return s.extraHTML&&t(n.extraHTML).find("input,select,textarea").each(function(e,i){void 0!=s.fileData?h.formData.append(t(this).attr("name"),t(this).val()):h.data[t(this).attr("name")]=t(this).val()}),!0}return n.statusbar.append("<div class='"+s.errorClass+"'>"+s.uploadErrorStr+"</div>"),n.cancel.show(),i.remove(),n.cancel.click(function(){l.splice(l.indexOf(i),1),_(o,a),n.statusbar.remove(),s.onCancel.call(o,a,n),o.selectedFiles-=a.length,y(s,o)}),!1},beforeSend:function(t,i){"advance"==s.selecttype&&n.progressDiv.show(),n.cancel.hide(),n.done.hide(),s.showAbort&&(n.abort.show(),n.abort.click(function(){_(o,a),t.abort(),o.selectedFiles-=a.length,s.onAbort.call(o,a,n)})),e.formdata?n.progressbar.width("1%"):n.progressbar.width("5%")},uploadProgress:function(t,e,i,a){a>98&&(a=98);var o=a+"%";a>1&&n.progressbar.width(o),s.showProgress&&(n.progressbar.html(o),n.progressbar.css("text-align","center"))},success:function(e,r,l){if(n.cancel.remove(),h.pop(),"json"==s.returnType&&"object"==t.type(e)&&e.hasOwnProperty(s.customErrorKeyStr)){n.abort.hide();var c=e[s.customErrorKeyStr];return s.onError.call(this,a,200,c,n),s.showStatusAfterError?(n.progressDiv.hide(),t(n.statusbar).addClass("upload-error")):(n.statusbar.hide(),n.statusbar.remove()),o.selectedFiles-=a.length,void i.remove()}o.responses.push(e),n.progressbar.width("100%"),s.showProgress&&(n.progressbar.html("100%"),n.progressbar.css("text-align","center")),n.abort.hide(),s.onSuccess.call(this,a,e,l,n),s.showStatusAfterSuccess?(s.showDone?(n.done.show(),n.done.click(function(){n.statusbar.hide("slow"),n.statusbar.remove()})):n.done.hide(),s.showDelete?(n.del.show(),n.del.click(function(){_(o,a),n.statusbar.hide().remove(),s.deleteCallback&&s.deleteCallback.call(this,e,n),o.selectedFiles-=a.length,y(s,o)})):n.del.hide()):(n.statusbar.hide("slow"),n.statusbar.remove()),s.showDownload&&(n.download.show(),n.download.click(function(){s.downloadCallback&&s.downloadCallback(e,n)})),i.remove()},error:function(e,r,l){n.cancel.show(),h.pop(),n.abort.hide(),"abort"==e.statusText?(n.statusbar.hide("slow").remove(),y(s,o)):(s.onError.call(this,a,r,l,n),s.showStatusAfterError?(n.progressDiv.hide(),t(n.statusbar).addClass("upload-error"),t(n.statusbar).find(".preview-progress").append('<span class="Font-bold Color-warning">[Error]</span>  '+l)):(n.statusbar.hide(),n.statusbar.remove()),o.selectedFiles-=a.length),i.remove()}};s.showPreview&&null!=r&&"image"==r.type.toLowerCase().split("/").shift()&&function(t,e){if(t){e.show();var i=new FileReader;i.onload=function(t){e.attr("src",t.target.result)},i.readAsDataURL(t)}}(r,n.preview),s.autoSubmit?(i.ajaxForm(c),l.push(i),u()):(s.showCancel&&(n.cancel.show(),n.cancel.click(function(){l.splice(l.indexOf(i),1),_(o,a),i.remove(),n.statusbar.remove(),s.onCancel.call(o,a,n),o.selectedFiles-=a.length,y(s,o)})),i.ajaxForm(c))}return this}}(jQuery);