/*! jquery ui - v1.12.1 - 2017-07-22 * http://jqueryui.com * includes: widget.js, keycode.js, widgets/mouse.js, widgets/slider.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js * copyright jquery foundation and other contributors; licensed mit */ (function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jquery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var e=0,i=array.prototype.slice;t.cleandata=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerhandler("remove")}catch(a){}e(i)}}(t.cleandata),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.widget),t.isarray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.tolowercase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createwidget?(arguments.length&&this._createwidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childconstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isfunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superapply;return this._super=t,this._superapply=n,e=s.apply(this,arguments),this._super=i,this._superapply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgeteventprefix:n?a.widgeteventprefix||e:e},r,{constructor:o,namespace:l,widgetname:e,widgetfullname:h}),n?(t.each(n._childconstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetname,o,i._proto)}),delete n._childconstructors):i._childconstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasownproperty(s)&&void 0!==n&&(e[s]=t.isplainobject(n)?t.isplainobject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetfullname||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isfunction(s[o])&&"_"!==o.charat(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushstack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.widget=function(){},t.widget._childconstructors=[],t.widget.prototype={widgetname:"widget",widgeteventprefix:"",defaultelement:"
")[0],f=t.each;p.style.csstext="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundcolor.indexof("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,a,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodetype)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,l],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inarray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),o=c[n],a=0===this.alpha()?h("transparent"):this,r=a[o.cache]||o.to(a._rgba),l=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],h=s[o],c=u[n.type]||{};null!==h&&(null===a?l[o]=h:(c.mod&&(h-a>c.mod/2?a+=c.mod:a-h>c.mod/2&&(a-=c.mod)),l[o]=i((h-a)*e+a,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(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&&3>e&&(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 t=(t||0).tostring(16),1===t.length?"0"+t:t}).join("")},tostring:function(){return 0===this._rgba[3]?"transparent":this.torgbastring()}}),h.fn.parse.prototype=h.fn,c.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,o=t[2]/255,a=t[3],r=math.max(s,n,o),l=math.min(s,n,o),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-o)/h+360:n===r?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[math.round(e)%360,i,u,null==a?1:a]},c.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],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[math.round(255*n(r,a,e+1/3)),math.round(255*n(r,a,e)),math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[a]&&(this[a]=l(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[a]=d,n):h(d)},f(o,function(e,i){h.fn[e]||(h.fn[e]=function(n){var o,a=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parsefloat(o[2])*("+"===o[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.csshooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=h(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundcolor"===i?e.parentnode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundcolor"),a=a.parentnode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.torgbastring()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorinit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorinit=!0),t.csshooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(a),t.csshooks.bordercolor={expand:function(t){var e={};return f(["top","right","bottom","left"],function(i,s){e["border"+s+"color"]=t}),e}},o=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"}}(r),function(){function e(e){var i,s,n=e.ownerdocument.defaultview?e.ownerdocument.defaultview.getcomputedstyle(e,null):e.currentstyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelcase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isnan(parsefloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderbottom:1,bordercolor:1,borderleft:1,borderright:1,bordertop:1,borderwidth:1,margin:1,padding:1};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)&&(r.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(n,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addback():a;h=h.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"class"](n[e])})},o(),h=h.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.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(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addclass:function(e){return function(i,s,n,o){return s?t.effects.animateclass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addclass),removeclass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateclass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeclass),toggleclass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateclass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateclass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleclass),switchclass:function(e,i,s,n,o){return t.effects.animateclass.call(this,{add:i,remove:e},s,n,o)}})}(),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]?!0:"string"!=typeof e||t.effects.effect[e]?t.isfunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerwidth(),s=e.outerheight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parsefloat(o[1])||0,right:"auto"===o[2]?i:parsefloat(o[2]),bottom:"auto"===o[3]?s:parsefloat(o[3]),left:parsefloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(a)||e(i)}}(t.expr.filters.animated)),t.uibackcompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(n+e[i],t[0].style[e[i]]) },restore:function(t,e){for(var i,s=0,o=e.length;o>s;s++)null!==e[s]&&(i=t.data(n+e[s]),t.css(e[s],i))},setmode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},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("
").addclass("ui-effects-wrapper").css({fontsize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeelement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("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).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaleddimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerheight:0,outerwidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerheight:t.outerheight()*n,outerwidth:t.outerwidth()*s}},cliptobox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},savestyle:function(t){t.data(o,t[0].style.csstext)},restorestyle:function(t){t[0].style.csstext=t.data(o)||"",t.removedata(o)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),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}},createplaceholder:function(e){var i,s=e.css("position"),o=e.position();return e.css({margintop:e.css("margintop"),marginbottom:e.css("marginbottom"),marginleft:e.css("marginleft"),marginright:e.css("marginright")}).outerwidth(e.outerwidth()).outerheight(e.outerheight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodename+">").insertafter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",margintop:e.css("margintop"),marginbottom:e.css("marginbottom"),marginleft:e.css("marginleft"),marginright:e.css("marginright"),"float":e.css("float")}).outerwidth(e.outerwidth()).outerheight(e.outerheight()).addclass("ui-effects-placeholder"),e.data(n+"placeholder",i)),e.css({position:s,left:o.left,top:o.top}),i},removeplaceholder:function(t){var e=n+"placeholder",i=t.data(e);i&&(i.remove(),t.removedata(e))},cleanup:function(e){t.effects.restorestyle(e),t.effects.removeplaceholder(e)},settransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssunit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){l.removedata(a),t.effects.cleanup(l),"hide"===s.mode&&l.hide(),r()}function r(){t.isfunction(h)&&h.call(l[0]),t.isfunction(e)&&e()}var l=t(this);s.mode=u.shift(),t.uibackcompat===!1||o?"none"===s.mode?(l[c](),r()):n.call(l[0],s,i):(l.is(":hidden")?"hide"===c:"show"===c)?(l[c](),r()):n.call(l[0],s,r)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,r=s.queue,l=r||"fx",h=s.complete,c=s.mode,u=[],d=function(e){var i=t(this),s=t.effects.mode(i,c)||o;i.data(a,!0),u.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.savestyle(i),t.isfunction(e)&&e()};return t.fx.off||!n?c?this[c](s.duration,h):this.each(function(){h&&h.call(this)}):r===!1?this.each(d).each(i):this.queue(l,d).queue(l,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),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},cssclip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrolltop():0,l=o?a.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("").appendto("body").addclass(e.classname).css({top:u.top-r,left:u.left-l,height:s.innerheight(),width:s.innerwidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isfunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipinit||(e.start=t(e.elem).cssclip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipinit=!0),t(e.elem).cssclip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["quad","cubic","quart","quint","expo"],function(t,i){e[i]=function(e){return math.pow(e,t+2)}}),t.extend(e,{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;((e=math.pow(2,--i))-1)/11>t;);return 1/math.pow(4,3-i)-7.5625*math.pow((3*e-2)/22-t,2)}}),t.each(e,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.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var l=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssclip(),r={clip:t.extend({},a)},l=t.effects.createplaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssclip(r.clip),l&&l.css(t.effects.cliptobox(r)),r.clip=a),l&&l.animate(t.effects.cliptobox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(h||l?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createplaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerheight":"outerwidth"]()/3),h&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),l&&(u/=math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=l?2*u:u/2;l&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;s=o.cssclip(),n.clip={top:h?(s.bottom-s.top)/2:s.top,right:l?(s.right-s.left)/2:s.right,bottom:h?(s.bottom-s.top)/2:s.bottom,left:l?(s.right-s.left)/2:s.left},t.effects.createplaceholder(o),"show"===e.mode&&(o.cssclip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r?"-=":"+=",c="+="===h?"-=":"+=",u={opacity:0};t.effects.createplaceholder(n),s=e.distance||n["top"===l?"outerheight":"outerwidth"](!0)/2,u[l]=h+s,a&&(n.css(u),u[l]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,l,h,c,u=e.pieces?math.round(math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=math.ceil(p.outerwidth()/d),v=math.ceil(p.outerheight()/u),b=[];for(o=0;u>o;o++)for(l=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,h=a-(d-1)/2,p.clone().appendto("body").wrap("").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addclass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?h*_:0),top:l+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:h*_),top:l+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizfirst,c=h?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createplaceholder(s),p=s.cssclip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;l&&(r=parseint(l[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssclip(g.clip),d&&d.css(t.effects.cliptobox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.cliptobox(f),u,e.easing).animate(t.effects.cliptobox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundcolor:s.css("backgroundcolor")};"hide"===e.mode&&(n.opacity=0),t.effects.savestyle(s),s.css({backgroundimage:"none",backgroundcolor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontsize"],l=["bordertopwidth","borderbottomwidth","paddingtop","paddingbottom"],h=["borderleftwidth","borderrightwidth","paddingleft","paddingright"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaleddimensions(a),_=e.from||m,v=e.to||t.effects.scaleddimensions(a,0);t.effects.createplaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.settransition(a,l,n.from.y,_),v=t.effects.settransition(a,l,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.settransition(a,h,n.from.x,_),v=t.effects.settransition(a,h,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.settransition(a,r,n.from.y,_),v=t.effects.settransition(a,r,n.to.y,v)),p&&(s=t.effects.getbaseline(p,m),_.top=(m.outerheight-_.outerheight)*s.y+g.top,_.left=(m.outerwidth-_.outerwidth)*s.x+g.left,v.top=(m.outerheight-v.outerheight)*s.y+g.top,v.left=(m.outerwidth-v.outerwidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(l=l.concat(["margintop","marginbottom"]).concat(r),h=h.concat(["marginleft","marginright"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaleddimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerheight:s.outerheight*n.from.y,outerwidth:s.outerwidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerheight:s.height*n.to.y,outerwidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.settransition(i,l,n.from.y,o),a=t.effects.settransition(i,l,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.settransition(i,h,n.from.x,o),a=t.effects.settransition(i,h,n.to.x,a)),u&&t.effects.savestyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restorestyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.savestyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseint(e.percent,10)||(0===parseint(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaleddimensions(s),to:t.effects.scaleddimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseint(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,l=2*(e.times||5)+(r?1:0),h=e.duration/l,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);l>u;u++)s.animate({opacity:c},h,e.easing),c=1-c;s.animate({opacity:c},h,e.easing),s.queue(i),t.effects.unshift(s,d,l+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=math.round(e.duration/l),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createplaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,h,e.easing);r>s;s++)n.animate(p,h,e.easing).animate(f,h,e.easing);n.animate(p,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(n,g,l+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u=e.distance||o["top"===h?"outerheight":"outerwidth"](!0),d={};t.effects.createplaceholder(o),s=o.cssclip(),n=o.position()[h],d[h]=(c?-1:1)*u+n,d.clip=o.cssclip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(o.cssclip(d.clip),o.css(h,d[h]),d.clip=s,d[h]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var l;t.uibackcompat!==!1&&(l=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)}))});