Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bumped troopjs-bundle

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

0 notes on commit bbdec9c

Please sign in to comment.
Something went wrong with that request. Please try again.