├── favicon.ico ├── favicon.png ├── audio ├── done.mp3 ├── done.ogg └── done.wav ├── icons ├── ipad.png ├── iphone.png ├── ipad-retina.png └── iphone-retina.png ├── screenshot_iphone.jpg ├── screenshot_snap.jpg ├── screenshot_browser.jpg ├── iconic fill ├── iconic_fill.eot ├── iconic_fill.otf ├── iconic_fill.ttf ├── iconic_fill.woff ├── iconic_fill.css ├── iconic_fill.afm └── iconic_fill_demo.html ├── js ├── viewport.js ├── templates.js ├── controllers │ ├── textbar.js │ ├── task.js │ ├── addtask.js │ ├── tasks.js │ └── document.js ├── done.js ├── lib │ ├── jquery.ui.touch-punch.min.js │ ├── piecon.min.js │ ├── amplify.store.js │ ├── es5-sham.min.js │ ├── md5.min.js │ ├── hogan.js │ ├── base64.min.js │ ├── es5-shim.min.js │ ├── howler.min.js │ ├── gibberish-aes.min.js │ ├── require.js │ ├── flight.min.js │ └── jquery-ui-1.10.2.custom.min.js └── data.js ├── .jsfmtrc ├── xdm.html ├── README.md ├── index.html ├── done.css └── normalize.css /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/favicon.ico -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/favicon.png -------------------------------------------------------------------------------- /audio/done.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/audio/done.mp3 -------------------------------------------------------------------------------- /audio/done.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/audio/done.ogg -------------------------------------------------------------------------------- /audio/done.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/audio/done.wav -------------------------------------------------------------------------------- /icons/ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/icons/ipad.png -------------------------------------------------------------------------------- /icons/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/icons/iphone.png -------------------------------------------------------------------------------- /icons/ipad-retina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/icons/ipad-retina.png -------------------------------------------------------------------------------- /screenshot_iphone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/screenshot_iphone.jpg -------------------------------------------------------------------------------- /screenshot_snap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/screenshot_snap.jpg -------------------------------------------------------------------------------- /icons/iphone-retina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/icons/iphone-retina.png -------------------------------------------------------------------------------- /screenshot_browser.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/screenshot_browser.jpg -------------------------------------------------------------------------------- /iconic fill/iconic_fill.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/iconic fill/iconic_fill.eot -------------------------------------------------------------------------------- /iconic fill/iconic_fill.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/iconic fill/iconic_fill.otf -------------------------------------------------------------------------------- /iconic fill/iconic_fill.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/iconic fill/iconic_fill.ttf -------------------------------------------------------------------------------- /iconic fill/iconic_fill.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imsky/done/HEAD/iconic fill/iconic_fill.woff -------------------------------------------------------------------------------- /js/viewport.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var dpr = window.devicePixelRatio || 1; 3 | if (dpr > 1) { 4 | var m = document.createElement("meta"); 5 | m.setAttribute("name", "viewport"); 6 | m.setAttribute("content", 'width=device-width,height=device-height,initial-scale=' + (1 / dpr)); 7 | document.head.appendChild(m); 8 | } 9 | })(); -------------------------------------------------------------------------------- /.jsfmtrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "default", 3 | "plugins": [ 4 | "esformatter-semicolons" 5 | ], 6 | "quotes": { 7 | "type": "single", 8 | "avoidEscape": false 9 | }, 10 | "indent": { 11 | "value": " " 12 | }, 13 | "whiteSpace": { 14 | "after": { 15 | "FunctionReservedWord": 1 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /xdm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /js/templates.js: -------------------------------------------------------------------------------- 1 | define(['lib/hogan'], function () { 2 | return { 3 | check: $("
").html("✔").html(), 4 | emptynotice: 'get started by adding a task', 5 | pause: '', 6 | play: '', 7 | task: window.Hogan.compile( 8 | '
{{title}}
{{time}}
') 9 | }; 10 | }); 11 | -------------------------------------------------------------------------------- /js/controllers/textbar.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'lib/flight.min' 3 | ], function (Flight) { 4 | function component() { 5 | this.after("initialize", function () { 6 | var timer = null; 7 | this.on(document, this.attr["event"], function (evt, payload) { 8 | var node = this.$node; 9 | this.$node.text(payload.text).addClass("visible"); 10 | if (timer != null) { 11 | clearTimeout(timer); 12 | } 13 | timer = setTimeout(function () { 14 | node.removeClass("visible"); 15 | clearTimeout(timer); 16 | }, 5000); 17 | }); 18 | }); 19 | } 20 | return Flight.component(component); 21 | } 22 | ); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # done 2 | 3 | ![done in browser](http://imsky.github.io/done/screenshot_browser.jpg) 4 | 5 | **done** is a task management app that lets you time and order tasks as necessary. 6 | 7 | Your task list is saved automatically in your browser, so it's always there when you need it. 8 | 9 | ## How to use 10 | 11 | ### Adding a task 12 | Enter the task name, then click the time button to set the task time, and click **add**. 13 | 14 | ### Organizing tasks 15 | You can drag and drop tasks to order them as you like. Put the important stuff first, or mix your schedule up, it's your call. 16 | 17 | ## Details 18 | 19 | **done** is built using [Twitter Flight](https://github.com/twitter/flight), and localStorage. 20 | 21 | ## Compatibility 22 | 23 | **done** works with IE8+, Firefox 3+, Chrome 10+, and Safari. 24 | 25 | ## License 26 | 27 | **done** is provided under the Apache 2 license. 28 | 29 | ## Credits 30 | 31 | done is a project by [Ivan Malopinsky](http://imsky.co). 32 | 33 | -------------------------------------------------------------------------------- /js/done.js: -------------------------------------------------------------------------------- 1 | require([ 2 | 'lib/flight.min', 3 | 'lib/piecon.min', 4 | 'lib/amplify.store', 5 | 'lib/howler.min', 6 | 'templates', 7 | 'data', 8 | 'controllers/document', 9 | 'controllers/addtask', 10 | 'controllers/textbar', 11 | 'controllers/task', 12 | 'controllers/tasks' 13 | ], function (Flight, _Piecon, Store, Howler, Templates, Data, DocumentController, AddTaskController, TextbarController, TaskController, TasksController, SettingsController, CredentialsController) { 14 | AddTaskController.attachTo("#addtask"); 15 | TextbarController.attachTo("#error", { 16 | event: "error" 17 | }); 18 | TextbarController.attachTo("#notification", { 19 | event: "notification" 20 | }); 21 | TasksController.attachTo("#tasks"); 22 | DocumentController.attachTo(document); 23 | 24 | Piecon.setOptions({ 25 | color: "#3B5F7F", 26 | background: "#ffffff", 27 | shadow: "#3B5F7F" 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /js/lib/jquery.ui.touch-punch.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI Touch Punch 0.2.2 3 | * 4 | * Copyright 2011, Dave Furfero 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * 7 | * Depends: 8 | * jquery.ui.widget.js 9 | * jquery.ui.mouse.js 10 | */ 11 | (function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery); -------------------------------------------------------------------------------- /js/lib/piecon.min.js: -------------------------------------------------------------------------------- 1 | (function(){var u={},f=null,e=null,r=null,i=null,t={},o={color:"#ff0084",background:"#bbb",shadow:"#fff",fallback:!1},a=window.devicePixelRatio>1,n=function(){var n=navigator.userAgent.toLowerCase();return function(t){return n.indexOf(t)!==-1}}(),l={ie:n("msie"),chrome:n("chrome"),webkit:n("chrome")||n("safari"),safari:n("safari")&&!n("chrome"),mozilla:n("mozilla")&&!n("chrome")&&!n("safari")},p=function(){for(var t=document.getElementsByTagName("link"),n=0,i=t.length;n0&&(r.beginPath(),r.moveTo(i.width/2,i.height/2),r.arc(i.width/2,i.height/2,Math.min(i.width/2,i.height/2)-2,-.5*Math.PI,(-.5+2*n/100)*Math.PI,!1),r.lineTo(i.width/2,i.height/2),r.fillStyle=t.color,r.fill()),s(i.toDataURL()))},e.match(/^data/)||(u.crossOrigin="anonymous"),u.src=e},c=function(n){document.title=n>0?"("+n+"%) "+r:r};u.setOptions=function(n){t={};for(var i in o)t[i]=n.hasOwnProperty(i)?n[i]:o[i];return this},u.setProgress=function(n){if(r||(r=document.title),!e||!f){var i=p();e=f=i?i.getAttribute("href"):"/favicon.ico"}return!isNaN(parseFloat(n))&&isFinite(n)?!h().getContext||l.ie||l.safari||t.fallback===!0?c(n):(t.fallback==="force"&&c(n),v(n)):!1},u.reset=function(){r&&(document.title=r),e&&(f=e,s(f))},u.setOptions(o),window.Piecon=u})(); -------------------------------------------------------------------------------- /js/controllers/task.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'lib/flight.min', 3 | 'data', 4 | 'templates' 5 | ], function (Flight, Data, Templates) { 6 | function component() { 7 | this.defaultAttrs({ 8 | 'time': '.tasktime', 9 | 'control': '.controlbutton', 10 | 'delete': '.deletebutton' 11 | }); 12 | this.after("initialize", function (el, evt) { 13 | this.task = Data.get(evt.task); 14 | 15 | this.on("click", { 16 | "control": function (e) { 17 | if (this.task == Data.active()) { 18 | this.trigger("tasks:pause"); 19 | } else { 20 | this.trigger("tasks:pause"); 21 | this.trigger("task:play"); 22 | } 23 | e.preventDefault(); 24 | }, 25 | "delete": function (e) { 26 | this.trigger("task:delete", this.task); 27 | e.preventDefault(); 28 | } 29 | }); 30 | 31 | this.on("task:play", function () { 32 | Data.setActive(this.task); 33 | this.trigger("tasks:update"); 34 | }); 35 | 36 | this.on(document, "tasks:update", function () { 37 | if (this.task.minutes == 0) { 38 | this.$node.removeClass("active"); 39 | if (!this.$node.hasClass("finished")) { 40 | this.select("time").html(Templates.check); 41 | this.$node.addClass("finished"); 42 | } 43 | 44 | if (!this.task.complete) { 45 | this.task.complete = true; 46 | this.trigger("task:complete", this.task); 47 | } 48 | } else { 49 | this.select("time").text(this.task.time); 50 | if (Data.active() == this.task) { 51 | this.$node.addClass("active"); 52 | this.select("control").html(Templates.pause); 53 | } else { 54 | this.$node.removeClass("active"); 55 | this.select("control").html(Templates.play); 56 | } 57 | } 58 | }); 59 | 60 | }); 61 | } 62 | return Flight.component(component); 63 | } 64 | ); -------------------------------------------------------------------------------- /js/controllers/addtask.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'lib/flight.min' 3 | ], function (Flight) { 4 | function component() { 5 | var minutes = 15; 6 | 7 | function render_time(minutes) { 8 | var hours = Math.floor(minutes / 60); 9 | if ((hours == 1 && minutes % 60 == 0) || hours > 1) { 10 | return hours + "h"; 11 | } else if (minutes < 120) { 12 | return minutes + "m"; 13 | } 14 | } 15 | 16 | this.defaultAttrs({ 17 | 'add-button': ".taskbutton", 18 | 'time-button': ".timebutton", 19 | 'task-name': "#taskname", 20 | 'task-time': "#tasktime", 21 | 'task-time-area': '.tasktime' 22 | }); 23 | 24 | this.after("initialize", function () { 25 | this.on("click", { 26 | 'add-button': function (e) { 27 | this.trigger("tasks:add", { 28 | title: this.select('task-name').val(), 29 | minutes: minutes, 30 | _minutes: minutes 31 | }); 32 | this.trigger("reset"); 33 | e.preventDefault(); 34 | }, 35 | 'task-time-area': function (e) { 36 | this.trigger(this.select('time-button'), "click"); 37 | }, 38 | 'time-button': function (e) { 39 | if (minutes >= 12 * 60) { 40 | minutes = 15; 41 | } else if (minutes < 60) { 42 | minutes += 15; 43 | } else if (minutes < 120) { 44 | minutes += 30; 45 | } else { 46 | minutes += 60; 47 | } 48 | this.trigger("renderTime"); 49 | e.preventDefault(); 50 | } 51 | }); 52 | 53 | this.on("renderTime", function () { 54 | this.select('task-time').html($("
").html(render_time(minutes)).html()); 55 | }); 56 | 57 | this.on("reset", function (e) { 58 | minutes = 15; 59 | this.trigger("renderTime"); 60 | this.select('task-name').val(""); 61 | e.stopPropagation(); 62 | }); 63 | 64 | this.trigger("renderTime"); 65 | }); 66 | } 67 | return Flight.component(component); 68 | } 69 | ); -------------------------------------------------------------------------------- /js/lib/amplify.store.js: -------------------------------------------------------------------------------- 1 | (function(n,t){function f(n,r){i.addType(n,function(f,e,o){var a,s,v,l,h=e,c=+new Date;if(!f){h={},l=[],v=0;try{for(f=r.length;f=r.key(v++);)u.test(f)&&(s=JSON.parse(r.getItem(f)),s.expires&&s.expires<=c?l.push(f):h[f.replace(u,"")]=s.data);while(f=l.pop())r.removeItem(f)}catch(y){}return h}if(f="__amplify__"+f,e===t)if(a=r.getItem(f),s=a?JSON.parse(a):{expires:-1},s.expires&&s.expires<=c)r.removeItem(f);else return s.data;else if(e===null)r.removeItem(f);else{s=JSON.stringify({data:e,expires:o.expires?c+o.expires:null});try{r.setItem(f,s)}catch(y){i[n]();try{r.setItem(f,s)}catch(y){throw i.error();}}}return h})}var i=n.store=function(n,t,r,u){var u=i.type;return r&&r.type&&r.type in i.types&&(u=r.type),i.types[u](n,t,r||{})},u,r;i.types={},i.type=null,i.addType=function(n,t){i.type||(i.type=n),i.types[n]=t,i[n]=function(t,r,u){return u=u||{},u.type=n,i(t,r,u)}},i.error=function(){return"amplify.store quota exceeded"},u=/^__amplify__/;for(r in{localStorage:1,sessionStorage:1})try{window[r].getItem&&f(r,window[r])}catch(e){}if(window.globalStorage)try{f("globalStorage",window.globalStorage[window.location.hostname]),i.type==="sessionStorage"&&(i.type="globalStorage")}catch(e){}(function(){if(!i.types.localStorage){var n=document.createElement("div"),r="amplify";n.style.display="none",document.getElementsByTagName("head")[0].appendChild(n);try{n.addBehavior("#default#userdata"),n.load(r)}catch(u){n.parentNode.removeChild(n);return}i.addType("userData",function(u,f,e){n.load(r);var s,o,h,v,a,c=f,l=+new Date;if(!u){for(c={},a=[],v=0;s=n.XMLDocument.documentElement.attributes[v++];)o=JSON.parse(s.value),o.expires&&o.expires<=l?a.push(s.name):c[s.name]=o.data;while(u=a.pop())n.removeAttribute(u);return n.save(r),c}if(u=u.replace(/[^-._0-9A-Za-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u37f-\u1fff\u200c-\u200d\u203f\u2040\u2070-\u218f]/g,"-"),f===t)if(s=n.getAttribute(u),o=s?JSON.parse(s):{expires:-1},o.expires&&o.expires<=l)n.removeAttribute(u);else return o.data;else f===null?n.removeAttribute(u):(h=n.getAttribute(u),o=JSON.stringify({data:f,expires:e.expires?l+e.expires:null}),n.setAttribute(u,o));try{n.save(r)}catch(y){h===null?n.removeAttribute(u):n.setAttribute(u,h),i.userData();try{n.setAttribute(u,o),n.save(r)}catch(y){h===null?n.removeAttribute(u):n.setAttribute(u,h);throw i.error();}}return c})}})(),function(){function u(n){return n===t?t:JSON.parse(JSON.stringify(n))}var r={},n={};i.addType("memory",function(i,f,e){return i?f===t?u(r[i]):(n[i]&&(clearTimeout(n[i]),delete n[i]),f===null)?(delete r[i],null):(r[i]=f,e.expires&&(n[i]=setTimeout(function(){delete r[i],delete n[i]},e.expires)),f):u(r)})}()})(this.amplify=this.amplify||{}); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | done 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
Error here
28 |
Notification here
29 |
30 |
31 |

done

32 |
33 |
34 | 35 |
36 |
37 | 15m 38 |
39 |
40 | 41 |
42 |
43 | add 44 |
45 |
46 |
get started by adding a task
47 | 52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /js/lib/es5-sham.min.js: -------------------------------------------------------------------------------- 1 | (function(f){"function"==typeof define?define(f):"function"==typeof YUI?YUI.add("es5-sham",f):f()})(function(){function f(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(c){}}var b=Function.prototype.call,g=Object.prototype,h=b.bind(g.hasOwnProperty),p,q,k,l,i;if(i=h(g,"__defineGetter__"))p=b.bind(g.__defineGetter__),q=b.bind(g.__defineSetter__),k=b.bind(g.__lookupGetter__),l=b.bind(g.__lookupSetter__);Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__|| 2 | (a.constructor?a.constructor.prototype:g)});Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(a,c){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+a);if(h(a,c)){var d={enumerable:true,configurable:true};if(i){var b=a.__proto__;a.__proto__=g;var e=k(a,c),f=l(a,c);a.__proto__=b;if(e||f){if(e)d.get=e;if(f)d.set=f;return d}}d.value=a[c];return d}});Object.getOwnPropertyNames||(Object.getOwnPropertyNames= 3 | function(a){return Object.keys(a)});if(!Object.create){var m;if(null===Object.prototype.__proto__||"undefined"==typeof document)m=function(){return{__proto__:null}};else{var r=function(){},b=document.createElement("iframe"),j=document.body||document.documentElement;b.style.display="none";j.appendChild(b);b.src="javascript:";var e=b.contentWindow.Object.prototype;j.removeChild(b);b=null;delete e.constructor;delete e.hasOwnProperty;delete e.propertyIsEnumerable;delete e.isPrototypeOf;delete e.toLocaleString; 4 | delete e.toString;delete e.valueOf;e.__proto__=null;r.prototype=e;m=function(){return new r}}Object.create=function(a,c){function d(){}var b;if(a===null)b=m();else{if(typeof a!=="object"&&typeof a!=="function")throw new TypeError("Object prototype may only be an Object or null");d.prototype=a;b=new d;b.__proto__=a}c!==void 0&&Object.defineProperties(b,c);return b}}if(Object.defineProperty&&(b=f({}),j="undefined"==typeof document||f(document.createElement("div")),!b||!j))var n=Object.defineProperty, 5 | o=Object.defineProperties;if(!Object.defineProperty||n)Object.defineProperty=function(a,c,d){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.defineProperty called on non-object: "+a);if(typeof d!="object"&&typeof d!="function"||d===null)throw new TypeError("Property description must be an object: "+d);if(n)try{return n.call(Object,a,c,d)}catch(b){}if(h(d,"value"))if(i&&(k(a,c)||l(a,c))){var e=a.__proto__;a.__proto__=g;delete a[c];a[c]=d.value;a.__proto__=e}else a[c]= 6 | d.value;else{if(!i)throw new TypeError("getters & setters can not be defined on this javascript engine");h(d,"get")&&p(a,c,d.get);h(d,"set")&&q(a,c,d.set)}return a};if(!Object.defineProperties||o)Object.defineProperties=function(a,c){if(o)try{return o.call(Object,a,c)}catch(d){}for(var b in c)h(c,b)&&b!="__proto__"&&Object.defineProperty(a,b,c[b]);return a};Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(t){var s= 7 | Object.freeze;Object.freeze=function(a){return typeof a=="function"?a:s(a)}}Object.preventExtensions||(Object.preventExtensions=function(a){return a});Object.isSealed||(Object.isSealed=function(){return false});Object.isFrozen||(Object.isFrozen=function(){return false});Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)!==a)throw new TypeError;for(var c="";h(a,c);)c=c+"?";a[c]=true;var b=h(a,c);delete a[c];return b})}); 8 | -------------------------------------------------------------------------------- /js/lib/md5.min.js: -------------------------------------------------------------------------------- 1 | (function(a){function b(a,b){var c=(a&65535)+(b&65535),d=(a>>16)+(b>>16)+(c>>16);return d<<16|c&65535}function c(a,b){return a<>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d>5]>>>b%32&255);return c}function k(a){var b,c=[];c[(a.length>>2)-1]=undefined;for(b=0;b>5]|=(a.charCodeAt(b/8)&255)<16&&(d=i(d,a.length*8));for(c=0;c<16;c+=1)e[c]=d[c]^909522486,f[c]=d[c]^1549556828;return g=i(e.concat(k(b)),512+b.length*8),j(i(f.concat(g),640))}function n(a){var b="0123456789abcdef",c="",d,e;for(e=0;e>>4&15)+b.charAt(d&15);return c}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}"use strict",typeof define=="function"&&define.amd?define(function(){return t}):a.md5=t})(this); -------------------------------------------------------------------------------- /js/data.js: -------------------------------------------------------------------------------- 1 | define(['lib/md5.min', 'lib/gibberish-aes.min', 'lib/base64.min'], function (md5, Gibberish, Base64) { 2 | var tasks = []; 3 | var active = null; 4 | var credentials = null; 5 | return { 6 | credentials: function (obj) { 7 | if (obj) { 8 | credentials = obj; 9 | } 10 | return credentials; 11 | }, 12 | load: function () { 13 | this.clear(); 14 | var local = amplify.store("donejs"); 15 | if (local) { 16 | this.recover(local); 17 | } 18 | }, 19 | recover: function (obj) { 20 | tasks = obj.tasks; 21 | active = this.get(obj.active); 22 | this.persist(); 23 | }, 24 | freeze: function () { 25 | return { 26 | tasks: tasks, 27 | active: (active ? active.id : null) 28 | }; 29 | }, 30 | getKey: function (username, password) { 31 | return "done-" + Base64.toBase64(md5([username, password, username, password].join("/"))).replace(/[\W]+/g, ''); 32 | }, 33 | encode: function (username, password) { 34 | return { 35 | key: this.getKey(username, password), 36 | value: GibberishAES.enc(JSON.stringify(this.freeze()), password) 37 | }; 38 | }, 39 | decode: function (object, password) { 40 | return JSON.parse(GibberishAES.dec(object, password)); 41 | }, 42 | persist: function () { 43 | amplify.store("donejs", this.freeze()); 44 | }, 45 | push: function (task) { 46 | var id = (new Date()).getTime(); 47 | task.id = id; 48 | tasks.push(task); 49 | this.updateTimes(); 50 | this.persist(); 51 | return id; 52 | }, 53 | validateTask: function (task) { 54 | return !isNaN(task.minutes) && task.minutes >= 0 && task.title && task.title.length > 0; 55 | }, 56 | deleteTask: function (task) { 57 | if (active == task) { 58 | this.setActive(null); 59 | } 60 | tasks = tasks.filter(function (t) { 61 | return t !== task; 62 | }); 63 | this.persist(); 64 | }, 65 | clear: function () { 66 | tasks = []; 67 | active = null; 68 | }, 69 | deleteAllTasks: function () { 70 | this.clear(); 71 | this.persist(); 72 | }, 73 | reorder: function (order) { 74 | var t = []; 75 | order.forEach(function (index) { 76 | t.push(tasks[index]); 77 | }); 78 | tasks = t; 79 | this.persist(); 80 | }, 81 | setActive: function (task) { 82 | active = task; 83 | this.persist(); 84 | }, 85 | active: function () { 86 | return active; 87 | }, 88 | tasks: function () { 89 | return tasks; 90 | }, 91 | get: function (id) { 92 | for (i = 0; i < tasks.length; i++) { 93 | if (tasks[i].id == id) { 94 | return tasks[i]; 95 | } 96 | } 97 | return false; 98 | }, 99 | count: function () { 100 | return Object.keys(tasks).length; 101 | }, 102 | reduceMinutes: function () { 103 | if (!active) return; 104 | active.minutes -= 1; 105 | this.updateTimes(); 106 | this.persist(); 107 | }, 108 | minutesToText: function (m) { 109 | var hours = Math.floor(m / 60); 110 | var minutes = Math.floor(m % 60); 111 | var time = null; 112 | if (m > 0) { 113 | time = hours + "h"; 114 | if (hours == 0) { 115 | time = minutes + "m"; 116 | } else if (hours > 0 && minutes > 0) { 117 | time += " " + minutes + "m"; 118 | } 119 | } 120 | return time; 121 | }, 122 | updateTimes: function () { 123 | tasks.forEach(function (task) { 124 | task.time = this.minutesToText(task.minutes); 125 | }, this); 126 | } 127 | }; 128 | }); -------------------------------------------------------------------------------- /js/controllers/tasks.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'lib/flight.min', 3 | 'data', 4 | 'templates', 5 | 'controllers/task' 6 | ], function (Flight, Data, Templates, TaskController) { 7 | function component() { 8 | this.after("initialize", function (evt) { 9 | 10 | this.els = {}; 11 | 12 | var empty = true; 13 | 14 | var that = this; 15 | 16 | this.on("emptycheck", function (force) { 17 | if ((Data.count() == 0 && !empty) || force == true) { 18 | this.$node.empty(); 19 | this.$node.append(Templates.emptynotice); 20 | empty = true; 21 | } else if (Data.count() > 0 && empty) { 22 | this.$node.empty(); 23 | empty = false; 24 | } 25 | }); 26 | 27 | this.on(document, "tasks:add", function (evt, task) { 28 | if (Data.validateTask(task)) { 29 | var id = Data.push(task); 30 | this.trigger("task:attach", id); 31 | } else { 32 | this.trigger("error", { 33 | text: "Task title needs to filled in and/or task time should be valid" 34 | }); 35 | } 36 | }); 37 | 38 | this.on(document, "tasks:import", function () { 39 | if (Data.count() > 0) { 40 | var tasks = Data.tasks(); 41 | for (i = 0; i < tasks.length; i++) { 42 | if (Data.validateTask(tasks[i])) { 43 | this.trigger("task:attach", tasks[i].id); 44 | } 45 | } 46 | } 47 | this.trigger("tasks:update"); 48 | }); 49 | 50 | this.on(document, "task:attach", function (evt, id) { 51 | this.trigger("emptycheck"); 52 | var el = $(Templates.task.render(Data.get(id))); 53 | TaskController.attachTo(el, { 54 | task: id 55 | }); 56 | this.els[id] = el; 57 | this.$node.append(el); 58 | }); 59 | 60 | this.on(document, "task:delete", function (evt, task) { 61 | $(this.els[task.id]).remove(); 62 | delete this.els[task.id]; 63 | Data.deleteTask(task); 64 | this.trigger("emptycheck"); 65 | this.trigger("tasks:update"); 66 | }); 67 | 68 | this.on(document, "tasks:clear", function () { 69 | this.els = {}; 70 | Data.deleteAllTasks(); 71 | this.trigger("emptycheck", true); 72 | }); 73 | 74 | this.on(document, "tasks:update", function () { 75 | if (Data.active()) { 76 | this.$node.addClass("running"); 77 | } else { 78 | this.$node.removeClass("running"); 79 | } 80 | this.trigger("favicon:update"); 81 | }); 82 | 83 | this.on("tasks:reorder", function () { 84 | 85 | var tasks = Data.tasks(); 86 | var index = {}; 87 | var order = []; 88 | var elements = this.$node.find(".task"); 89 | 90 | for (i = 0, l = tasks.length; i < l; i++) { 91 | index[tasks[i]["id"]] = i; 92 | } 93 | 94 | for (i = 0, l = tasks.length; i < l; i++) { 95 | order.push(index[elements.eq(i).data("task")]); 96 | } 97 | 98 | Data.reorder(order); 99 | }); 100 | 101 | this.$node.sortable({ 102 | items: ".task.row", 103 | handle: ".taskname", 104 | stop: function () { 105 | that.trigger("tasks:reorder"); 106 | } 107 | }); 108 | 109 | this.on(document, "tasks:big", function () { 110 | $("body").toggleClass("big"); 111 | if ($("body").hasClass("big")) { 112 | this.$node.sortable("disable"); 113 | } else { 114 | this.$node.sortable("enable"); 115 | } 116 | }); 117 | }); 118 | } 119 | return Flight.component(component); 120 | } 121 | ); -------------------------------------------------------------------------------- /js/lib/hogan.js: -------------------------------------------------------------------------------- 1 | var Hogan={};(function(a,b){function j(a){return(null===a||void 0===a?"":a)+""}function k(a){return a=j(a),i.test(a)?a.replace(d,"&").replace(e,"<").replace(f,">").replace(g,"'").replace(h,"""):a}a.Template=function(a,c,d,e){this.r=a||this.r,this.c=d,this.options=e,this.text=c||"",this.buf=b?[]:""},a.Template.prototype={r:function(){return""},v:k,t:j,render:function(a,b,c){return this.ri([a],b||{},c)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&"string"==typeof e&&(e=this.c.compile(e,this.options)),e.ri(b,c,d)):""},rs:function(a,b,c){var d=a[a.length-1];if(!l(d))return c(a,b,this),void 0;for(var e=0;d.length>e;e++)a.push(d[e]),c(a,b,this),a.pop()},s:function(a,b,c,d,e,f,g){var h;return l(a)&&0===a.length?!1:("function"==typeof a&&(a=this.ls(a,b,c,d,e,f,g)),h=""===a||!!a,!d&&h&&b&&b.push("object"==typeof a?a:b[b.length-1]),h)},d:function(a,b,c,d){var e=a.split("."),f=this.f(e[0],b,c,d),g=null;if("."===a&&l(b[b.length-2]))return b[b.length-1];for(var h=1;e.length>h;h++)f&&"object"==typeof f&&e[h]in f?(g=f,f=f[e[h]]):f="";return d&&!f?!1:(d||"function"!=typeof f||(b.push(g),f=this.lv(f,b,c),b.pop()),f)},f:function(a,b,c,d){for(var e=!1,f=null,g=!1,h=b.length-1;h>=0;h--)if(f=b[h],f&&"object"==typeof f&&a in f){e=f[a],g=!0;break}return g?(d||"function"!=typeof e||(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=this.options;g.delimiters=e;var d=a.call(b,d);return d=null==d?d+"":""+d,this.b(f.compile(d,g).render(b,c)),!1},b:b?function(a){this.buf.push(a)}:function(a){this.buf+=a},fl:b?function(){var a=this.buf.join("");return this.buf=[],a}:function(){var a=this.buf;return this.buf="",a},ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);if(i=a.call(h),"function"==typeof i){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return"function"==typeof e&&(e=j(e.call(d)),this.c&&~e.indexOf("{{"))?this.c.compile(e,this.options).render(d,c):j(e)}};var d=/&/g,e=//g,g=/\'/g,h=/\"/g,i=/[&<>\"\']/,l=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}})("undefined"!=typeof exports?exports:Hogan),function(a){function i(a){"}"===a.n.substr(a.n.length-1)&&(a.n=a.n.substring(0,a.n.length-1))}function j(a){return a.trim?a.trim():a.replace(/^\s*|\s*$/g,"")}function k(a,b,c){if(b.charAt(c)!=a.charAt(0))return!1;for(var d=1,e=a.length;e>d;d++)if(b.charAt(c+d)!=a.charAt(d))return!1;return!0}function l(a,b,c,d){for(var e=[],f=null,g=null;a.length>0;)if(g=a.shift(),"#"==g.tag||"^"==g.tag||m(g,d))c.push(g),g.nodes=l(a,g.tag,c,d),e.push(g);else{if("/"==g.tag){if(0===c.length)throw Error("Closing tag without opener: /"+g.n);if(f=c.pop(),g.n!=f.n&&!n(g.n,f.n,d))throw Error("Nesting error: "+f.n+" vs. "+g.n);return f.end=g.i,e}e.push(g)}if(c.length>0)throw Error("missing closing tag: "+c.pop().n);return e}function m(a,b){for(var c=0,d=b.length;d>c;c++)if(b[c].o==a.n)return a.tag="#",!0}function n(a,b,c){for(var d=0,e=c.length;e>d;d++)if(c[d].c==a&&c[d].o==b)return!0}function o(a){return a.replace(f,"\\\\").replace(c,'\\"').replace(d,"\\n").replace(e,"\\r")}function p(a){return~a.indexOf(".")?"d":"f"}function q(a){for(var b="",c=0,d=a.length;d>c;c++){var e=a[c].tag;"#"==e?b+=r(a[c].nodes,a[c].n,p(a[c].n),a[c].i,a[c].end,a[c].otag+" "+a[c].ctag):"^"==e?b+=s(a[c].nodes,a[c].n,p(a[c].n)):"<"==e||">"==e?b+=t(a[c]):"{"==e||"&"==e?b+=u(a[c].n,p(a[c].n)):"\n"==e?b+=w('"\\n"'+(a.length-1==c?"":" + i")):"_v"==e?b+=v(a[c].n,p(a[c].n)):void 0===e&&(b+=w('"'+o(a[c])+'"'))}return b}function r(a,b,c,d,e,f){return"if(_.s(_."+c+'("'+o(b)+'",c,p,1),'+"c,p,0,"+d+","+e+',"'+f+'")){'+"_.rs(c,p,"+"function(c,p,_){"+q(a)+"});c.pop();}"}function s(a,b,c){return"if(!_.s(_."+c+'("'+o(b)+'",c,p,1),c,p,1,0,0,"")){'+q(a)+"};"}function t(a){return'_.b(_.rp("'+o(a.n)+'",c,p,"'+(a.indent||"")+'"));'}function u(a,b){return"_.b(_.t(_."+b+'("'+o(a)+'",c,p,0)));'}function v(a,b){return"_.b(_.v(_."+b+'("'+o(a)+'",c,p,0)));'}function w(a){return"_.b("+a+");"}var b=/\S/,c=/\"/g,d=/\n/g,e=/\r/g,f=/\\/g,g={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};a.scan=function(a,c){function v(){o.length>0&&(p.push(new String(o)),o="")}function w(){for(var a=!0,c=s;p.length>c;c++)if(a=p[c].tag&&g[p[c].tag]c;c++)p[c].tag||((d=p[c+1])&&">"==d.tag&&(d.indent=""+p[c]),p.splice(c,1));else b||p.push({tag:"\n"});q=!1,s=p.length}function y(a,b){var c="="+u,d=a.indexOf(c,b),e=j(a.substring(a.indexOf("=",b)+1,d)).split(" ");return t=e[0],u=e[1],d+c.length-1}var d=a.length,e=0,f=1,h=2,l=e,m=null,n=null,o="",p=[],q=!1,r=0,s=0,t="{{",u="}}";for(c&&(c=c.split(" "),t=c[0],u=c[1]),r=0;d>r;r++)l==e?k(t,a,r)?(--r,v(),l=f):"\n"==a.charAt(r)?x(q):o+=a.charAt(r):l==f?(r+=t.length-1,n=g[a.charAt(r+1)],m=n?a.charAt(r+1):"_v","="==m?(r=y(a,r),l=e):(n&&r++,l=h),q=r):k(u,a,r)?(p.push({tag:m,n:j(o),otag:t,ctag:u,i:"/"==m?q-u.length:r+t.length}),o="",r+=u.length-1,l=e,"{"==m&&("}}"==u?r++:i(p[p.length-1]))):o+=a.charAt(r);return x(q,!0),p},a.generate=function(b,c,d){var e='var _=this;_.b(i=i||"");'+q(b)+"return _.fl();";return d.asString?"function(c,p,i){"+e+";}":new a.Template(Function("c","p","i",e),c,a,d)},a.parse=function(a,b,c){return c=c||{},l(a,"",[],c.sectionTags||[])},a.cache={},a.compile=function(a,b){b=b||{};var c=a+"||"+!!b.asString,d=this.cache[c];return d?d:(d=this.generate(this.parse(this.scan(a,b.delimiters),a,b),a,b),this.cache[c]=d)}}("undefined"!=typeof exports?exports:Hogan); -------------------------------------------------------------------------------- /js/controllers/document.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'lib/flight.min', 3 | 'data', 4 | 'templates', 5 | ], function (Flight, Data, Templates) { 6 | function component() { 7 | this.defaultAttrs({ 8 | 'settings-button': "#settings-button" 9 | }); 10 | 11 | this.after("initialize", function (el) { 12 | 13 | var that = this; 14 | var notificationTimer = null; 15 | var minuteTimer = null; 16 | var originalTitle = el.title; 17 | 18 | function startTimer() { 19 | stopTimer(); 20 | minuteTimer = setInterval(function () { 21 | Data.reduceMinutes(); 22 | that.trigger("tasks:update"); 23 | }, 60 * 1000); 24 | } 25 | 26 | function stopTimer() { 27 | clearTimeout(minuteTimer); 28 | } 29 | 30 | this.on("click", { 31 | 'settings-button': function (e) { 32 | $("body").toggleClass("settings").removeClass("credentials"); 33 | e.preventDefault(); 34 | } 35 | }); 36 | 37 | this.on("tasks:pause", function () { 38 | stopTimer(); 39 | Data.setActive(null); 40 | this.trigger("tasks:update"); 41 | }); 42 | 43 | this.on("task:play", function () { 44 | var task = Data.active(); 45 | startTimer(); 46 | this.trigger("favicon:update"); 47 | }); 48 | 49 | this.on("task:complete", function (evt, task) { 50 | Data.setActive(null); 51 | this.trigger("tasks:update"); 52 | this.trigger("notification:complete"); 53 | if (Data.credentials()) { 54 | this.trigger("tasks:save"); 55 | } 56 | }); 57 | 58 | this.on("tasks:update", function (evt, task) { 59 | if (Data.active()) { 60 | var active = Data.active(); 61 | if (active.minutes > 1) { 62 | this.trigger("tasks:save"); 63 | } 64 | } 65 | this.trigger("title:update"); 66 | }); 67 | 68 | this.on("title:update", function () { 69 | if (Data.active()) { 70 | el.title = Data.active().title; 71 | } else { 72 | el.title = originalTitle; 73 | } 74 | }); 75 | 76 | this.on("favicon:update", function () { 77 | var active = Data.active(); 78 | if (active && active._minutes && active.minutes) { 79 | var progress = Math.floor(100 * (1 - (active.minutes / active._minutes))); 80 | Piecon.setProgress(progress); 81 | } else { 82 | Piecon.reset(); 83 | } 84 | }); 85 | 86 | this.on("notification:complete", function () { 87 | var t = originalTitle; 88 | var nt = t + " " + Templates.check; 89 | var count = 10; 90 | var sound = new Howl({ 91 | urls: ['audio/done.mp3', 'audio/done.ogg'] 92 | }).play(); 93 | 94 | clearTimeout(notificationTimer); 95 | notificationTimer = setInterval(function () { 96 | if (count > 0 && count % 2 == 0) { 97 | document.title = nt; 98 | } else if (count > 0 && count % 2 == 1) { 99 | document.title = t; 100 | } else { 101 | clearTimeout(i); 102 | document.title = t; 103 | } 104 | count--; 105 | }, 1000); 106 | }); 107 | 108 | this.on("tasks:open", function () { 109 | this.trigger("credentials:check", { 110 | action: "open", 111 | callback: function () {} 112 | }); 113 | }); 114 | 115 | this.on("tasks:save", function () { 116 | this.trigger("credentials:check", { 117 | action: "save", 118 | callback: function () {} 119 | }); 120 | }); 121 | 122 | this.on("credentials:check", function (evt, object) { 123 | var callback = object.callback; 124 | var action = object.action; 125 | $("body").removeClass("settings"); 126 | if (!Data.credentials()) { 127 | this.trigger("credentials:setup", { 128 | action: action, 129 | callback: function () { 130 | this.trigger("credentials:check", callback); 131 | } 132 | }); 133 | } else { 134 | this.trigger("credentials:hide"); 135 | this.trigger("credentials:" + action, Data.credentials()); 136 | } 137 | }); 138 | 139 | Data.load(); 140 | 141 | this.trigger("tasks:import"); 142 | 143 | startTimer(); 144 | }); 145 | } 146 | return Flight.component(component); 147 | }); -------------------------------------------------------------------------------- /iconic fill/iconic_fill.css: -------------------------------------------------------------------------------- 1 | @font-face { font-family: 'IconicFill'; src: url('iconic_fill.eot'); src: url('iconic_fill.eot?#iefix') format('embedded-opentype'), url('iconic_fill.ttf') format('truetype'), url('iconic_fill.svg#iconic') format('svg'); font-weight: normal; font-style: normal; }.iconic { display:inline-block; font-family: 'IconicFill'; }.lightbulb:before {content:'\e063';}.equalizer:before {content:'\e052';}.brush_alt:before {content:'\e01c';}.move:before {content:'\e03e';}.tag_fill:before {content:'\e02b';}.book_alt2:before {content:'\e06a';}.layers:before {content:'\e01f';}.chat_alt_fill:before {content:'\e007';}.layers_alt:before {content:'\e020';}.cloud_upload:before {content:'\e045';}.chart_alt:before {content:'\e029';}.fullscreen_exit_alt:before {content:'\e051';}.cloud_download:before {content:'\e044';}.paperclip:before {content:'\e08a';}.heart_fill:before {content:'\2764';}.mail:before {content:'\2709';}.pen_alt_fill:before {content:'\e005';}.check_alt:before {content:'\2718';}.battery_charging:before {content:'\e05d';}.lock_fill:before {content:'\e075';}.stop:before {content:'\e04a';}.arrow_up:before {content:'\2191';}.move_horizontal:before {content:'\e038';}.compass:before {content:'\e021';}.minus_alt:before {content:'\e009';}.battery_empty:before {content:'\e05c';}.comment_fill:before {content:'\e06d';}.map_pin_alt:before {content:'\e002';}.question_mark:before {content:'\003f';}.list:before {content:'\e055';}.upload:before {content:'\e043';}.reload:before {content:'\e030';}.loop_alt4:before {content:'\e035';}.loop_alt3:before {content:'\e034';}.loop_alt2:before {content:'\e033';}.loop_alt1:before {content:'\e032';}.left_quote:before {content:'\275d';}.x:before {content:'\2713';}.last:before {content:'\e04d';}.bars:before {content:'\e06f';}.arrow_left:before {content:'\2190';}.arrow_down:before {content:'\2193';}.download:before {content:'\e042';}.home:before {content:'\2302';}.calendar:before {content:'\e001';}.right_quote_alt:before {content:'\e012';}.unlock_fill:before {content:'\e076';}.fullscreen:before {content:'\e04e';}.dial:before {content:'\e058';}.plus_alt:before {content:'\e008';}.clock:before {content:'\e079';}.movie:before {content:'\e060';}.steering_wheel:before {content:'\e024';}.pen:before {content:'\270e';}.pin:before {content:'\e067';}.denied:before {content:'\26d4';}.left_quote_alt:before {content:'\e011';}.volume_mute:before {content:'\e071';}.umbrella:before {content:'\2602';}.list_nested:before {content:'\e056';}.arrow_up_alt1:before {content:'\e014';}.undo:before {content:'\e02f';}.pause:before {content:'\e049';}.bolt:before {content:'\26a1';}.article:before {content:'\e053';}.read_more:before {content:'\e054';}.beaker:before {content:'\e023';}.beaker_alt:before {content:'\e010';}.battery_full:before {content:'\e073';}.arrow_right:before {content:'\2192';}.iphone:before {content:'\e06e';}.arrow_up_alt2:before {content:'\e018';}.cog:before {content:'\2699';}.award_fill:before {content:'\e022';}.first:before {content:'\e04c';}.trash_fill:before {content:'\e05a';}.image:before {content:'\e027';}.comment_alt1_fill:before {content:'\e003';}.cd:before {content:'\e064';}.right_quote:before {content:'\275e';}.brush:before {content:'\e01b';}.cloud:before {content:'\2601';}.eye:before {content:'\e025';}.play_alt:before {content:'\e048';}.transfer:before {content:'\e041';}.pen_alt2:before {content:'\e006';}.camera:before {content:'\e070';}.move_horizontal_alt2:before {content:'\e03a';}.curved_arrow:before {content:'\2935';}.move_horizontal_alt1:before {content:'\e039';}.aperture:before {content:'\e026';}.reload_alt:before {content:'\e031';}.magnifying_glass:before {content:'\e074';}.calendar_alt_fill:before {content:'\e06c';}.fork:before {content:'\e046';}.box:before {content:'\e06b';}.map_pin_fill:before {content:'\e068';}.bars_alt:before {content:'\e00a';}.volume:before {content:'\e072';}.x_alt:before {content:'\2714';}.link:before {content:'\e077';}.move_vertical:before {content:'\e03b';}.eyedropper:before {content:'\e01e';}.spin:before {content:'\e036';}.rss:before {content:'\e02c';}.info:before {content:'\2139';}.target:before {content:'\e02a';}.cursor:before {content:'\e057';}.key_fill:before {content:'\26bf';}.minus:before {content:'\2796';}.book_alt:before {content:'\e00b';}.headphones:before {content:'\e061';}.hash:before {content:'\0023';}.arrow_left_alt1:before {content:'\e013';}.arrow_left_alt2:before {content:'\e017';}.fullscreen_exit:before {content:'\e050';}.share:before {content:'\e02e';}.fullscreen_alt:before {content:'\e04f';}.comment_alt2_fill:before {content:'\e004';}.moon_fill:before {content:'\263e';}.at:before {content:'\0040';}.chat:before {content:'\e05e';}.move_vertical_alt2:before {content:'\e03d';}.move_vertical_alt1:before {content:'\e03c';}.check:before {content:'\2717';}.mic:before {content:'\e05f';}.book:before {content:'\e069';}.move_alt1:before {content:'\e03f';}.move_alt2:before {content:'\e040';}.document_fill:before {content:'\e066';}.plus:before {content:'\2795';}.wrench:before {content:'\e078';}.play:before {content:'\e047';}.star:before {content:'\2605';}.document_alt_fill:before {content:'\e000';}.chart:before {content:'\e028';}.rain:before {content:'\26c6';}.folder_fill:before {content:'\e065';}.new_window:before {content:'\e059';}.user:before {content:'\e062';}.battery_half:before {content:'\e05b';}.aperture_alt:before {content:'\e00c';}.eject:before {content:'\e04b';}.arrow_down_alt1:before {content:'\e016';}.pilcrow:before {content:'\00b6';}.arrow_down_alt2:before {content:'\e01a';}.arrow_right_alt1:before {content:'\e015';}.arrow_right_alt2:before {content:'\e019';}.rss_alt:before {content:'\e02d';}.spin_alt:before {content:'\e037';}.sun_fill:before {content:'\2600';} -------------------------------------------------------------------------------- /js/lib/base64.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: base64.js,v 2.11 2013/04/08 12:27:14 dankogai Exp dankogai $ 3 | * 4 | * Licensed under the MIT license. 5 | * http://opensource.org/licenses/mit-license 6 | * 7 | * References: 8 | * http://en.wikipedia.org/wiki/Base64 9 | */ 10 | 11 | void 12 | function (name, global, callback) { 13 | if (typeof module === 'object') { 14 | module.exports = callback(); 15 | } else if (typeof define === 'function') { 16 | define(callback); 17 | } else { 18 | global[name] = callback(); 19 | } 20 | }("Base64", this, function () { 21 | 22 | 'use strict'; 23 | var version = "2.1.1"; 24 | // if node.js, we use Buffer 25 | var buffer; 26 | if (typeof module !== 'undefined' && module.exports) { 27 | buffer = require('buffer').Buffer; 28 | } 29 | // constants 30 | var b64chars 31 | = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 32 | var b64tab = function(bin) { 33 | var t = {}; 34 | for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; 35 | return t; 36 | }(b64chars); 37 | var fromCharCode = String.fromCharCode; 38 | // encoder stuff 39 | var cb_utob = function(c) { 40 | if (c.length < 2) { 41 | var cc = c.charCodeAt(0); 42 | return cc < 0x80 ? c 43 | : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) 44 | + fromCharCode(0x80 | (cc & 0x3f))) 45 | : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) 46 | + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) 47 | + fromCharCode(0x80 | ( cc & 0x3f))); 48 | } else { 49 | var cc = 0x10000 50 | + (c.charCodeAt(0) - 0xD800) * 0x400 51 | + (c.charCodeAt(1) - 0xDC00); 52 | return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) 53 | + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) 54 | + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) 55 | + fromCharCode(0x80 | ( cc & 0x3f))); 56 | } 57 | }; 58 | var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; 59 | var utob = function(u) { 60 | return u.replace(re_utob, cb_utob); 61 | }; 62 | var cb_encode = function(ccc) { 63 | var padlen = [0, 2, 1][ccc.length % 3], 64 | ord = ccc.charCodeAt(0) << 16 65 | | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) 66 | | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), 67 | chars = [ 68 | b64chars.charAt( ord >>> 18), 69 | b64chars.charAt((ord >>> 12) & 63), 70 | padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), 71 | padlen >= 1 ? '=' : b64chars.charAt(ord & 63) 72 | ]; 73 | return chars.join(''); 74 | }; 75 | var btoa = window.btoa || function(b) { 76 | return b.replace(/[\s\S]{1,3}/g, cb_encode); 77 | }; 78 | var _encode = buffer 79 | ? function (u) { return (new buffer(u)).toString('base64') } 80 | : function (u) { return btoa(utob(u)) } 81 | ; 82 | var encode = function(u, urisafe) { 83 | return !urisafe 84 | ? _encode(u) 85 | : _encode(u).replace(/[+\/]/g, function(m0) { 86 | return m0 == '+' ? '-' : '_'; 87 | }).replace(/=/g, ''); 88 | }; 89 | var encodeURI = function(u) { return encode(u, true) }; 90 | // decoder stuff 91 | var re_btou = new RegExp([ 92 | '[\xC0-\xDF][\x80-\xBF]', 93 | '[\xE0-\xEF][\x80-\xBF]{2}', 94 | '[\xF0-\xF7][\x80-\xBF]{3}' 95 | ].join('|'), 'g'); 96 | var cb_btou = function(cccc) { 97 | switch(cccc.length) { 98 | case 4: 99 | var cp = ((0x07 & cccc.charCodeAt(0)) << 18) 100 | | ((0x3f & cccc.charCodeAt(1)) << 12) 101 | | ((0x3f & cccc.charCodeAt(2)) << 6) 102 | | (0x3f & cccc.charCodeAt(3)), 103 | offset = cp - 0x10000; 104 | return (fromCharCode((offset >>> 10) + 0xD800) 105 | + fromCharCode((offset & 0x3FF) + 0xDC00)); 106 | case 3: 107 | return fromCharCode( 108 | ((0x0f & cccc.charCodeAt(0)) << 12) 109 | | ((0x3f & cccc.charCodeAt(1)) << 6) 110 | | (0x3f & cccc.charCodeAt(2)) 111 | ); 112 | default: 113 | return fromCharCode( 114 | ((0x1f & cccc.charCodeAt(0)) << 6) 115 | | (0x3f & cccc.charCodeAt(1)) 116 | ); 117 | } 118 | }; 119 | var btou = function(b) { 120 | return b.replace(re_btou, cb_btou); 121 | }; 122 | var cb_decode = function(cccc) { 123 | var len = cccc.length, 124 | padlen = len % 4, 125 | n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) 126 | | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) 127 | | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) 128 | | (len > 3 ? b64tab[cccc.charAt(3)] : 0), 129 | chars = [ 130 | fromCharCode( n >>> 16), 131 | fromCharCode((n >>> 8) & 0xff), 132 | fromCharCode( n & 0xff) 133 | ]; 134 | chars.length -= [0, 0, 2, 1][padlen]; 135 | return chars.join(''); 136 | }; 137 | var atob = window.atob || function(a){ 138 | return a.replace(/[\s\S]{1,4}/g, cb_decode); 139 | }; 140 | var _decode = buffer 141 | ? function(a) { return (new buffer(a, 'base64')).toString() } 142 | : function(a) { return btou(atob(a)) }; 143 | var decode = function(a){ 144 | return _decode( 145 | a.replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' }) 146 | .replace(/[^A-Za-z0-9\+\/]/g, '') 147 | ); 148 | }; 149 | // export Base64 150 | var Base64 = { 151 | VERSION: version, 152 | atob: atob, 153 | btoa: btoa, 154 | fromBase64: decode, 155 | toBase64: encode, 156 | utob: utob, 157 | encode: encode, 158 | encodeURI: encodeURI, 159 | btou: btou, 160 | decode: decode 161 | }; 162 | // if ES5 is available, make Base64.extendString() available 163 | if (typeof Object.defineProperty === 'function') { 164 | var noEnum = function(v){ 165 | return {value:v,enumerable:false,writable:true,configurable:true}; 166 | }; 167 | Base64.extendString = function () { 168 | Object.defineProperty( 169 | String.prototype, 'fromBase64', noEnum(function () { 170 | return decode(this) 171 | })); 172 | Object.defineProperty( 173 | String.prototype, 'toBase64', noEnum(function (urisafe) { 174 | return encode(this, urisafe) 175 | })); 176 | Object.defineProperty( 177 | String.prototype, 'toBase64URI', noEnum(function () { 178 | return encode(this, true) 179 | })); 180 | }; 181 | } 182 | // that's it! 183 | 184 | 185 | var exports = Base64; 186 | return exports; 187 | }); -------------------------------------------------------------------------------- /js/lib/es5-shim.min.js: -------------------------------------------------------------------------------- 1 | (function(o){"function"==typeof define?define(o):"function"==typeof YUI?YUI.add("es5",o):o()})(function(){function o(){}function v(a){a=+a;a!==a?a=0:0!==a&&(a!==1/0&&a!==-(1/0))&&(a=(0>>0;if(h(a)!="[object Function]")throw new TypeError;for(;++e>>0,f=Array(e);if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var g=0;g>>0,f=[],g;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var i=0;i>>0;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var f=0;f>>0;if(h(a)!="[object Function]")throw new TypeError(a+" is not a function");for(var f=0;f>>0;if(h(a)!="[object Function]")throw new TypeError(a+ 7 | " is not a function");if(!c&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var e=0,f;if(arguments.length>=2)f=arguments[1];else{do{if(e in d){f=d[e++];break}if(++e>=c)throw new TypeError("reduce of empty array with no initial value");}while(1)}for(;e>>0;if(h(a)!= 8 | "[object Function]")throw new TypeError(a+" is not a function");if(!c&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var e,c=c-1;if(arguments.length>=2)e=arguments[1];else{do{if(c in d){e=d[c--];break}if(--c<0)throw new TypeError("reduceRight of empty array with no initial value");}while(1)}do c in this&&(e=a.call(void 0,e,d[c],c,b));while(c--);return e});if(!Array.prototype.indexOf||-1!=[0,1].indexOf(1,2))Array.prototype.indexOf=function(a){var b=l&& 9 | h(this)=="[object String]"?this.split(""):n(this),d=b.length>>>0;if(!d)return-1;var c=0;arguments.length>1&&(c=v(arguments[1]));for(c=c>=0?c:Math.max(0,d+c);c>>0;if(!d)return-1;var c=d-1;arguments.length>1&&(c=Math.min(c,v(arguments[1])));for(c=c>=0?c:d-Math.abs(c);c>=0;c--)if(c in b&& 10 | a===b[c])return c;return-1};if(!Object.keys){var w=!0,x="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),A=x.length,r;for(r in{toString:null})w=!1;Object.keys=function(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var b=[],d;for(d in a)t(a,d)&&b.push(d);if(w)for(d=0;d9999?"+":"")+("00000"+Math.abs(c)).slice(0<=c&&c<=9999?-4:-6);for(b=a.length;b--;){d=a[b];d<10&&(a[b]="0"+d)}return c+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+ 12 | "Z"};r=!1;try{r=Date.prototype.toJSON&&null===(new Date(NaN)).toJSON()&&-1!==(new Date(-621987552E5)).toJSON().indexOf("-000001")&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(H){}r||(Date.prototype.toJSON=function(){var a=Object(this),b;a:if(s(a))b=a;else{b=a.valueOf;if(typeof b==="function"){b=b.call(a);if(s(b))break a}b=a.toString;if(typeof b==="function"){b=b.call(a);if(s(b))break a}throw new TypeError;}if(typeof b==="number"&&!isFinite(b))return null;b=a.toISOString; 13 | if(typeof b!="function")throw new TypeError("toISOString property is not callable");return b.call(a)});var g=Date,m=function(a,b,d,c,e,f,h){var i=arguments.length;if(this instanceof g){i=i==1&&String(a)===a?new g(m.parse(a)):i>=7?new g(a,b,d,c,e,f,h):i>=6?new g(a,b,d,c,e,f):i>=5?new g(a,b,d,c,e):i>=4?new g(a,b,d,c):i>=3?new g(a,b,d):i>=2?new g(a,b):i>=1?new g(a):new g;i.constructor=m;return i}return g.apply(this,arguments)},u=function(a,b){var d=b>1?1:0;return B[b]+Math.floor((a-1969+d)/4)-Math.floor((a- 14 | 1901+d)/100)+Math.floor((a-1601+d)/400)+365*(a-1970)},C=RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),B=[0,31,59,90,120,151,181,212,243,273,304,334,365],j;for(j in g)m[j]=g[j];m.now=g.now;m.UTC=g.UTC;m.prototype=g.prototype;m.prototype.constructor=m;m.parse=function(a){var b=C.exec(a);if(b){var d=Number(b[1]),c=Number(b[2]||1)-1,e=Number(b[3]||1)-1,f=Number(b[4]||0),h=Number(b[5]||0),i=Number(b[6]|| 15 | 0),j=Number(b[7]||0),m=!b[4]||b[8]?0:Number(new g(1970,0)),k=b[9]==="-"?1:-1,l=Number(b[10]||0),b=Number(b[11]||0);if(f<(h>0||i>0||j>0?24:25)&&h<60&&i<60&&j<1E3&&c>-1&&c<12&&l<24&&b<60&&e>-1&&e=0&&1>=t){r._volume=t,n&&(i.gain.value=t);for(var s in e)if(e.hasOwnProperty(s)&&e[s]._webAudio===!1)for(var o=0;o=2?s[1]:t._urls[i].toLowerCase().match(/data\:audio\/([^?]+);/)[1]){case"mp3":o=u.mp3;break;case"ogg":o=u.ogg;break;case"wav":o=u.wav;break;case"m4a":o=u.m4a;break;case"weba":o=u.webm}if(o===!0){n=t._urls[i];break}}if(n){if(t._src=n,t._webAudio)f(t,n);else{var a=new Audio;t._audioNode.push(a),a.src=n,a._pos=0,a.preload="auto",a.volume=Howler._muted?0:t._volume*Howler.volume(),e[n]=t;var l=function(){t._duration=a.duration,Object.getOwnPropertyNames(t._sprite).length===0&&(t._sprite={_default:[0,t._duration*1e3]}),t._loaded||(t._loaded=!0,t.on("load")),t._autoplay&&t.play(),a.removeEventListener("canplaythrough",l,!1)};a.addEventListener("canplaythrough",l,!1),a.load()}return t}}},urls:function(e){var t=this;return e?(t._urls=e,t.stop(),t.load(),t):t._urls},play:function(e,n){var r=this;return e||(e="_default"),r._loaded?r._sprite[e]?(r._inactiveNode(function(i){i._sprite=e;var s,o=i._pos>0?i._pos:r._sprite[e][0]/1e3,u=r._sprite[e][1]/1e3-i._pos,a=!(!r._loop&&!r._sprite[e][2]),f="string"==typeof n?n:Math.round(Date.now()*Math.random())+"";if(function(){var t={id:f,sprite:e,loop:a};s=setTimeout(function(){!r._webAudio&&a&&r.stop(t.id,t.timer).play(e,t.id),r._webAudio&&!a&&(r._nodeById(t.id).paused=!0),r._webAudio||a||r.stop(t.id,t.timer),r.on("end")},1e3*u),r._onendTimer.push(s),t.timer=r._onendTimer[r._onendTimer.length-1]}(),r._webAudio)i.id=f,i.paused=!1,c(r,[a,o,u],f),r._playStart=t.currentTime,typeof i.bufferSource.start=="undefined"?i.bufferSource.noteGrainOn(0,o,u):i.bufferSource.start(0,o,u);else{if(i.readyState!==4)return r._clearEndTimer(s),function(){var t=r,s=e,o=n,u=i,a=function(){t.play(s,o),u.removeEventListener("canplaythrough",a,!1)};u.addEventListener("canplaythrough",a,!1)}(),r;i.id=f,i.currentTime=o,i.play()}return r.on("play"),"function"==typeof n&&n(f),r}),void 0):("function"==typeof n&&n(),r):(r.on("load",function(){r.play(e,n)}),r)},pause:function(e,n){var r=this;if(!r._loaded)return r.on("play",function(){r.pause(e)}),r;r._clearEndTimer(n||0);var i=e?r._nodeById(e):r._activeNode();if(i)if(r._webAudio){if(!i.bufferSource)return r;i.paused=!0,i._pos+=t.currentTime-r._playStart,typeof i.bufferSource.stop=="undefined"?i.bufferSource.noteOff(0):i.bufferSource.stop(0)}else i._pos=i.currentTime,i.pause();return r.on("pause"),r},stop:function(e,t){var n=this;if(!n._loaded)return n.on("play",function(){n.stop(e)}),n;n._clearEndTimer(t||0);var r=e?n._nodeById(e):n._activeNode();if(r)if(r._pos=0,n._webAudio){if(!r.bufferSource)return n;r.paused=!0,typeof r.bufferSource.stop=="undefined"?r.bufferSource.noteOff(0):r.bufferSource.stop(0)}else r.pause(),r.currentTime=0;return n},mute:function(e){var t=this;if(!t._loaded)return t.on("play",function(){t.mute(e)}),t;var n=e?t._nodeById(e):t._activeNode();return n&&(t._webAudio?n.gain.value=0:n.volume=0),t},unmute:function(e){var t=this;if(!t._loaded)return t.on("play",function(){t.unmute(e)}),t;var n=e?t._nodeById(e):t._activeNode();return n&&(t._webAudio?n.gain.value=t._volume:n.volume=t._volume),t},volume:function(e,t){var n=this;if(e=parseFloat(e,10),!n._loaded)return n.on("play",function(){n.volume(e,t)}),n;if(e>=0&&1>=e){n._volume=e;var r=t?n._nodeById(t):n._activeNode();return r&&(n._webAudio?r.gain.value=e:r.volume=e*Howler.volume()),n}return n._volume},loop:function(e){var t=this;return"boolean"==typeof e?(t._loop=e,t):t._loop},sprite:function(e){var t=this;return"object"==typeof e?(t._sprite=e,t):t._sprite},pos:function(e,n){var r=this;if(!r._loaded)return r.on("load",function(){r.pos(e)}),r;var i=n?r._nodeById(n):r._activeNode();return i?r._webAudio?e>=0?(i._pos=e,r.pause(n).play(i._sprite,n),r):i._pos+(t.currentTime-r._playStart):e>=0?(i.currentTime=e,r):i.currentTime:void 0},pos3d:function(e,t,n,r){var i=this;if(t=void 0!==t&&t?t:0,n=void 0!==n&&n?n:-.5,!i._loaded)return i.on("play",function(){i.pos3d(e,t,n,r)}),i;if(!(e>=0||0>e))return i._pos3d;if(i._webAudio){var s=r?i._nodeById(r):i._activeNode();s&&(i._pos3d=[e,t,n],s.panner.setPosition(e,t,n))}return i},fadeIn:function(e,t,n){var r=this,i=e,s=i/.01,o=t/s;if(!r._loaded)return r.on("load",function(){r.fadeIn(e,t,n)}),r;r.volume(0).play();for(var u=1;s>=u;u++)(function(){var t=Math.round(1e3*(r._volume+.01*u))/1e3,i=e;setTimeout(function(){r.volume(t),t===i&&n&&n()},o*u)})();return r},fadeOut:function(e,t,n,r){var i=this,s=i._volume-e,o=s/.01,u=t/o;if(!i._loaded)return i.on("play",function(){i.fadeOut(e,t,n,r)}),i;for(var a=1;o>=a;a++)(function(){var t=Math.round(1e3*(i._volume-.01*a))/1e3,s=e;setTimeout(function(){i.volume(t,r),t===s&&(n&&n(),i.pause(r),i.on("end"))},u*a)})();return i},_nodeById:function(e){for(var t=this,n=t._audioNode[0],r=0;r=n);e++)t._audioNode[e].paused&&(n--,t._audioNode.splice(e,1))},_clearEndTimer:function(e){var t=this,n=t._onendTimer.indexOf(e);n=n>=0?n:0,t._onendTimer[n]&&(clearTimeout(t._onendTimer[n]),t._onendTimer.splice(n,1))},_setupAudioNode:function(){var e=this,n=e._audioNode,r=e._audioNode.length;return n[r]=typeof t.createGain=="undefined"?t.createGainNode():t.createGain(),n[r].gain.value=e._volume,n[r].paused=!0,n[r]._pos=0,n[r].readyState=4,n[r].connect(i),n[r].panner=t.createPanner(),n[r].panner.setPosition(e._pos3d[0],e._pos3d[1],e._pos3d[2]),n[r].panner.connect(n[r]),n[r]},on:function(e,t){var n=this,r=n["_on"+e];if(t)r.push(t);else for(var i=0;i16){throw ("Decryption error: Maybe bad key")}if(W==16){return""}for(U=0;U<16-W;U++){T+=String.fromCharCode(X[U])}}else{for(U=0;U<16;U++){T+=String.fromCharCode(X[U])}}return T},s=function(V){var T="",U;for(U=0;U=12?3:2,Y=[],V=[],T=[],ab=[],U=X.concat(Z),W;T[0]=GibberishAES.Hash.MD5(U);ab=T[0];for(W=1;W=0;X--){T[X]=J(U[X],aa);T[X]=(X===0)?E(T[X],V):E(T[X],U[X-1])}for(X=0;X-1;T--){U=a(U);U=O(U);U=N(U,V,T);if(T>0){U=R(U)}}return U},O=function(W){var V=g?D:Q,T=[],U;for(U=0;U<16;U++){T[U]=V[W[U]]}return T},a=function(W){var T=[],V=g?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],U;for(U=0;U<16;U++){T[U]=W[V[U]]}return T},R=function(U){var T=[],V;if(!g){for(V=0;V<4;V++){T[V*4]=B[U[V*4]]^f[U[1+V*4]]^U[2+V*4]^U[3+V*4];T[1+V*4]=U[V*4]^B[U[1+V*4]]^f[U[2+V*4]]^U[3+V*4];T[2+V*4]=U[V*4]^U[1+V*4]^B[U[2+V*4]]^f[U[3+V*4]];T[3+V*4]=f[U[V*4]]^U[1+V*4]^U[2+V*4]^B[U[3+V*4]]}}else{for(V=0;V<4;V++){T[V*4]=n[U[V*4]]^k[U[1+V*4]]^I[U[2+V*4]]^h[U[3+V*4]];T[1+V*4]=h[U[V*4]]^n[U[1+V*4]]^k[U[2+V*4]]^I[U[3+V*4]];T[2+V*4]=I[U[V*4]]^h[U[1+V*4]]^n[U[2+V*4]]^k[U[3+V*4]];T[3+V*4]=k[U[V*4]]^I[U[1+V*4]]^h[U[2+V*4]]^n[U[3+V*4]]}}return T},N=function(W,X,U){var T=[],V;for(V=0;V<16;V++){T[V]=W[V]^X[U][V]}return T},E=function(W,V){var T=[],U;for(U=0;U<16;U++){T[U]=W[U]^V[U]}return T},K=function(Y){var T=[],U=[],X,Z,W,aa=[],V;for(X=0;X6&&X%w==4){U=y(U)}}for(W=0;W<4;W++){T[X][W]=T[X-w][W]^U[W]}}for(X=0;X<(p+1);X++){aa[X]=[];for(V=0;V<4;V++){aa[X].push(T[X*4+V][0],T[X*4+V][1],T[X*4+V][2],T[X*4+V][3])}}return aa},y=function(T){for(var U=0;U<4;U++){T[U]=Q[T[U]]}return T},x=function(T){var V=T[0],U;for(U=0;U<4;U++){T[U]=T[U+1]}T[3]=V;return T},b=function(V,U){var T=[];for(i=0;i127)?283^(U<<1):(U<<1);T>>>=1}return V},C=function(T){var V=[];for(var U=0;U<256;U++){V[U]=q(T,U)}return V},Q=b("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16",2),D=j(Q),L=b("01020408102040801b366cd8ab4d9a2f5ebc63c697356ad4b37dfaefc591",2),B=C(2),f=C(3),h=C(9),k=C(11),I=C(13),n=C(14),t=function(X,aa,V){var W=u(8),Z=r(o(aa,V),W),ab=Z.key,U=Z.iv,T,Y=[[83,97,108,116,101,100,95,95].concat(W)];X=o(X,V);T=c(X,ab,U);T=Y.concat(T);return M.encode(T)},v=function(V,Y,aa){var U=M.decode(V),X=U.slice(8,16),Z=r(o(Y,aa),X),W=Z.key,T=Z.iv;U=U.slice(16,U.length);V=A(U,W,T,aa);return V},m=function(X){function W(at,ar){return(at<>>(32-ar))}function ac(aw,at){var ay,ar,av,ax,au;av=(aw&2147483648);ax=(at&2147483648);ay=(aw&1073741824);ar=(at&1073741824);au=(aw&1073741823)+(at&1073741823);if(ay&ar){return(au^2147483648^av^ax)}if(ay|ar){if(au&1073741824){return(au^3221225472^av^ax)}else{return(au^1073741824^av^ax)}}else{return(au^av^ax)}}function al(ar,au,at){return(ar&au)|((~ar)&at)}function ak(ar,au,at){return(ar&at)|(au&(~at))}function aj(ar,au,at){return(ar^au^at)}function Y(ar,au,at){return(au^(ar|(~at)))}function ae(au,at,ay,ax,ar,av,aw){au=ac(au,ac(ac(al(at,ay,ax),ar),aw));return ac(W(au,av),at)}function an(au,at,ay,ax,ar,av,aw){au=ac(au,ac(ac(ak(at,ay,ax),ar),aw));return ac(W(au,av),at)}function V(au,at,ay,ax,ar,av,aw){au=ac(au,ac(ac(aj(at,ay,ax),ar),aw));return ac(W(au,av),at)}function ad(au,at,ay,ax,ar,av,aw){au=ac(au,ac(ac(Y(at,ay,ax),ar),aw));return ac(W(au,av),at)}function af(ay){var az,av=ay.length,au=av+8,at=(au-(au%64))/64,ax=(at+1)*16,aA=[],ar=0,aw=0;while(aw>>29;return aA}function T(au){var av,ar,at=[];for(ar=0;ar<=3;ar++){av=(au>>>(ar*8))&255;at=at.concat(av)}return at}var ab=[],ah,ai,U,aa,ag,aq,ap,ao,am,Z=b("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391",8);ab=af(X);aq=Z[0];ap=Z[1];ao=Z[2];am=Z[3];for(ah=0;ah>2];aa+=V[((ac[Z]&3)<<4)|(ac[Z+1]>>4)];if(!(ac[Z+1]===undefined)){aa+=V[((ac[Z+1]&15)<<2)|(ac[Z+2]>>6)]}else{aa+="="}if(!(ac[Z+2]===undefined)){aa+=V[ac[Z+2]&63]}else{aa+="="}}Y=aa.slice(0,64)+"\n";for(Z=1;Z<(Math.ceil(aa.length/64));Z++){Y+=aa.slice(Z*64,Z*64+64)+(Math.ceil(aa.length/64)==Z+1?"":"\n")}return Y},W=function(Y){Y=Y.replace(/\n/g,"");var aa=[],ab=[],X=[],Z;for(Z=0;Z>4);X[1]=((ab[1]&15)<<4)|(ab[2]>>2);X[2]=((ab[2]&3)<<6)|ab[3];aa.push(X[0],X[1],X[2])}aa=aa.slice(0,aa.length-(aa.length%16));return aa};if(typeof Array.indexOf==="function"){T=V}return{encode:U,decode:W}})();return{size:d,h2a:G,expandKey:K,encryptBlock:e,decryptBlock:J,Decrypt:g,s2a:o,rawEncrypt:c,dec:v,openSSLKey:r,a2h:s,enc:t,Hash:{MD5:m},Base64:M}})();if(typeof define==="function"){define(function(){return GibberishAES})}; -------------------------------------------------------------------------------- /js/lib/require.js: -------------------------------------------------------------------------------- 1 | /* 2 | RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. 3 | Available via the MIT or new BSD license. 4 | see: http://github.com/jrburke/requirejs for details 5 | */ 6 | var requirejs,require,define; 7 | (function(aa){function I(b){return"[object Function]"===L.call(b)}function J(b){return"[object Array]"===L.call(b)}function y(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(I(n)){if(this.events.error)try{e=i.execCb(c,n,b,e)}catch(d){a=d}else e=i.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",v(this.error= 19 | a)}else e=n;this.exports=e;if(this.map.isDefine&&!this.ignore&&(q[c]=e,l.onResourceLoad))l.onResourceLoad(i,this.map,this.depMaps);x(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=j(a.prefix);this.depMaps.push(d);t(d,"defined",u(this,function(e){var n,d;d=this.map.name;var g=this.map.parentMap?this.map.parentMap.name:null,h= 20 | i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,g,!0)})||""),e=j(a.prefix+"!"+d,this.map.parentMap),t(e,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(p,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else n=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=u(this, 21 | function(a){this.inited=!0;this.error=a;a.requireModules=[b];G(p,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&x(a.map.id)});v(a)}),n.fromText=u(this,function(e,c){var d=a.name,g=j(d),C=O;c&&(e=c);C&&(O=!1);r(g);s(k.config,b)&&(k.config[d]=k.config[b]);try{l.exec(e)}catch(ca){return v(B("fromtexteval","fromText eval for "+b+" failed: "+ca,ca,[b]))}C&&(O=!0);this.depMaps.push(g);i.completeLoad(d);h([d],n)}),e.load(a.name,h,n,k)}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]= 22 | this;this.enabling=this.enabled=!0;y(this.depMaps,u(this,function(a,b){var c,e;if("string"===typeof a){a=j(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;t(a,"defined",u(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&t(a,"error",this.errback)}c=a.id;e=p[c];!s(N,c)&&(e&&!e.enabled)&&i.enable(a,this)}));G(this.pluginMaps,u(this,function(a){var b=m(p,a.id);b&&!b.enabled&&i.enable(a, 23 | this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){y(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:k,contextName:b,registry:p,defined:q,urlFetched:U,defQueue:H,Module:Z,makeModuleMap:j,nextTick:l.nextTick,onError:v,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=k.pkgs,c=k.shim,e={paths:!0,config:!0,map:!0};G(a,function(a,b){e[b]? 24 | "map"===b?(k.map||(k.map={}),R(k[b],a,!0,!0)):R(k[b],a,!0):k[b]=a});a.shim&&(G(a.shim,function(a,b){J(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);c[b]=a}),k.shim=c);a.packages&&(y(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ja,"").replace(ea,"")}}),k.pkgs=b);G(p,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=j(b))});if(a.deps||a.callback)i.require(a.deps||[], 25 | a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(aa,arguments));return b||a.exports&&ba(a.exports)}},makeRequire:function(a,f){function d(e,c,h){var g,k;f.enableBuildCallback&&(c&&I(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(I(c))return v(B("requireargs","Invalid require call"),h);if(a&&s(N,e))return N[e](p[a.id]);if(l.get)return l.get(i,e,a,d);g=j(e,a,!1,!0);g=g.id;return!s(q,g)?v(B("notloaded",'Module name "'+g+'" has not been loaded yet for context: '+ 26 | b+(a?"":". Use require([])"))):q[g]}L();i.nextTick(function(){L();k=r(j(null,a));k.skipMap=f.skipMap;k.init(e,c,h,{enabled:!0});D()});return d}f=f||{};R(d,{isBrowser:A,toUrl:function(b){var d,f=b.lastIndexOf("."),g=b.split("/")[0];if(-1!==f&&(!("."===g||".."===g)||1h.attachEvent.toString().indexOf("[native code"))&&!Y?(O=!0,h.attachEvent("onreadystatechange",b.onScriptLoad)):(h.addEventListener("load",b.onScriptLoad,!1),h.addEventListener("error",b.onScriptError,!1)),h.src=d,K=h,D?x.insertBefore(h,D):x.appendChild(h),K=null,h;if(da)try{importScripts(d),b.completeLoad(c)}catch(j){b.onError(B("importscripts","importScripts failed for "+c+" at "+d,j,[c]))}};A&&M(document.getElementsByTagName("script"),function(b){x||(x= 34 | b.parentNode);if(t=b.getAttribute("data-main"))return r.baseUrl||(E=t.split("/"),Q=E.pop(),fa=E.length?E.join("/")+"/":"./",r.baseUrl=fa,t=Q),t=t.replace(ea,""),r.deps=r.deps?r.deps.concat(t):[t],!0});define=function(b,c,d){var l,h;"string"!==typeof b&&(d=c,c=b,b=null);J(c)||(d=c,c=[]);!c.length&&I(d)&&d.length&&(d.toString().replace(la,"").replace(ma,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(l=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"), 35 | function(b){if("interactive"===b.readyState)return P=b}),l=P;l&&(b||(b=l.getAttribute("data-requiremodule")),h=F[l.getAttribute("data-requirecontext")])}(h?h.defQueue:T).push([b,c,d])};define.amd={jQuery:!0};l.exec=function(b){return eval(b)};l(r)}})(this); 36 | -------------------------------------------------------------------------------- /js/lib/flight.min.js: -------------------------------------------------------------------------------- 1 | /*! Flight v1.5.0 | (c) Twitter, Inc. | MIT License */ 2 | !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):"object"==typeof exports?exports.flight=n():t.flight=n()}(this,function(){return function(t){function n(o){if(e[o])return e[o].exports;var i=e[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){var o,i;o=[e(1),e(2),e(3),e(4),e(5),e(6),e(7)],i=function(t,n,e,o,i,r,a){"use strict";return{advice:t,component:n,compose:e,debug:o,logger:i,registry:r,utils:a}}.apply(n,o),!(void 0!==i&&(t.exports=i))},function(t,n,e){var o,i;o=[e(7)],i=function(t){"use strict";var n={around:function(t,n){return function(){var e=0,o=arguments.length,i=new Array(o+1);for(i[0]=t.bind(this);o>e;e++)i[e+1]=arguments[e];return n.apply(this,i)}},before:function(t,n){var e="function"==typeof n?n:n.obj[n.fnName];return function(){return e.apply(this,arguments),t.apply(this,arguments)}},after:function(t,n){var e="function"==typeof n?n:n.obj[n.fnName];return function(){var n=(t.unbound||t).apply(this,arguments);return e.apply(this,arguments),n}},withAdvice:function(){["before","after","around"].forEach(function(e){this[e]=function(o,i){var r=o.trim().split(" ");r.forEach(function(o){t.mutateProperty(this,o,function(){return this[o]="function"==typeof this[o]?n[e](this[o],i):i,this[o]})},this)}},this)}};return n}.apply(n,o),!(void 0!==i&&(t.exports=i))},function(t,n,e){var o,i;o=[e(1),e(7),e(3),e(8),e(6),e(5),e(4)],i=function(t,n,e,o,i,r,a){"use strict";function s(){var t=i.findComponentInfo(this);t&&Object.keys(t.instances).forEach(function(n){var e=t.instances[n];e&&e.instance&&e.instance.teardown()})}function c(t){for(var e=arguments.length,o=new Array(e-1),r=1;e>r;r++)o[r-1]=arguments[r];if(!t)throw new Error("Component needs to be attachTo'd a jQuery object, native node or selector string");var a=n.merge.apply(n,o),s=i.findComponentInfo(this);$(t).each(function(t,n){s&&s.isAttachedTo(n)||(new this).initialize(n,a)}.bind(this))}function u(){var t=this.mixedIn||this.prototype.mixedIn||[];return t.map(function(t){if(null==t.name){var n=t.toString().match(l);return n&&n[1]?n[1]:""}return h[t.name]?"":t.name}).filter(Boolean).join(", ")}function f(){for(var l=arguments.length,h=new Array(l),p=0;l>p;p++)h[p]=arguments[p];var d=function(){};return d.toString=d.prototype.toString=u,a.enabled&&(d.describe=d.prototype.describe=d.toString()),d.attachTo=c,d.mixin=function(){var t=f(),o=Object.create(d.prototype);return o.mixedIn=[].concat(d.prototype.mixedIn),o.defaults=n.merge(d.prototype.defaults),o.attrDef=d.prototype.attrDef,e.mixin(o,arguments),t.prototype=o,t.prototype.constructor=t,t},d.teardownAll=s,a.enabled&&h.unshift(r),h.unshift(o,t.withAdvice,i.withRegistration),e.mixin(d.prototype,h),d}var l=/function (.*?)\s?\(/,h={withBase:!0,withLogging:!0};return f.teardownAll=function(){i.components.slice().forEach(function(t){t.component.teardownAll()}),i.reset()},f}.apply(n,o),!(void 0!==i&&(t.exports=i))},function(t,n,e){var o,i;o=[e(7)],i=function(t){"use strict";function n(n,e){Object.keys(n).forEach(function(i){o.indexOf(i)<0&&t.propertyWritability(n,i,e)})}function e(t,e){t.mixedIn=Object.prototype.hasOwnProperty.call(t,"mixedIn")?t.mixedIn:[];for(var o=0;o",["(",typeof i[o],")"].join(""),i[o]),"[object Object]"==Object.prototype.toString.call(i[o])&&i[o]!=i&&-1==r.split(".").indexOf(o)&&n(t,e,{obj:i[o],path:[r,o].join(".")})})}function e(t,e,o,i){e&&typeof o!=e?console.error([o,"must be",e].join(" ")):n(t,o,i)}function o(t,n){e("name","string",t,n)}function i(t,n){e("nameContains","string",t,n)}function r(t,n){e("type","function",t,n)}function a(t,n){e("value",null,t,n)}function s(t,n){e("valueCoerced",null,t,n)}function c(t,e){n(t,null,e)}function u(){var t=[].slice.call(arguments);y.eventNames.length||(y.eventNames=m),y.actions=t.length?t:m,p()}function f(){var t=[].slice.call(arguments);y.actions.length||(y.actions=m),y.eventNames=t.length?t:m,p()}function l(){y.actions=[],y.eventNames=[],p()}function h(){y.actions=m,y.eventNames=m,p()}function p(){try{window.localStorage&&(localStorage.setItem("logFilter_eventNames",y.eventNames),localStorage.setItem("logFilter_actions",y.actions))}catch(t){}}function d(){var t,n;try{t=window.localStorage&&localStorage.getItem("logFilter_eventNames"),n=window.localStorage&&localStorage.getItem("logFilter_actions")}catch(e){return}t&&(y.eventNames=t),n&&(y.actions=n),Object.keys(y).forEach(function(t){var n=y[t];"string"==typeof n&&n!==m&&(y[t]=n?n.split(","):[])})}var g={name:function(t,n,e){return t==e},nameContains:function(t,n,e){return e.indexOf(t)>-1},type:function(t,n,e){return n[e]instanceof t},value:function(t,n,e){return n[e]===t},valueCoerced:function(t,n,e){return n[e]==t}},m="all",y={eventNames:[],actions:[]};return{enable:function(t){this.enabled=!!t,t&&window.console&&(console.info("Booting in DEBUG mode"),console.info("You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()")),d(),window.DEBUG=this},warn:function(t){if(window.console){var n=console.warn||console.log;n.call(console,this.toString()+": "+t)}},registry:t,find:{byName:o,byNameContains:i,byType:r,byValue:a,byValueCoerced:s,custom:c},events:{logFilter:y,logByAction:u,logByName:f,logAll:h,logNone:l}}}.apply(n,o),!(void 0!==i&&(t.exports=i))},function(t,n,e){var o,i;o=[e(7)],i=function(t){"use strict";function n(t){var n=t.tagName?t.tagName.toLowerCase():t.toString(),e=t.className?"."+t.className:"",o=n+e;return t.tagName?["'","'"].join(o):o}function e(t,e,o){if(window.DEBUG&&window.DEBUG.enabled){var r,a,s,c,u,f,l,h,p,d;"function"==typeof o[o.length-1]&&(c=o.pop(),c=c.unbound||c),1==o.length?(s=e.$node[0],a=o[0]):2!=o.length||"object"!=typeof o[1]||o[1].type?(s=o[0],a=o[1],"trigger"==t&&(u=o[2])):(s=e.$node[0],a=o[0],"trigger"==t&&(u=o[1])),r="object"==typeof a?a.type:a,f=DEBUG.events.logFilter,h="all"==f.actions||f.actions.indexOf(t)>-1,l=function(t){return t.test?t:new RegExp("^"+t.replace(/\*/g,".*")+"$")},p="all"==f.eventNames||f.eventNames.some(function(t){return l(t).test(r)}),h&&p&&(d=[i[t],t,"["+r+"]"],u&&d.push(u),d.push(n(s)),d.push(e.constructor.describe.split(" ").slice(0,3).join(" ")),console.groupCollapsed&&"trigger"==t&&console.groupCollapsed(t,r),Function.prototype.apply.call(console.info,console,d))}}function o(){this.before("trigger",function(){e("trigger",this,t.toArray(arguments))}),console.groupCollapsed&&this.after("trigger",function(){console.groupEnd()}),this.before("on",function(){e("on",this,t.toArray(arguments))}),this.before("off",function(){e("off",this,t.toArray(arguments))})}var i={on:"<-",trigger:"->",off:"x "};return o}.apply(n,o),!(void 0!==i&&(t.exports=i))},function(t,n){var e,o;e=[],o=function(){"use strict";function t(t,n){var e,o,i,r=n.length;return"function"==typeof n[r-1]&&(r-=1,i=n[r]),"object"==typeof n[r-1]&&(r-=1),2==r?(e=n[0],o=n[1]):(e=t.node,o=n[0]),{element:e,type:o,callback:i}}function n(t,n){return t.element==n.element&&t.type==n.type&&(null==n.callback||t.callback==n.callback)}function e(){function e(t){this.component=t,this.attachedTo=[],this.instances={},this.addInstance=function(t){var n=new o(t);return this.instances[t.identity]=n,this.attachedTo.push(t.node),n},this.removeInstance=function(t){delete this.instances[t.identity];var n=this.attachedTo.indexOf(t.node);n>-1&&this.attachedTo.splice(n,1),Object.keys(this.instances).length||i.removeComponentInfo(this)},this.isAttachedTo=function(t){return this.attachedTo.indexOf(t)>-1}}function o(t){this.instance=t,this.events=[],this.addBind=function(t){this.events.push(t),i.events.push(t)},this.removeBind=function(t){for(var e,o=0;e=this.events[o];o++)n(e,t)&&this.events.splice(o,1)}}var i=this;(this.reset=function(){this.components=[],this.allInstances={},this.events=[]}).call(this),this.addInstance=function(t){var n=this.findComponentInfo(t);n||(n=new e(t.constructor),this.components.push(n));var o=n.addInstance(t);return this.allInstances[t.identity]=o,n},this.removeInstance=function(t){var n=this.findComponentInfo(t);n&&n.removeInstance(t),delete this.allInstances[t.identity]},this.removeComponentInfo=function(t){var n=this.components.indexOf(t);n>-1&&this.components.splice(n,1)},this.findComponentInfo=function(t){for(var n,e=t.attachTo?t:t.constructor,o=0;n=this.components[o];o++)if(n.component===e)return n;return null},this.findInstanceInfo=function(t){return this.allInstances[t.identity]||null},this.getBoundEventNames=function(t){return this.findInstanceInfo(t).events.map(function(t){return t.type})},this.findInstanceInfoByNode=function(t){var n=[];return Object.keys(this.allInstances).forEach(function(e){var o=this.allInstances[e];o.instance.node===t&&n.push(o)},this),n},this.on=function(n){for(var e,o=i.findInstanceInfo(this),r=arguments.length,a=1,s=new Array(r-1);r>a;a++)s[a-1]=arguments[a];if(o){e=n.apply(null,s),e&&(s[s.length-1]=e);var c=t(this,s);o.addBind(c)}},this.off=function(){var e=t(this,arguments),o=i.findInstanceInfo(this);o&&o.removeBind(e);for(var r,a=0;r=i.events[a];a++)n(r,e)&&i.events.splice(a,1)},i.trigger=function(){},this.teardown=function(){i.removeInstance(this)},this.withRegistration=function(){this.after("initialize",function(){i.addInstance(this)}),this.around("on",i.on),this.after("off",i.off),window.DEBUG&&(!1).enabled&&this.after("trigger",i.trigger),this.after("teardown",{obj:i,fnName:"teardown"})}}return new e}.apply(n,e),!(void 0!==o&&(t.exports=o))},function(t,n,e){var o,i;o=[e(4)],i=function(t){"use strict";function n(){var n=t.enabled&&!Object.propertyIsEnumerable("getOwnPropertyDescriptor");if(n)try{Object.getOwnPropertyDescriptor(Object,"keys")}catch(e){return!1}return n}var e=100,o={isDomObj:function(t){return!(!t.nodeType&&t!==window)},toArray:function(t,n){n=n||0;for(var e=t.length,o=new Array(e-n),i=n;e>i;i++)o[i-n]=t[i];return o},merge:function(){var t=arguments.length,n=new Array(t+1);if(0===t)return{};for(var e=0;t>e;e++)n[e+1]=arguments[e];return n[0]={},n[n.length-1]===!0&&(n.pop(),n.unshift(!0)),$.extend.apply(void 0,n)},push:function(t,n,e){return t&&Object.keys(n||{}).forEach(function(o){if(t[o]&&e)throw new Error('utils.push attempted to overwrite "'+o+'" while running in protected mode');"object"==typeof t[o]&&"object"==typeof n[o]?this.push(t[o],n[o]):t[o]=n[o]},this),t},getEnumerableProperty:function(t,n){return t.propertyIsEnumerable(n)?t[n]:void 0},compose:function(){var t=arguments;return function(){for(var n=arguments,e=t.length-1;e>=0;e--)n=[t[e].apply(this,n)];return n[0]}},uniqueArray:function(t){for(var n={},e=[],o=0,i=t.length;i>o;++o)n.hasOwnProperty(t[o])||(e.push(t[o]),n[t[o]]=1);return e},debounce:function(t,n,o){"number"!=typeof n&&(n=e);var i,r;return function(){var e=this,a=arguments,s=function(){i=null,o||(r=t.apply(e,a))},c=o&&!i;return i&&clearTimeout(i),i=setTimeout(s,n),c&&(r=t.apply(e,a)),r}},throttle:function(t,n){"number"!=typeof n&&(n=e);var o,i,r,a,s,c,u=this.debounce(function(){s=a=!1},n);return function(){o=this,i=arguments;var e=function(){r=null,s&&(c=t.apply(o,i)),u()};return r||(r=setTimeout(e,n)),a?s=!0:(a=!0,c=t.apply(o,i)),u(),c}},countThen:function(t,n){return function(){return--t?void 0:n.apply(this,arguments)}},delegate:function(t){return function(n,e){var o,i=$(n.target);Object.keys(t).forEach(function(r){return!n.isPropagationStopped()&&(o=i.closest(r)).length?(e=e||{},n.currentTarget=e.el=o[0],t[r].apply(this,[n,e])):void 0},this)}},once:function(t){var n,e;return function(){return n?e:(n=!0,e=t.apply(this,arguments))}},propertyWritability:function(t,e,o){n()&&t.hasOwnProperty(e)&&Object.defineProperty(t,e,{writable:o})},mutateProperty:function(t,e,o){var i;return n()&&t.hasOwnProperty(e)?(i=Object.getOwnPropertyDescriptor(t,e).writable,Object.defineProperty(t,e,{writable:!0}),o.call(t),void Object.defineProperty(t,e,{writable:i})):void o.call(t)}};return o}.apply(n,o),!(void 0!==i&&(t.exports=i))},function(t,n,e){var o,i;o=[e(7),e(6),e(4)],i=function(t,n,e){"use strict";function o(t){t.events.slice().forEach(function(t){var n=[t.type];t.element&&n.unshift(t.element),"function"==typeof t.callback&&n.push(t.callback),this.off.apply(this,n)},t.instance)}function i(t,n){try{window.postMessage(n,"*")}catch(o){e.warn.call(this,['Event "',t,'" was triggered with non-serializable data. ',"Flight recommends you avoid passing non-serializable data in events."].join(""))}}function r(t){e.warn.call(this,['Attribute "',t,'" defaults to an array or object. ',"Enclose this in a function to avoid sharing between component instances."].join(""))}function a(t){var n,o=[];if(this.attr=new this.attrDef,e.enabled&&window.console){for(var i in this.attrDef.prototype)o.push(i);n=Object.keys(t);for(var a=n.length-1;a>=0;a--)if(-1==o.indexOf(n[a])){e.warn.call(this,'Passed unused attribute "'+n[a]+'".');break}}for(var i in this.attrDef.prototype){if("undefined"==typeof t[i]){if(null===this.attr[i])throw new Error('Required attribute "'+i+'" not specified in attachTo for component "'+this.toString()+'".');e.enabled&&"object"==typeof this.attr[i]&&r.call(this,i)}else this.attr[i]=t[i];"function"==typeof this.attr[i]&&(this.attr[i]=this.attr[i].call(this))}}function s(t){var n=Object.create(t);for(var o in this.defaults)t.hasOwnProperty(o)||(n[o]=this.defaults[o],e.enabled&&"object"==typeof this.defaults[o]&&r.call(this,o));this.attr=n,Object.keys(this.defaults||{}).forEach(function(t){if(null===this.defaults[t]&&null===this.attr[t])throw new Error('Required attribute "'+t+'" not specified in attachTo for component "'+this.toString()+'".')},this)}function c(t){return function(n,e){$(n.target).trigger(t,e)}}function u(){this.trigger=function(){var t,n,o,r,a,s=arguments.length-1,c=arguments[s];return"string"==typeof c||c&&c.defaultBehavior||(s--,o=c),1==s?(t=$(arguments[0]),r=arguments[1]):(t=this.$node,r=arguments[0]),r.defaultBehavior&&(a=r.defaultBehavior,r=$.Event(r.type)),n=r.type||r,e.enabled&&window.postMessage&&i.call(this,n,o),"object"==typeof this.attr.eventData&&(o=$.extend(!0,{},this.attr.eventData,o)),t.trigger(r||n,o),a&&!r.isDefaultPrevented()&&(this[a]||a).call(this,r,o),t},this.on=function(){var n,e,o,i,r=arguments.length-1,a=arguments[r];if(i="object"==typeof a?t.delegate(this.resolveDelegateRules(a)):"string"==typeof a?c(a):a,2==r?(n=$(arguments[0]),e=arguments[1]):(n=this.$node,e=arguments[0]),"function"!=typeof i&&"object"!=typeof i)throw new Error('Unable to bind to "'+e+'" because the given callback is not a function or an object');return o=i.bind(this),o.target=i,o.context=this,n.on(e,o),i.bound||(i.bound=[]),i.bound.push(o),o},this.off=function(){var t,e,o,i=arguments.length-1;if("function"==typeof arguments[i]&&(o=arguments[i],i-=1),1==i?(t=$(arguments[0]),e=arguments[1]):(t=this.$node,e=arguments[0]),o){var r=o.target?o.target.bound:o.bound||[];r&&r.some(function(t,n,e){return t.context&&this.identity==t.context.identity?(e.splice(n,1),o=t,!0):void 0},this),t.off(e,o)}else n.findInstanceInfo(this).events.forEach(function(n){e==n.type&&t.off(e,n.callback)});return t},this.resolveDelegateRules=function(t){var n={};return Object.keys(t).forEach(function(e){if(!(e in this.attr))throw new Error('Component "'+this.toString()+'" wants to listen on "'+e+'" but no such attribute was defined.');n[this.attr[e]]="string"==typeof t[e]?c(t[e]):t[e]},this),n},this.select=function(t){return this.$node.find(this.attr[t])},this.attributes=function(t){var n=function(){};this.attrDef&&(n.prototype=new this.attrDef);for(var e in t)n.prototype[e]=t[e];this.attrDef=n},this.defaultAttrs=function(n){t.push(this.defaults,n,!0)||(this.defaults=n)},this.initialize=function(t,n){if(n=n||{},this.identity||(this.identity=f++),!t)throw new Error("Component needs a node");return t.jquery?(this.node=t[0],this.$node=t):(this.node=t,this.$node=$(t)),this.attrDef?a.call(this,n):s.call(this,n),this},this.teardown=function(){o(n.findInstanceInfo(this))}}var f=0;return u}.apply(n,o),!(void 0!==i&&(t.exports=i))}])}); -------------------------------------------------------------------------------- /iconic fill/iconic_fill_demo.html: -------------------------------------------------------------------------------- 1 | Iconic Font-embedding demo
NameIconic IconUnicode IconHexidecimal Code
lightbulbe063
equalizere052
brush_alte01c
movee03e
tag_fille02b
book_alt2e06a
layerse01f
chat_alt_fille007
layers_alte020
cloud_uploade045
chart_alte029
fullscreen_exit_alte051
cloud_downloade044
paperclipe08a
heart_fill2764
mail2709
pen_alt_fille005
check_alt2718
battery_charginge05d
lock_fille075
stope04a
arrow_up2191
move_horizontale038
compasse021
minus_alte009
battery_emptye05c
comment_fille06d
map_pin_alte002
question_mark003f
liste055
uploade043
reloade030
loop_alt4e035
loop_alt3e034
loop_alt2e033
loop_alt1e032
left_quote275d
x2713
laste04d
barse06f
arrow_left2190
arrow_down2193
downloade042
home2302
calendare001
right_quote_alte012
unlock_fille076
fullscreene04e
diale058
plus_alte008
clocke079
moviee060
steering_wheele024
pen270e
pine067
denied26d4
left_quote_alte011
volume_mutee071
umbrella2602
list_nestede056
arrow_up_alt1e014
undoe02f
pausee049
bolt26a1
articlee053
read_moree054
beakere023
beaker_alte010
battery_fulle073
arrow_right2192
iphonee06e
arrow_up_alt2e018
cog2699
award_fille022
firste04c
trash_fille05a
imagee027
comment_alt1_fille003
cde064
right_quote275e
brushe01b
cloud2601
eyee025
play_alte048
transfere041
pen_alt2e006
camerae070
move_horizontal_alt2e03a
curved_arrow2935
move_horizontal_alt1e039
aperturee026
reload_alte031
magnifying_glasse074
calendar_alt_fille06c
forke046
boxe06b
map_pin_fille068
bars_alte00a
volumee072
x_alt2714
linke077
move_verticale03b
eyedroppere01e
spine036
rsse02c
info2139
targete02a
cursore057
key_fill26bf
minus2796
book_alte00b
headphonese061
hash0023
arrow_left_alt1e013
arrow_left_alt2e017
fullscreen_exite050
sharee02e
fullscreen_alte04f
comment_alt2_fille004
moon_fill263e
at0040
chate05e
move_vertical_alt2e03d
move_vertical_alt1e03c
check2717
mice05f
booke069
move_alt1e03f
move_alt2e040
document_fille066
plus2795
wrenche078
playe047
star2605
document_alt_fille000
charte028
rain26c6
folder_fille065
new_windowe059
usere062
battery_halfe05b
aperture_alte00c
ejecte04b
arrow_down_alt1e016
pilcrow00b6
arrow_down_alt2e01a
arrow_right_alt1e015
arrow_right_alt2e019
rss_alte02d
spin_alte037
sun_fill2600
-------------------------------------------------------------------------------- /js/lib/jquery-ui-1.10.2.custom.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.2 - 2013-04-13 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js 4 | * Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ 5 | 6 | (function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.2",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}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.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:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),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(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).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),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(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.2",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||i(this.items[0].item):!1,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?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),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):!1:!1)},_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("").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=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&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):!0)){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,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u=s+l>r&&h>s+l&&e+c>a&&o>e+c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(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&&i||"up"===n&&!i)},_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=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&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]);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(function(){o.push(this)});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;e.length>i;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,h,l,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(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&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],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.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){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t(e.document[0].createElement(s)).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?n.append(" "):"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(s){var n,a,o,r,h,l,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",s,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",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],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||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(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(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,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,h=/(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.leftthis.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():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?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();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(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(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;s.length>i;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;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&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); --------------------------------------------------------------------------------