activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1416718 [3/4] - in /activemq/activemq-apollo/trunk: ./ apollo-distro/src/main/descriptors/ apollo-network/src/main/scala/org/apache/activemq/apollo/broker/network/web/ apollo-web/ apollo-web/src/main/scala/org/apache/activemq/apollo/web/re...
Date Mon, 03 Dec 2012 22:58:08 GMT
Added: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery-1.8.0.min.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery-1.8.0.min.js?rev=1416718&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery-1.8.0.min.js
(added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery-1.8.0.min.js
Mon Dec  3 22:58:00 2012
@@ -0,0 +1,2 @@
+/*! jQuery v@1.8.0 jquery.com | jquery.org/license */

[... 3 lines stripped ...]
Added: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.ba-bbq.min.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.ba-bbq.min.js?rev=1416718&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.ba-bbq.min.js
(added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.ba-bbq.min.js
Mon Dec  3 22:58:00 2012
@@ -0,0 +1,18 @@
+/*
+ * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
+ * http://benalman.com/projects/jquery-bbq-plugin/
+ * 
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function
E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return
G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function
o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return
O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new
RegExp(F.join("|"),"g
 ")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g,"
").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return
H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return
l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function
s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function
 (){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var
H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return
F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete
G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return
K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return
G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
+/*
+ * jQuery hashchange event - v1.2 - 2/11/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ * 
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d
in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return
false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function
p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return
a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var
t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return
m})()})(jQuery,this);
\ No newline at end of file

Added: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.slideto.min.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.slideto.min.js?rev=1416718&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.slideto.min.js
(added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.slideto.min.js
Mon Dec  3 22:58:00 2012
@@ -0,0 +1 @@
+(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return
this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);

Added: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.wiggle.min.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.wiggle.min.js?rev=1416718&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.wiggle.min.js
(added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/jquery.wiggle.min.js
Mon Dec  3 22:58:00 2012
@@ -0,0 +1,8 @@
+/*
+jQuery Wiggle
+Author: WonderGroup, Jordan Thomas
+URL: http://labs.wondergroup.com/demos/mini-ui/index.html
+License: MIT (http://en.wikipedia.org/wiki/MIT_License)
+*/
+jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return
this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var
calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}
+if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};
\ No newline at end of file

Added: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/swagger.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/swagger.js?rev=1416718&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/swagger.js (added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/swagger.js Mon Dec 
3 22:58:00 2012
@@ -0,0 +1,746 @@
+// Generated by CoffeeScript 1.3.3
+(function() {
+  var SwaggerApi, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource,
+    __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
+
+  SwaggerApi = (function() {
+
+    SwaggerApi.prototype.discoveryUrl = "http://api.wordnik.com/v4/resources.json";
+
+    SwaggerApi.prototype.debug = false;
+
+    SwaggerApi.prototype.api_key = null;
+
+    SwaggerApi.prototype.basePath = null;
+
+    function SwaggerApi(options) {
+      if (options == null) {
+        options = {};
+      }
+      if (options.discoveryUrl != null) {
+        this.discoveryUrl = options.discoveryUrl;
+      }
+      if (options.debug != null) {
+        this.debug = options.debug;
+      }
+      this.apiKeyName = options.apiKeyName != null ? options.apiKeyName : 'api_key';
+      if (options.apiKey != null) {
+        this.api_key = options.apiKey;
+      }
+      if (options.api_key != null) {
+        this.api_key = options.api_key;
+      }
+      if (options.verbose != null) {
+        this.verbose = options.verbose;
+      }
+      this.supportHeaderParams = options.supportHeaderParams != null ? options.supportHeaderParams
: false;
+      this.supportedSubmitMethods = options.supportedSubmitMethods != null ? options.supportedSubmitMethods
: ['get'];
+      if (options.success != null) {
+        this.success = options.success;
+      }
+      this.failure = options.failure != null ? options.failure : function() {};
+      this.progress = options.progress != null ? options.progress : function() {};
+      this.headers = options.headers != null ? options.headers : {};
+      this.booleanValues = options.booleanValues != null ? options.booleanValues : new Array('true',
'false');
+      this.discoveryUrl = this.suffixApiKey(this.discoveryUrl);
+      if (options.success != null) {
+        this.build();
+      }
+    }
+
+    SwaggerApi.prototype.build = function() {
+      var _this = this;
+      this.progress('fetching resource list: ' + this.discoveryUrl);
+      return jQuery.getJSON(this.discoveryUrl, function(response) {
+        var res, resource, _i, _j, _len, _len1, _ref, _ref1;
+        if (response.apiVersion != null) {
+          _this.apiVersion = response.apiVersion;
+        }
+        if ((response.basePath != null) && jQuery.trim(response.basePath).length
> 0) {
+          _this.basePath = response.basePath;
+          if (_this.basePath.match(/^HTTP/i) == null) {
+            _this.fail("discoveryUrl basePath must be a URL.");
+          }
+          _this.basePath = _this.basePath.replace(/\/$/, '');
+        } else {
+          _this.basePath = _this.discoveryUrl.substring(0, _this.discoveryUrl.lastIndexOf('/'));
+          log('derived basepath from discoveryUrl as ' + _this.basePath);
+        }
+        _this.resources = {};
+        _this.resourcesArray = [];
+        if (response.resourcePath != null) {
+          _this.resourcePath = response.resourcePath;
+          res = null;
+          _ref = response.apis;
+          for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+            resource = _ref[_i];
+            if (res === null) {
+              res = new SwaggerResource(resource, _this);
+            } else {
+              res.addOperations(resource.path, resource.operations);
+            }
+          }
+          if (res != null) {
+            _this.resources[res.name] = res;
+            _this.resourcesArray.push(res);
+            res.ready = true;
+            _this.selfReflect();
+          }
+        } else {
+          _ref1 = response.apis;
+          for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+            resource = _ref1[_j];
+            res = new SwaggerResource(resource, _this);
+            _this.resources[res.name] = res;
+            _this.resourcesArray.push(res);
+          }
+        }
+        return _this;
+      }).error(function(error) {
+        return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.discoveryUrl);
+      });
+    };
+
+    SwaggerApi.prototype.selfReflect = function() {
+      var resource, resource_name, _ref;
+      if (this.resources == null) {
+        return false;
+      }
+      _ref = this.resources;
+      for (resource_name in _ref) {
+        resource = _ref[resource_name];
+        if (resource.ready == null) {
+          return false;
+        }
+      }
+      this.setConsolidatedModels();
+      this.ready = true;
+      if (this.success != null) {
+        return this.success();
+      }
+    };
+
+    SwaggerApi.prototype.fail = function(message) {
+      this.failure(message);
+      throw message;
+    };
+
+    SwaggerApi.prototype.setConsolidatedModels = function() {
+      var model, modelName, resource, resource_name, _i, _len, _ref, _ref1, _results;
+      this.modelsArray = [];
+      this.models = {};
+      _ref = this.resources;
+      for (resource_name in _ref) {
+        resource = _ref[resource_name];
+        for (modelName in resource.models) {
+          if (!(this.models[modelName] != null)) {
+            this.models[modelName] = resource.models[modelName];
+            this.modelsArray.push(resource.models[modelName]);
+          }
+        }
+      }
+      _ref1 = this.modelsArray;
+      _results = [];
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        model = _ref1[_i];
+        _results.push(model.setReferencedModels(this.models));
+      }
+      return _results;
+    };
+
+    SwaggerApi.prototype.suffixApiKey = function(url) {
+      var sep;
+      if ((this.api_key != null) && jQuery.trim(this.api_key).length > 0 &&
(url != null)) {
+        sep = url.indexOf('?') > 0 ? '&' : '?';
+        return url + sep + this.apiKeyName + '=' + this.api_key;
+      } else {
+        return url;
+      }
+    };
+
+    SwaggerApi.prototype.help = function() {
+      var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref,
_ref1, _ref2;
+      _ref = this.resources;
+      for (resource_name in _ref) {
+        resource = _ref[resource_name];
+        console.log(resource_name);
+        _ref1 = resource.operations;
+        for (operation_name in _ref1) {
+          operation = _ref1[operation_name];
+          console.log("  " + operation.nickname);
+          _ref2 = operation.parameters;
+          for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+            parameter = _ref2[_i];
+            console.log("    " + parameter.name + (parameter.required ? ' (required)' : '')
+ " - " + parameter.description);
+          }
+        }
+      }
+      return this;
+    };
+
+    return SwaggerApi;
+
+  })();
+
+  SwaggerResource = (function() {
+
+    function SwaggerResource(resourceObj, api) {
+      var parts,
+        _this = this;
+      this.api = api;
+      this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
+      this.description = resourceObj.description;
+      parts = this.path.split("/");
+      this.name = parts[parts.length - 1].replace('.{format}', '');
+      this.basePath = this.api.basePath;
+      this.operations = {};
+      this.operationsArray = [];
+      this.modelsArray = [];
+      this.models = {};
+      if ((resourceObj.operations != null) && (this.api.resourcePath != null)) {
+        this.api.progress('reading resource ' + this.name + ' models and operations');
+        this.addModels(resourceObj.models);
+        this.addOperations(resourceObj.path, resourceObj.operations);
+        this.api[this.name] = this;
+      } else {
+        if (this.path == null) {
+          this.api.fail("SwaggerResources must have a path.");
+        }
+        this.url = this.api.suffixApiKey(this.api.basePath + this.path.replace('{format}',
'json'));
+        this.api.progress('fetching resource ' + this.name + ': ' + this.url);
+        jQuery.getJSON(this.url, function(response) {
+          var endpoint, _i, _len, _ref;
+          if ((response.basePath != null) && jQuery.trim(response.basePath).length
> 0) {
+            _this.basePath = response.basePath;
+            _this.basePath = _this.basePath.replace(/\/$/, '');
+          }
+          _this.addModels(response.models);
+          if (response.apis) {
+            _ref = response.apis;
+            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+              endpoint = _ref[_i];
+              _this.addOperations(endpoint.path, endpoint.operations);
+            }
+          }
+          _this.api[_this.name] = _this;
+          _this.ready = true;
+          return _this.api.selfReflect();
+        }).error(function(error) {
+          return _this.api.fail(error.status + ' : ' + error.statusText + ' ' + _this.url);
+        });
+      }
+    }
+
+    SwaggerResource.prototype.addModels = function(models) {
+      var model, modelName, swaggerModel, _i, _len, _ref, _results;
+      if (models != null) {
+        for (modelName in models) {
+          swaggerModel = new SwaggerModel(modelName, models[modelName]);
+          this.modelsArray.push(swaggerModel);
+          this.models[modelName] = swaggerModel;
+        }
+        _ref = this.modelsArray;
+        _results = [];
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          model = _ref[_i];
+          _results.push(model.setReferencedModels(this.models));
+        }
+        return _results;
+      }
+    };
+
+    SwaggerResource.prototype.addOperations = function(resource_path, ops) {
+      var o, op, _i, _len, _results;
+      if (ops) {
+        _results = [];
+        for (_i = 0, _len = ops.length; _i < _len; _i++) {
+          o = ops[_i];
+          op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters,
o.summary, o.notes, o.responseClass, o.errorResponses, this, o.supportedContentTypes);
+          this.operations[op.nickname] = op;
+          _results.push(this.operationsArray.push(op));
+        }
+        return _results;
+      }
+    };
+
+    SwaggerResource.prototype.help = function() {
+      var operation, operation_name, parameter, _i, _len, _ref, _ref1;
+      _ref = this.operations;
+      for (operation_name in _ref) {
+        operation = _ref[operation_name];
+        console.log("  " + operation.nickname);
+        _ref1 = operation.parameters;
+        for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+          parameter = _ref1[_i];
+          console.log("    " + parameter.name + (parameter.required ? ' (required)' : '')
+ " - " + parameter.description);
+        }
+      }
+      return this;
+    };
+
+    return SwaggerResource;
+
+  })();
+
+  SwaggerModel = (function() {
+
+    function SwaggerModel(modelName, obj) {
+      var propertyName;
+      this.name = obj.id != null ? obj.id : modelName;
+      this.properties = [];
+      for (propertyName in obj.properties) {
+        this.properties.push(new SwaggerModelProperty(propertyName, obj.properties[propertyName]));
+      }
+    }
+
+    SwaggerModel.prototype.setReferencedModels = function(allModels) {
+      var prop, _i, _len, _ref, _results;
+      _ref = this.properties;
+      _results = [];
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        prop = _ref[_i];
+        if (allModels[prop.dataType] != null) {
+          _results.push(prop.refModel = allModels[prop.dataType]);
+        } else if ((prop.refDataType != null) && (allModels[prop.refDataType] !=
null)) {
+          _results.push(prop.refModel = allModels[prop.refDataType]);
+        } else {
+          _results.push(void 0);
+        }
+      }
+      return _results;
+    };
+
+    SwaggerModel.prototype.getMockSignature = function(prefix, modelToIgnore) {
+      var classClose, classOpen, prop, propertiesStr, returnVal, strong, strongClose, stronger,
_i, _j, _len, _len1, _ref, _ref1;
+      propertiesStr = [];
+      _ref = this.properties;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        prop = _ref[_i];
+        propertiesStr.push(prop.toString());
+      }
+      strong = '<span style="font-weight: bold; color: #000; font-size: 1.0em">';
+      stronger = '<span style="font-weight: bold; color: #000; font-size: 1.1em">';
+      strongClose = '</span>';
+      classOpen = strong + 'class ' + this.name + '(' + strongClose;
+      classClose = strong + ')' + strongClose;
+      returnVal = classOpen + '<span>' + propertiesStr.join('</span>, <span>')
+ '</span>' + classClose;
+      if (prefix != null) {
+        returnVal = stronger + prefix + strongClose + '<br/>' + returnVal;
+      }
+      _ref1 = this.properties;
+      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+        prop = _ref1[_j];
+        if ((prop.refModel != null) && (!(prop.refModel === modelToIgnore))) {
+          returnVal = returnVal + ('<br>' + prop.refModel.getMockSignature(void 0,
this));
+        }
+      }
+      return returnVal;
+    };
+
+    SwaggerModel.prototype.createJSONSample = function(modelToIgnore) {
+      var prop, result, _i, _len, _ref;
+      result = {};
+      _ref = this.properties;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        prop = _ref[_i];
+        result[prop.name] = prop.getSampleValue(modelToIgnore);
+      }
+      return result;
+    };
+
+    return SwaggerModel;
+
+  })();
+
+  SwaggerModelProperty = (function() {
+
+    function SwaggerModelProperty(name, obj) {
+      this.name = name;
+      this.dataType = obj.type;
+      this.isArray = this.dataType.toLowerCase() === 'array';
+      this.descr = obj.description;
+      if (obj.items != null) {
+        if (obj.items.type != null) {
+          this.refDataType = obj.items.type;
+        }
+        if (obj.items.$ref != null) {
+          this.refDataType = obj.items.$ref;
+        }
+      }
+      this.dataTypeWithRef = this.refDataType != null ? this.dataType + '[' + this.refDataType
+ ']' : this.dataType;
+      if (obj.allowableValues != null) {
+        this.valueType = obj.allowableValues.valueType;
+        this.values = obj.allowableValues.values;
+        if (this.values != null) {
+          this.valuesString = "'" + this.values.join("' or '") + "'";
+        }
+      }
+    }
+
+    SwaggerModelProperty.prototype.getSampleValue = function(modelToIgnore) {
+      var result;
+      if ((this.refModel != null) && (!(this.refModel === modelToIgnore))) {
+        result = this.refModel.createJSONSample(this.refModel);
+      } else {
+        if (this.isArray) {
+          result = this.refDataType;
+        } else {
+          result = this.dataType;
+        }
+      }
+      if (this.isArray) {
+        return [result];
+      } else {
+        return result;
+      }
+    };
+
+    SwaggerModelProperty.prototype.toString = function() {
+      var str;
+      str = this.name + ': ' + this.dataTypeWithRef;
+      if (this.values != null) {
+        str += " = ['" + this.values.join("' or '") + "']";
+      }
+      if (this.descr != null) {
+        str += ' {' + this.descr + '}';
+      }
+      return str;
+    };
+
+    return SwaggerModelProperty;
+
+  })();
+
+  SwaggerOperation = (function() {
+
+    function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, responseClass,
errorResponses, resource, supportedContentTypes) {
+      var parameter, v, _i, _j, _len, _len1, _ref, _ref1, _ref2,
+        _this = this;
+      this.nickname = nickname;
+      this.path = path;
+      this.httpMethod = httpMethod;
+      this.parameters = parameters != null ? parameters : [];
+      this.summary = summary;
+      this.notes = notes;
+      this.responseClass = responseClass;
+      this.errorResponses = errorResponses;
+      this.resource = resource;
+      this.supportedContentTypes = supportedContentTypes;
+      this["do"] = __bind(this["do"], this);
+
+      if (this.nickname == null) {
+        this.resource.api.fail("SwaggerOperations must have a nickname.");
+      }
+      if (this.path == null) {
+        this.resource.api.fail("SwaggerOperation " + nickname + " is missing path.");
+      }
+      if (this.httpMethod == null) {
+        this.resource.api.fail("SwaggerOperation " + nickname + " is missing httpMethod.");
+      }
+      this.path = this.path.replace('{format}', 'json');
+      this.httpMethod = this.httpMethod.toLowerCase();
+      this.isGetMethod = this.httpMethod === "get";
+      this.resourceName = this.resource.name;
+      if (((_ref = this.responseClass) != null ? _ref.toLowerCase() : void 0) === 'void')
{
+        this.responseClass = void 0;
+      }
+      if (this.responseClass != null) {
+        this.responseClassSignature = this.getSignature(this.responseClass, this.resource.models);
+        this.responseSampleJSON = this.getSampleJSON(this.responseClass, this.resource.models);
+      }
+      this.errorResponses = this.errorResponses || [];
+      _ref1 = this.parameters;
+      for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+        parameter = _ref1[_i];
+        parameter.name = parameter.name || parameter.dataType;
+        if (parameter.dataType.toLowerCase() === 'boolean') {
+          parameter.allowableValues = {};
+          parameter.allowableValues.values = this.resource.api.booleanValues;
+        }
+        parameter.signature = this.getSignature(parameter.dataType, this.resource.models);
+        parameter.sampleJSON = this.getSampleJSON(parameter.dataType, this.resource.models);
+        if (parameter.allowableValues != null) {
+          if (parameter.allowableValues.valueType === "RANGE") {
+            parameter.isRange = true;
+          } else {
+            parameter.isList = true;
+          }
+          if (parameter.allowableValues.values != null) {
+            parameter.allowableValues.descriptiveValues = [];
+            _ref2 = parameter.allowableValues.values;
+            for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+              v = _ref2[_j];
+              if ((parameter.defaultValue != null) && parameter.defaultValue ===
v) {
+                parameter.allowableValues.descriptiveValues.push({
+                  value: v,
+                  isDefault: true
+                });
+              } else {
+                parameter.allowableValues.descriptiveValues.push({
+                  value: v,
+                  isDefault: false
+                });
+              }
+            }
+          }
+        }
+      }
+      this.resource[this.nickname] = function(args, callback, error) {
+        return _this["do"](args, callback, error);
+      };
+    }
+
+    SwaggerOperation.prototype.isListType = function(dataType) {
+      if (dataType.indexOf('[') >= 0) {
+        return dataType.substring(dataType.indexOf('[') + 1, dataType.indexOf(']'));
+      } else {
+        return void 0;
+      }
+    };
+
+    SwaggerOperation.prototype.getSignature = function(dataType, models) {
+      var isPrimitive, listType;
+      listType = this.isListType(dataType);
+      isPrimitive = ((listType != null) && models[listType]) || (models[dataType]
!= null) ? false : true;
+      if (isPrimitive) {
+        return dataType;
+      } else {
+        if (listType != null) {
+          return models[listType].getMockSignature(dataType);
+        } else {
+          return models[dataType].getMockSignature(dataType);
+        }
+      }
+    };
+
+    SwaggerOperation.prototype.getSampleJSON = function(dataType, models) {
+      var isPrimitive, listType, val;
+      listType = this.isListType(dataType);
+      isPrimitive = ((listType != null) && models[listType]) || (models[dataType]
!= null) ? false : true;
+      val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample()
: models[dataType].createJSONSample());
+      if (val) {
+        val = listType ? [val] : val;
+        return JSON.stringify(val, null, 2);
+      }
+    };
+
+    SwaggerOperation.prototype["do"] = function(args, callback, error) {
+      var body, headers;
+      if (args == null) {
+        args = {};
+      }
+      if ((typeof args) === "function") {
+        error = callback;
+        callback = args;
+        args = {};
+      }
+      if (error == null) {
+        error = function(xhr, textStatus, error) {
+          return console.log(xhr, textStatus, error);
+        };
+      }
+      if (callback == null) {
+        callback = function(data) {
+          return console.log(data);
+        };
+      }
+      if (args.headers != null) {
+        headers = args.headers;
+        delete args.headers;
+      }
+      if (args.body != null) {
+        body = args.body;
+        delete args.body;
+      }
+      return new SwaggerRequest(this.httpMethod, this.urlify(args), headers, body, callback,
error, this);
+    };
+
+    SwaggerOperation.prototype.pathJson = function() {
+      return this.path.replace("{format}", "json");
+    };
+
+    SwaggerOperation.prototype.pathXml = function() {
+      return this.path.replace("{format}", "xml");
+    };
+
+    SwaggerOperation.prototype.urlify = function(args, includeApiKey) {
+      var param, queryParams, reg, url, _i, _len, _ref;
+      if (includeApiKey == null) {
+        includeApiKey = true;
+      }
+      url = this.resource.basePath + this.pathJson();
+      _ref = this.parameters;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        param = _ref[_i];
+        if (param.paramType === 'path') {
+          if (args[param.name]) {
+            reg = new RegExp('\{' + param.name + '[^\}]*\}', 'gi');
+            url = url.replace(reg, encodeURIComponent(args[param.name]));
+            delete args[param.name];
+          } else {
+            throw "" + param.name + " is a required path param.";
+          }
+        }
+      }
+      if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length
> 0) {
+        args[this.apiKeyName] = this.resource.api.api_key;
+      }
+      if (this.supportHeaderParams()) {
+        queryParams = jQuery.param(this.getQueryParams(args, includeApiKey));
+      } else {
+        queryParams = jQuery.param(this.getQueryAndHeaderParams(args, includeApiKey));
+      }
+      if ((queryParams != null) && queryParams.length > 0) {
+        url += "?" + queryParams;
+      }
+      return url;
+    };
+
+    SwaggerOperation.prototype.supportHeaderParams = function() {
+      return this.resource.api.supportHeaderParams;
+    };
+
+    SwaggerOperation.prototype.supportedSubmitMethods = function() {
+      return this.resource.api.supportedSubmitMethods;
+    };
+
+    SwaggerOperation.prototype.getQueryAndHeaderParams = function(args, includeApiKey) {
+      if (includeApiKey == null) {
+        includeApiKey = true;
+      }
+      return this.getMatchingParams(['query', 'header'], args, includeApiKey);
+    };
+
+    SwaggerOperation.prototype.getQueryParams = function(args, includeApiKey) {
+      if (includeApiKey == null) {
+        includeApiKey = true;
+      }
+      return this.getMatchingParams(['query'], args, includeApiKey);
+    };
+
+    SwaggerOperation.prototype.getHeaderParams = function(args, includeApiKey) {
+      if (includeApiKey == null) {
+        includeApiKey = true;
+      }
+      return this.getMatchingParams(['header'], args, includeApiKey);
+    };
+
+    SwaggerOperation.prototype.getMatchingParams = function(paramTypes, args, includeApiKey)
{
+      var matchingParams, name, param, value, _i, _len, _ref, _ref1;
+      matchingParams = {};
+      _ref = this.parameters;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        param = _ref[_i];
+        if ((jQuery.inArray(param.paramType, paramTypes) >= 0) && args[param.name])
{
+          matchingParams[param.name] = args[param.name];
+        }
+      }
+      if (includeApiKey && (this.resource.api.api_key != null) && this.resource.api.api_key.length
> 0) {
+        matchingParams[this.resource.api.apiKeyName] = this.resource.api.api_key;
+      }
+      if (jQuery.inArray('header', paramTypes) >= 0) {
+        _ref1 = this.resource.api.headers;
+        for (name in _ref1) {
+          value = _ref1[name];
+          matchingParams[name] = value;
+        }
+      }
+      return matchingParams;
+    };
+
+    SwaggerOperation.prototype.help = function() {
+      var parameter, _i, _len, _ref;
+      _ref = this.parameters;
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        parameter = _ref[_i];
+        console.log("    " + parameter.name + (parameter.required ? ' (required)' : '') +
" - " + parameter.description);
+      }
+      return this;
+    };
+
+    return SwaggerOperation;
+
+  })();
+
+  SwaggerRequest = (function() {
+
+    function SwaggerRequest(type, url, headers, body, successCallback, errorCallback, operation)
{
+      var obj,
+        _this = this;
+      this.type = type;
+      this.url = url;
+      this.headers = headers;
+      this.body = body;
+      this.successCallback = successCallback;
+      this.errorCallback = errorCallback;
+      this.operation = operation;
+      if (this.type == null) {
+        throw "SwaggerRequest type is required (get/post/put/delete).";
+      }
+      if (this.url == null) {
+        throw "SwaggerRequest url is required.";
+      }
+      if (this.successCallback == null) {
+        throw "SwaggerRequest successCallback is required.";
+      }
+      if (this.errorCallback == null) {
+        throw "SwaggerRequest error callback is required.";
+      }
+      if (this.operation == null) {
+        throw "SwaggerRequest operation is required.";
+      }
+      if (this.operation.resource.api.verbose) {
+        console.log(this.asCurl());
+      }
+      this.headers || (this.headers = {});
+      if (this.operation.resource.api.api_key != null) {
+        this.headers[this.apiKeyName] = this.operation.resource.api.api_key;
+      }
+      if (this.headers.mock == null) {
+        obj = {
+          type: this.type,
+          url: this.url,
+          data: JSON.stringify(this.body),
+          dataType: 'json',
+          error: function(xhr, textStatus, error) {
+            return _this.errorCallback(xhr, textStatus, error);
+          },
+          success: function(data) {
+            return _this.successCallback(data);
+          }
+        };
+        if (obj.type.toLowerCase() === "post" || obj.type.toLowerCase() === "put") {
+          obj.contentType = "application/json";
+        }
+        jQuery.ajax(obj);
+      }
+    }
+
+    SwaggerRequest.prototype.asCurl = function() {
+      var header_args, k, v;
+      header_args = (function() {
+        var _ref, _results;
+        _ref = this.headers;
+        _results = [];
+        for (k in _ref) {
+          v = _ref[k];
+          _results.push("--header \"" + k + ": " + v + "\"");
+        }
+        return _results;
+      }).call(this);
+      return "curl " + (header_args.join(" ")) + " " + this.url;
+    };
+
+    return SwaggerRequest;
+
+  })();
+
+  window.SwaggerApi = SwaggerApi;
+
+  window.SwaggerResource = SwaggerResource;
+
+  window.SwaggerOperation = SwaggerOperation;
+
+  window.SwaggerRequest = SwaggerRequest;
+
+}).call(this);

Added: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/underscore-min.js
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/underscore-min.js?rev=1416718&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/underscore-min.js (added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/api/lib/underscore-min.js Mon
Dec  3 22:58:00 2012
@@ -0,0 +1,32 @@
+// Underscore.js 1.3.3
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the MIT license.
+// Portions of Underscore are inspired or borrowed from Prototype,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore
+(function(){function r(a,c,d){if(a===c)return 0!==a||1/a==1/c;if(null==a||null==c)return
a===c;a._chain&&(a=a._wrapped);c._chain&&(c=c._wrapped);if(a.isEqual&&b.isFunction(a.isEqual))return
a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return!1;switch(e){case
"[object String]":return a==""+c;case "[object Number]":return a!=+a?c!=+c:0==a?1/a==1/c:a==+c;case
"[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
+c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if("object"!=typeof
a||"object"!=typeof c)return!1;for(var f=d.length;f--;)if(d[f]==a)return!0;d.push(a);var f=0,g=!0;if("[object
Array]"==e){if(f=a.length,g=f==c.length)for(;f--&&(g=f in a==f in c&&r(a[f],c[f],d)););}else{if("constructor"in
a!="constructor"in c||a.constructor!=c.constructor)return!1;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&r(a[h],c[h],d))))break;if(g){for(h
in c)if(b.has(c,h)&&!f--)break;
+g=!f}}d.pop();return g}var s=this,I=s._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,J=k.unshift,l=p.toString,K=p.hasOwnProperty,y=k.forEach,z=k.map,A=k.reduce,B=k.reduceRight,C=k.filter,D=k.every,E=k.some,q=k.indexOf,F=k.lastIndexOf,p=Array.isArray,L=Object.keys,t=Function.prototype.bind,b=function(a){return
new m(a)};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=b),exports._=b):s._=b;b.VERSION="1.3.3";var
j=b.each=b.forEach=function(a,
+c,d){if(a!=null)if(y&&a.forEach===y)a.forEach(c,d);else if(a.length===+a.length)for(var
e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===o)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===o)break};b.map=b.collect=function(a,c,b){var
e=[];if(a==null)return e;if(z&&a.map===z)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return
e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(A&&
+a.reduce===A){e&&(c=b.bind(c,e));return f?a.reduce(c,d):a.reduce(c)}j(a,function(a,b,i){if(f)d=c.call(e,d,a,b,i);else{d=a;f=true}});if(!f)throw
new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var
f=arguments.length>2;a==null&&(a=[]);if(B&&a.reduceRight===B){e&&(c=b.bind(c,e));return
f?a.reduceRight(c,d):a.reduceRight(c)}var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return
f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=function(a,
+c,b){var e;G(a,function(a,g,h){if(c.call(b,a,g,h)){e=a;return true}});return e};b.filter=b.select=function(a,c,b){var
e=[];if(a==null)return e;if(C&&a.filter===C)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return
e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return
e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(D&&a.every===D)return
a.every(c,b);j(a,function(a,g,h){if(!(e=e&&c.call(b,
+a,g,h)))return o});return!!e};var G=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return
e;if(E&&a.some===E)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return
o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;if(q&&a.indexOf===q)return
a.indexOf(c)!=-1;return b=G(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return
b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
+function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return
Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return
e.value};b.min=function(a,c,d){if(!c&&b.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return
Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&
+(e={value:a,computed:b})});return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){d=Math.floor(Math.random()*(f+1));b[f]=b[d];b[d]=a});return
b};b.sortBy=function(a,c,d){var e=b.isFunction(c)?c:function(a){return a[c]};return b.pluck(b.map(a,function(a,b,c){return{value:a,criteria:e.call(d,a,b,c)}}).sort(function(a,b){var
c=a.criteria,d=b.criteria;return c===void 0?1:d===void 0?-1:c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var
d={},e=b.isFunction(c)?c:function(a){return a[c]};
+j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var
e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:b.isArray(a)||b.isArguments(a)?i.call(a):a.toArray&&b.isFunction(a.toArray)?a.toArray():b.values(a)};b.size=function(a){return
b.isArray(a)?a.length:b.keys(a).length};b.first=b.head=b.take=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return
i.call(a,
+0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=b.tail=function(a,b,d){return
i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return
b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return
a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var
d=d?b.map(a,d):a,
+e=[];a.length<3&&(c=true);b.reduce(d,function(d,g,h){if(c?b.last(d)!==g||!d.length:!b.include(d,g)){d.push(g);e.push(a[h])}return
d},[]);return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var
c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return
b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1),true);return
b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=
+i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return
d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d){d=b.sortedIndex(a,c);return a[d]===c?d:-1}if(q&&a.indexOf===q)return
a.indexOf(c);d=0;for(e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(F&&a.lastIndexOf===F)return
a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){if(arguments.length<=
+1){b=a||0;a=0}for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;){g[f++]=a;a=a+d}return
g};var H=function(){};b.bind=function(a,c){var d,e;if(a.bind===t&&t)return t.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw
new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));H.prototype=a.prototype;var
b=new H,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var
c=
+i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return
a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return
b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return
setTimeout(function(){return a.apply(null,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var
d,e,f,g,h,i,j=b.debounce(function(){h=
+g=false},c);return function(){d=this;e=arguments;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);j()},c));g?h=true:i=a.apply(d,e);j();g=true;return
i}};b.debounce=function(a,b,d){var e;return function(){var f=this,g=arguments;d&&!e&&a.apply(f,g);clearTimeout(e);e=setTimeout(function(){e=null;d||a.apply(f,g)},b)}};b.once=function(a){var
b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return
function(){var d=[a].concat(i.call(arguments,0));
+return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return
b[0]}};b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=L||function(a){if(a!==Object(a))throw
new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return
c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var
c=[],d;for(d in a)b.isFunction(a[d])&&
+c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var
d in b)a[d]=b[d]});return a};b.pick=function(a){var c={};j(b.flatten(i.call(arguments,1)),function(b){b
in a&&(c[b]=a[b])});return c};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var
d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return
a};b.isEqual=function(a,b){return r(a,b,[])};b.isEmpty=
+function(a){if(a==null)return true;if(b.isArray(a)||b.isString(a))return a.length===0;for(var
c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return
l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=function(a){return
l.call(a)=="[object Arguments]"};b.isArguments(arguments)||(b.isArguments=function(a){return!(!a||!b.has(a,"callee"))});b.isFunction=function(a){return
l.call(a)=="[object Function]"};
+b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return
l.call(a)=="[object Number]"};b.isFinite=function(a){return b.isNumber(a)&&isFinite(a)};b.isNaN=function(a){return
a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return
l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return
a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,
+b){return K.call(a,b)};b.noConflict=function(){s._=I;return this};b.identity=function(a){return
a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.result=function(a,c){if(a==null)return
null;var d=a[c];return b.isFunction(d)?d.call(a):d};b.mixin=function(a){j(b.functions(a),function(c){M(c,b[c]=a[c])})};var
N=0;b.uniqueId=
+function(a){var b=N++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var
u=/.^/,n={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},v;for(v in
n)n[n[v]]=v;var O=/\\|'|\r|\n|\t|\u2028|\u2029/g,P=/\\(\\|'|r|n|t|u2028|u2029)/g,w=function(a){return
a.replace(P,function(a,b){return n[b]})};b.template=function(a,c,d){d=b.defaults(d||{},b.templateSettings);a="__p+='"+a.replace(O,function(a){return"\\"+n[a]}).replace(d.escape||
+u,function(a,b){return"'+\n_.escape("+w(b)+")+\n'"}).replace(d.interpolate||u,function(a,b){return"'+\n("+w(b)+")+\n'"}).replace(d.evaluate||u,function(a,b){return"';\n"+w(b)+"\n;__p+='"})+"';\n";d.variable||(a="with(obj||{}){\n"+a+"}\n");var
a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return
__p;\n",e=new Function(d.variable||"obj","_",a);if(c)return e(c,b);c=function(a){return e.call(this,a,b)};c.source="function("+(d.variable||"obj")+"){\n"+a+"}";return
c};
+b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var
x=function(a,c){return c?b(a).chain():a},M=function(a,c){m.prototype[a]=function(){var a=i.call(arguments);J.call(a,this._wrapped);return
x(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var
b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete
d[0];return x(d,
+this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return
x(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=true;return
this};m.prototype.value=function(){return this._wrapped}}).call(this);



Mime
View raw message