aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fancybox/jquery.easing-1.3.pack.js
blob: 9028179e7bde19e3c0fdbf9f422c35c4a0d95034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){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 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */
"> } leh = event_init(); id_hash = g_hash_table_new(g_int_hash, g_int_equal); read_hash = g_hash_table_new(g_int_hash, g_int_equal); write_hash = g_hash_table_new(g_int_hash, g_int_equal); } void b_main_run() { /* This while loop is necessary to exit the event loop and start a different one (necessary for ForkDaemon mode). */ while (event_base_dispatch(leh) == 0 && !quitting) { if (old_leh != NULL) { /* For some reason this just isn't allowed... Possibly a bug in older versions, will see later. event_base_free( old_leh ); */ old_leh = NULL; } event_debug("New event loop.\n"); } } static void b_main_restart() { struct timeval tv; memset(&tv, 0, sizeof(struct timeval)); event_base_loopexit(leh, &tv); event_debug("b_main_restart()\n"); } void b_main_quit() { /* Tell b_main_run() that it shouldn't restart the loop. Also, libevent sometimes generates events before really quitting, we want to stop them. */ quitting = 1; b_main_restart(); } static void b_event_passthrough(int fd, short event, void *data) { struct b_event_data *b_ev = data; b_input_condition cond = 0; gboolean st; if (fd >= 0) { if (event & EV_READ) { cond |= B_EV_IO_READ; } if (event & EV_WRITE) { cond |= B_EV_IO_WRITE; } } event_debug("b_event_passthrough( %d, %d, 0x%x ) (%d)\n", fd, event, (int) data, b_ev->id); /* Since the called function might cancel this handler already (which free()s b_ev), we have to remember the ID here. */ id_cur = b_ev->id; id_dead = 0; if (quitting) { b_event_remove(id_cur); return; } st = b_ev->function(b_ev->data, fd, cond); if (id_dead) { /* This event was killed already, don't touch it! */ return; } else if (!st && !(b_ev->flags & B_EV_FLAG_FORCE_REPEAT)) { event_debug("Handler returned FALSE: "); b_event_remove(id_cur); } else if (fd == -1) { /* fd == -1 means it was a timer. These can't be auto-repeated so it has to be recreated every time. */ struct timeval tv; tv.tv_sec = b_ev->timeout / 1000; tv.tv_usec = (b_ev->timeout % 1000) * 1000; evtimer_add(&b_ev->evinfo, &tv); } } gint b_input_add(gint fd, b_input_condition condition, b_event_handler function, gpointer data) { struct b_event_data *b_ev; event_debug("b_input_add( %d, %d, 0x%x, 0x%x ) ", fd, condition, function, data); if ((condition & B_EV_IO_READ && (b_ev = g_hash_table_lookup(read_hash, &fd))) || (condition & B_EV_IO_WRITE && (b_ev = g_hash_table_lookup(write_hash, &fd)))) { /* We'll stick with this libevent entry, but give it a new BitlBee id. */ g_hash_table_remove(id_hash, &b_ev->id); event_debug("(replacing old handler (id = %d)) = %d\n", b_ev->id, id_next); b_ev->id = id_next++; b_ev->function = function; b_ev->data = data; } else { GIOCondition out_cond; event_debug("(new) = %d\n", id_next); b_ev = g_new0(struct b_event_data, 1); b_ev->id = id_next++; b_ev->function = function; b_ev->data = data; out_cond = EV_PERSIST; if (condition & B_EV_IO_READ) { out_cond |= EV_READ; } if (condition & B_EV_IO_WRITE) { out_cond |= EV_WRITE; } event_set(&b_ev->evinfo, fd, out_cond, b_event_passthrough, b_ev); event_add(&b_ev->evinfo, NULL); if (out_cond & EV_READ) { g_hash_table_insert(read_hash, &b_ev->evinfo.ev_fd, b_ev); } if (out_cond & EV_WRITE) { g_hash_table_insert(write_hash, &b_ev->evinfo.ev_fd, b_ev); } } b_ev->flags = condition; g_hash_table_insert(id_hash, &b_ev->id, b_ev); return b_ev->id; } /* TODO: Persistence for timers! */ gint b_timeout_add(gint timeout, b_event_handler function, gpointer data) { struct b_event_data *b_ev = g_new0(struct b_event_data, 1); struct timeval tv; b_ev->id = id_next++; b_ev->timeout = timeout; b_ev->function = function; b_ev->data = data; tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; evtimer_set(&b_ev->evinfo, b_event_passthrough, b_ev); evtimer_add(&b_ev->evinfo, &tv); event_debug("b_timeout_add( %d, 0x%x, 0x%x ) = %d\n", timeout, function, data, b_ev->id); g_hash_table_insert(id_hash, &b_ev->id, b_ev); return b_ev->id; } void b_event_remove(gint id) { struct b_event_data *b_ev = g_hash_table_lookup(id_hash, &id); event_debug("b_event_remove( %d )\n", id); if (b_ev) { if (id == id_cur) { id_dead = TRUE; } g_hash_table_remove(id_hash, &b_ev->id); if (b_ev->evinfo.ev_fd >= 0) { if (b_ev->evinfo.ev_events & EV_READ) { g_hash_table_remove(read_hash, &b_ev->evinfo.ev_fd); } if (b_ev->evinfo.ev_events & EV_WRITE) { g_hash_table_remove(write_hash, &b_ev->evinfo.ev_fd); } } event_del(&b_ev->evinfo); g_free(b_ev); } else { event_debug("Already removed?\n"); } } void closesocket(int fd) { struct b_event_data *b_ev; /* Since epoll() (the main reason we use libevent) automatically removes sockets from the epoll() list when a socket gets closed and some modules have a habit of closing sockets before removing event handlers, our and libevent's administration get a little bit messed up. So this little function will remove the handlers properly before closing a socket. */ if ((b_ev = g_hash_table_lookup(read_hash, &fd))) { event_debug("Warning: fd %d still had a read event handler when shutting down.\n", fd); b_event_remove(b_ev->id); } if ((b_ev = g_hash_table_lookup(write_hash, &fd))) { event_debug("Warning: fd %d still had a write event handler when shutting down.\n", fd); b_event_remove(b_ev->id); } close(fd); }