12345 |
- /* jQuery UI - v1.9.2 - 2014-03-21
- * http://jqueryui.com
- * Includes: jquery.ui.effect.js
- * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
- jQuery.effects||function(c,f){var d=c.uiBackCompat!==!1,b="ui-effects-";c.effects={effect:{}},function(D,v){function e(l,n,m){var h=g[n.type]||{};return null==l?m||!n.def?null:n.def:(l=h.floor?~~l:parseFloat(l),isNaN(l)?n.def:h.mod?(l+h.mod)%h.mod:0>l?0:l>h.max?h.max:l)}function C(i){var h=E(),l=h._rgba=[];return i=i.toLowerCase(),x(w,function(F,p){var u,s=p.re.exec(i),a=s&&p.parse(s),m=p.space||"rgba";return a?(u=h[m](a),h[j[m].cache]=u[j[m].cache],l=h._rgba=u._rgba,!1):v}),l.length?("0,0,0,0"===l.join()&&D.extend(l,B.transparent),h):B[i]}function y(a,l,h){return h=(h+1)%1,1>6*h?a+6*(l-a)*h:1>2*h?l:2>3*h?a+6*(l-a)*(2/3-h):a}var B,z="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),q=/^([\-+])=\s*(\d+\.?\d*)/,w=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],E=D.Color=function(l,m,h,n){return new D.Color.fn.parse(l,m,h,n)},j={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"}}}},g={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},A=E.support={},k=D("<p>")[0],x=D.each;k.style.cssText="background-color:rgba(1,1,1,.5)",A.rgba=k.style.backgroundColor.indexOf("rgba")>-1,x(j,function(a,h){h.cache="_"+a,h.props.alpha={idx:3,type:"percent",def:1}}),E.fn=D.extend(E.prototype,{parse:function(s,t,m,r){if(s===v){return this._rgba=[null,null,null,null],this}(s.jquery||s.nodeType)&&(s=D(s).css(t),t=v);var a=this,u=D.type(s),i=this._rgba=[];return t!==v&&(s=[s,t,m,r],u="array"),"string"===u?this.parse(C(s)||B._default):"array"===u?(x(j.rgba.props,function(h,l){i[l.idx]=e(s[l.idx],l)}),this):"object"===u?(s instanceof E?x(j,function(h,l){s[l.cache]&&(a[l.cache]=s[l.cache].slice())}):x(j,function(n,h){var l=h.cache;x(h.props,function(o,p){if(!a[l]&&h.to){if("alpha"===o||null==s[o]){return}a[l]=h.to(a._rgba)}a[l][p.idx]=e(s[o],p,!0)}),a[l]&&0>c.inArray(null,a[l].slice(0,3))&&(a[l][3]=1,h.from&&(a._rgba=h.from(a[l])))}),this):v},is:function(i){var m=E(i),h=!0,l=this;return x(j,function(a,p){var t,s=m[p.cache];return s&&(t=l[p.cache]||p.to&&p.to(l._rgba)||[],x(p.props,function(n,o){return null!=s[o.idx]?h=s[o.idx]===t[o.idx]:v})),h}),h},_space:function(){var a=[],h=this;return x(j,function(m,l){h[l.cache]&&a.push(m)}),a.pop()},transition:function(a,H){var m=E(a),G=m._space(),p=j[G],F=0===this.alpha()?E("transparent"):this,u=F[p.cache]||p.to(F._rgba),l=u.slice();return m=m[p.cache],x(p.props,function(h,I){var o=I.idx,t=u[o],i=m[o],J=g[I.type]||{};null!==i&&(null===t?l[o]=i:(J.mod&&(i-t>J.mod/2?t+=J.mod:t-i>J.mod/2&&(t-=J.mod)),l[o]=e((i-t)*H+t,I)))}),this[G](l)},blend:function(l){if(1===this._rgba[3]){return this}var m=this._rgba.slice(),h=m.pop(),n=E(l)._rgba;return E(D.map(m,function(a,i){return(1-h)*n[i]+h*a}))},toRgbaString:function(){var a="rgba(",h=D.map(this._rgba,function(i,l){return null==i?l>2?1:0:i});return 1===h[3]&&(h.pop(),a="rgb("),a+h.join()+")"},toHslaString:function(){var a="hsla(",h=D.map(this.hsla(),function(i,l){return null==i&&(i=l>2?1:0),l&&3>l&&(i=Math.round(100*i)+"%"),i});return 1===h[3]&&(h.pop(),a="hsl("),a+h.join()+")"},toHexString:function(l){var m=this._rgba.slice(),h=m.pop();return l&&m.push(~~(255*h)),"#"+D.map(m,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),E.fn.parse.prototype=E.fn,j.hsla.to=function(F){if(null==F[0]||null==F[1]||null==F[2]){return[null,null,null,F[3]]}var N,H,m=F[0]/255,M=F[1]/255,J=F[2]/255,L=F[3],K=Math.max(m,M,J),G=Math.min(m,M,J),I=K-G,O=K+G,p=0.5*O;return N=G===K?0:m===K?60*(M-J)/I+360:M===K?60*(J-m)/I+120:60*(m-M)/I+240,H=0===p||1===p?p:0.5>=p?I/O:I/(2-O),[Math.round(N)%360,H,p,null==L?1:L]},j.hsla.from=function(l){if(null==l[0]||null==l[1]||null==l[2]){return[null,null,null,l[3]]}var F=l[0]/360,m=l[1],h=l[2],u=l[3],p=0.5>=h?h*(1+m):h+m-h*m,n=2*h-p;return[Math.round(255*y(n,p,F+1/3)),Math.round(255*y(n,p,F)),Math.round(255*y(n,p,F-1/3)),u]},x(j,function(a,t){var i=t.props,p=t.cache,m=t.to,h=t.from;E.fn[a]=function(o){if(m&&!this[p]&&(this[p]=m(this._rgba)),o===v){return this[p].slice()}var u,r=D.type(o),n="array"===r||"object"===r?o:arguments,l=this[p].slice();return x(i,function(s,G){var F=n["object"===r?s:G.idx];null==F&&(F=l[G.idx]),l[G.idx]=e(F,G)}),h?(u=E(h(l)),u[p]=l,u):E(l)},x(i,function(n,l){E.fn[n]||(E.fn[n]=function(J){var G,I=D.type(J),H="alpha"===n?this._hsla?"hsla":"rgba":a,F=this[H](),K=F[l.idx];return"undefined"===I?K:("function"===I&&(J=J.call(this,K),I=D.type(J)),null==J&&l.empty?this:("string"===I&&(G=q.exec(J),G&&(J=K+parseFloat(G[2])*("+"===G[1]?1:-1))),F[l.idx]=J,this[H](F)))})})}),x(z,function(a,h){D.cssHooks[h]={set:function(m,i){var t,F,u="";if("string"!==D.type(i)||(t=C(i))){if(i=E(t||i),!A.rgba&&1!==i._rgba[3]){for(F="backgroundColor"===h?m.parentNode:m;(""===u||"transparent"===u)&&F&&F.style;){try{u=D.css(F,"backgroundColor"),F=F.parentNode}catch(p){}}i=i.blend(u&&"transparent"!==u?u:"_default")}i=i.toRgbaString()}try{m.style[h]=i}catch(s){}}},D.fx.step[h]=function(i){i.colorInit||(i.start=E(i.elem,h),i.end=E(i.end),i.colorInit=!0),D.cssHooks[h].set(i.elem,i.start.transition(i.end,i.pos))}}),D.cssHooks.borderColor={expand:function(a){var h={};return x(["Top","Right","Bottom","Left"],function(m,l){h["border"+l+"Color"]=a}),h}},B=D.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(){function g(){var n,l,k=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,m={};if(k&&k.length&&k[0]&&k[k[0]]){for(l=k.length;l--;){n=k[l],"string"==typeof k[n]&&(m[c.camelCase(n)]=k[n])}}else{for(n in k){"string"==typeof k[n]&&(m[n]=k[n])}}return m}function e(o,l){var k,n,m={};for(k in l){n=l[k],o[k]!==n&&(h[k]||(c.fx.step[k]||!isNaN(parseFloat(n)))&&(m[k]=n))}return m}var j=["add","remove","toggle"],h={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};c.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(k,a){c.fx.step[a]=function(i){("none"!==i.end&&!i.setAttr||1===i.pos&&!i.setAttr)&&(jQuery.style(i.elem,a,i.end),i.setAttr=!0)}}),c.effects.animateClass=function(m,i,l,k){var a=c.speed(i,l,k);return this.queue(function(){var q,t=c(this),s=t.attr("class")||"",p=a.children?t.find("*").andSelf():t;p=p.map(function(){var n=c(this);return{el:n,start:g.call(this)}}),q=function(){c.each(j,function(n,o){m[o]&&t[o+"Class"](m[o])})},q(),p=p.map(function(){return this.end=g.call(this.el[0]),this.diff=e(this.start,this.end),this}),t.attr("class",s),p=p.map(function(){var r=this,o=c.Deferred(),n=jQuery.extend({},a,{queue:!1,complete:function(){o.resolve(r)}});return this.el.animate(this.diff,n),o.promise()}),c.when.apply(c,p.get()).done(function(){q(),c.each(arguments,function(){var n=this.el;c.each(this.diff,function(o){n.css(o,"")})}),a.complete.call(t[0])})})},c.fn.extend({_addClass:c.fn.addClass,addClass:function(n,l,k,m){return l?c.effects.animateClass.call(this,{add:n},l,k,m):this._addClass(n)},_removeClass:c.fn.removeClass,removeClass:function(n,l,k,m){return l?c.effects.animateClass.call(this,{remove:n},l,k,m):this._removeClass(n)},_toggleClass:c.fn.toggleClass,toggleClass:function(l,k,p,m,o){return"boolean"==typeof k||k===f?p?c.effects.animateClass.call(this,k?{add:l}:{remove:l},p,m,o):this._toggleClass(l,k):c.effects.animateClass.call(this,{toggle:l},k,p,m)},switchClass:function(p,l,k,o,m){return c.effects.animateClass.call(this,{add:l,remove:p},k,o,m)}})}(),function(){function e(k,h,g,j){return c.isPlainObject(k)&&(h=k,k=k.effect),k={effect:k},null==h&&(h={}),c.isFunction(h)&&(j=h,g=null,h={}),("number"==typeof h||c.fx.speeds[h])&&(j=g,g=h,h={}),c.isFunction(g)&&(j=g,g=null),h&&c.extend(k,h),g=g||h.duration,k.duration=c.fx.off?0:"number"==typeof g?g:g in c.fx.speeds?c.fx.speeds[g]:c.fx.speeds._default,k.complete=j||h.complete,k}function a(g){return !g||"number"==typeof g||c.fx.speeds[g]?!0:"string"!=typeof g||c.effects.effect[g]?!1:d&&c.effects[g]?!1:!0}c.extend(c.effects,{version:"1.9.2",save:function(g,j){for(var h=0;j.length>h;h++){null!==j[h]&&g.data(b+j[h],g[0].style[j[h]])}},restore:function(g,h){var k,j;for(j=0;h.length>j;j++){null!==h[j]&&(k=g.data(b+h[j]),k===f&&(k=""),g.css(h[j],k))}},setMode:function(g,h){return"toggle"===h&&(h=g.is(":hidden")?"show":"hide"),h},getBaseline:function(h,k){var j,g;switch(h[0]){case"top":j=0;break;case"middle":j=0.5;break;case"bottom":j=1;break;default:j=h[0]/k.height}switch(h[1]){case"left":g=0;break;case"center":g=0.5;break;case"right":g=1;break;default:g=h[1]/k.width}return{x:g,y:j}},createWrapper:function(m){if(m.parent().is(".ui-effects-wrapper")){return m.parent()}var h={width:m.outerWidth(!0),height:m.outerHeight(!0),"float":m.css("float")},g=c("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),l={width:m.width(),height:m.height()},j=document.activeElement;try{j.id}catch(k){j=document.body}return m.wrap(g),(m[0]===j||c.contains(m[0],j))&&c(j).focus(),g=m.parent(),"static"===m.css("position")?(g.css({position:"relative"}),m.css({position:"relative"})):(c.extend(h,{position:m.css("position"),zIndex:m.css("z-index")}),c.each(["top","left","bottom","right"],function(n,i){h[i]=m.css(i),isNaN(parseInt(h[i],10))&&(h[i]="auto")}),m.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),m.css(l),g.css(h).show()},removeWrapper:function(h){var g=document.activeElement;return h.parent().is(".ui-effects-wrapper")&&(h.parent().replaceWith(h),(h[0]===g||c.contains(h[0],g))&&c(g).focus()),h},setTransition:function(k,h,g,j){return j=j||{},c.each(h,function(l,m){var o=k.cssUnit(m);o[0]>0&&(j[m]=o[0]*g+o[1])}),j}}),c.fn.extend({effect:function(){function m(u){function h(){c.isFunction(o)&&o.call(q[0]),c.isFunction(u)&&u()}var q=c(this),o=g.complete,p=g.mode;(q.is(":hidden")?"hide"===p:"show"===p)?h():k.call(q[0],g,h)}var g=e.apply(this,arguments),j=g.mode,l=g.queue,k=c.effects.effect[g.effect],i=!k&&d&&c.effects[g.effect];return c.fx.off||!k&&!i?j?this[j](g.duration,g.complete):this.each(function(){g.complete&&g.complete.call(this)}):k?l===!1?this.each(m):this.queue(l||"fx",m):i.call(this,{options:g,duration:g.duration,callback:g.complete,mode:g.mode})},_show:c.fn.show,show:function(g){if(a(g)){return this._show.apply(this,arguments)}var h=e.apply(this,arguments);return h.mode="show",this.effect.call(this,h)},_hide:c.fn.hide,hide:function(g){if(a(g)){return this._hide.apply(this,arguments)}var h=e.apply(this,arguments);return h.mode="hide",this.effect.call(this,h)},__toggle:c.fn.toggle,toggle:function(h){if(a(h)||"boolean"==typeof h||c.isFunction(h)){return this.__toggle.apply(this,arguments)}var g=e.apply(this,arguments);return g.mode="toggle",this.effect.call(this,g)},cssUnit:function(j){var h=this.css(j),g=[];return c.each(["em","px","%","pt"],function(i,k){h.indexOf(k)>0&&(g=[parseFloat(h),k])}),g}})}(),function(){var a={};c.each(["Quad","Cubic","Quart","Quint","Expo"],function(g,h){a[h]=function(e){return Math.pow(e,g+2)}}),c.extend(a,{Sine:function(g){return 1-Math.cos(g*Math.PI/2)},Circ:function(g){return 1-Math.sqrt(1-g*g)},Elastic:function(g){return 0===g||1===g?g:-Math.pow(2,8*(g-1))*Math.sin((80*(g-1)-7.5)*Math.PI/15)},Back:function(g){return g*g*(3*g-2)},Bounce:function(g){for(var j,h=4;((j=Math.pow(2,--h))-1)/11>g;){}return 1/Math.pow(4,3-h)-7.5625*Math.pow((3*j-2)/22-g,2)}}),c.each(a,function(g,e){c.easing["easeIn"+g]=e,c.easing["easeOut"+g]=function(h){return 1-e(1-h)},c.easing["easeInOut"+g]=function(h){return 0.5>h?e(2*h)/2:1-e(-2*h+2)/2}})}()}(jQuery);
|