Commit dcb98e86 authored by Mikael Karon's avatar Mikael Karon

bumped troopjs-bundle to 1.0.1

parent dcc1830f
/*!
* TroopJS RequireJS template plug-in
*
* parts of code from require-cs 0.4.0+ Copyright (c) 2010-2011, The Dojo Foundation
*
* @license TroopJS 0.0.2 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS base component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS deferred component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS pubsub/topic module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS pubsub/hub module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS gadget component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS service component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS util/merge module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS remote/ajax module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS util/uri module
*
* parts of code from parseUri 1.2.2 Copyright Steven Levithan <stevenlevithan.com>
*
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS route/router module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS store/base module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS store/local module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS store/session module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS widget component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS widget/placeholder component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS route/placeholder module
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS widget/application component
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS jQuery action plug-in
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS jQuery destroy plug-in
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS jQuery dimensions plug-in
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS jQuery hashchange plug-in
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
/*!
* TroopJS jQuery weave plug-in
* @license TroopJS 0.0.1 Copyright 2012, Mikael Karon <mikael@karon.se>
* Released under the MIT license.
*/
define("template",[],function(){function j(a){function k(a,c,d){return b[j]=c?'" +'+d+'+ "':'";'+d+'o += "',"<%"+String(j++)+"%>"}function l(a,c){return b[c]}function m(a,b){return i[b]||b}var b=[],j=0;return('function template(data) { var o = "'+a.replace(c,"").replace(d,k).replace(f,m).replace(e,l)+'"; return o; }').replace(g,h)}var b={node:function(){var a=require.nodeRequire("fs");return function(c,d){d(a.readFileSync(c,"utf8"))}},browser:function(){var a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b,c,d;if(typeof XMLHttpRequest!="undefined")c=XMLHttpRequest;else a:{for(d=0;d<3;d++){b=a[d];try{c=ActiveXObject(b);break a}catch(e){}}throw new Error("XHR: XMLHttpRequest not available")}return function(b,d){var e=new c;e.open("GET",b,!0),e.onreadystatechange=function(a){e.readyState===4&&d(e.responseText)},e.send(null)}},rhino:function(){var a="utf-8",b=java.lang.System.getProperty("line.separator");return function(d,e){var f=new java.io.File(d),g=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),a)),h=new java.lang.StringBuffer,i,j="";try{i=g.readLine(),i&&i.length()&&i.charAt(0)===65279&&(i=i.substring(1)),h.append(i);while((i=g.readLine())!==null)h.append(b),h.append(i);j=String(h.toString())}finally{g.close()}e(j)}},borked:function(){return function(){throw new Error("Environment unsupported.")}}},c=/^[\n\t\r]+|[\n\t\r]+$/g,d=/<%(=)?([\S\s]*?)%>/g,e=/<%(\d+)%>/gm,f=/(["\n\t\r])/gm,g=/o \+= "";| \+ ""/gm,h="",i={'"':'\\"',"\n":"\\n"," ":"\\t","\r":"\\r"},k={},l=b[typeof process!="undefined"&&process.versions&&!!process.versions.node?"node":typeof window!="undefined"&&window.navigator&&window.document||typeof importScripts!="undefined"?"browser":typeof Packages!="undefined"?"rhino":"borked"]();return{load:function(a,b,c,d){var e=b.toUrl(a);l(e,function(f){try{f="define(function() { return "+j(f,a,e,d.template)+"; })"}catch(g){throw g.message="In "+e+", "+g.message,g}d.isBuild?k[a]=f:f+="\n//@ sourceURL="+e,c.fromText(a,f),b([a],function(a){c(a)})})},write:function(a,b,c){k.hasOwnProperty(b)&&c.asModule(a+"!"+b,k[b])}}}),function(a){a("compose",[],function(){function a(){}function c(a){if(!a)throw new Error("Compose arguments must be functions or objects");return a}function d(a,b,d){var f,g=b.length;for(;d<g;d++){var h=b[d];if(typeof h=="function"){var i=h.prototype;for(var k in i){f=i[k];var l=i.hasOwnProperty(k);if(typeof f=="function"&&k in a&&f!==a[k]){var n=a[k];f==j?f=n:l||(e(f,k,m([].slice.call(b,0,d),!0))?f=n:e(n,k,m([h],!0))||console.error("Conflicted method "+k+", final composer must explicitly override with correct method."))}f&&f.install&&l&&!e(n,k,m([h],!0))?f.install.call(a,k):a[k]=f}}else for(var k in c(h)){var f=h[k];if(typeof f=="function"){if(f.install){f.install.call(a,k);continue}if(k in a&&f==j)continue}a[k]=f}}return a}function e(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(e[b]==a)return!0}}function f(a,b){function c(){if(b)return b.apply(this,arguments);throw new Error("Decorator not applied")}return c.install=a,c}function g(a){return function(b){return f(function c(d){var e=this[d];(b=this[d]=e?a(this,e,b):b).install=c},b)}}function j(){throw new Error("This method is required and no implementation has been provided")}function k(){var a=[this];return a.push.apply(a,arguments),l.apply(0,a)}function l(e){function h(){var b;this instanceof h?b=this:(a.prototype=g,b=new a);for(var c=0;c<j;c++){var d=i[c],e=d.apply(b,arguments);if(typeof e=="object")if(e instanceof h)b=e;else for(var f in e)e.hasOwnProperty(f)&&(b[f]=e[f])}return b}var f=arguments,g=f.length<2&&typeof f[0]!="function"?f[0]:d(b(c(e)),f,1);h._getBases=function(a){return a?n:i};var i=m(f),j=i.length;typeof f[f.length-1]=="object"&&(f[f.length-1]=g);var n=m(f,!0);return h.extend=k,l.secure||(g.constructor=h),h.prototype=g,h}function m(a,b){function d(a,e){a:for(var f=0;f<a.length;f++){var g=a[f],h=b&&typeof g=="function"?g.prototype:g;if(b||typeof g=="function"){var i=e&&g._getBases;if(i)d(i(b));else{for(var j=0;j<c.length;j++)if(h==c[j])continue a;c.push(h)}}}}var c=[];return d(a,!0),c}var b=Object.create?function(a){return Object.create(typeof a=="function"?a.prototype:a||Object.prototype)}:function(b){a.prototype=typeof b=="function"?b.prototype:b;var c=new a;return a.prototype=null,c};l._setMixin=function(a){d=a},l.Decorator=f,l.around=g(function(a,b,c){return c.call(a,b)}),l.before=g(function(a,b,c){return function(){var a=c.apply(this,arguments);if(a!==h)return b.apply(this,a||arguments)}});var h=l.stop={},i;return l.after=g(function(a,b,c){return function(){var a=b.apply(this,arguments),d=c.apply(this,arguments);return d===i?a:d}}),l.from=function(a,b){return b?(typeof a=="function"?a.prototype:a)[b]:f(function(c){if(!(this[c]=typeof a=="string"?this[a]:(typeof a=="function"?a.prototype:a)[b||c]))throw new Error("Source method "+b+" was not available to be renamed to "+c)})},l.create=function(a){var c=d(b(a),arguments,1),e=arguments.length;for(var f=0;f<e;f++){var g=arguments[f];typeof g=="function"&&(c=g.call(c)||c)}return c},l.required=j,l.apply=function(a,b){return a?d(a,b,0):k.apply.call(l,0,b)},l.call=function(a){return d(a,arguments,1)},l})}(typeof define!="undefined"?define:function(a,b){typeof module!="undefined"?module.exports=b():Compose=b()}),define("troopjs-core/component/base",["compose","config"],function(b,c){var d=0;return b(function(){this.instanceCount=d++},{displayName:"core/component",config:c,toString:function e(){var a=this;return a.displayName+"@"+a.instanceCount}})}),define("troopjs-core/util/deferred",["jquery"],function(b){return b.Deferred}),define("troopjs-core/pubsub/topic",["../component/base"],function(b){var c=Array;return b.extend(function(b,c,d){var e=this;e.topic=b,e.publisher=c,e.parent=d},{displayName:"core/pubsub/topic",toString:function d(){return this.topic},trace:function(){var b=this,d=b.constructor,e,f,g="",h,i;while(b){if(b.constructor===c){for(h=0,i=b.length;h<i;h++)f=b[h],b[h]=f.constructor===d?f.trace():f;g+=b.join(",");break}e=b.parent,g+=e?b.publisher+":":b.publisher,b=e}return g}})}),define("troopjs-core/pubsub/hub",["compose","../component/base","./topic"],function(b,c,d){var e={},f={},g="memory",h="head",i="tail",j="next";return b.create({displayName:"core/pubsub/hub",subscribe:function(b){var c=this,d=arguments.length,k=arguments[1],l=arguments[2],m=arguments[3],n,o,p,q,r;if(k instanceof Function)m=k,l=!1,k=e,n=1;else if(k===!0||k===!1)m=l,l=k,k=e,n=2;else if(l instanceof Function)m=l,l=!1,n=2;else{if(!(m instanceof Function))return c;n=3}if(b in f){o=f[b],p={callback:arguments[n++],context:k},r=i in o?o[i][j]=p:o[h]=p;while(n<d)r=r[j]={callback:arguments[n++],context:k};o[i]=r;if(l&&g in o){l=o[g];if(l.length>0)while(p)p.callback.apply(p.context,l),p=p[j];else while(p)p.callback.call(p.context),p=p[j]}}else{q=r={callback:arguments[n++],context:k};while(n<d)r=r[j]={callback:arguments[n++],context:k};f[b]={head:q,tail:r}}return c},unsubscribe:function(b){var c=arguments.length,d=arguments[1],g=arguments[2],k,l,m,n,o=null;if(d instanceof Function)g=d,d=e,k=1;else{if(!(g instanceof Function))return self;k=2}a:{if(!b in f)break a;l=f[b],n=l[h];while(k<c){g=arguments[k++],m=o=n;do{if(m.callback===g&&m.context===d){if(m===n){n=o=m[j];continue}o[j]=m[j];continue}o=m}while(m=m[j])}n&&o?(l[h]=n,l[i]=o):(delete l[h],delete l[i])}return this},publish:function(b){var c,d;if(b in f){c=f[b],c[g]=arguments,d=c[h];if(arguments.length>0)while(d)d.callback.apply(d.context,arguments),d=d[j];else while(d)d.callback.call(d.context),d=d[j]}else arguments.length>0&&(f[b]=c={},c[g]=arguments);return this}})}),define("troopjs-core/component/gadget",["compose","./base","../util/deferred","../pubsub/hub"],function(b,c,d,e){var f=null,g=Object,h=Function,i=/^hub(?::(\w+))?\/(.+)/,j=/^sig\/(.+)/,k=e.publish,l=e.subscribe,m=e.unsubscribe,n="memory",o="subscriptions",p="__proto__",q=g.getPrototypeOf||(p in g?function(b){return b[p]}:function(b){return b.constructor.prototype});return c.extend(function(){var c=this,__proto__=c,e,g,i,k,l={},m,n,o=null;do a:for(o in __proto__){g=__proto__[o];if(!(g instanceof h))continue;n=j.exec(o);if(n!==f){m=n[1];if(m in l){e=l[m],i=k=e.length;while(i--)if(g===e[i])continue a;e[k]=g}else l[m]=[g]}}while(__proto__=q(__proto__));b.call(c,{signal:function p(p,a){var b=this,c,e,f=a;if(p in l){c=l[p],e=c.length;while(--e)f=d(function(a){var d=c[e],g=f;a.done(function(){d.call(b,p,g)})});c[0].call(b,p,f)}else a&&a.resolve();return b}})},{displayName:"core/component/gadget","sig/initialize":function(b,c){var d=this,g=d[o]=[],j=f,k,l,m;for(j in d){k=d[j];if(!(k instanceof h))continue;l=i.exec(j),l!==f&&(m=l[2],e.subscribe(m,d,l[1]===n,k),g[g.length]=[m,d,k],d[j]=f)}return c&&c.resolve(),d},"sig/finalize":function(b,c){var d=this,f=d[o],g;while(g=f.shift())e.unsubscribe(g[0],g[1],g[2]);return c&&c.resolve(),d},publish:function(){var b=this;return k.apply(e,arguments),b},subscribe:function(){var b=this;return l.apply(e,arguments),b},unsubscribe:function(){var b=this;return m.apply(e,arguments),b},start:function(b){var c=this;return d(function(e){d(function(b){c.signal("initialize",b)}).done(function(){c.signal("start",e)}).fail(e.reject),b&&e.then(b.resolve,b.reject)}),c},stop:function(b){var c=this;return d(function(e){d(function(b){c.signal("stop",b)}).done(function(){c.signal("finalize",e)}).fail(e.reject),b&&e.then(b.resolve,b.reject)}),c}})}),define("troopjs-core/component/service",["./gadget"],function(b){return b.extend({displayName:"core/component/service"})}),define("troopjs-core/util/merge",[],function(){var b=Array,c=Object;return function d(a){var e=this,f=null,g,h,i,j;for(g=0,h=arguments.length;g<h;g++){a=arguments[g];for(f in a)i=a[f],j=i.constructor,f in e?j===b?e[f]=e[f].concat(i):j===c?d.call(e[f],i):e[f]=i:e[f]=i}return e}}),define("troopjs-core/remote/ajax",["../component/service","../pubsub/topic","jquery","../util/merge"],function(b,c,d,e){return b.extend({displayName:"core/remote/ajax","hub/ajax":function(b,f,g){d.ajax(e.call({headers:{"x-request-id":(new Date).getTime(),"x-components":b instanceof c?b.trace():b}},f)).then(g.resolve,g.reject)}})}),define("troopjs-core/util/uri",["compose"],function(b){var c=null,d=Function,e=Array,f=e.prototype,g=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:([^?#]*)(?:\?([^#]*))?(?:#(.*))?)/,h="protocol",i="authority",j="path",k="query",l="anchor",m=["source",h,i,"userInfo","user","password","host","port",j,k,l],n=b.secure;b.secure=!0;var o=b(function(b){if(!b||b.length===0)return;var c=this,d,f,g,h=/(?:&|^)([^&=]*)=?([^&]*)/g;while(d=h.exec(b))f=d[1],f in c?(g=c[f],g instanceof e?g[g.length]=d[2]:c[f]=[g,d[2]]):c[f]=d[2]},{toString:function r(){var a=this,b=c,f=c,g=[],h=0,i;for(b in a){if(a[b]instanceof d)continue;g[h++]=b}g.sort();while(h--){b=g[h],f=a[b];if(f instanceof e){f=f.slice(0),f.sort(),i=f.length;while(i--)f[i]=b+"="+f[i];g[h]=f.join("&")}else g[h]=b+"="+f}return g.join("&")}}),p=b(f,function(b){if(!b||b.length===0)return;var c=this,d,e=/(?:\/|^)([^\/]*)/g;while(d=e.exec(b))c.push(d[1])},{toString:function s(){return this.join("/")}}),q=b(function(b){var c=this,d=g.exec(b),e=d.length,f;while(e--)f=d[e],f&&(c[m[e]]=f);k in c&&(c[k]=o(c[k])),j in c&&(c[j]=p(c[j]))},{toString:function t(){var a=this,b=[h,"://",i,j,"?",k,"#",l],c,d;h in a||b.splice(0,3),j in a||b.splice(0,1),l in a||b.splice(-2,2),k in a||b.splice(-2,2),c=b.length;while(c--)d=b[c],d in a&&(b[c]=a[d]);return b.join("")}});return b.secure=n,q}),define("troopjs-core/route/router",["../component/service","../util/uri"],function(b,c){function h(a){var b=a.data,d=c(a.target.location.hash.replace(g,"")),e=d.toString();e!==b[f]&&(b[f]=e,b.publish(f,d))}var d="hashchange",e="$element",f="route",g=/^#/;return b.extend(function(b){this[e]=b},{displayName:"core/route/router","sig/initialize":function(b,c){var f=this;return f[e].bind(d,f,h),c&&c.resolve(),f},"sig/start":function(b,c){var f=this;return f[e].trigger(d),c&&c.resolve(),f},"sig/finalize":function(b,c){var f=this;return f[e].unbind(d,h),c&&c.resolve(),f}})}),define("troopjs-core/store/base",["compose","../component/gadget"],function(b,c){var d="storage";return c.extend({storage:b.required,set:function(b,c,e){this[d].setItem(b,JSON.stringify(c)),e&&e.resolve(c)},get:function(b,c){var e=JSON.parse(this[d].getItem(b));c&&c.resolve(e)},remove:function(b,c){this[d].removeItem(b),c&&c.resolve()},clear:function(b){this[d].clear(),b&&b.resolve()}})}),define("troopjs-core/store/local",["compose","./base"],function(b,c){return b.create(c,{displayName:"core/store/local",storage:window.localStorage})}),define("troopjs-core/store/session",["compose","./base"],function(b,c){return b.create(c,{displayName:"core/store/session",storage:window.sessionStorage})}),define("troopjs-core/component/widget",["./gadget","jquery","../util/deferred"],function(b,c,d){function x(a,b,c){return function(){return j.call(arguments,a),c.apply(b,arguments)}}function y(a){function b(){var b=this,c=b[r],e=arguments,h=i.call(e),j=e.length,l=j>0&&e[j-1][u]instanceof f?k.call(e):g;return a.call(c,h instanceof f?h.apply(b,e):h),d(function(b){c.find(v).weave(b),b.done(function(){c.trigger(q,arguments)}),l&&b.then(l.resolve,l.reject)}),b}return b}var e=null,f=Function,g=undefined,h=Array.prototype,i=h.shift,j=h.unshift,k=h.pop,l=c.fn.trigger,m=c.fn.one,n=c.fn.bind,o=c.fn.unbind,p=/^dom(?::(\w+))?\/([^\.]+(?:\.(.+))?)/,q="widget/refresh",r="$element",s="$proxies",t="one",u="then",v="[data-weave]",w="[data-woven]";return b.extend(function(b,c){var d=this;d[r]=b,c&&(d.displayName=c)},{displayName:"core/component/widget","sig/initialize":function(b,c){var d=this,g=d[r],h=d[s]=[],i=e,j,k,l;for(i in d){j=d[i];if(!(j instanceof f))continue;k=p.exec(i),k!==e&&(l=k[2],j=x(l,d,j),(k[2]===t?m:n).call(g,l,d,j),h[h.length]=[l,j],d[i]=e)}return c&&c.resolve(),d},"sig/finalize":function(b,c){var d=this,e=d[r],f=d[s],g;while(g=f.shift())e.unbind(g[0],g[1]);return c&&c.resolve(),d},weave:function(b){var c=this;return c[r].find(v).weave(b),c},unweave:function(){var b=this;return b[r].find(w).andSelf().unweave(),this},one:function(){var b=this;return m.apply(b[r],arguments),b},bind:function(){var b=this;return n.apply(b[r],arguments),b},unbind:function(){var b=this;return o.apply(b[r],arguments),b},trigger:function(){var b=this;return l.apply(b[r],arguments),b},before:y(c.fn.before),after:y(c.fn.after),html:y(c.fn.html),text:y(c.fn.text),append:y(c.fn.append),prepend:y(c.fn.prepend),empty:function(b){var c=this;return d(function(d){var e=c[r],f=e.contents().detach();e.trigger(q,c),setTimeout(function(){var b=f.get();f.remove(),d.resolve(b)},0),b&&d.then(b.resolve,b.reject)}),c}})}),define("troopjs-core/widget/placeholder",["../component/widget","../util/deferred"],function(b,c){function n(){var a=this,b=arguments,f=b.length,g=f>0&&b[f-1][m]instanceof e?h.call(b):d;return c(function(e){var f,h,m,n;if(i in a)e.resolve(a[i]);else{e.done(function(c){a[k].attr(j,c),a[i]=c}),m=a[l],n=[a[k],m];for(f=0,h=b.length;f<h;f++)n[f+2]=b[f];require([m],function(b){var d=b.apply(b,n);c(function(b){d.start(b)}).done(function(){e.resolve(d)}).fail(e.reject)})}g&&e.then(g.resolve,g.reject)}),a}function o(a){var b=this;return c(function(e){var f;i in b?(f=b[i],delete b[i],b[k].removeAttr(j),c(function(b){f.stop(b)}).then(e.resolve,e.reject)):e.resolve(),a&&dfd.then(a.resolve,a.reject)}),b}var d=undefined,e=Function,f=Array,g=f.prototype,h=g.pop,i="holding",j="data-"+i,k="$element",l="target",m="then";return b.extend(function(b,c,d){this[l]=d},{displayName:"core/widget/placeholder",release:n,hold:o,finalize:o})}),define("troopjs-core/route/placeholder",["../widget/placeholder"],function(b){var c=null,d="route";return b.extend(function(b,c){this[d]=RegExp(b.data("route"))},{displayName:"core/route/placeholder","hub:memory/route":function(b,e){var f=this,g=f[d].exec(e.path);g!==c?f.release.apply(f,g.slice(1)):f.hold()}})}),define("troopjs-core/widget/application",["../component/widget","../util/deferred"],function(b,c){return b.extend({displayName:"core/widget/application","sig/start":function(b,c){var d=this;return d.weave(c),d},"sig/stop":function(b,c){var d=this;return d.unweave(c),d}})}),define("troopjs-jquery/action",["jquery"],function(b){function p(a,b){return a?a+"."+g:e}function q(a){var c=b(this),e=f.call(arguments,1),h=i in a?a[i].type:g,j=a[g];a.type=g+"/"+j+"."+h,c.trigger(a,e),a.result!==d&&(a.type=g+"/"+j+"!",c.trigger(a,e),a.result!==d&&(a.type=g+"."+h,c.trigger(a,e)))}function r(a){var d=b(a.target).closest("[data-action]");if(d.length===0)return;var f=d.data(),i=j.exec(f[g]);if(i===e)return;var p=i[1],q=i[2],r=i[3];if(q!==c&&!RegExp(q.split(l).join("|")).test(a.type))return;var s=r!==c?r.split(k):[];b.each(s,function(b,d){d in f?s[b]=f[d]:m.test(d)?s[b]=d.slice(1,-1):n.test(d)?s[b]=Number(d):o.test(d)?s[b]=d===h:s[b]=c}),d.trigger(b.Event(a,{type:g+"!",action:p}),s),a.stopPropagation()}var c=undefined,d=!1,e=null,f=Array.prototype.slice,g="action",h="true",i="originalEvent",j=/^([\w\d\s_\-\/]+)(?:\.([\w\.]+))?(?:\((.*)\))?$/,k=/\s*,\s*/,l=/\.+/,m=/^(["']).*\1$/,n=/^\d+$/,o=/^false|true$/i;b.event.special[g]={setup:function(c,d,e){b(this).bind(g,c,q)},add:function(c){var d=b.map(c.namespace.split(l),p);d.length!==0&&b(this).bind(d.join(" "),r)},remove:function(c){var d=b.map(c.namespace.split(l),p);d.length!==0&&b(this).unbind(d.join(" "),r)},teardown:function(c){b(this).unbind(g,q)}},b.fn[g]=function(c){return b(this).trigger({type:g+"!",action:c},f.call(arguments,1))}}),define("troopjs-jquery/destroy",["jquery"],function(b){b.event.special.destroy={remove:function(c){var d=this;c.handler.call(d,b.Event({type:c.type,data:c.data,namespace:c.namespace,target:d}))}}}),define("troopjs-jquery/dimensions",["jquery"],function(b){function j(a,b){return a<b?1:a>b?-1:0}function k(a){var c=b(this),e=c.width(),j=c.height();b.each(c.data(d),function(k,l){var m=l[f],n=m.length-1,o=l[g],p=o.length-1,q=b.grep(m,function(a,b){return a<=e||b===n})[0],r=b.grep(o,function(a,b){return a<=j||b===p})[0];if(q!==l[h]||r!==l[i])l[h]=q,l[i]=r,c.trigger(d+"."+k,[q,r])})}var c=/(w|h)(\d*)/g,d="dimensions",e="resize."+d,f="w",g="h",h="_"+f,i="_"+g;b.event.special[d]={setup:function(c,f,g){b(this).bind(e,k).data(d,{})},add:function(e){var h=e.namespace,i={},k=i[f]=[],l=i[g]=[],m;while(m=c.exec(h))i[m[1]].push(parseInt(m[2]));k.sort(j),l.sort(j),b.data(this,d)[h]=i},remove:function(c){delete b.data(this,d)[c.namespace]},teardown:function(c){b(this).removeData(d).unbind(e,k)}}}),define("troopjs-jquery/hashchange",["jquery"],function(b){function i(a){var b=f.exec(a.location.href);return b&&b[1]?decodeURIComponent(b[1]):""}function j(a){var b=this,c;b.element=c=a.createElement("iframe"),c.src="about:blank",c.style.display="none"}var c="interval",d="hashchange",e="on"+d,f=/#(.*)$/,g=/\?/,h=!1;j.prototype={getElement:function(){return this.element},getHash:function(){return this.element.contentWindow.frameHash},update:function(b){var c=this,d=c.element.contentWindow.document;if(c.getHash()===b)return;d.open(),d.write("<html><head><title>' + document.title + '</title><script type='text/javascript'>var frameHash='"+b+"';</script></head><body>&nbsp;</body></html>"),d.close()}},b.event.special[d]={setup:function(f,k,l){var m=this;if(e in m)return!1;if(!b.isWindow(m))throw new Error("Unable to bind 'hashchange' to a non-window object");var n=b(m),o=i(m),p=m.location;n.data(c,m.setInterval(h?function(){var b=m.document,c=p.protocol==="file:",e=new j(b);return b.body.appendChild(e.getElement()),e.update(o),function(){var b=o,f,h=i(m),j=e.getHash();j!==o&&j!==h?(f=decodeURIComponent(j),o!==f&&(o=f,e.update(o),n.trigger(d,[f,b])),p.hash="#"+encodeURI(c?j.replace(g,"%3F"):j)):h!==o&&(f=decodeURIComponent(h),o!==f&&(o=f,n.trigger(d,[f,b])))}}():function(){var b=o,c,e=i(m);e!==o&&(c=decodeURIComponent(e),o!==c&&(o=c,n.trigger(d,[c,b])))},25))},teardown:function(d){var f=this;if(e in f)return!1;f.clearInterval(b.data(f,c))}}}),define("troopjs-jquery/weave",["jquery"],function(b){function x(a){b(this).unweave()}var c=undefined,d=!0,e=Array,f=Function,g=e.prototype,h=g.join,i=g.pop,j=b.when,k="then",l="weave",m="unweave",n="woven",o="destroy",p="data-"+l,q="data-"+n,r="["+p+"]",s="["+q+"]",t=/\s*,\s*/,u=/^(["']).*\1$/,v=/^\d+$/,w=/^false|true$/i;b.fn[l]=function(){var e=[],g=0,m=b(this),s=arguments,y=s.length,z=y>0&&s[y-1][k]instanceof f?i.call(s):c;return m.filter(r).each(function(f,i){var k=b(i),m=k.data(),r=k.attr(p)||"",y=/[\s,]*([\w_\-\/]+)(?:\(([^\)]+)\))?/g,z=[],A=g,B=0,C;k.data(l,r).data(n,z).removeAttr(p);while(C=y.exec(r))b.Deferred(function(f){var h=B++,i,j,l,n;e[g++]=f,f.done(function(b){z[h]=b});var p=C[1],q=[k,p];for(i=0,l=s.length,j=q.length;i<l;i++,j++)q[j]=s[i];var r=C[2];if(r!==c){r=r.split(t);for(i=0,l=r.length,j=q.length;i<l;i++,j++)n=r[i],n in m?q[j]=m[n]:u.test(n)?q[j]=n.slice(1,-1):v.test(n)?q[j]=Number(n):w.test(n)?q[j]=n===d:q[j]=n}require([p],function(c){var d=c.apply(c,q).bind(o,x);b.Deferred(function(b){d.start(b)}).done(function(){f.resolve(d)}).fail(f.reject)})});j.apply(b,e.slice(A,g)).done(function(){k.attr(q,h.call(arguments," "))})}),z&&j.apply(b,e).then(z.resolve,z.reject),m},b.fn[m]=function(c){var d=[],e=0,f=b(this);return f.filter(s).each(function(c,f){var g=b(f),h=g.data(n),i;g.removeData(n).removeAttr(q);while(i=h.shift())b.Deferred(function(b){d[e++]=b,i.stop(b)});g.attr(p,g.data(l)).removeData(l).unbind(o,x)}),c&&j.apply(b,d).then(c.resolve,c.reject),f}})
\ No newline at end of file
define("template",[],function(){function j(a){function k(a,c,d){return b[j]=c?'" +'+d+'+ "':'";'+d+'o += "',"<%"+String(j++)+"%>"}function l(a,c){return b[c]}function m(a,b){return i[b]||b}var b=[],j=0;return('function template(data) { var o = "'+a.replace(c,"").replace(d,k).replace(f,m).replace(e,l)+'"; return o; }').replace(g,h)}var b={node:function(){var a=require.nodeRequire("fs");return function(c,d){d(a.readFileSync(c,"utf8"))}},browser:function(){var a=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b,c,d;if(typeof XMLHttpRequest!="undefined")c=XMLHttpRequest;else a:{for(d=0;d<3;d++){b=a[d];try{c=ActiveXObject(b);break a}catch(e){}}throw new Error("XHR: XMLHttpRequest not available")}return function(b,d){var e=new c;e.open("GET",b,!0),e.onreadystatechange=function(a){e.readyState===4&&d(e.responseText)},e.send(null)}},rhino:function(){var a="utf-8",b=java.lang.System.getProperty("line.separator");return function(d,e){var f=new java.io.File(d),g=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),a)),h=new java.lang.StringBuffer,i,j="";try{i=g.readLine(),i&&i.length()&&i.charAt(0)===65279&&(i=i.substring(1)),h.append(i);while((i=g.readLine())!==null)h.append(b),h.append(i);j=String(h.toString())}finally{g.close()}e(j)}},borked:function(){return function(){throw new Error("Environment unsupported.")}}},c=/^[\n\t\r]+|[\n\t\r]+$/g,d=/<%(=)?([\S\s]*?)%>/g,e=/<%(\d+)%>/gm,f=/(["\n\t\r])/gm,g=/o \+= "";| \+ ""/gm,h="",i={'"':'\\"',"\n":"\\n","\t":"\\t","\r":"\\r"},k={},l=b[typeof process!="undefined"&&process.versions&&!!process.versions.node?"node":typeof window!="undefined"&&window.navigator&&window.document||typeof importScripts!="undefined"?"browser":typeof Packages!="undefined"?"rhino":"borked"]();return{load:function(a,b,c,d){var e=b.toUrl(a);l(e,function(f){try{f="define(function() { return "+j(f,a,e,d.template)+"; })"}catch(g){throw g.message="In "+e+", "+g.message,g}d.isBuild?k[a]=f:f+="\n//@ sourceURL="+e,c.fromText(a,f),b([a],function(a){c(a)})})},write:function(a,b,c){k.hasOwnProperty(b)&&c.asModule(a+"!"+b,k[b])}}}),function(a){a("compose",[],function(){function a(){}function c(a){if(!a)throw new Error("Compose arguments must be functions or objects");return a}function d(a,b,d){var f,g=b.length;for(;d<g;d++){var h=b[d];if(typeof h=="function"){var i=h.prototype;for(var k in i){f=i[k];var l=i.hasOwnProperty(k);if(typeof f=="function"&&k in a&&f!==a[k]){var n=a[k];f==j?f=n:l||(e(f,k,m([].slice.call(b,0,d),!0))?f=n:e(n,k,m([h],!0))||console.error("Conflicted method "+k+", final composer must explicitly override with correct method."))}f&&f.install&&l&&!e(n,k,m([h],!0))?f.install.call(a,k):a[k]=f}}else for(var k in c(h)){var f=h[k];if(typeof f=="function"){if(f.install){f.install.call(a,k);continue}if(k in a&&f==j)continue}a[k]=f}}return a}function e(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(e[b]==a)return!0}}function f(a,b){function c(){if(b)return b.apply(this,arguments);throw new Error("Decorator not applied")}return c.install=a,c}function g(a){return function(b){return f(function c(d){var e=this[d];(b=this[d]=e?a(this,e,b):b).install=c},b)}}function j(){throw new Error("This method is required and no implementation has been provided")}function k(){var a=[this];return a.push.apply(a,arguments),l.apply(0,a)}function l(e){function h(){var b;this instanceof h?b=this:(a.prototype=g,b=new a);for(var c=0;c<j;c++){var d=i[c],e=d.apply(b,arguments);if(typeof e=="object")if(e instanceof h)b=e;else for(var f in e)e.hasOwnProperty(f)&&(b[f]=e[f])}return b}var f=arguments,g=f.length<2&&typeof f[0]!="function"?f[0]:d(b(c(e)),f,1);h._getBases=function(a){return a?n:i};var i=m(f),j=i.length;typeof f[f.length-1]=="object"&&(f[f.length-1]=g);var n=m(f,!0);return h.extend=k,l.secure||(g.constructor=h),h.prototype=g,h}function m(a,b){function d(a,e){a:for(var f=0;f<a.length;f++){var g=a[f],h=b&&typeof g=="function"?g.prototype:g;if(b||typeof g=="function"){var i=e&&g._getBases;if(i)d(i(b));else{for(var j=0;j<c.length;j++)if(h==c[j])continue a;c.push(h)}}}}var c=[];return d(a,!0),c}var b=Object.create?function(a){return Object.create(typeof a=="function"?a.prototype:a||Object.prototype)}:function(b){a.prototype=typeof b=="function"?b.prototype:b;var c=new a;return a.prototype=null,c};l._setMixin=function(a){d=a},l.Decorator=f,l.around=g(function(a,b,c){return c.call(a,b)}),l.before=g(function(a,b,c){return function(){var a=c.apply(this,arguments);if(a!==h)return b.apply(this,a||arguments)}});var h=l.stop={},i;return l.after=g(function(a,b,c){return function(){var a=b.apply(this,arguments),d=c.apply(this,arguments);return d===i?a:d}}),l.from=function(a,b){return b?(typeof a=="function"?a.prototype:a)[b]:f(function(c){if(!(this[c]=typeof a=="string"?this[a]:(typeof a=="function"?a.prototype:a)[b||c]))throw new Error("Source method "+b+" was not available to be renamed to "+c)})},l.create=function(a){var c=d(b(a),arguments,1),e=arguments.length;for(var f=0;f<e;f++){var g=arguments[f];typeof g=="function"&&(c=g.call(c)||c)}return c},l.required=j,l.apply=function(a,b){return a?d(a,b,0):k.apply.call(l,0,b)},l.call=function(a){return d(a,arguments,1)},l})}(typeof define!="undefined"?define:function(a,b){typeof module!="undefined"?module.exports=b():Compose=b()}),define("troopjs-core/component/base",["compose","config"],function(b,c){var d=0;return b(function(){this.instanceCount=d++},{displayName:"core/component",config:c,toString:function e(){var a=this;return a.displayName+"@"+a.instanceCount}})}),define("troopjs-core/util/deferred",["jquery"],function(b){return b.Deferred}),define("troopjs-core/pubsub/topic",["../component/base"],function(b){var c=Array;return b.extend(function(b,c,d){var e=this;e.topic=b,e.publisher=c,e.parent=d},{displayName:"core/pubsub/topic",toString:function d(){return this.topic},trace:function(){var b=this,d=b.constructor,e,f,g="",h,i;while(b){if(b.constructor===c){for(h=0,i=b.length;h<i;h++)f=b[h],b[h]=f.constructor===d?f.trace():f;g+=b.join(",");break}e=b.parent,g+=e?b.publisher+":":b.publisher,b=e}return g}})}),define("troopjs-core/pubsub/hub",["compose","../component/base","./topic"],function(b,c,d){var e={},f={},g="memory",h="head",i="tail",j="next";return b.create({displayName:"core/pubsub/hub",subscribe:function(b){var c=this,d=arguments.length,k=arguments[1],l=arguments[2],m=arguments[3],n,o,p,q,r;if(k instanceof Function)m=k,l=!1,k=e,n=1;else if(k===!0||k===!1)m=l,l=k,k=e,n=2;else if(l instanceof Function)m=l,l=!1,n=2;else if(m instanceof Function)n=3;else return c;if(b in f){o=f[b],p={callback:arguments[n++],context:k},r=i in o?o[i][j]=p:o[h]=p;while(n<d)r=r[j]={callback:arguments[n++],context:k};o[i]=r;if(l&&g in o){l=o[g];if(l.length>0)while(p)p.callback.apply(p.context,l),p=p[j];else while(p)p.callback.call(p.context),p=p[j]}}else{q=r={callback:arguments[n++],context:k};while(n<d)r=r[j]={callback:arguments[n++],context:k};f[b]={head:q,tail:r}}return c},unsubscribe:function(b){var c=arguments.length,d=arguments[1],g=arguments[2],k,l,m,n,o=null;if(d instanceof Function)g=d,d=e,k=1;else if(g instanceof Function)k=2;else return self;a:{if(!b in f)break a;l=f[b],n=l[h];while(k<c){g=arguments[k++],m=o=n;do{if(m.callback===g&&m.context===d){if(m===n){n=o=m[j];continue}o[j]=m[j];continue}o=m}while(m=m[j])}n&&o?(l[h]=n,l[i]=o):(delete l[h],delete l[i])}return this},publish:function(b){var c,d;if(b in f){c=f[b],c[g]=arguments,d=c[h];if(arguments.length>0)while(d)d.callback.apply(d.context,arguments),d=d[j];else while(d)d.callback.call(d.context),d=d[j]}else arguments.length>0&&(f[b]=c={},c[g]=arguments);return this}})}),define("troopjs-core/component/gadget",["compose","./base","../util/deferred","../pubsub/hub"],function(b,c,d,e){var f=null,g=Function,h=/^hub(?::(\w+))?\/(.+)/,i=/^sig\/(.+)/,j=e.publish,k=e.subscribe,l=e.unsubscribe,m="memory",n="subscriptions";return c.extend(function(){var c=this,e=c.constructor._getBases(!0),h,j,k,l,m,n,o={},p,q,r=null;for(l=e.length;l>=0;l--){h=e[l];a:for(r in h){k=h[r];if(!(k instanceof g))continue;q=i.exec(r);if(q!==f){p=q[1];if(p in o){j=o[p],m=n=j.length;while(m--)if(k===j[m])continue a;j[n]=k}else o[p]=[k]}}}b.call(c,{signal:function s(s,a){var b=this,c,e,f=a;if(s in o){c=o[s],e=c.length;while(--e)f=d(function(a){var d=c[e],g=f;a.done(function(){d.call(b,s,g)})});c[0].call(b,s,f)}else a&&a.resolve();return b}})},{displayName:"core/component/gadget","sig/initialize":function(b,c){var d=this,i=d[n]=[],j=f,k,l,o;for(j in d){k=d[j];if(k instanceof g)l=h.exec(j),l!==f&&(o=l[2],e.subscribe(o,d,l[1]===m,k),i[i.length]=[o,d,k],d[j]=f);else continue}return c&&c.resolve(),d},"sig/finalize":function(b,c){var d=this,f=d[n],g;while(g=f.shift())e.unsubscribe(g[0],g[1],g[2]);return c&&c.resolve(),d},publish:function(){var b=this;return j.apply(e,arguments),b},subscribe:function(){var b=this;return k.apply(e,arguments),b},unsubscribe:function(){var b=this;return l.apply(e,arguments),b},start:function(b){var c=this;return d(function(e){d(function(b){c.signal("initialize",b)}).done(function(){c.signal("start",e)}).fail(e.reject),b&&e.then(b.resolve,b.reject)}),c},stop:function(b){var c=this;return d(function(e){d(function(b){c.signal("stop",b)}).done(function(){c.signal("finalize",e)}).fail(e.reject),b&&e.then(b.resolve,b.reject)}),c}})}),define("troopjs-core/component/service",["./gadget"],function(b){return b.extend({displayName:"core/component/service"})}),define("troopjs-core/util/merge",[],function(){var b=Array,c=Object;return function d(a){var e=this,f=null,g,h,i,j;for(g=0,h=arguments.length;g<h;g++){a=arguments[g];for(f in a)i=a[f],j=i.constructor,f in e?j===b?e[f]=e[f].concat(i):j===c?d.call(e[f],i):e[f]=i:e[f]=i}return e}}),define("troopjs-core/remote/ajax",["../component/service","../pubsub/topic","jquery","../util/merge"],function(b,c,d,e){return b.extend({displayName:"core/remote/ajax","hub/ajax":function(b,f,g){d.ajax(e.call({headers:{"x-request-id":(new Date).getTime(),"x-components":b instanceof c?b.trace():b}},f)).then(g.resolve,g.reject)}})}),define("troopjs-core/util/uri",["compose"],function(b){var c=null,d=Function,e=Array,f=e.prototype,g=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:([^?#]*)(?:\?([^#]*))?(?:#(.*))?)/,h="protocol",i="authority",j="path",k="query",l="anchor",m=["source",h,i,"userInfo","user","password","host","port",j,k,l],n=b.secure;b.secure=!0;var o=b(function(b){if(!b||b.length===0)return;var c=this,d,f,g,h=/(?:&|^)([^&=]*)=?([^&]*)/g;while(d=h.exec(b))f=d[1],f in c?(g=c[f],g instanceof e?g[g.length]=d[2]:c[f]=[g,d[2]]):c[f]=d[2]},{toString:function r(){var a=this,b=c,f=c,g=[],h=0,i;for(b in a){if(a[b]instanceof d)continue;g[h++]=b}g.sort();while(h--){b=g[h],f=a[b];if(f instanceof e){f=f.slice(0),f.sort(),i=f.length;while(i--)f[i]=b+"="+f[i];g[h]=f.join("&")}else g[h]=b+"="+f}return g.join("&")}}),p=b(f,function(b){if(!b||b.length===0)return;var c=this,d,e=/(?:\/|^)([^\/]*)/g;while(d=e.exec(b))c.push(d[1])},{toString:function s(){return this.join("/")}}),q=b(function(b){var c=this,d=g.exec(b),e=d.length,f;while(e--)f=d[e],f&&(c[m[e]]=f);k in c&&(c[k]=o(c[k])),j in c&&(c[j]=p(c[j]))},{toString:function t(){var a=this,b=[h,"://",i,j,"?",k,"#",l],c,d;h in a||b.splice(0,3),j in a||b.splice(0,1),l in a||b.splice(-2,2),k in a||b.splice(-2,2),c=b.length;while(c--)d=b[c],d in a&&(b[c]=a[d]);return b.join("")}});return b.secure=n,q}),define("troopjs-core/route/router",["../component/service","../util/uri"],function(b,c){function h(a){var b=a.data,d=c(a.target.location.hash.replace(g,"")),e=d.toString();e!==b[f]&&(b[f]=e,b.publish(f,d))}var d="hashchange",e="$element",f="route",g=/^#/;return b.extend(function(b){this[e]=b},{displayName:"core/route/router","sig/initialize":function(b,c){var f=this;return f[e].bind(d,f,h),c&&c.resolve(),f},"sig/start":function(b,c){var f=this;return f[e].trigger(d),c&&c.resolve(),f},"sig/finalize":function(b,c){var f=this;return f[e].unbind(d,h),c&&c.resolve(),f}})}),define("troopjs-core/store/base",["compose","../component/gadget"],function(b,c){var d="storage";return c.extend({storage:b.required,set:function(b,c,e){this[d].setItem(b,JSON.stringify(c)),e&&e.resolve(c)},get:function(b,c){var e=JSON.parse(this[d].getItem(b));c&&c.resolve(e)},remove:function(b,c){this[d].removeItem(b),c&&c.resolve()},clear:function(b){this[d].clear(),b&&b.resolve()}})}),define("troopjs-core/store/local",["compose","./base"],function(b,c){return b.create(c,{displayName:"core/store/local",storage:window.localStorage})}),define("troopjs-core/store/session",["compose","./base"],function(b,c){return b.create(c,{displayName:"core/store/session",storage:window.sessionStorage})}),define("troopjs-core/component/widget",["./gadget","jquery","../util/deferred"],function(b,c,d){function x(a,b,c){return function(){return j.call(arguments,a),c.apply(b,arguments)}}function y(a){function b(){var b=this,c=b[r],e=arguments,h=i.call(e),j=e.length,l=j>0&&e[j-1][u]instanceof f?k.call(e):g;return l&&l.notifyWith(this,["beforeRender"]),a.call(c,h instanceof f?h.apply(b,e):h),l&&l.notifyWith(this,["afterRender"]),d(function(b){b.done(function(){c.trigger(q,arguments)}),l&&b.then(l.resolve,l.reject,l.notify),c.find(v).weave(b)}),b}return b}var e=null,f=Function,g=undefined,h=Array.prototype,i=h.shift,j=h.unshift,k=h.pop,l=c.fn.trigger,m=c.fn.one,n=c.fn.bind,o=c.fn.unbind,p=/^dom(?::(\w+))?\/([^\.]+(?:\.(.+))?)/,q="widget/refresh",r="$element",s="$proxies",t="one",u="then",v="[data-weave]",w="[data-woven]";return b.extend(function(b,c){var d=this;d[r]=b,c&&(d.displayName=c)},{displayName:"core/component/widget","sig/initialize":function(b,c){var d=this,g=d[r],h=d[s]=[],i=e,j,k,l;for(i in d){j=d[i];if(j instanceof f)k=p.exec(i),k!==e&&(l=k[2],j=x(l,d,j),(k[2]===t?m:n).call(g,l,d,j),h[h.length]=[l,j],d[i]=e);else continue}return c&&c.resolve(),d},"sig/finalize":function(b,c){var d=this,e=d[r],f=d[s],g;while(g=f.shift())e.unbind(g[0],g[1]);return c&&c.resolve(),d},weave:function(b){var c=this;return c[r].find(v).weave(b),c},unweave:function(){var b=this;return b[r].find(w).andSelf().unweave(),this},one:function(){var b=this;return m.apply(b[r],arguments),b},bind:function(){var b=this;return n.apply(b[r],arguments),b},unbind:function(){var b=this;return o.apply(b[r],arguments),b},trigger:function(){var b=this;return l.apply(b[r],arguments),b},before:y(c.fn.before),after:y(c.fn.after),html:y(c.fn.html),text:y(c.fn.text),append:y(c.fn.append),prepend:y(c.fn.prepend),empty:function(b){var c=this;return d(function(d){var e=c[r],f=e.contents().detach();e.trigger(q,c),setTimeout(function(){var b=f.get();f.remove(),d.resolve(b)},0),b&&d.then(b.resolve,b.reject)}),c}})}),define("troopjs-core/widget/placeholder",["../component/widget","../util/deferred"],function(b,c){function n(){var a=this,b=arguments,f=b.length,g=f>0&&b[f-1][m]instanceof e?h.call(b):d;return c(function(e){var f,h,m,n;if(i in a)e.resolve(a[i]);else{e.done(function(c){a[k].attr(j,c),a[i]=c}),m=a[l],n=[a[k],m];for(f=0,h=b.length;f<h;f++)n[f+2]=b[f];require([m],function(b){var d=b.apply(b,n);c(function(b){d.start(b)}).done(function(){e.resolve(d)}).fail(e.reject)})}g&&e.then(g.resolve,g.reject)}),a}function o(a){var b=this;return c(function(e){var f;i in b?(f=b[i],delete b[i],b[k].removeAttr(j),c(function(b){f.stop(b)}).then(e.resolve,e.reject)):e.resolve(),a&&dfd.then(a.resolve,a.reject)}),b}var d=undefined,e=Function,f=Array,g=f.prototype,h=g.pop,i="holding",j="data-"+i,k="$element",l="target",m="then";return b.extend(function(b,c,d){this[l]=d},{displayName:"core/widget/placeholder",release:n,hold:o,finalize:o})}),define("troopjs-core/route/placeholder",["../widget/placeholder"],function(b){var c=null,d="route";return b.extend(function(b,c){this[d]=RegExp(b.data("route"))},{displayName:"core/route/placeholder","hub:memory/route":function(b,e){var f=this,g=f[d].exec(e.path);g!==c?f.release.apply(f,g.slice(1)):f.hold()}})}),define("troopjs-core/widget/application",["../component/widget","../util/deferred"],function(b,c){return b.extend({displayName:"core/widget/application","sig/start":function(b,c){var d=this;return d.weave(c),d},"sig/stop":function(b,c){var d=this;return d.unweave(c),d}})}),define("troopjs-core/util/each",["jquery"],function(b){return b.each}),define("troopjs-core/util/grep",["jquery"],function(b){return b.grep}),define("troopjs-core/util/tr",[],function(){var b=typeof Number();return function(c){var d=this,e=[],f,g=d.length,h;if(typeof g===b&&g===0||g>0&&0 in d&&g-1 in d)for(f=0;f<g;f++)e.push(c.call(d,d[f],f));else if(d)for(h in d)e.push(c.call(d,d[h],h));return e}}),define("troopjs-core/util/when",["jquery"],function(b){return b.when}),define("troopjs-jquery/action",["jquery"],function(b){function p(a,b){return a?a+"."+g:e}function q(a){var c=b(this),e=f.call(arguments,1),h=i in a?a[i].type:g,j=a[g];a.type=g+"/"+j+"."+h,c.trigger(a,e),a.result!==d&&(a.type=g+"/"+j+"!",c.trigger(a,e),a.result!==d&&(a.type=g+"."+h,c.trigger(a,e)))}function r(a){var d=b(a.target).closest("[data-action]");if(d.length===0)return;var f=d.data(),i=j.exec(f[g]);if(i===e)return;var p=i[1],q=i[2],r=i[3];if(q!==c&&!RegExp(q.split(l).join("|")).test(a.type))return;var s=r!==c?r.split(k):[];b.each(s,function(b,d){d in f?s[b]=f[d]:m.test(d)?s[b]=d.slice(1,-1):n.test(d)?s[b]=Number(d):o.test(d)?s[b]=d===h:s[b]=c}),d.trigger(b.Event(a,{type:g+"!",action:p}),s),a.stopPropagation()}var c=undefined,d=!1,e=null,f=Array.prototype.slice,g="action",h="true",i="originalEvent",j=/^([\w\d\s_\-\/]+)(?:\.([\w\.]+))?(?:\((.*)\))?$/,k=/\s*,\s*/,l=/\.+/,m=/^(["']).*\1$/,n=/^\d+$/,o=/^false|true$/i;b.event.special[g]={setup:function(c,d,e){b(this).bind(g,c,q)},add:function(c){var d=b.map(c.namespace.split(l),p);d.length!==0&&b(this).bind(d.join(" "),r)},remove:function(c){var d=b.map(c.namespace.split(l),p);d.length!==0&&b(this).unbind(d.join(" "),r)},teardown:function(c){b(this).unbind(g,q)}},b.fn[g]=function(c){return b(this).trigger({type:g+"!",action:c},f.call(arguments,1))}}),define("troopjs-jquery/destroy",["jquery"],function(b){b.event.special.destroy={remove:function(c){var d=this;c.handler.call(d,b.Event({type:c.type,data:c.data,namespace:c.namespace,target:d}))}}}),define("troopjs-jquery/dimensions",["jquery"],function(b){function j(a,b){return a<b?1:a>b?-1:0}function k(a){var c=b(this),e=c.width(),j=c.height();b.each(c.data(d),function(k,l){var m=l[f],n=m.length-1,o=l[g],p=o.length-1,q=b.grep(m,function(a,b){return a<=e||b===n})[0],r=b.grep(o,function(a,b){return a<=j||b===p})[0];if(q!==l[h]||r!==l[i])l[h]=q,l[i]=r,c.trigger(d+"."+k,[q,r])})}var c=/(w|h)(\d*)/g,d="dimensions",e="resize."+d,f="w",g="h",h="_"+f,i="_"+g;b.event.special[d]={setup:function(c,f,g){b(this).bind(e,k).data(d,{})},add:function(e){var h=e.namespace,i={},k=i[f]=[],l=i[g]=[],m;while(m=c.exec(h))i[m[1]].push(parseInt(m[2]));k.sort(j),l.sort(j),b.data(this,d)[h]=i},remove:function(c){delete b.data(this,d)[c.namespace]},teardown:function(c){b(this).removeData(d).unbind(e,k)}}}),define("troopjs-jquery/hashchange",["jquery"],function(b){function i(a){var b=f.exec(a.location.href);return b&&b[1]?decodeURIComponent(b[1]):""}function j(a){var b=this,c;b.element=c=a.createElement("iframe"),c.src="about:blank",c.style.display="none"}var c="interval",d="hashchange",e="on"+d,f=/#(.*)$/,g=/\?/,h=!1;j.prototype={getElement:function(){return this.element},getHash:function(){return this.element.contentWindow.frameHash},update:function(b){var c=this,d=c.element.contentWindow.document;if(c.getHash()===b)return;d.open(),d.write("<html><head><title>' + document.title + '</title><script type='text/javascript'>var frameHash='"+b+"';</script></head><body>&nbsp;</body></html>"),d.close()}},b.event.special[d]={setup:function(f,k,l){var m=this;if(e in m)return!1;if(!b.isWindow(m))throw new Error("Unable to bind 'hashchange' to a non-window object");var n=b(m),o=i(m),p=m.location;n.data(c,m.setInterval(h?function(){var b=m.document,c=p.protocol==="file:",e=new j(b);return b.body.appendChild(e.getElement()),e.update(o),function(){var b=o,f,h=i(m),j=e.getHash();j!==o&&j!==h?(f=decodeURIComponent(j),o!==f&&(o=f,e.update(o),n.trigger(d,[f,b])),p.hash="#"+encodeURI(c?j.replace(g,"%3F"):j)):h!==o&&(f=decodeURIComponent(h),o!==f&&(o=f,n.trigger(d,[f,b])))}}():function(){var b=o,c,e=i(m);e!==o&&(c=decodeURIComponent(e),o!==c&&(o=c,n.trigger(d,[c,b])))},25))},teardown:function(d){var f=this;if(e in f)return!1;f.clearInterval(b.data(f,c))}}}),define("troopjs-jquery/weave",["jquery"],function(b){function x(a){b(this).unweave()}var c=undefined,d=!0,e=Array,f=Function,g=e.prototype,h=g.join,i=g.pop,j=b.when,k="then",l="weave",m="unweave",n="woven",o="destroy",p="data-"+l,q="data-"+n,r="["+p+"]",s="["+q+"]",t=/\s*,\s*/,u=/^(["']).*\1$/,v=/^\d+$/,w=/^false|true$/i;b.fn[l]=function(){var e=[],g=0,m=b(this),s=arguments,y=s.length,z=y>0&&s[y-1][k]instanceof f?i.call(s):c;return m.filter(r).each(function(f,i){var k=b(i),m=k.data(),r=k.attr(p)||"",y=/[\s,]*([\w_\-\/]+)(?:\(([^\)]+)\))?/g,z=[],A=g,B=0,C;k.data(l,r).data(n,z).removeAttr(p);while(C=y.exec(r))b.Deferred(function(f){var h=B++,i,j,l,n;e[g++]=f,f.done(function(b){z[h]=b});var p=C[1],q=[k,p];for(i=0,l=s.length,j=q.length;i<l;i++,j++)q[j]=s[i];var r=C[2];if(r!==c){r=r.split(t);for(i=0,l=r.length,j=q.length;i<l;i++,j++)n=r[i],n in m?q[j]=m[n]:u.test(n)?q[j]=n.slice(1,-1):v.test(n)?q[j]=Number(n):w.test(n)?q[j]=n===d:q[j]=n}require([p],function(c){var d=c.apply(c,q).bind(o,x);b.Deferred(function(b){d.start(b)}).done(function(){f.resolve(d)}).fail(f.reject)})});j.apply(b,e.slice(A,g)).done(function(){k.attr(q,h.call(arguments," "))})}),z&&j.apply(b,e).then(z.resolve,z.reject),m},b.fn[m]=function(c){var d=[],e=0,f=b(this);return f.filter(s).each(function(c,f){var g=b(f),h=g.data(n),i;g.removeData(n).removeAttr(q);while(i=h.shift())b.Deferred(function(b){d[e++]=b,i.stop(b)});g.attr(p,g.data(l)).removeData(l).unbind(o,x)}),c&&j.apply(b,d).then(c.resolve,c.reject),f}});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment