* 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(){functionj(a){functionk(a,c,d){returnb[j]=c?'" +'+d+'+ "':'";'+d+'o += "',"<%"+String(j++)+"%>"}functionl(a,c){returnb[c]}functionm(a,b){returni[b]||b}varb=[],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)}varb={node:function(){vara=require.nodeRequire("fs");returnfunction(c,d){d(a.readFileSync(c,"utf8"))}},browser:function(){vara=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b,c,d;if(typeofXMLHttpRequest!="undefined")c=XMLHttpRequest;elsea:{for(d=0;d<3;d++){b=a[d];try{c=ActiveXObject(b);breaka}catch(e){}}thrownewError("XHR: XMLHttpRequest not available")}returnfunction(b,d){vare=newc;e.open("GET",b,!0),e.onreadystatechange=function(a){e.readyState===4&&d(e.responseText)},e.send(null)}},rhino:function(){vara="utf-8",b=java.lang.System.getProperty("line.separator");returnfunction(d,e){varf=newjava.io.File(d),g=newjava.io.BufferedReader(newjava.io.InputStreamReader(newjava.io.FileInputStream(f),a)),h=newjava.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(){returnfunction(){thrownewError("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[typeofprocess!="undefined"&&process.versions&&!!process.versions.node?"node":typeofwindow!="undefined"&&window.navigator&&window.document||typeofimportScripts!="undefined"?"browser":typeofPackages!="undefined"?"rhino":"borked"]();return{load:function(a,b,c,d){vare=b.toUrl(a);l(e,function(f){try{f="define(function() { return "+j(f,a,e,d.template)+"; })"}catch(g){throwg.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(){functiona(){}functionc(a){if(!a)thrownewError("Compose arguments must be functions or objects");returna}functiond(a,b,d){varf,g=b.length;for(;d<g;d++){varh=b[d];if(typeofh=="function"){vari=h.prototype;for(varkini){f=i[k];varl=i.hasOwnProperty(k);if(typeoff=="function"&&kina&&f!==a[k]){varn=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}}elsefor(varkinc(h)){varf=h[k];if(typeoff=="function"){if(f.install){f.install.call(a,k);continue}if(kina&&f==j)continue}a[k]=f}}returna}functione(a,b,c){for(vard=0;d<c.length;d++){vare=c[d];if(e[b]==a)return!0}}functionf(a,b){functionc(){if(b)returnb.apply(this,arguments);thrownewError("Decorator not applied")}returnc.install=a,c}functiong(a){returnfunction(b){returnf(functionc(d){vare=this[d];(b=this[d]=e?a(this,e,b):b).install=c},b)}}functionj(){thrownewError("This method is required and no implementation has been provided")}functionk(){vara=[this];returna.push.apply(a,arguments),l.apply(0,a)}functionl(e){functionh(){varb;thisinstanceofh?b=this:(a.prototype=g,b=newa);for(varc=0;c<j;c++){vard=i[c],e=d.apply(b,arguments);if(typeofe=="object")if(einstanceofh)b=e;elsefor(varfine)e.hasOwnProperty(f)&&(b[f]=e[f])}returnb}varf=arguments,g=f.length<2&&typeoff[0]!="function"?f[0]:d(b(c(e)),f,1);h._getBases=function(a){returna?n:i};vari=m(f),j=i.length;typeoff[f.length-1]=="object"&&(f[f.length-1]=g);varn=m(f,!0);returnh.extend=k,l.secure||(g.constructor=h),h.prototype=g,h}functionm(a,b){functiond(a,e){a:for(varf=0;f<a.length;f++){varg=a[f],h=b&&typeofg=="function"?g.prototype:g;if(b||typeofg=="function"){vari=e&&g._getBases;if(i)d(i(b));else{for(varj=0;j<c.length;j++)if(h==c[j])continuea;c.push(h)}}}}varc=[];returnd(a,!0),c}varb=Object.create?function(a){returnObject.create(typeofa=="function"?a.prototype:a||Object.prototype)}:function(b){a.prototype=typeofb=="function"?b.prototype:b;varc=newa;returna.prototype=null,c};l._setMixin=function(a){d=a},l.Decorator=f,l.around=g(function(a,b,c){returnc.call(a,b)}),l.before=g(function(a,b,c){returnfunction(){vara=c.apply(this,arguments);if(a!==h)returnb.apply(this,a||arguments)}});varh=l.stop={},i;returnl.after=g(function(a,b,c){returnfunction(){vara=b.apply(this,arguments),d=c.apply(this,arguments);returnd===i?a:d}}),l.from=function(a,b){returnb?(typeofa=="function"?a.prototype:a)[b]:f(function(c){if(!(this[c]=typeofa=="string"?this[a]:(typeofa=="function"?a.prototype:a)[b||c]))thrownewError("Source method "+b+" was not available to be renamed to "+c)})},l.create=function(a){varc=d(b(a),arguments,1),e=arguments.length;for(varf=0;f<e;f++){varg=arguments[f];typeofg=="function"&&(c=g.call(c)||c)}returnc},l.required=j,l.apply=function(a,b){returna?d(a,b,0):k.apply.call(l,0,b)},l.call=function(a){returnd(a,arguments,1)},l})}(typeofdefine!="undefined"?define:function(a,b){typeofmodule!="undefined"?module.exports=b():Compose=b()}),define("troopjs-core/component/base",["compose","config"],function(b,c){vard=0;returnb(function(){this.instanceCount=d++},{displayName:"core/component",config:c,toString:functione(){vara=this;returna.displayName+"@"+a.instanceCount}})}),define("troopjs-core/util/deferred",["jquery"],function(b){returnb.Deferred}),define("troopjs-core/pubsub/topic",["../component/base"],function(b){varc=Array;returnb.extend(function(b,c,d){vare=this;e.topic=b,e.publisher=c,e.parent=d},{displayName:"core/pubsub/topic",toString:functiond(){returnthis.topic},trace:function(){varb=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}returng}})}),define("troopjs-core/pubsub/hub",["compose","../component/base","./topic"],function(b,c,d){vare={},f={},g="memory",h="head",i="tail",j="next";returnb.create({displayName:"core/pubsub/hub",subscribe:function(b){varc=this,d=arguments.length,k=arguments[1],l=arguments[2],m=arguments[3],n,o,p,q,r;if(kinstanceofFunction)m=k,l=!1,k=e,n=1;elseif(k===!0||k===!1)m=l,l=k,k=e,n=2;elseif(linstanceofFunction)m=l,l=!1,n=2;else{if(!(minstanceofFunction))returnc;n=3}if(binf){o=f[b],p={callback:arguments[n++],context:k},r=iino?o[i][j]=p:o[h]=p;while(n<d)r=r[j]={callback:arguments[n++],context:k};o[i]=r;if(l&&gino){l=o[g];if(l.length>0)while(p)p.callback.apply(p.context,l),p=p[j];elsewhile(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}}returnc},unsubscribe:function(b){varc=arguments.length,d=arguments[1],g=arguments[2],k,l,m,n,o=null;if(dinstanceofFunction)g=d,d=e,k=1;else{if(!(ginstanceofFunction))returnself;k=2}a:{if(!binf)breaka;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):(deletel[h],deletel[i])}returnthis},publish:function(b){varc,d;if(binf){c=f[b],c[g]=arguments,d=c[h];if(arguments.length>0)while(d)d.callback.apply(d.context,arguments),d=d[j];elsewhile(d)d.callback.call(d.context),d=d[j]}elsearguments.length>0&&(f[b]=c={},c[g]=arguments);returnthis}})}),define("troopjs-core/component/gadget",["compose","./base","../util/deferred","../pubsub/hub"],function(b,c,d,e){varf=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||(ping?function(b){returnb[p]}:function(b){returnb.constructor.prototype});returnc.extend(function(){varc=this,__proto__=c,e,g,i,k,l={},m,n,o=null;doa:for(oin__proto__){g=__proto__[o];if(!(ginstanceofh))continue;n=j.exec(o);if(n!==f){m=n[1];if(minl){e=l[m],i=k=e.length;while(i--)if(g===e[i])continuea;e[k]=g}elsel[m]=[g]}}while(__proto__=q(__proto__));b.call(c,{signal:functionp(p,a){varb=this,c,e,f=a;if(pinl){c=l[p],e=c.length;while(--e)f=d(function(a){vard=c[e],g=f;a.done(function(){d.call(b,p,g)})});c[0].call(b,p,f)}elsea&&a.resolve();returnb}})},{displayName:"core/component/gadget","sig/initialize":function(b,c){vard=this,g=d[o]=[],j=f,k,l,m;for(jind){k=d[j];if(!(kinstanceofh))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)}returnc&&c.resolve(),d},"sig/finalize":function(b,c){vard=this,f=d[o],g;while(g=f.shift())e.unsubscribe(g[0],g[1],g[2]);returnc&&c.resolve(),d},publish:function(){varb=this;returnk.apply(e,arguments),b},subscribe:function(){varb=this;returnl.apply(e,arguments),b},unsubscribe:function(){varb=this;returnm.apply(e,arguments),b},start:function(b){varc=this;returnd(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){varc=this;returnd(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){returnb.extend({displayName:"core/component/service"})}),define("troopjs-core/util/merge",[],function(){varb=Array,c=Object;returnfunctiond(a){vare=this,f=null,g,h,i,j;for(g=0,h=arguments.length;g<h;g++){a=arguments[g];for(fina)i=a[f],j=i.constructor,fine?j===b?e[f]=e[f].concat(i):j===c?d.call(e[f],i):e[f]=i:e[f]=i}returne}}),define("troopjs-core/remote/ajax",["../component/service","../pubsub/topic","jquery","../util/merge"],function(b,c,d,e){returnb.extend({displayName:"core/remote/ajax","hub/ajax":function(b,f,g){d.ajax(e.call({headers:{"x-request-id":(newDate).getTime(),"x-components":binstanceofc?b.trace():b}},f)).then(g.resolve,g.reject)}})}),define("troopjs-core/util/uri",["compose"],function(b){varc=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;varo=b(function(b){if(!b||b.length===0)return;varc=this,d,f,g,h=/(?:&|^)([^&=]*)=?([^&]*)/g;while(d=h.exec(b))f=d[1],finc?(g=c[f],ginstanceofe?g[g.length]=d[2]:c[f]=[g,d[2]]):c[f]=d[2]},{toString:functionr(){vara=this,b=c,f=c,g=[],h=0,i;for(bina){if(a[b]instanceofd)continue;g[h++]=b}g.sort();while(h--){b=g[h],f=a[b];if(finstanceofe){f=f.slice(0),f.sort(),i=f.length;while(i--)f[i]=b+"="+f[i];g[h]=f.join("&")}elseg[h]=b+"="+f}returng.join("&")}}),p=b(f,function(b){if(!b||b.length===0)return;varc=this,d,e=/(?:\/|^)([^\/]*)/g;while(d=e.exec(b))c.push(d[1])},{toString:functions(){returnthis.join("/")}}),q=b(function(b){varc=this,d=g.exec(b),e=d.length,f;while(e--)f=d[e],f&&(c[m[e]]=f);kinc&&(c[k]=o(c[k])),jinc&&(c[j]=p(c[j]))},{toString:functiont(){vara=this,b=[h,"://",i,j,"?",k,"#",l],c,d;hina||b.splice(0,3),jina||b.splice(0,1),lina||b.splice(-2,2),kina||b.splice(-2,2),c=b.length;while(c--)d=b[c],dina&&(b[c]=a[d]);returnb.join("")}});returnb.secure=n,q}),define("troopjs-core/route/router",["../component/service","../util/uri"],function(b,c){functionh(a){varb=a.data,d=c(a.target.location.hash.replace(g,"")),e=d.toString();e!==b[f]&&(b[f]=e,b.publish(f,d))}vard="hashchange",e="$element",f="route",g=/^#/;returnb.extend(function(b){this[e]=b},{displayName:"core/route/router","sig/initialize":function(b,c){varf=this;returnf[e].bind(d,f,h),c&&c.resolve(),f},"sig/start":function(b,c){varf=this;returnf[e].trigger(d),c&&c.resolve(),f},"sig/finalize":function(b,c){varf=this;returnf[e].unbind(d,h),c&&c.resolve(),f}})}),define("troopjs-core/store/base",["compose","../component/gadget"],function(b,c){vard="storage";returnc.extend({storage:b.required,set:function(b,c,e){this[d].setItem(b,JSON.stringify(c)),e&&e.resolve(c)},get:function(b,c){vare=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){returnb.create(c,{displayName:"core/store/local",storage:window.localStorage})}),define("troopjs-core/store/session",["compose","./base"],function(b,c){returnb.create(c,{displayName:"core/store/session",storage:window.sessionStorage})}),define("troopjs-core/component/widget",["./gadget","jquery","../util/deferred"],function(b,c,d){functionx(a,b,c){returnfunction(){returnj.call(arguments,a),c.apply(b,arguments)}}functiony(a){functionb(){varb=this,c=b[r],e=arguments,h=i.call(e),j=e.length,l=j>0&&e[j-1][u]instanceoff?k.call(e):g;returna.call(c,hinstanceoff?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}returnb}vare=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]";returnb.extend(function(b,c){vard=this;d[r]=b,c&&(d.displayName=c)},{displayName:"core/component/widget","sig/initialize":function(b,c){vard=this,g=d[r],h=d[s]=[],i=e,j,k,l;for(iind){j=d[i];if(!(jinstanceoff))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)}returnc&&c.resolve(),d},"sig/finalize":function(b,c){vard=this,e=d[r],f=d[s],g;while(g=f.shift())e.unbind(g[0],g[1]);returnc&&c.resolve(),d},weave:function(b){varc=this;returnc[r].find(v).weave(b),c},unweave:function(){varb=this;returnb[r].find(w).andSelf().unweave(),this},one:function(){varb=this;returnm.apply(b[r],arguments),b},bind:function(){varb=this;returnn.apply(b[r],arguments),b},unbind:function(){varb=this;returno.apply(b[r],arguments),b},trigger:function(){varb=this;returnl.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){varc=this;returnd(function(d){vare=c[r],f=e.contents().detach();e.trigger(q,c),setTimeout(function(){varb=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){functionn(){vara=this,b=arguments,f=b.length,g=f>0&&b[f-1][m]instanceofe?h.call(b):d;returnc(function(e){varf,h,m,n;if(iina)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){vard=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}functiono(a){varb=this;returnc(function(e){varf;iinb?(f=b[i],deleteb[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}vard=undefined,e=Function,f=Array,g=f.prototype,h=g.pop,i="holding",j="data-"+i,k="$element",l="target",m="then";returnb.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){varc=null,d="route";returnb.extend(function(b,c){this[d]=RegExp(b.data("route"))},{displayName:"core/route/placeholder","hub:memory/route":function(b,e){varf=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){returnb.extend({displayName:"core/widget/application","sig/start":function(b,c){vard=this;returnd.weave(c),d},"sig/stop":function(b,c){vard=this;returnd.unweave(c),d}})}),define("troopjs-jquery/action",["jquery"],function(b){functionp(a,b){returna?a+"."+g:e}functionq(a){varc=b(this),e=f.call(arguments,1),h=iina?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)))}functionr(a){vard=b(a.target).closest("[data-action]");if(d.length===0)return;varf=d.data(),i=j.exec(f[g]);if(i===e)return;varp=i[1],q=i[2],r=i[3];if(q!==c&&!RegExp(q.split(l).join("|")).test(a.type))return;vars=r!==c?r.split(k):[];b.each(s,function(b,d){dinf?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()}varc=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){vard=b.map(c.namespace.split(l),p);d.length!==0&&b(this).bind(d.join(""),r)},remove:function(c){vard=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){returnb(this).trigger({type:g+"!",action:c},f.call(arguments,1))}}),define("troopjs-jquery/destroy",["jquery"],function(b){b.event.special.destroy={remove:function(c){vard=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){functionj(a,b){returna<b?1:a>b?-1:0}functionk(a){varc=b(this),e=c.width(),j=c.height();b.each(c.data(d),function(k,l){varm=l[f],n=m.length-1,o=l[g],p=o.length-1,q=b.grep(m,function(a,b){returna<=e||b===n})[0],r=b.grep(o,function(a,b){returna<=j||b===p})[0];if(q!==l[h]||r!==l[i])l[h]=q,l[i]=r,c.trigger(d+"."+k,[q,r])})}varc=/(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){varh=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){deleteb.data(this,d)[c.namespace]},teardown:function(c){b(this).removeData(d).unbind(e,k)}}}),define("troopjs-jquery/hashchange",["jquery"],function(b){functioni(a){varb=f.exec(a.location.href);returnb&&b[1]?decodeURIComponent(b[1]):""}functionj(a){varb=this,c;b.element=c=a.createElement("iframe"),c.src="about:blank",c.style.display="none"}varc="interval",d="hashchange",e="on"+d,f=/#(.*)$/,g=/\?/,h=!1;j.prototype={getElement:function(){returnthis.element},getHash:function(){returnthis.element.contentWindow.frameHash},update:function(b){varc=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> </body></html>"),d.close()}},b.event.special[d]={setup:function(f,k,l){varm=this;if(einm)return!1;if(!b.isWindow(m))thrownewError("Unable to bind 'hashchange' to a non-window object");varn=b(m),o=i(m),p=m.location;n.data(c,m.setInterval(h?function(){varb=m.document,c=p.protocol==="file:",e=newj(b);returnb.body.appendChild(e.getElement()),e.update(o),function(){varb=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(){varb=o,c,e=i(m);e!==o&&(c=decodeURIComponent(e),o!==c&&(o=c,n.trigger(d,[c,b])))},25))},teardown:function(d){varf=this;if(einf)return!1;f.clearInterval(b.data(f,c))}}}),define("troopjs-jquery/weave",["jquery"],function(b){functionx(a){b(this).unweave()}varc=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(){vare=[],g=0,m=b(this),s=arguments,y=s.length,z=y>0&&s[y-1][k]instanceoff?i.call(s):c;returnm.filter(r).each(function(f,i){vark=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){varh=B++,i,j,l,n;e[g++]=f,f.done(function(b){z[h]=b});varp=C[1],q=[k,p];for(i=0,l=s.length,j=q.length;i<l;i++,j++)q[j]=s[i];varr=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],ninm?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){vard=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){vard=[],e=0,f=b(this);returnf.filter(s).each(function(c,f){varg=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(){functionj(a){functionk(a,c,d){returnb[j]=c?'" +'+d+'+ "':'";'+d+'o += "',"<%"+String(j++)+"%>"}functionl(a,c){returnb[c]}functionm(a,b){returni[b]||b}varb=[],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)}varb={node:function(){vara=require.nodeRequire("fs");returnfunction(c,d){d(a.readFileSync(c,"utf8"))}},browser:function(){vara=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b,c,d;if(typeofXMLHttpRequest!="undefined")c=XMLHttpRequest;elsea:{for(d=0;d<3;d++){b=a[d];try{c=ActiveXObject(b);breaka}catch(e){}}thrownewError("XHR: XMLHttpRequest not available")}returnfunction(b,d){vare=newc;e.open("GET",b,!0),e.onreadystatechange=function(a){e.readyState===4&&d(e.responseText)},e.send(null)}},rhino:function(){vara="utf-8",b=java.lang.System.getProperty("line.separator");returnfunction(d,e){varf=newjava.io.File(d),g=newjava.io.BufferedReader(newjava.io.InputStreamReader(newjava.io.FileInputStream(f),a)),h=newjava.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(){returnfunction(){thrownewError("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[typeofprocess!="undefined"&&process.versions&&!!process.versions.node?"node":typeofwindow!="undefined"&&window.navigator&&window.document||typeofimportScripts!="undefined"?"browser":typeofPackages!="undefined"?"rhino":"borked"]();return{load:function(a,b,c,d){vare=b.toUrl(a);l(e,function(f){try{f="define(function() { return "+j(f,a,e,d.template)+"; })"}catch(g){throwg.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(){functiona(){}functionc(a){if(!a)thrownewError("Compose arguments must be functions or objects");returna}functiond(a,b,d){varf,g=b.length;for(;d<g;d++){varh=b[d];if(typeofh=="function"){vari=h.prototype;for(varkini){f=i[k];varl=i.hasOwnProperty(k);if(typeoff=="function"&&kina&&f!==a[k]){varn=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}}elsefor(varkinc(h)){varf=h[k];if(typeoff=="function"){if(f.install){f.install.call(a,k);continue}if(kina&&f==j)continue}a[k]=f}}returna}functione(a,b,c){for(vard=0;d<c.length;d++){vare=c[d];if(e[b]==a)return!0}}functionf(a,b){functionc(){if(b)returnb.apply(this,arguments);thrownewError("Decorator not applied")}returnc.install=a,c}functiong(a){returnfunction(b){returnf(functionc(d){vare=this[d];(b=this[d]=e?a(this,e,b):b).install=c},b)}}functionj(){thrownewError("This method is required and no implementation has been provided")}functionk(){vara=[this];returna.push.apply(a,arguments),l.apply(0,a)}functionl(e){functionh(){varb;thisinstanceofh?b=this:(a.prototype=g,b=newa);for(varc=0;c<j;c++){vard=i[c],e=d.apply(b,arguments);if(typeofe=="object")if(einstanceofh)b=e;elsefor(varfine)e.hasOwnProperty(f)&&(b[f]=e[f])}returnb}varf=arguments,g=f.length<2&&typeoff[0]!="function"?f[0]:d(b(c(e)),f,1);h._getBases=function(a){returna?n:i};vari=m(f),j=i.length;typeoff[f.length-1]=="object"&&(f[f.length-1]=g);varn=m(f,!0);returnh.extend=k,l.secure||(g.constructor=h),h.prototype=g,h}functionm(a,b){functiond(a,e){a:for(varf=0;f<a.length;f++){varg=a[f],h=b&&typeofg=="function"?g.prototype:g;if(b||typeofg=="function"){vari=e&&g._getBases;if(i)d(i(b));else{for(varj=0;j<c.length;j++)if(h==c[j])continuea;c.push(h)}}}}varc=[];returnd(a,!0),c}varb=Object.create?function(a){returnObject.create(typeofa=="function"?a.prototype:a||Object.prototype)}:function(b){a.prototype=typeofb=="function"?b.prototype:b;varc=newa;returna.prototype=null,c};l._setMixin=function(a){d=a},l.Decorator=f,l.around=g(function(a,b,c){returnc.call(a,b)}),l.before=g(function(a,b,c){returnfunction(){vara=c.apply(this,arguments);if(a!==h)returnb.apply(this,a||arguments)}});varh=l.stop={},i;returnl.after=g(function(a,b,c){returnfunction(){vara=b.apply(this,arguments),d=c.apply(this,arguments);returnd===i?a:d}}),l.from=function(a,b){returnb?(typeofa=="function"?a.prototype:a)[b]:f(function(c){if(!(this[c]=typeofa=="string"?this[a]:(typeofa=="function"?a.prototype:a)[b||c]))thrownewError("Source method "+b+" was not available to be renamed to "+c)})},l.create=function(a){varc=d(b(a),arguments,1),e=arguments.length;for(varf=0;f<e;f++){varg=arguments[f];typeofg=="function"&&(c=g.call(c)||c)}returnc},l.required=j,l.apply=function(a,b){returna?d(a,b,0):k.apply.call(l,0,b)},l.call=function(a){returnd(a,arguments,1)},l})}(typeofdefine!="undefined"?define:function(a,b){typeofmodule!="undefined"?module.exports=b():Compose=b()}),define("troopjs-core/component/base",["compose","config"],function(b,c){vard=0;returnb(function(){this.instanceCount=d++},{displayName:"core/component",config:c,toString:functione(){vara=this;returna.displayName+"@"+a.instanceCount}})}),define("troopjs-core/util/deferred",["jquery"],function(b){returnb.Deferred}),define("troopjs-core/pubsub/topic",["../component/base"],function(b){varc=Array;returnb.extend(function(b,c,d){vare=this;e.topic=b,e.publisher=c,e.parent=d},{displayName:"core/pubsub/topic",toString:functiond(){returnthis.topic},trace:function(){varb=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}returng}})}),define("troopjs-core/pubsub/hub",["compose","../component/base","./topic"],function(b,c,d){vare={},f={},g="memory",h="head",i="tail",j="next";returnb.create({displayName:"core/pubsub/hub",subscribe:function(b){varc=this,d=arguments.length,k=arguments[1],l=arguments[2],m=arguments[3],n,o,p,q,r;if(kinstanceofFunction)m=k,l=!1,k=e,n=1;elseif(k===!0||k===!1)m=l,l=k,k=e,n=2;elseif(linstanceofFunction)m=l,l=!1,n=2;elseif(minstanceofFunction)n=3;elsereturnc;if(binf){o=f[b],p={callback:arguments[n++],context:k},r=iino?o[i][j]=p:o[h]=p;while(n<d)r=r[j]={callback:arguments[n++],context:k};o[i]=r;if(l&&gino){l=o[g];if(l.length>0)while(p)p.callback.apply(p.context,l),p=p[j];elsewhile(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}}returnc},unsubscribe:function(b){varc=arguments.length,d=arguments[1],g=arguments[2],k,l,m,n,o=null;if(dinstanceofFunction)g=d,d=e,k=1;elseif(ginstanceofFunction)k=2;elsereturnself;a:{if(!binf)breaka;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):(deletel[h],deletel[i])}returnthis},publish:function(b){varc,d;if(binf){c=f[b],c[g]=arguments,d=c[h];if(arguments.length>0)while(d)d.callback.apply(d.context,arguments),d=d[j];elsewhile(d)d.callback.call(d.context),d=d[j]}elsearguments.length>0&&(f[b]=c={},c[g]=arguments);returnthis}})}),define("troopjs-core/component/gadget",["compose","./base","../util/deferred","../pubsub/hub"],function(b,c,d,e){varf=null,g=Function,h=/^hub(?::(\w+))?\/(.+)/,i=/^sig\/(.+)/,j=e.publish,k=e.subscribe,l=e.unsubscribe,m="memory",n="subscriptions";returnc.extend(function(){varc=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(rinh){k=h[r];if(!(kinstanceofg))continue;q=i.exec(r);if(q!==f){p=q[1];if(pino){j=o[p],m=n=j.length;while(m--)if(k===j[m])continuea;j[n]=k}elseo[p]=[k]}}}b.call(c,{signal:functions(s,a){varb=this,c,e,f=a;if(sino){c=o[s],e=c.length;while(--e)f=d(function(a){vard=c[e],g=f;a.done(function(){d.call(b,s,g)})});c[0].call(b,s,f)}elsea&&a.resolve();returnb}})},{displayName:"core/component/gadget","sig/initialize":function(b,c){vard=this,i=d[n]=[],j=f,k,l,o;for(jind){k=d[j];if(kinstanceofg)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);elsecontinue}returnc&&c.resolve(),d},"sig/finalize":function(b,c){vard=this,f=d[n],g;while(g=f.shift())e.unsubscribe(g[0],g[1],g[2]);returnc&&c.resolve(),d},publish:function(){varb=this;returnj.apply(e,arguments),b},subscribe:function(){varb=this;returnk.apply(e,arguments),b},unsubscribe:function(){varb=this;returnl.apply(e,arguments),b},start:function(b){varc=this;returnd(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){varc=this;returnd(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){returnb.extend({displayName:"core/component/service"})}),define("troopjs-core/util/merge",[],function(){varb=Array,c=Object;returnfunctiond(a){vare=this,f=null,g,h,i,j;for(g=0,h=arguments.length;g<h;g++){a=arguments[g];for(fina)i=a[f],j=i.constructor,fine?j===b?e[f]=e[f].concat(i):j===c?d.call(e[f],i):e[f]=i:e[f]=i}returne}}),define("troopjs-core/remote/ajax",["../component/service","../pubsub/topic","jquery","../util/merge"],function(b,c,d,e){returnb.extend({displayName:"core/remote/ajax","hub/ajax":function(b,f,g){d.ajax(e.call({headers:{"x-request-id":(newDate).getTime(),"x-components":binstanceofc?b.trace():b}},f)).then(g.resolve,g.reject)}})}),define("troopjs-core/util/uri",["compose"],function(b){varc=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;varo=b(function(b){if(!b||b.length===0)return;varc=this,d,f,g,h=/(?:&|^)([^&=]*)=?([^&]*)/g;while(d=h.exec(b))f=d[1],finc?(g=c[f],ginstanceofe?g[g.length]=d[2]:c[f]=[g,d[2]]):c[f]=d[2]},{toString:functionr(){vara=this,b=c,f=c,g=[],h=0,i;for(bina){if(a[b]instanceofd)continue;g[h++]=b}g.sort();while(h--){b=g[h],f=a[b];if(finstanceofe){f=f.slice(0),f.sort(),i=f.length;while(i--)f[i]=b+"="+f[i];g[h]=f.join("&")}elseg[h]=b+"="+f}returng.join("&")}}),p=b(f,function(b){if(!b||b.length===0)return;varc=this,d,e=/(?:\/|^)([^\/]*)/g;while(d=e.exec(b))c.push(d[1])},{toString:functions(){returnthis.join("/")}}),q=b(function(b){varc=this,d=g.exec(b),e=d.length,f;while(e--)f=d[e],f&&(c[m[e]]=f);kinc&&(c[k]=o(c[k])),jinc&&(c[j]=p(c[j]))},{toString:functiont(){vara=this,b=[h,"://",i,j,"?",k,"#",l],c,d;hina||b.splice(0,3),jina||b.splice(0,1),lina||b.splice(-2,2),kina||b.splice(-2,2),c=b.length;while(c--)d=b[c],dina&&(b[c]=a[d]);returnb.join("")}});returnb.secure=n,q}),define("troopjs-core/route/router",["../component/service","../util/uri"],function(b,c){functionh(a){varb=a.data,d=c(a.target.location.hash.replace(g,"")),e=d.toString();e!==b[f]&&(b[f]=e,b.publish(f,d))}vard="hashchange",e="$element",f="route",g=/^#/;returnb.extend(function(b){this[e]=b},{displayName:"core/route/router","sig/initialize":function(b,c){varf=this;returnf[e].bind(d,f,h),c&&c.resolve(),f},"sig/start":function(b,c){varf=this;returnf[e].trigger(d),c&&c.resolve(),f},"sig/finalize":function(b,c){varf=this;returnf[e].unbind(d,h),c&&c.resolve(),f}})}),define("troopjs-core/store/base",["compose","../component/gadget"],function(b,c){vard="storage";returnc.extend({storage:b.required,set:function(b,c,e){this[d].setItem(b,JSON.stringify(c)),e&&e.resolve(c)},get:function(b,c){vare=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){returnb.create(c,{displayName:"core/store/local",storage:window.localStorage})}),define("troopjs-core/store/session",["compose","./base"],function(b,c){returnb.create(c,{displayName:"core/store/session",storage:window.sessionStorage})}),define("troopjs-core/component/widget",["./gadget","jquery","../util/deferred"],function(b,c,d){functionx(a,b,c){returnfunction(){returnj.call(arguments,a),c.apply(b,arguments)}}functiony(a){functionb(){varb=this,c=b[r],e=arguments,h=i.call(e),j=e.length,l=j>0&&e[j-1][u]instanceoff?k.call(e):g;returnl&&l.notifyWith(this,["beforeRender"]),a.call(c,hinstanceoff?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}returnb}vare=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]";returnb.extend(function(b,c){vard=this;d[r]=b,c&&(d.displayName=c)},{displayName:"core/component/widget","sig/initialize":function(b,c){vard=this,g=d[r],h=d[s]=[],i=e,j,k,l;for(iind){j=d[i];if(jinstanceoff)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);elsecontinue}returnc&&c.resolve(),d},"sig/finalize":function(b,c){vard=this,e=d[r],f=d[s],g;while(g=f.shift())e.unbind(g[0],g[1]);returnc&&c.resolve(),d},weave:function(b){varc=this;returnc[r].find(v).weave(b),c},unweave:function(){varb=this;returnb[r].find(w).andSelf().unweave(),this},one:function(){varb=this;returnm.apply(b[r],arguments),b},bind:function(){varb=this;returnn.apply(b[r],arguments),b},unbind:function(){varb=this;returno.apply(b[r],arguments),b},trigger:function(){varb=this;returnl.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){varc=this;returnd(function(d){vare=c[r],f=e.contents().detach();e.trigger(q,c),setTimeout(function(){varb=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){functionn(){vara=this,b=arguments,f=b.length,g=f>0&&b[f-1][m]instanceofe?h.call(b):d;returnc(function(e){varf,h,m,n;if(iina)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){vard=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}functiono(a){varb=this;returnc(function(e){varf;iinb?(f=b[i],deleteb[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}vard=undefined,e=Function,f=Array,g=f.prototype,h=g.pop,i="holding",j="data-"+i,k="$element",l="target",m="then";returnb.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){varc=null,d="route";returnb.extend(function(b,c){this[d]=RegExp(b.data("route"))},{displayName:"core/route/placeholder","hub:memory/route":function(b,e){varf=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){returnb.extend({displayName:"core/widget/application","sig/start":function(b,c){vard=this;returnd.weave(c),d},"sig/stop":function(b,c){vard=this;returnd.unweave(c),d}})}),define("troopjs-core/util/each",["jquery"],function(b){returnb.each}),define("troopjs-core/util/grep",["jquery"],function(b){returnb.grep}),define("troopjs-core/util/tr",[],function(){varb=typeofNumber();returnfunction(c){vard=this,e=[],f,g=d.length,h;if(typeofg===b&&g===0||g>0&&0ind&&g-1ind)for(f=0;f<g;f++)e.push(c.call(d,d[f],f));elseif(d)for(hind)e.push(c.call(d,d[h],h));returne}}),define("troopjs-core/util/when",["jquery"],function(b){returnb.when}),define("troopjs-jquery/action",["jquery"],function(b){functionp(a,b){returna?a+"."+g:e}functionq(a){varc=b(this),e=f.call(arguments,1),h=iina?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)))}functionr(a){vard=b(a.target).closest("[data-action]");if(d.length===0)return;varf=d.data(),i=j.exec(f[g]);if(i===e)return;varp=i[1],q=i[2],r=i[3];if(q!==c&&!RegExp(q.split(l).join("|")).test(a.type))return;vars=r!==c?r.split(k):[];b.each(s,function(b,d){dinf?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()}varc=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){vard=b.map(c.namespace.split(l),p);d.length!==0&&b(this).bind(d.join(""),r)},remove:function(c){vard=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){returnb(this).trigger({type:g+"!",action:c},f.call(arguments,1))}}),define("troopjs-jquery/destroy",["jquery"],function(b){b.event.special.destroy={remove:function(c){vard=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){functionj(a,b){returna<b?1:a>b?-1:0}functionk(a){varc=b(this),e=c.width(),j=c.height();b.each(c.data(d),function(k,l){varm=l[f],n=m.length-1,o=l[g],p=o.length-1,q=b.grep(m,function(a,b){returna<=e||b===n})[0],r=b.grep(o,function(a,b){returna<=j||b===p})[0];if(q!==l[h]||r!==l[i])l[h]=q,l[i]=r,c.trigger(d+"."+k,[q,r])})}varc=/(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){varh=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){deleteb.data(this,d)[c.namespace]},teardown:function(c){b(this).removeData(d).unbind(e,k)}}}),define("troopjs-jquery/hashchange",["jquery"],function(b){functioni(a){varb=f.exec(a.location.href);returnb&&b[1]?decodeURIComponent(b[1]):""}functionj(a){varb=this,c;b.element=c=a.createElement("iframe"),c.src="about:blank",c.style.display="none"}varc="interval",d="hashchange",e="on"+d,f=/#(.*)$/,g=/\?/,h=!1;j.prototype={getElement:function(){returnthis.element},getHash:function(){returnthis.element.contentWindow.frameHash},update:function(b){varc=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> </body></html>"),d.close()}},b.event.special[d]={setup:function(f,k,l){varm=this;if(einm)return!1;if(!b.isWindow(m))thrownewError("Unable to bind 'hashchange' to a non-window object");varn=b(m),o=i(m),p=m.location;n.data(c,m.setInterval(h?function(){varb=m.document,c=p.protocol==="file:",e=newj(b);returnb.body.appendChild(e.getElement()),e.update(o),function(){varb=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(){varb=o,c,e=i(m);e!==o&&(c=decodeURIComponent(e),o!==c&&(o=c,n.trigger(d,[c,b])))},25))},teardown:function(d){varf=this;if(einf)return!1;f.clearInterval(b.data(f,c))}}}),define("troopjs-jquery/weave",["jquery"],function(b){functionx(a){b(this).unweave()}varc=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(){vare=[],g=0,m=b(this),s=arguments,y=s.length,z=y>0&&s[y-1][k]instanceoff?i.call(s):c;returnm.filter(r).each(function(f,i){vark=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){varh=B++,i,j,l,n;e[g++]=f,f.done(function(b){z[h]=b});varp=C[1],q=[k,p];for(i=0,l=s.length,j=q.length;i<l;i++,j++)q[j]=s[i];varr=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],ninm?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){vard=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){vard=[],e=0,f=b(this);returnf.filter(s).each(function(c,f){varg=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}});