diff --git a/pom.xml b/pom.xml
index 35d22fb1c..6685e20a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
UTF-8
- 2.9.1
+ 2.9.2
5.15.1
diff --git a/src/main/js/cass.js b/src/main/js/cass.js
index e6133a37c..1ea48e682 100644
--- a/src/main/js/cass.js
+++ b/src/main/js/cass.js
@@ -43256,6 +43256,8 @@ EcRemoteLinkedData = stjs.extend(EcRemoteLinkedData, EcLinkedData, [], function(
constructor.trimVersionFromUrl = function(id) {
if (id == null)
return null;
+ if (id.indexOf("/api/data/") == -1)
+ return id;
if (!id.substring(id.lastIndexOf("/")).matches("\\/[0-9]+"))
return id;
var rawId = id.substring(0, id.lastIndexOf("/"));
@@ -90058,8 +90060,8 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
fd.append("signatureSheet", signatureSheet);
if (!EcRepository.alwaysTryUrl)
if (repo != null)
- if (!repo.constructor.shouldTryUrl(data.id)) {
- EcRemote.postExpectingString(EcRemote.urlAppend(repo.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.id)), "", fd, success, failure);
+ if (!repo.constructor.shouldTryUrl(data.id) || data.id.indexOf(repo.selectedServer) == -1) {
+ EcRemote.postExpectingString(EcRemote.urlAppend(repo.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.shortId())), "", fd, success, failure);
return;
}
EcRemote.postExpectingString(data.id, "", fd, success, failure);
@@ -90173,7 +90175,7 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
if (EcRepository.shouldTryUrl(data.id))
targetUrl = data.shortId();
else {
- targetUrl = EcRemote.urlAppend(this.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.id));
+ targetUrl = EcRemote.urlAppend(this.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.shortId()));
}
var me = this;
if (data.owner != null && data.owner.length > 0) {
@@ -90263,7 +90265,7 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
results[i] = d;
if (EcRepository.caching) {
if (!EcRepository.shouldTryUrl(d.id)) {
- var md5 = EcCrypto.md5(d.id);
+ var md5 = EcCrypto.md5(d.shortId());
for (var j = 0; j < cacheUrls.length; j++) {
var url = cacheUrls[j];
if (url.indexOf(md5) != -1) {
diff --git a/src/main/js/cass.min.js b/src/main/js/cass.min.js
index e1c16a24e..7ec47d26e 100644
--- a/src/main/js/cass.min.js
+++ b/src/main/js/cass.min.js
@@ -34,16 +34,16 @@ function(a){var b=0;do b=(b<<8)+this.data.getInt8(this.read++),a-=8;while(0c&&(a+="0");a+=c.toString(16)}return a};c.DataBuffer.prototype.toString=
function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return c.binary.raw.encode(b);if("hex"===a)return c.binary.hex.encode(b);if("base64"===a)return c.binary.base64.encode(b);if("utf8"===a)return c.text.utf8.decode(b);if("utf16"===a)return c.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};c.createBuffer=function(a,b){return b=b||"raw",void 0!==a&&"utf8"===b&&(a=c.encodeUtf8(a)),new c.ByteBuffer(a)};c.fillString=function(a,b){for(var c=
-"";0>>=1,0>
-24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var k=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];c.encode64=function(a,b){for(var c="",f="",k,d,e,m=0;m>
-2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt((k&3)<<4|d>>4),isNaN(d)?c+="\x3d\x3d":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt((d&15)<<2|e>>6),c+=isNaN(e)?"\x3d":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(e&63)),b&&c.length>b&&(f+=c.substr(0,b)+"\r\n",c=c.substr(b));return f+=c,f};c.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,f,d,e,m=0;m>4),64!==d&&(b+=String.fromCharCode((f&15)<<4|d>>2),64!==e&&(b+=String.fromCharCode((d&3)<<6|e)));return b};c.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};c.decodeUtf8=function(a){return decodeURIComponent(escape(a))};c.binary={raw:{},hex:{},base64:{}};c.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};c.binary.raw.decode=function(a,b,c){var f=b;
-f||(f=new Uint8Array(a.length));for(var k=c=c||0,d=0;d>
+"";0>>=1,0>
+24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var k=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];c.encode64=function(a,b){for(var c="",f="",k,d,e,h=0;h>
+2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt((k&3)<<4|d>>4),isNaN(d)?c+="\x3d\x3d":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt((d&15)<<2|e>>6),c+=isNaN(e)?"\x3d":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(e&63)),b&&c.length>b&&(f+=c.substr(0,b)+"\r\n",c=c.substr(b));return f+=c,f};c.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,f,d,e,h=0;h>4),64!==d&&(b+=String.fromCharCode((f&15)<<4|d>>2),64!==e&&(b+=String.fromCharCode((d&3)<<6|e)));return b};c.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};c.decodeUtf8=function(a){return decodeURIComponent(escape(a))};c.binary={raw:{},hex:{},base64:{}};c.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};c.binary.raw.decode=function(a,b,c){var f=b;
+f||(f=new Uint8Array(a.length));for(var k=c=c||0,d=0;d>
2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt((k&3)<<4|d>>4),isNaN(d)?c+="\x3d\x3d":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt((d&15)<<2|e>>6),c+=isNaN(e)?"\x3d":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d".charAt(e&63)),b&&c.length>b&&(f+=c.substr(0,b)+"\r\n",c=c.substr(b));return f+=c,f};c.binary.base64.decode=function(a,b,c){var f=b;f||(f=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
-"");c=c||0;for(var d,e,m,h,p=0,n=c;p>4,64!==m&&(f[n++]=(e&15)<<4|m>>2,64!==h&&(f[n++]=(m&3)<<6|h));return b?n-c:f.subarray(0,n)};c.text={utf8:{},utf16:{}};c.text.utf8.encode=function(a,b,f){a=c.encodeUtf8(a);var k=b;k||(k=new Uint8Array(a.length));for(var d=f=f||0,e=0;e>4,64!==h&&(f[n++]=(e&15)<<4|h>>2,64!==m&&(f[n++]=(h&3)<<6|m));return b?n-c:f.subarray(0,n)};c.text={utf8:{},utf16:{}};c.text.utf8.encode=function(a,b,f){a=c.encodeUtf8(a);var k=b;k||(k=new Uint8Array(a.length));for(var d=f=f||0,e=0;ea?"-":"";var d=parseInt(a=Math.abs(+a||
0).toFixed(k),10)+"",e=3d;++d)if(a[d]&&0!==a[d].length){var e=c.hexToBytes(a[d]);2>e.length&&k.putByte(0);k.putBytes(e)}else k.fillWithByte(0,f),f=0;return k.getBytes()};
-c.bytesToIP=function(a){return 4===a.length?c.bytesToIPv4(a):16===a.length?c.bytesToIPv6(a):null};c.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;cf[k].end-f[k].start&&(k=
-f.length-1)):f.push({start:h,end:h})}b.push(e)}0m.st&&k.stk.st&&m.stf[k].end-f[k].start&&(k=
+f.length-1)):f.push({start:m,end:m})}b.push(e)}0h.st&&k.stk.st&&h.st=this.blockSize){for(var d=0;df;++f)a[f/32|0]&1<<31-f%32&&(c[0]^=b[0],c[1]^=b[1],c[2]^=b[2],c[3]^=b[3]),this.pow(b,b);return c};d.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,f=3;0>>1|(a[f-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};d.gcm.prototype.tableMultiply=function(a){for(var b=[0,0,0,0],c=0;32>c;++c){var f=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=f[0];b[1]^=f[1];b[2]^=f[2];b[3]^=f[3]}return b};d.gcm.prototype.ghash=function(a,b,c){return b[0]^=c[0],b[1]^=c[1],b[2]^=c[2],b[3]^=c[3],this.tableMultiply(b)};
-d.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,f=4*c,c=16*c,k=Array(c),d=0;d>>1,f=Array(b);f[c]=a.slice(0);for(var k=c>>>1;0>=1;for(k=2;k>>1,f=Array(b);f[c]=a.slice(0);for(var k=c>>>1;0>=1;for(k=2;kb;++b)a[b]=b<<1,a[b+
128]=b+128<<1^283;g=Array(256);q=Array(256);D=Array(4);x=Array(4);for(b=0;4>b;++b)D[b]=Array(256),x[b]=Array(256);for(var c=0,f=0,k,d,e,m,n,b=0;256>b;++b){m=f^f<<1^f<<2^f<<3^f<<4;m=m>>8^m&255^99;g[c]=m;q[m]=c;n=a[m];k=a[c];d=a[k];e=a[d];n^=n<<24^m<<16^m<<8^m;d=(k^d^e)<<24^(c^e)<<16^(c^d^e)<<8^c^k^e;for(var p=0;4>p;++p)D[p][c]=n,x[p][m]=d,n=n<<24|n>>>8,d=d<<24|d>>>8;0===c?c=f=1:(c=k^a[a[a[k^e]]],f^=a[a[f]])}}function k(a,b){a=a.slice(0);for(var c,f=1,k=a.length,d=l*(k+6+1),e=k;e>>16&255]<<24^g[c>>>8&255]<<16^g[c&255]<<8^g[c>>>24]^z[f]<<24,f++):6>>24]<<24^g[c>>>16&255]<<16^g[c>>>8&255]<<8^g[c&255]),a[e]=a[e-k]^c;if(b){c=x[0];for(var f=x[1],k=x[2],m=x[3],h=a.slice(0),d=a.length,e=0,n=d-l;e>>24]]^f[g[b>>>16&255]]^k[g[b>>>8&255]]^m[g[b&255]];a=h}return a}function d(a,b,c,f){var k=a.length/4-1,d,e,m,h,n;f?(d=x[0],
-e=x[1],m=x[2],h=x[3],n=q):(d=D[0],e=D[1],m=D[2],h=D[3],n=g);var p,u,r,l,w,v;p=b[0]^a[0];u=b[f?3:1]^a[1];r=b[2]^a[2];b=b[f?1:3]^a[3];for(var B=3,F=1;F>>24]^e[u>>>16&255]^m[r>>>8&255]^h[b&255]^a[++B],w=d[u>>>24]^e[r>>>16&255]^m[b>>>8&255]^h[p&255]^a[++B],v=d[r>>>24]^e[b>>>16&255]^m[p>>>8&255]^h[u&255]^a[++B],b=d[b>>>24]^e[p>>>16&255]^m[u>>>8&255]^h[r&255]^a[++B],p=l,u=w,r=v;c[0]=n[p>>>24]<<24^n[u>>>16&255]<<16^n[r>>>8&255]<<8^n[b&255]^a[++B];c[f?3:1]=n[u>>>24]<<24^n[r>>>16&255]<<16^n[b>>>
+e%k?(c=g[c>>>16&255]<<24^g[c>>>8&255]<<16^g[c&255]<<8^g[c>>>24]^z[f]<<24,f++):6>>24]<<24^g[c>>>16&255]<<16^g[c>>>8&255]<<8^g[c&255]),a[e]=a[e-k]^c;if(b){c=x[0];for(var f=x[1],k=x[2],h=x[3],m=a.slice(0),d=a.length,e=0,n=d-l;e>>24]]^f[g[b>>>16&255]]^k[g[b>>>8&255]]^h[g[b&255]];a=m}return a}function d(a,b,c,f){var k=a.length/4-1,d,e,h,m,n;f?(d=x[0],
+e=x[1],h=x[2],m=x[3],n=q):(d=D[0],e=D[1],h=D[2],m=D[3],n=g);var p,u,r,l,w,v;p=b[0]^a[0];u=b[f?3:1]^a[1];r=b[2]^a[2];b=b[f?1:3]^a[3];for(var B=3,F=1;F>>24]^e[u>>>16&255]^h[r>>>8&255]^m[b&255]^a[++B],w=d[u>>>24]^e[r>>>16&255]^h[b>>>8&255]^m[p&255]^a[++B],v=d[r>>>24]^e[b>>>16&255]^h[p>>>8&255]^m[u&255]^a[++B],b=d[b>>>24]^e[p>>>16&255]^h[u>>>8&255]^m[r&255]^a[++B],p=l,u=w,r=v;c[0]=n[p>>>24]<<24^n[u>>>16&255]<<16^n[r>>>8&255]<<8^n[b&255]^a[++B];c[f?3:1]=n[u>>>24]<<24^n[r>>>16&255]<<16^n[b>>>
8&255]<<8^n[p&255]^a[++B];c[2]=n[r>>>24]<<24^n[b>>>16&255]<<16^n[p>>>8&255]<<8^n[u&255]^a[++B];c[f?1:3]=n[b>>>24]<<24^n[p>>>16&255]<<16^n[u>>>8&255]<<8^n[r&255]^a[++B]}function e(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),f;b.decrypt?f=a.cipher.createDecipher(c,b.key):f=a.cipher.createCipher(c,b.key);var k=f.start;return f.start=function(b,c){var d=null;c instanceof a.util.ByteBuffer&&(d=c,c={});c=c||{};c.output=d;c.iv=b;k.call(f,c)},f}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,
c,f){a=e({key:a,output:c,decrypt:!1,mode:f});return a.start(b),a};a.aes.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,f){a=e({key:a,output:c,decrypt:!0,mode:f});return a.start(b),a};a.aes.createDecryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){h||c();var f=this;f.name=a;f.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return d(f._w,a,b,!1)},decrypt:function(a,
b){return d(f._w,a,b,!0)}}});f._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,f;if("string"!=typeof c||16!==c.length&&24!==c.length&&32!==c.length){if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){f=c;for(var c=a.util.createBuffer(),d=0;d>>=2,d=0;df.length()){var e=Error("Too few bytes to parse DER.");throw e.bytes=f.length(),e;}var k=f.getByte(),e=k&192,m=k&31,h=c(f);if(f.length()f.length()){var e=Error("Too few bytes to parse DER.");throw e.bytes=f.length(),e;}var k=f.getByte(),e=k&192,h=k&31,m=c(f);if(f.length()=e.length())f.putByte(e.length()&127);else{k=e.length();c="";do c+=String.fromCharCode(k&255),k>>>=8;while(0>>=7,f||(k|=128),d.push(k),f=!1;while(0b;++b)l[b]=Math.floor(4294967296*Math.abs(Math.sin(b+1)));g=!0}function c(a,b,c){for(var f,d,k,m,n,C,p,u=c.length();64<=u;){d=a.h0;k=a.h1;m=a.h2;n=a.h3;for(p=0;16>p;++p)b[p]=c.getInt32Le(),f=n^k&(m^n),f=d+f+l[p]+b[p],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;for(;32>p;++p)f=m^n&(k^m),f=d+
-f+l[p]+b[e[p]],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;for(;48>p;++p)f=k^m^n,f=d+f+l[p]+b[e[p]],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;for(;64>p;++p)f=m^(k|~n),f=d+f+l[p]+b[e[p]],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;a.h0=a.h0+d|0;a.h1=a.h1+k|0;a.h2=a.h2+m|0;a.h3=a.h3+n|0;u-=64}}var d=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=d;d.create=function(){g||b();var f=null,d=a.util.createBuffer(),e=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,
-messageLength64:[0,0]};return m.start=function(){return m.messageLength=0,m.messageLength64=[0,0],d=a.util.createBuffer(),f={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},m},m.start(),m.update=function(b,k){return"utf8"===k&&(b=a.util.encodeUtf8(b)),m.messageLength+=b.length,m.messageLength64[0]+=b.length/4294967296>>>0,m.messageLength64[1]+=b.length>>>0,d.putBytes(b),c(f,e,d),(2048>>28);var h={h0:f.h0,h1:f.h1,h2:f.h2,h3:f.h3};c(h,e,b);b=a.util.createBuffer();return b.putInt32Le(h.h0),b.putInt32Le(h.h1),b.putInt32Le(h.h2),b.putInt32Le(h.h3),b},m};var k=null,e=null,h=null,l=null,g=!1}if("function"!=typeof b){if("object"!=typeof module||!module.exports)return"undefined"==typeof forge&&(forge={}),c(forge);var e=!0;b=function(b,c){c(a,
+f+l[p]+b[e[p]],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;for(;48>p;++p)f=k^m^n,f=d+f+l[p]+b[e[p]],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;for(;64>p;++p)f=m^(k|~n),f=d+f+l[p]+b[e[p]],C=h[p],d=n,n=m,m=k,k+=f<>>32-C;a.h0=a.h0+d|0;a.h1=a.h1+k|0;a.h2=a.h2+m|0;a.h3=a.h3+n|0;u-=64}}var d=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=d;d.create=function(){g||b();var f=null,d=a.util.createBuffer(),e=Array(16),h={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,
+messageLength64:[0,0]};return h.start=function(){return h.messageLength=0,h.messageLength64=[0,0],d=a.util.createBuffer(),f={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},h},h.start(),h.update=function(b,k){return"utf8"===k&&(b=a.util.encodeUtf8(b)),h.messageLength+=b.length,h.messageLength64[0]+=b.length/4294967296>>>0,h.messageLength64[1]+=b.length>>>0,d.putBytes(b),c(f,e,d),(2048>>28);var m={h0:f.h0,h1:f.h1,h2:f.h2,h3:f.h3};c(m,e,b);b=a.util.createBuffer();return b.putInt32Le(m.h0),b.putInt32Le(m.h1),b.putInt32Le(m.h2),b.putInt32Le(m.h3),b},h};var k=null,e=null,h=null,l=null,g=!1}if("function"!=typeof b){if("object"!=typeof module||!module.exports)return"undefined"==typeof forge&&(forge={}),c(forge);var e=!0;b=function(b,c){c(a,
module)}}var h,l=function(a,b){b.exports=function(b){var f=h.map(function(b){return a(b)}).concat(c);b=b||{};b.defined=b.defined||{};if(b.defined.md5)return b.md5;b.defined.md5=!0;for(var d=0;dp;++p)f=c.getInt32(),b[p]=f,n=m^k&(e^m),f=(d<<5|d>>>27)+n+h+1518500249+f,h=m,m=e,e=k<<30|k>>>2,k=d,d=f;for(;20>p;++p)f=b[p-3]^b[p-8]^b[p-14]^b[p-16],f=f<<1|f>>>31,b[p]=f,n=m^k&(e^m),f=(d<<5|d>>>27)+n+h+1518500249+f,h=m,m=e,e=k<<30|k>>>2,k=d,d=f;for(;32>p;++p)f=b[p-3]^b[p-8]^b[p-14]^b[p-16],f=f<<1|f>>>31,b[p]=f,n=k^e^m,f=(d<<5|d>>>27)+n+h+1859775393+f,h=m,m=
-e,e=k<<30|k>>>2,k=d,d=f;for(;40>p;++p)f=b[p-6]^b[p-16]^b[p-28]^b[p-32],f=f<<2|f>>>30,b[p]=f,n=k^e^m,f=(d<<5|d>>>27)+n+h+1859775393+f,h=m,m=e,e=k<<30|k>>>2,k=d,d=f;for(;60>p;++p)f=b[p-6]^b[p-16]^b[p-28]^b[p-32],f=f<<2|f>>>30,b[p]=f,n=k&e|m&(k^e),f=(d<<5|d>>>27)+n+h+2400959708+f,h=m,m=e,e=k<<30|k>>>2,k=d,d=f;for(;80>p;++p)f=b[p-6]^b[p-16]^b[p-28]^b[p-32],f=f<<2|f>>>30,b[p]=f,n=k^e^m,f=(d<<5|d>>>27)+n+h+3395469782+f,h=m,m=e,e=k<<30|k>>>2,k=d,d=f;a.h0=a.h0+d|0;a.h1=a.h1+k|0;a.h2=a.h2+e|0;a.h3=a.h3+m|
-0;a.h4=a.h4+h|0;u-=64}}var c=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=c;c.create=function(){k||(d=String.fromCharCode(128),d+=a.util.fillString(String.fromCharCode(0),64),k=!0);var c=null,f=a.util.createBuffer(),e=Array(80),m={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,messageLength64:[0,0]};return m.start=function(){return m.messageLength=0,m.messageLength64=[0,0],f=a.util.createBuffer(),c={h0:1732584193,h1:4023233417,
-h2:2562383102,h3:271733878,h4:3285377520},m},m.start(),m.update=function(d,k){return"utf8"===k&&(d=a.util.encodeUtf8(d)),m.messageLength+=d.length,m.messageLength64[0]+=d.length/4294967296>>>0,m.messageLength64[1]+=d.length>>>0,f.putBytes(d),b(c,e,f),(2048>>28);k.putInt32(m.messageLength64[1]<<
-3);var h={h0:c.h0,h1:c.h1,h2:c.h2,h3:c.h3,h4:c.h4};b(h,e,k);k=a.util.createBuffer();return k.putInt32(h.h0),k.putInt32(h.h1),k.putInt32(h.h2),k.putInt32(h.h3),k.putInt32(h.h4),k},m};var d=null,k=!1}if("function"!=typeof b){if("object"!=typeof module||!module.exports)return"undefined"==typeof forge&&(forge={}),c(forge);var e=!0;b=function(b,c){c(a,module)}}var h,l=function(a,b){b.exports=function(b){var f=h.map(function(b){return a(b)}).concat(c);b=b||{};b.defined=b.defined||{};if(b.defined.sha1)return b.sha1;
-b.defined.sha1=!0;for(var d=0;dh;++h)b[h]=c.getInt32();
-for(;64>h;++h)f=b[h-2],f=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,d=b[h-15],d=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,b[h]=f+b[h-7]+d+b[h-16]|0;n=a.h0;p=a.h1;l=a.h2;C=a.h3;u=a.h4;g=a.h5;r=a.h6;w=a.h7;for(h=0;64>h;++h)f=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),k=r^u&(g^r),d=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=n&p|l&(n^p),f=w+f+k+e[h]+b[h],d+=m,w=r,r=g,g=u,u=C+f|0,C=l,l=p,p=n,n=f+d|0;a.h0=a.h0+n|0;a.h1=a.h1+p|0;a.h2=a.h2+l|0;a.h3=a.h3+C|0;a.h4=a.h4+u|0;a.h5=a.h5+g|0;a.h6=a.h6+r|0;a.h7=a.h7+w|0;B-=
+0))})}(),function(){function c(a){function b(a,b,c){for(var f,d,k,e,h,m,n,p,u=c.length();64<=u;){d=a.h0;k=a.h1;e=a.h2;h=a.h3;m=a.h4;for(p=0;16>p;++p)f=c.getInt32(),b[p]=f,n=h^k&(e^h),f=(d<<5|d>>>27)+n+m+1518500249+f,m=h,h=e,e=k<<30|k>>>2,k=d,d=f;for(;20>p;++p)f=b[p-3]^b[p-8]^b[p-14]^b[p-16],f=f<<1|f>>>31,b[p]=f,n=h^k&(e^h),f=(d<<5|d>>>27)+n+m+1518500249+f,m=h,h=e,e=k<<30|k>>>2,k=d,d=f;for(;32>p;++p)f=b[p-3]^b[p-8]^b[p-14]^b[p-16],f=f<<1|f>>>31,b[p]=f,n=k^e^h,f=(d<<5|d>>>27)+n+m+1859775393+f,m=h,h=
+e,e=k<<30|k>>>2,k=d,d=f;for(;40>p;++p)f=b[p-6]^b[p-16]^b[p-28]^b[p-32],f=f<<2|f>>>30,b[p]=f,n=k^e^h,f=(d<<5|d>>>27)+n+m+1859775393+f,m=h,h=e,e=k<<30|k>>>2,k=d,d=f;for(;60>p;++p)f=b[p-6]^b[p-16]^b[p-28]^b[p-32],f=f<<2|f>>>30,b[p]=f,n=k&e|h&(k^e),f=(d<<5|d>>>27)+n+m+2400959708+f,m=h,h=e,e=k<<30|k>>>2,k=d,d=f;for(;80>p;++p)f=b[p-6]^b[p-16]^b[p-28]^b[p-32],f=f<<2|f>>>30,b[p]=f,n=k^e^h,f=(d<<5|d>>>27)+n+m+3395469782+f,m=h,h=e,e=k<<30|k>>>2,k=d,d=f;a.h0=a.h0+d|0;a.h1=a.h1+k|0;a.h2=a.h2+e|0;a.h3=a.h3+h|
+0;a.h4=a.h4+m|0;u-=64}}var c=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=c;c.create=function(){k||(d=String.fromCharCode(128),d+=a.util.fillString(String.fromCharCode(0),64),k=!0);var c=null,f=a.util.createBuffer(),e=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,messageLength64:[0,0]};return h.start=function(){return h.messageLength=0,h.messageLength64=[0,0],f=a.util.createBuffer(),c={h0:1732584193,h1:4023233417,
+h2:2562383102,h3:271733878,h4:3285377520},h},h.start(),h.update=function(d,k){return"utf8"===k&&(d=a.util.encodeUtf8(d)),h.messageLength+=d.length,h.messageLength64[0]+=d.length/4294967296>>>0,h.messageLength64[1]+=d.length>>>0,f.putBytes(d),b(c,e,f),(2048>>28);k.putInt32(h.messageLength64[1]<<
+3);var m={h0:c.h0,h1:c.h1,h2:c.h2,h3:c.h3,h4:c.h4};b(m,e,k);k=a.util.createBuffer();return k.putInt32(m.h0),k.putInt32(m.h1),k.putInt32(m.h2),k.putInt32(m.h3),k.putInt32(m.h4),k},h};var d=null,k=!1}if("function"!=typeof b){if("object"!=typeof module||!module.exports)return"undefined"==typeof forge&&(forge={}),c(forge);var e=!0;b=function(b,c){c(a,module)}}var h,l=function(a,b){b.exports=function(b){var f=h.map(function(b){return a(b)}).concat(c);b=b||{};b.defined=b.defined||{};if(b.defined.sha1)return b.sha1;
+b.defined.sha1=!0;for(var d=0;dm;++m)b[m]=c.getInt32();
+for(;64>m;++m)f=b[m-2],f=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,d=b[m-15],d=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,b[m]=f+b[m-7]+d+b[m-16]|0;n=a.h0;p=a.h1;l=a.h2;C=a.h3;u=a.h4;g=a.h5;r=a.h6;w=a.h7;for(m=0;64>m;++m)f=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),k=r^u&(g^r),d=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),h=n&p|l&(n^p),f=w+f+k+e[m]+b[m],d+=h,w=r,r=g,g=u,u=C+f|0,C=l,l=p,p=n,n=f+d|0;a.h0=a.h0+n|0;a.h1=a.h1+p|0;a.h2=a.h2+l|0;a.h3=a.h3+C|0;a.h4=a.h4+u|0;a.h5=a.h5+g|0;a.h6=a.h6+r|0;a.h7=a.h7+w|0;B-=
64}}var c=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=c;c.create=function(){k||(d=String.fromCharCode(128),d+=a.util.fillString(String.fromCharCode(0),64),e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
-2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],k=!0);var c=null,f=a.util.createBuffer(),m=Array(64),h={algorithm:"sha256",blockLength:64,digestLength:32,
-messageLength:0,messageLength64:[0,0]};return h.start=function(){return h.messageLength=0,h.messageLength64=[0,0],f=a.util.createBuffer(),c={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},h},h.start(),h.update=function(d,k){return"utf8"===k&&(d=a.util.encodeUtf8(d)),h.messageLength+=d.length,h.messageLength64[0]+=d.length/4294967296>>>0,h.messageLength64[1]+=d.length>>>0,f.putBytes(d),b(c,m,f),(2048>>28);k.putInt32(h.messageLength64[1]<<3);var e={h0:c.h0,h1:c.h1,h2:c.h2,h3:c.h3,h4:c.h4,h5:c.h5,h6:c.h6,h7:c.h7};b(e,m,k);k=a.util.createBuffer();return k.putInt32(e.h0),k.putInt32(e.h1),k.putInt32(e.h2),k.putInt32(e.h3),k.putInt32(e.h4),k.putInt32(e.h5),k.putInt32(e.h6),k.putInt32(e.h7),k},h};var d=null,k=!1,e=null}
+2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],k=!0);var c=null,f=a.util.createBuffer(),h=Array(64),m={algorithm:"sha256",blockLength:64,digestLength:32,
+messageLength:0,messageLength64:[0,0]};return m.start=function(){return m.messageLength=0,m.messageLength64=[0,0],f=a.util.createBuffer(),c={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},m},m.start(),m.update=function(d,k){return"utf8"===k&&(d=a.util.encodeUtf8(d)),m.messageLength+=d.length,m.messageLength64[0]+=d.length/4294967296>>>0,m.messageLength64[1]+=d.length>>>0,f.putBytes(d),b(c,h,f),(2048>>28);k.putInt32(m.messageLength64[1]<<3);var e={h0:c.h0,h1:c.h1,h2:c.h2,h3:c.h3,h4:c.h4,h5:c.h5,h6:c.h6,h7:c.h7};b(e,h,k);k=a.util.createBuffer();return k.putInt32(e.h0),k.putInt32(e.h1),k.putInt32(e.h2),k.putInt32(e.h3),k.putInt32(e.h4),k.putInt32(e.h5),k.putInt32(e.h6),k.putInt32(e.h7),k},m};var d=null,k=!1,e=null}
if("function"!=typeof b){if("object"!=typeof module||!module.exports)return"undefined"==typeof forge&&(forge={}),c(forge);var e=!0;b=function(b,c){c(a,module)}}var h,l=function(a,b){b.exports=function(b){var f=h.map(function(b){return a(b)}).concat(c);b=b||{};b.defined=b.defined||{};if(b.defined.sha256)return b.sha256;b.defined.sha256=!0;for(var d=0;dU;++U)b[U][0]=c.getInt32()>>>0,b[U][1]=c.getInt32()>>>0;for(;80>U;++U)m=b[U-2],l=m[0],m=m[1],f=((l>>>19|m<<13)^(m>>>29|l<<3)^l>>>6)>>>0,d=((l<<13|m>>>19)^(m<<3|l>>>29)^(l<<26|m>>>6))>>>
0,m=b[U-15],l=m[0],m=m[1],e=((l>>>1|m<<31)^(l>>>8|m<<24)^l>>>7)>>>0,k=((l<<31|m>>>1)^(l<<24|m>>>8)^(l<<25|m>>>7))>>>0,l=b[U-7],u=b[U-16],m=d+l[1]+k+u[1],b[U][0]=f+l[0]+e+u[0]+(m/4294967296>>>0)>>>0,b[U][1]=m>>>0;l=a[0][0];u=a[0][1];g=a[1][0];r=a[1][1];w=a[2][0];q=a[2][1];B=a[3][0];z=a[3][1];T=a[4][0];S=a[4][1];K=a[5][0];M=a[5][1];R=a[6][0];O=a[6][1];H=a[7][0];L=a[7][1];for(U=0;80>U;++U)f=((T>>>14|S<<18)^(T>>>18|S<<14)^(S>>>9|T<<23))>>>0,m=((T<<18|S>>>14)^(T<<14|S>>>18)^(S<<23|T>>>9))>>>0,d=(R^T&(K^
@@ -163,7 +163,7 @@ c.create=function(c){k||(e=String.fromCharCode(128),e+=a.util.fillString(String.
!0;for(var d=0;db.blockLength&&(b.start(),b.update(e.bytes()),e=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();m=e.length();for(k=0;kb.blockLength&&(b.start(),b.update(e.bytes()),e=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();h=e.length();for(k=0;kc-11)throw d=Error("Message is too long for PKCS#1 v1.5 padding."),d.length=b.length,d.max=c-11,d;d.putByte(0);d.putByte(f);c=c-3-b.length;if(0===f||1===f){f=0===f?0:255;for(var e=0;eb.p.compareTo(b.q)&&(a=b.p,b.p=b.q,b.q=a);0!==b.p.subtract(h.ONE).gcd(b.e).compareTo(h.ONE)?
+c;){for(var h=0,k=a.random.getBytes(c),e=0;eb.p.compareTo(b.q)&&(a=b.p,b.p=b.q,b.q=a);0!==b.p.subtract(h.ONE).gcd(b.e).compareTo(h.ONE)?
(b.p=null,d()):0!==b.q.subtract(h.ONE).gcd(b.e).compareTo(h.ONE)?(b.q=null,e(b.qBits,k)):(b.p1=b.p.subtract(h.ONE),b.q1=b.q.subtract(h.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(h.ONE)?(b.p=b.q=null,d()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,e(b.qBits,k)):(a=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,a,b.p,b.q,a.mod(b.p1),a.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},f(null,b.keys))))}"function"==typeof c&&(f=
c,c={});c=c||{};var m={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(m.prng=c.prng);d()}function e(b){b=b.toString(16);return"8"<=b[0]&&(b="00"+b),a.util.hexToBytes(b)}function k(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"==typeof h)var h=a.jsbn.BigInteger;var l=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,
q=[6,4,2,4,2,4,6,2],z={name:"PrivateKeyInfo",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:l.Class.UNIVERSAL,type:l.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:l.Class.UNIVERSAL,type:l.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:l.Class.UNIVERSAL,type:l.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:l.Class.UNIVERSAL,
@@ -282,7 +282,7 @@ keys:null},e.e.fromInt(e.eInt),e};g.rsa.stepKeyPairGenerationState=function(a,b)
++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(m=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,m,a.p,a.q,m.mod(a.p1),m.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});m=+new Date;l+=m-e;e=m}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,f){1===arguments.length?"object"==typeof a?(c=a,a=void 0):"function"==typeof a&&(f=a,a=void 0):2===arguments.length?
"number"==typeof a?"function"==typeof b?(f=b,b=void 0):"number"!=typeof b&&(c=b,b=void 0):(c=a,f=b,a=void 0,b=void 0):3===arguments.length&&("number"==typeof b?"function"==typeof c&&(f=c,c=void 0):(f=c,c=b,b=void 0));c=c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var e=g.rsa.createKeyPairGenerationState(a,b,c);if(!f)return g.rsa.stepKeyPairGenerationState(e,0),e.keys;d(e,c,f)};g.setRsaPublicKey=g.rsa.setPublicKey=function(f,d){var e={n:f,e:d};return e.encrypt=function(c,f,d){"string"==
typeof f?f=f.toUpperCase():void 0===f&&(f="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===f)f={encode:function(a,c,f){return b(a,c,2).getBytes()}};else if("RSA-OAEP"===f||"RSAES-OAEP"===f)f={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,b,d)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(f))f={encode:function(a){return a}};else if("string"==typeof f)throw Error('Unsupported encryption scheme: "'+f+'".');c=f.encode(c,e,!0);return g.rsa.encrypt(c,e,!0)},e.verify=function(a,b,f){"string"==typeof f?
-f=f.toUpperCase():void 0===f&&(f="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===f)f={verify:function(a,b){b=c(b,e,!0);b=l.fromDer(b);return a===b.value[1].value}};else if("NONE"===f||"NULL"===f||null===f)f={verify:function(a,b){return b=c(b,e,!0),a===b}};b=g.rsa.decrypt(b,e,!0,!1);return f.verify(a,b,e.n.bitLength())},e};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,f,d,e,k,h,m,l){var n={n:b,e:f,d:d,p:e,q:k,dP:h,dQ:m,qInv:l};return n.decrypt=function(b,f,d){"string"==typeof f?f=f.toUpperCase():
+f=f.toUpperCase():void 0===f&&(f="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===f)f={verify:function(a,b){b=c(b,e,!0);b=l.fromDer(b);return a===b.value[1].value}};else if("NONE"===f||"NULL"===f||null===f)f={verify:function(a,b){return b=c(b,e,!0),a===b}};b=g.rsa.decrypt(b,e,!0,!1);return f.verify(a,b,e.n.bitLength())},e};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,f,d,e,h,k,m,l){var n={n:b,e:f,d:d,p:e,q:h,dP:k,dQ:m,qInv:l};return n.decrypt=function(b,f,d){"string"==typeof f?f=f.toUpperCase():
void 0===f&&(f="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,n,!1,!1);if("RSAES-PKCS1-V1_5"===f)f={decode:c};else if("RSA-OAEP"===f||"RSAES-OAEP"===f)f={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,d)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(f))throw Error('Unsupported encryption scheme: "'+f+'".');f={decode:function(a){return a}}}return f.decode(b,n,!1)},n.sign=function(a,b){var c=!1;"string"==typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:y},c=1;else if("NONE"===
b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;b=b.encode(a,n.n.bitLength());return g.rsa.encrypt(b,n,c)},n};g.wrapRsaPrivateKey=function(a){return l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.INTEGER,!1,l.integerToDer(0).getBytes()),l.create(l.Class.UNIVERSAL,l.Type.SEQUENCE,!0,[l.create(l.Class.UNIVERSAL,l.Type.OID,!1,l.oidToDer(g.oids.rsaEncryption).getBytes()),l.create(l.Class.UNIVERSAL,l.Type.NULL,!1,"")]),l.create(l.Class.UNIVERSAL,l.Type.OCTETSTRING,
!1,l.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},f=[];l.validate(b,z,c,f)&&(b=l.fromDer(a.util.createBuffer(c.privateKey)));c={};f=[];if(!l.validate(b,D,c,f))throw b=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),b.errors=f,b;var d,e,k,m,n,p,u,r;return d=a.util.createBuffer(c.privateKeyModulus).toHex(),e=a.util.createBuffer(c.privateKeyPublicExponent).toHex(),k=a.util.createBuffer(c.privateKeyPrivateExponent).toHex(),m=a.util.createBuffer(c.privateKeyPrime1).toHex(),
@@ -405,7 +405,7 @@ k&&n&&!m.isIssuer(n)&&(k={message:"Certificate issuer is invalid.",error:g.certi
h||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate}),null===k&&null!==h&&!h.cA&&(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==m&&"pathLenConstraint"in h&&l-1>h.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",
error:g.certificateError.bad_certificate}));m=null===k?!0:k.error;h=f?f(m,l,d):m;if(!0!==h){!0===m&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});if(h||0===h)"object"!=typeof h||a.util.isArray(h)?"string"==typeof h&&(k.error=h):(h.message&&(k.message=h.message),h.error&&(k.error=h.error));throw k;}k=null;h=!1;++l}while(0(new Date).getTime()){setTimeout(function(){m.searchWithParams(a,c,e,h,g)},100);return}EcRepository.fetching[f]=(new Date).getTime()+6E4}}else f=null;var p=new FormData;p.append("data",
-b);null!=l&&p.append("searchParams",JSON.stringify(l));m=this;1==EcRepository.unsigned||1==k.unsigned?(p.append("signatureSheet","[]"),EcRemote.postExpectingObject(m.selectedServer,"sky/repo/search",p,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];m.handleSearchResults(a,e,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];null!=g&&g(a)})):EcIdentityManager.signatureSheetAsync(6E4+this.timeOffset,this.selectedServer,function(a){p.append("signatureSheet",
-a);EcRemote.postExpectingObject(m.selectedServer,"sky/repo/search",p,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];m.handleSearchResults(a,e,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];null!=g&&g(a)})},g)}};a.searchWithParamsBlocking=function(a,c){var b;null==c&&(c={});var h={};b=this.searchParamProps(a,c,h);null!=c.fields&&(h.fields=c.fields);a=EcRemote.async;EcRemote.async=!1;var g;g=JSON.stringify(h)+b;if(EcRepository.cachingSearch&&
-null!=EcRepository.cache[g])return this.handleSearchResults(EcRepository.cache[g],null,null,null);var d=new FormData;d.append("data",b);null!=h&&d.append("searchParams",JSON.stringify(h));1==EcRepository.unsigned||1==c.unsigned?(d.append("signatureSheet","[]"),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",d,function(a){EcRepository.cache[g]=a;null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null})):(c=EcIdentityManager.signatureSheet(6E4+
-this.timeOffset,this.selectedServer),d.append("signatureSheet",c),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",d,function(a){EcRepository.cache[g]=a;null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null}));c=this.handleSearchResults(EcRepository.cache[g],null,null,null);EcRepository.cachingSearch||delete EcRepository.cache[g];EcRemote.async=a;return c};a.searchParamProps=function(a,c,e){null!=c.start&&(e.start=
-c.start);null!=c.size&&(e.size=c.size);null!=c.types&&(e.types=c.types);null!=c.sort&&(e.sort=c.sort);null!=c.track_scores&&(e.track_scores=c.track_scores);if(null!=c.ownership)if(c=c.ownership,a.startsWith("(")&&a.endsWith(")")||(a="("+a+")"),"public"==c)a+=" AND (_missing_:@owner)";else if("owned"==c)a+=" AND (_exists_:@owner)";else if("me"==c){a+=" AND (";for(c=0;c(new Date).getTime()){setTimeout(function(){m.searchWithParams(a,
+c,e,h,g)},100);return}EcRepository.fetching[f]=(new Date).getTime()+6E4}}else f=null;var p=new FormData;p.append("data",b);null!=l&&p.append("searchParams",JSON.stringify(l));m=this;1==EcRepository.unsigned||1==k.unsigned?(p.append("signatureSheet","[]"),EcRemote.postExpectingObject(m.selectedServer,"sky/repo/search",p,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];m.handleSearchResults(a,e,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];
+null!=g&&g(a)})):EcIdentityManager.signatureSheetAsync(6E4+this.timeOffset,this.selectedServer,function(a){p.append("signatureSheet",a);EcRemote.postExpectingObject(m.selectedServer,"sky/repo/search",p,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];m.handleSearchResults(a,e,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];null!=g&&g(a)})},g)}};a.searchWithParamsBlocking=function(a,c){var b;null==c&&(c={});var h={};b=this.searchParamProps(a,
+c,h);null!=c.fields&&(h.fields=c.fields);a=EcRemote.async;EcRemote.async=!1;var g;g=JSON.stringify(h)+b;if(EcRepository.cachingSearch&&null!=EcRepository.cache[g])return this.handleSearchResults(EcRepository.cache[g],null,null,null);var d=new FormData;d.append("data",b);null!=h&&d.append("searchParams",JSON.stringify(h));1==EcRepository.unsigned||1==c.unsigned?(d.append("signatureSheet","[]"),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",d,function(a){EcRepository.cache[g]=a;
+null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null})):(c=EcIdentityManager.signatureSheet(6E4+this.timeOffset,this.selectedServer),d.append("signatureSheet",c),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",d,function(a){EcRepository.cache[g]=a;null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null}));c=this.handleSearchResults(EcRepository.cache[g],
+null,null,null);EcRepository.cachingSearch||delete EcRepository.cache[g];EcRemote.async=a;return c};a.searchParamProps=function(a,c,e){null!=c.start&&(e.start=c.start);null!=c.size&&(e.size=c.size);null!=c.types&&(e.types=c.types);null!=c.sort&&(e.sort=c.sort);null!=c.track_scores&&(e.track_scores=c.track_scores);if(null!=c.ownership)if(c=c.ownership,a.startsWith("(")&&a.endsWith(")")||(a="("+a+")"),"public"==c)a+=" AND (_missing_:@owner)";else if("owned"==c)a+=" AND (_exists_:@owner)";else if("me"==
+c){a+=" AND (";for(c=0;c=this.relation.length&&null!=e?e(""):EcAlignment.get(this.relation[c],function(h){null!=h&&h.source==b||h.target==b||h.source==a||h.target==a?(d.relation.splice(c,1),d.removeRelationshipsThatInclude(a,c,e,g)):d.removeRelationshipsThatInclude(a,c+1,e,g)},function(b){d.removeRelationshipsThatInclude(a,c+1,e,g)})};a.removeLevelsThatInclude=function(a,c,e,g){var b=EcRemoteLinkedData.trimVersionFromUrl(a),
-d=this;c>=this.level.length&&null!=e?e(""):EcLevel.get(this.level[c],function(h){h.competency==b||h.competency==a?(d.level.splice(c,1),d.removeLevelsThatInclude(a,c,e,g)):d.removeLevelsThatInclude(a,c+1,e,g)},function(b){d.removeLevelsThatInclude(a,c+1,e,g)})};a.addRelation=function(a){a=EcRemoteLinkedData.trimVersionFromUrl(a);null==this.relation&&(this.relation=[]);for(var b=0;b=this.relation.length&&null!=e?e(""):EcAlignment.get(this.relation[c],function(g){null!=g&&g.source==b||g.target==b||g.source==a||g.target==a?(d.relation.splice(c,1),d.removeRelationshipsThatInclude(a,c,e,h)):d.removeRelationshipsThatInclude(a,c+1,e,h)},function(b){d.removeRelationshipsThatInclude(a,c+1,e,h)})};a.removeLevelsThatInclude=function(a,c,e,h){var b=EcRemoteLinkedData.trimVersionFromUrl(a),
+d=this;c>=this.level.length&&null!=e?e(""):EcLevel.get(this.level[c],function(g){g.competency==b||g.competency==a?(d.level.splice(c,1),d.removeLevelsThatInclude(a,c,e,h)):d.removeLevelsThatInclude(a,c+1,e,h)},function(b){d.removeLevelsThatInclude(a,c+1,e,h)})};a.addRelation=function(a){a=EcRemoteLinkedData.trimVersionFromUrl(a);null==this.relation&&(this.relation=[]);for(var b=0;b 0) {
@@ -1628,7 +1628,7 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
results[i] = d;
if (EcRepository.caching) {
if (!EcRepository.shouldTryUrl(d.id)) {
- var md5 = EcCrypto.md5(d.id);
+ var md5 = EcCrypto.md5(d.shortId());
for (var j = 0; j < cacheUrls.length; j++) {
var url = cacheUrls[j];
if (url.indexOf(md5) != -1) {
diff --git a/src/main/js/cass/org.cassproject.schema.general.js b/src/main/js/cass/org.cassproject.schema.general.js
index 1cc73ffef..669fe3503 100644
--- a/src/main/js/cass/org.cassproject.schema.general.js
+++ b/src/main/js/cass/org.cassproject.schema.general.js
@@ -129,6 +129,8 @@ EcRemoteLinkedData = stjs.extend(EcRemoteLinkedData, EcLinkedData, [], function(
constructor.trimVersionFromUrl = function(id) {
if (id == null)
return null;
+ if (id.indexOf("/api/data/") == -1)
+ return id;
if (!id.substring(id.lastIndexOf("/")).matches("\\/[0-9]+"))
return id;
var rawId = id.substring(0, id.lastIndexOf("/"));
diff --git a/src/main/resources/b-skyrepo/kbac.skyrepo.js b/src/main/resources/b-skyrepo/kbac.skyrepo.js
index f262def2f..d07a87d6c 100644
--- a/src/main/resources/b-skyrepo/kbac.skyrepo.js
+++ b/src/main/resources/b-skyrepo/kbac.skyrepo.js
@@ -749,7 +749,7 @@ var endpointMultiPut = function() {
ld.copyFrom(o);
var id = null;
if (!EcRepository.alwaysTryUrl && repo != null && !repo.constructor.shouldTryUrl(ld.id))
- id = EcCrypto.md5(ld.id);
+ id = EcCrypto.md5(ld.shortId());
else
id = ld.getGuid();
var version = ld.getTimestamp();
diff --git a/src/main/resources/c-adapter/ceasn/ceasn.js b/src/main/resources/c-adapter/ceasn/ceasn.js
index 88d6ab483..4f1c812a0 100644
--- a/src/main/resources/c-adapter/ceasn/ceasn.js
+++ b/src/main/resources/c-adapter/ceasn/ceasn.js
@@ -611,7 +611,7 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
var topChild = frameworkObj["ceasn:hasTopChild"] ? frameworkObj["ceasn:hasTopChild"] : frameworkObj["ceasn:hasChild"];
if (topChild != null && topChild.length != null) {
for (var i = 0; i < topChild.length; i++) {
- cassCompetencies.push(topChild[i]);
+ cassCompetencies.push(EcRemoteLinkedData.trimVersionFromUrl(topChild[i]));
}
}
}
@@ -619,9 +619,6 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
for (var idx in competencyList) {
var asnComp = competencyList[idx];
- var compGuid = stringToHex(md5(asnComp["@id"]));
- print("guid: " + compGuid);
- print(JSON.stringify(asnComp, null, 2));
var compVersion = date(null, null, true);
var canonicalId = asnComp["@id"];
@@ -630,8 +627,8 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
if (childComps != null && childComps.length != null) {
for (var i = 0; i < childComps.length; i++) {
var r = new EcAlignment();
- r.source = childComps[i];
- r.target = canonicalId;
+ r.source = EcRemoteLinkedData.trimVersionFromUrl(childComps[i]);
+ r.target = EcRemoteLinkedData.trimVersionFromUrl(canonicalId);
r.relationType = Relation.NARROWS;
r.generateId(repoEndpoint());
r.addOwner(ceasnIdentity.ppk.toPk());
@@ -642,7 +639,7 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
if (relationshipMap[r.source + r.target] != true) {
relationshipMap[r.source + r.target] = true;
repo.saveTo(r, print, print);
- cassRelationships.push(r.id);
+ cassRelationships.push(r.shortId());
cassCompetencies.push(r.source);
}
}
@@ -653,8 +650,6 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
newComp["@context"] = "http://schema.cassproject.org/0.3/ceasn2cass";
var expandedComp = jsonLdExpand(JSON.stringify(newComp));
-
- print(JSON.stringify(expandedComp, null, 2));
var compactedComp = jsonLdCompact(JSON.stringify(expandedComp), "http://schema.cassproject.org/0.3");
delete compactedComp["ceasn:isChildOf"];
@@ -668,22 +663,17 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
if (owner != null)
c.addOwner(EcPk.fromPem(owner));
- print(JSON.stringify(c, null, 2));
repo.saveTo(c, print, print);
} // end for each competency in competencyList
if (frameworkObj != null) {
- var guid = stringToHex(md5(frameworkObj["@id"]));
+ var guid = stringToHex(md5(EcRemoteLinkedData.trimVersionFromUrl(frameworkObj["@id"])));
var version = date(null, null, true);
- print(JSON.stringify(frameworkObj, null, 2));
frameworkObj["@context"] = "http://schema.cassproject.org/0.3/ceasn2cass";
var expanded = jsonLdExpand(JSON.stringify(frameworkObj));
- print(JSON.stringify(expanded, null, 2));
-
var compacted = jsonLdCompact(JSON.stringify(expanded), "http://schema.cassproject.org/0.3");
- print(JSON.stringify(compacted, null, 2));
delete compacted["ceasn:hasChild"];
delete compacted["ceasn:hasTopChild"];
@@ -700,7 +690,6 @@ function importCeFrameworkToCass(frameworkObj, competencyList) {
if (owner != null)
f.addOwner(EcPk.fromPem(owner));
- print(JSON.stringify(f, null, 2));
repo.saveTo(f, print, print);
return repoEndpoint() + "data/" + guid;
diff --git a/src/main/webapp/cass-align b/src/main/webapp/cass-align
index f2bbdc714..45372d379 160000
--- a/src/main/webapp/cass-align
+++ b/src/main/webapp/cass-align
@@ -1 +1 @@
-Subproject commit f2bbdc714b972b28f177d692050af7b0e93f569b
+Subproject commit 45372d379f7b42ba5ad446cb16cd700238c55ee3
diff --git a/src/main/webapp/cass-editor b/src/main/webapp/cass-editor
index 5bf0259a7..33a29e608 160000
--- a/src/main/webapp/cass-editor
+++ b/src/main/webapp/cass-editor
@@ -1 +1 @@
-Subproject commit 5bf0259a79127fec75442b83724d78474caa3c45
+Subproject commit 33a29e6089485da9d33c701f7224efe7082c2ca3
diff --git a/src/main/webapp/cass-gap-analysis b/src/main/webapp/cass-gap-analysis
index 64d0e124b..b5fe9f552 160000
--- a/src/main/webapp/cass-gap-analysis
+++ b/src/main/webapp/cass-gap-analysis
@@ -1 +1 @@
-Subproject commit 64d0e124b948d7b7b3bbf98a00210b133582d7bb
+Subproject commit b5fe9f552a21c16bb0ad848a9d019866ccde34f3
diff --git a/src/main/webapp/cass-profile b/src/main/webapp/cass-profile
index add7a8cd9..e4e60eed8 160000
--- a/src/main/webapp/cass-profile
+++ b/src/main/webapp/cass-profile
@@ -1 +1 @@
-Subproject commit add7a8cd9ac2684b6294636ad3ffd9d2e86dfe03
+Subproject commit e4e60eed8e775dab2490aefa784ce021eb03154b
diff --git a/src/main/webapp/cass-viewer b/src/main/webapp/cass-viewer
index 26d685e11..189e0215d 160000
--- a/src/main/webapp/cass-viewer
+++ b/src/main/webapp/cass-viewer
@@ -1 +1 @@
-Subproject commit 26d685e114911c66b2f8c1373859fe9198272ab1
+Subproject commit 189e0215de87343e6eb92c53faebc961973c15f9
diff --git a/src/main/webapp/cass-vlrc b/src/main/webapp/cass-vlrc
index 7c15c0ad5..c6175aa26 160000
--- a/src/main/webapp/cass-vlrc
+++ b/src/main/webapp/cass-vlrc
@@ -1 +1 @@
-Subproject commit 7c15c0ad569f4aff509e0317d75934e59a328018
+Subproject commit c6175aa26fcca80f49eaf61eafa6b10b72073f94
diff --git a/src/main/webapp/js/cass/cass.js b/src/main/webapp/js/cass/cass.js
index a4c68a596..eefc8d2e2 100644
--- a/src/main/webapp/js/cass/cass.js
+++ b/src/main/webapp/js/cass/cass.js
@@ -40930,6 +40930,8 @@ EcRemoteLinkedData = stjs.extend(EcRemoteLinkedData, EcLinkedData, [], function(
constructor.trimVersionFromUrl = function(id) {
if (id == null)
return null;
+ if (id.indexOf("/api/data/") == -1)
+ return id;
if (!id.substring(id.lastIndexOf("/")).matches("\\/[0-9]+"))
return id;
var rawId = id.substring(0, id.lastIndexOf("/"));
@@ -69035,8 +69037,8 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
fd.append("signatureSheet", signatureSheet);
if (!EcRepository.alwaysTryUrl)
if (repo != null)
- if (!repo.constructor.shouldTryUrl(data.id)) {
- EcRemote.postExpectingString(EcRemote.urlAppend(repo.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.id)), "", fd, success, failure);
+ if (!repo.constructor.shouldTryUrl(data.id) || data.id.indexOf(repo.selectedServer) == -1) {
+ EcRemote.postExpectingString(EcRemote.urlAppend(repo.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.shortId())), "", fd, success, failure);
return;
}
EcRemote.postExpectingString(data.id, "", fd, success, failure);
@@ -69150,7 +69152,7 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
if (EcRepository.shouldTryUrl(data.id))
targetUrl = data.shortId();
else {
- targetUrl = EcRemote.urlAppend(this.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.id));
+ targetUrl = EcRemote.urlAppend(this.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.shortId()));
}
var me = this;
if (data.owner != null && data.owner.length > 0) {
@@ -69240,7 +69242,7 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
results[i] = d;
if (EcRepository.caching) {
if (!EcRepository.shouldTryUrl(d.id)) {
- var md5 = EcCrypto.md5(d.id);
+ var md5 = EcCrypto.md5(d.shortId());
for (var j = 0; j < cacheUrls.length; j++) {
var url = cacheUrls[j];
if (url.indexOf(md5) != -1) {
diff --git a/src/main/webapp/js/cass/cass.min.js b/src/main/webapp/js/cass/cass.min.js
index 24708434f..1dd40b433 100644
--- a/src/main/webapp/js/cass/cass.min.js
+++ b/src/main/webapp/js/cass/cass.min.js
@@ -1544,11 +1544,11 @@ q=!0);d&&"download"!==l&&(l+=".download");if("application/octet-stream"===n||d)y
function(){b.abort();r.readyState=r.DONE};r.readyState=r.WRITING}),w)}),w)};a.getFile(l,{create:!1},x(function(a){a.remove();b()}),x(function(a){a.code===a.NOT_FOUND_ERR?b():w()}))}),w)}),w)):w()}},n=l.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,b,c){c||(a=f(a));return navigator.msSaveOrOpenBlob(a,b||"download")};n.abort=function(){this.readyState=this.DONE;p(this,"abort")};n.readyState=n.INIT=0;n.WRITING=1;n.DONE=2;n.error=n.onwritestart=n.onprogress=
n.onwrite=n.onabort=n.onerror=n.onwriteend=null;return function(a,b,c){return new l(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);"undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
var General=function(){},General=stjs.extend(General,null,[],function(k,b){k.context_0_2="http://schema.eduworks.com/general/0.2";k.context_0_1="http://schema.eduworks.com/general/0.1";k.context="http://schema.eduworks.com/general/0.2"},{},{}),Ebac=function(){},Ebac=stjs.extend(Ebac,null,[],function(k,b){k.context_0_1="http://schema.eduworks.com/ebac/0.1";k.context_0_2="http://schema.eduworks.com/ebac/0.2";k.context_0_3="http://schema.cassproject.org/kbac/0.2";k.context="http://schema.cassproject.org/kbac/0.2"},
-{},{}),EcRemoteLinkedData=function(k,b){EcLinkedData.call(this,k,b)},EcRemoteLinkedData=stjs.extend(EcRemoteLinkedData,EcLinkedData,[],function(k,b){b.owner=null;b.signature=null;b.id=null;b.equals=function(a){return this.isId(a.id)};b.reader=null;k.trimVersionFromUrl=function(a){if(null==a)return null;if(!a.substring(a.lastIndexOf("/")).matches("\\/[0-9]+"))return a;a=a.substring(0,a.lastIndexOf("/"));a.endsWith("/")&&(a=a.substring(0,a.length-1));return a};b.generateId=function(a){this.id=a;this.id.endsWith("/")||
-this.id.endsWith("ce-")||(this.id+="/");this.id+="data/";this.id+=this.getDottedType();this.id+="/";this.id+=generateUUID();this.id+="/";this.id+=(new Date).getTime()};b.generateShortId=function(a){this.id=a;this.id.endsWith("/")||this.id.endsWith("ce-")||(this.id+="/");this.id+=generateUUID()};b.getDottedType=function(){return this.getFullType().replace("http://","").replaceAll("/",".")};b.assignId=function(a,b){this.id=a;this.id.endsWith("/")||(this.id+="/");this.id+="data/";this.id+=this.getDottedType();
-this.id+="/";this.id+=b;this.id+="/";this.id+=(new Date).getTime()};k.veryShortId=function(a,b){a.endsWith("/")||(a+="/");return a+"data/"+b};b.assignIdAndVersion=function(a,b,d){this.id=a;this.id.endsWith("/")||(this.id+="/");this.id+="data/";this.id+=this.getDottedType();this.id+="/";this.id+=b;this.id+="/";this.id+=d};b.hasOwner=function(a){if(null==this.owner)return!1;a=a.toPem();for(var b=0;b(new Date).getTime()){setTimeout(function(){l.searchWithParams(a,b,d,h,g)},100);return}EcRepository.fetching[f]=(new Date).getTime()+6E4}}else f=null;var n=new FormData;n.append("data",
-c);null!=p&&n.append("searchParams",JSON.stringify(p));l=this;1==EcRepository.unsigned||1==k.unsigned?(n.append("signatureSheet","[]"),EcRemote.postExpectingObject(l.selectedServer,"sky/repo/search",n,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];l.handleSearchResults(a,d,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];null!=g&&g(a)})):EcIdentityManager.signatureSheetAsync(6E4+this.timeOffset,this.selectedServer,function(a){n.append("signatureSheet",
-a);EcRemote.postExpectingObject(l.selectedServer,"sky/repo/search",n,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];l.handleSearchResults(a,d,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];null!=g&&g(a)})},g)}};b.searchWithParamsBlocking=function(a,b){var c;null==b&&(b={});var h={};c=this.searchParamProps(a,b,h);null!=b.fields&&(h.fields=b.fields);a=EcRemote.async;EcRemote.async=!1;var g;g=JSON.stringify(h)+c;if(EcRepository.cachingSearch&&
-null!=EcRepository.cache[g])return this.handleSearchResults(EcRepository.cache[g],null,null,null);var e=new FormData;e.append("data",c);null!=h&&e.append("searchParams",JSON.stringify(h));1==EcRepository.unsigned||1==b.unsigned?(e.append("signatureSheet","[]"),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",e,function(a){EcRepository.cache[g]=a;null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null})):(b=EcIdentityManager.signatureSheet(6E4+
-this.timeOffset,this.selectedServer),e.append("signatureSheet",b),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",e,function(a){EcRepository.cache[g]=a;null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null}));b=this.handleSearchResults(EcRepository.cache[g],null,null,null);EcRepository.cachingSearch||delete EcRepository.cache[g];EcRemote.async=a;return b};b.searchParamProps=function(a,b,d){null!=b.start&&(d.start=
-b.start);null!=b.size&&(d.size=b.size);null!=b.types&&(d.types=b.types);null!=b.sort&&(d.sort=b.sort);null!=b.track_scores&&(d.track_scores=b.track_scores);if(null!=b.ownership)if(b=b.ownership,a.startsWith("(")&&a.endsWith(")")||(a="("+a+")"),"public"==b)a+=" AND (_missing_:@owner)";else if("owned"==b)a+=" AND (_exists_:@owner)";else if("me"==b){a+=" AND (";for(b=0;b(new Date).getTime()){setTimeout(function(){l.searchWithParams(a,
+b,d,h,g)},100);return}EcRepository.fetching[f]=(new Date).getTime()+6E4}}else f=null;var n=new FormData;n.append("data",c);null!=p&&n.append("searchParams",JSON.stringify(p));l=this;1==EcRepository.unsigned||1==k.unsigned?(n.append("signatureSheet","[]"),EcRemote.postExpectingObject(l.selectedServer,"sky/repo/search",n,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];l.handleSearchResults(a,d,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];
+null!=g&&g(a)})):EcIdentityManager.signatureSheetAsync(6E4+this.timeOffset,this.selectedServer,function(a){n.append("signatureSheet",a);EcRemote.postExpectingObject(l.selectedServer,"sky/repo/search",n,function(a){EcRepository.cachingSearch&&(EcRepository.cache[f]=a);null!=f&&delete EcRepository.fetching[f];l.handleSearchResults(a,d,h,g)},function(a){null!=f&&delete EcRepository.fetching[f];null!=g&&g(a)})},g)}};b.searchWithParamsBlocking=function(a,b){var c;null==b&&(b={});var h={};c=this.searchParamProps(a,
+b,h);null!=b.fields&&(h.fields=b.fields);a=EcRemote.async;EcRemote.async=!1;var g;g=JSON.stringify(h)+c;if(EcRepository.cachingSearch&&null!=EcRepository.cache[g])return this.handleSearchResults(EcRepository.cache[g],null,null,null);var e=new FormData;e.append("data",c);null!=h&&e.append("searchParams",JSON.stringify(h));1==EcRepository.unsigned||1==b.unsigned?(e.append("signatureSheet","[]"),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",e,function(a){EcRepository.cache[g]=a;
+null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null})):(b=EcIdentityManager.signatureSheet(6E4+this.timeOffset,this.selectedServer),e.append("signatureSheet",b),EcRemote.postExpectingObject(this.selectedServer,"sky/repo/search",e,function(a){EcRepository.cache[g]=a;null!=g&&delete EcRepository.fetching[g]},function(a){null!=g&&delete EcRepository.fetching[g];EcRepository.cache[g]=null}));b=this.handleSearchResults(EcRepository.cache[g],
+null,null,null);EcRepository.cachingSearch||delete EcRepository.cache[g];EcRemote.async=a;return b};b.searchParamProps=function(a,b,d){null!=b.start&&(d.start=b.start);null!=b.size&&(d.size=b.size);null!=b.types&&(d.types=b.types);null!=b.sort&&(d.sort=b.sort);null!=b.track_scores&&(d.track_scores=b.track_scores);if(null!=b.ownership)if(b=b.ownership,a.startsWith("(")&&a.endsWith(")")||(a="("+a+")"),"public"==b)a+=" AND (_missing_:@owner)";else if("owned"==b)a+=" AND (_exists_:@owner)";else if("me"==
+b){a+=" AND (";for(b=0;b 0) {
@@ -1609,7 +1609,7 @@ EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototy
results[i] = d;
if (EcRepository.caching) {
if (!EcRepository.shouldTryUrl(d.id)) {
- var md5 = EcCrypto.md5(d.id);
+ var md5 = EcCrypto.md5(d.shortId());
for (var j = 0; j < cacheUrls.length; j++) {
var url = cacheUrls[j];
if (url.indexOf(md5) != -1) {
diff --git a/src/main/webapp/js/cass/org.cassproject.schema.general.js b/src/main/webapp/js/cass/org.cassproject.schema.general.js
index 6a83ba29a..d074fbe0a 100644
--- a/src/main/webapp/js/cass/org.cassproject.schema.general.js
+++ b/src/main/webapp/js/cass/org.cassproject.schema.general.js
@@ -110,6 +110,8 @@ EcRemoteLinkedData = stjs.extend(EcRemoteLinkedData, EcLinkedData, [], function(
constructor.trimVersionFromUrl = function(id) {
if (id == null)
return null;
+ if (id.indexOf("/api/data/") == -1)
+ return id;
if (!id.substring(id.lastIndexOf("/")).matches("\\/[0-9]+"))
return id;
var rawId = id.substring(0, id.lastIndexOf("/"));
diff --git a/src/main/webapp/pom.xml b/src/main/webapp/pom.xml
index c71a314f1..7f6579a5a 100644
--- a/src/main/webapp/pom.xml
+++ b/src/main/webapp/pom.xml
@@ -11,7 +11,7 @@
http://github.com/cassproject/cass
- 2.9.1
+ 2.9.2
UTF-8