@datagrok/eda 1.1.30 → 1.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- var eda_test;(()=>{var t={5540:(t,e,n)=>{"use strict";t=n.hmd(t);var i,r=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,n,r=void 0!==t?t:{};r.ready=new Promise((function(t,i){e=t,n=i}));var o,s=Object.assign({},r),a="object"==typeof window,c="function"==typeof importScripts,l=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(a||c)&&(c?l=self.location.href:"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),i&&(l=i),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c&&(o=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),r.print||console.log.bind(console);var u,h,f=r.printErr||console.warn.bind(console);Object.assign(r,s),s=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(u=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&E("no native wasm support detected");var d,y,g,m=!1;function p(){var t=h.buffer;r.HEAP8=d=new Int8Array(t),r.HEAP16=new Int16Array(t),r.HEAP32=new Int32Array(t),r.HEAPU8=y=new Uint8Array(t),r.HEAPU16=new Uint16Array(t),r.HEAPU32=g=new Uint32Array(t),r.HEAPF32=new Float32Array(t),r.HEAPF64=new Float64Array(t)}var x=[],C=[],A=[],v=0,b=null,_=null;function E(t){r.onAbort&&r.onAbort(t),f(t="Aborted("+t+")"),m=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}var N,w;function M(t){return t.startsWith("data:application/octet-stream;base64,")}function S(t){try{if(t==N&&u)return new Uint8Array(u);if(o)return o(t);throw"both async and sync fetching of the wasm failed"}catch(t){E(t)}}function I(t,e,n){return function(t){return u||!a&&!c||"function"!=typeof fetch?Promise.resolve().then((function(){return S(t)})):fetch(t,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((function(){return S(t)}))}(t).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(n,(function(t){f("failed to asynchronously prepare wasm: "+t),E(t)}))}function O(t){for(;t.length>0;)t.shift()(r)}function T(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){g[this.ptr+4>>2]=t},this.get_type=function(){return g[this.ptr+4>>2]},this.set_destructor=function(t){g[this.ptr+8>>2]=t},this.get_destructor=function(){return g[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,d[this.ptr+12|0]=t},this.get_caught=function(){return 0!=d[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,d[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=d[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)},this.set_adjusted_ptr=function(t){g[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return g[this.ptr+16>>2]},this.get_exception_ptr=function(){if(W(this.get_type()))return g[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function L(t){var e=h.buffer;try{return h.grow(t-e.byteLength+65535>>>16),p(),1}catch(t){}}function R(t){return r["_"+t]}M(N="wasmDbscan.wasm")||(w=N,N=r.locateFile?r.locateFile(w,l):l+w);var D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(t,e,n,i,r){var o={string:t=>{var e=0;return null!=t&&0!==t&&(e=function(t){var e=function(t){for(var e=0,n=0;n<t.length;++n){var i=t.charCodeAt(n);i<=127?e++:i<=2047?e+=2:i>=55296&&i<=57343?(e+=4,++n):e+=3}return e}(t)+1,n=F(e);return function(t,e,n){!function(t,e,n,i){if(!(i>0))return 0;for(var r=n+i-1,o=0;o<t.length;++o){var s=t.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o)),s<=127){if(n>=r)break;e[n++]=s}else if(s<=2047){if(n+1>=r)break;e[n++]=192|s>>6,e[n++]=128|63&s}else if(s<=65535){if(n+2>=r)break;e[n++]=224|s>>12,e[n++]=128|s>>6&63,e[n++]=128|63&s}else{if(n+3>=r)break;e[n++]=240|s>>18,e[n++]=128|s>>12&63,e[n++]=128|s>>6&63,e[n++]=128|63&s}}e[n]=0}(t,y,e,n)}(t,n,e),n}(t)),e},array:t=>{var e,n,i=F(t.length);return e=t,n=i,d.set(e,n),i}},s=R(t),a=[],c=0;if(i)for(var l=0;l<i.length;l++){var u=o[n[l]];u?(0===c&&(c=U()),a[l]=u(i[l])):a[l]=i[l]}var h=s.apply(null,a);return function(t){return 0!==c&&B(c),function(t){return"string"===e?(n=t)?function(t,e,n){for(var i=e+n,r=e;t[r]&&!(r>=i);)++r;if(r-e>16&&t.buffer&&D)return D.decode(t.subarray(e,r));for(var o="";e<r;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var c=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|c:(7&s)<<18|a<<12|c<<6|63&t[e++])<65536)o+=String.fromCharCode(s);else{var l=s-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}(y,n,i):"":"boolean"===e?Boolean(t):t;var n,i}(t)}(h)}var P,H={__cxa_throw:function(t,e,n){throw new T(t).init(e,n),t},abort:function(){E("")},emscripten_memcpy_big:function(t,e,n){y.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){var e,n=y.length,i=2147483648;if((t>>>=0)>i)return!1;for(var r=1;r<=4;r*=2){var o=n*(1+.2/r);if(o=Math.min(o,t+100663296),L(Math.min(i,(e=Math.max(t,o))+(65536-e%65536)%65536)))return!0}return!1}},U=(function(){var t,e,i,o,s={env:H,wasi_snapshot_preview1:H};function a(t,e){var n,i=t.exports;return r.asm=i,h=r.asm.memory,p(),r.asm.__indirect_function_table,n=r.asm.__wasm_call_ctors,C.unshift(n),function(){if(v--,r.monitorRunDependencies&&r.monitorRunDependencies(v),0==v&&(null!==b&&(clearInterval(b),b=null),_)){var t=_;_=null,t()}}(),i}if(v++,r.monitorRunDependencies&&r.monitorRunDependencies(v),r.instantiateWasm)try{return r.instantiateWasm(s,a)}catch(t){f("Module.instantiateWasm callback failed with error: "+t),n(t)}(t=u,e=N,i=s,o=function(t){a(t.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||M(e)||"function"!=typeof fetch?I(e,i,o):fetch(e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(o,(function(t){return f("wasm streaming compile failed: "+t),f("falling back to ArrayBuffer instantiation"),I(e,i,o)}))}))).catch(n)}(),r._dbscan=function(){return(r._dbscan=r.asm.dbscan).apply(null,arguments)},r._malloc=function(){return(r._malloc=r.asm.malloc).apply(null,arguments)},r._free=function(){return(r._free=r.asm.free).apply(null,arguments)},function(){return(U=r.asm.stackSave).apply(null,arguments)}),B=function(){return(B=r.asm.stackRestore).apply(null,arguments)},F=function(){return(F=r.asm.stackAlloc).apply(null,arguments)},W=function(){return(W=r.asm.__cxa_is_pointer_type).apply(null,arguments)};function V(){function t(){P||(P=!0,r.calledRun=!0,m||(O(C),e(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)t=r.postRun.shift(),A.unshift(t);var t;O(A)}()))}v>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)t=r.preRun.shift(),x.unshift(t);var t;O(x)}(),v>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t()))}if(r.ccall=k,r.cwrap=function(t,e,n,i){var r=!n||n.every((t=>"number"===t||"boolean"===t));return"string"!==e&&r&&!i?R(t):function(){return k(t,e,n,arguments)}},_=function t(){P||V(),P||(_=t)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return V(),t.ready});"object"==typeof exports?t.exports=r:"function"==typeof define&&n.amdO?define([],(function(){return r})):"object"==typeof exports&&(exports.exportCppDbscanLib=r)},9982:function(t,e,n){var i;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([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]);function n(t,n,i,r,o){for(var s,a,c,l,u,h,f,d,y,g,m,p,x;o>=64;){for(s=n[0],a=n[1],c=n[2],l=n[3],u=n[4],h=n[5],f=n[6],d=n[7],g=0;g<16;g++)m=r+4*g,t[g]=(255&i[m])<<24|(255&i[m+1])<<16|(255&i[m+2])<<8|255&i[m+3];for(g=16;g<64;g++)p=((y=t[g-2])>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,x=((y=t[g-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3,t[g]=(p+t[g-7]|0)+(x+t[g-16]|0);for(g=0;g<64;g++)p=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&h^~u&f)|0)+(d+(e[g]+t[g]|0)|0)|0,x=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&a^s&c^a&c)|0,d=f,f=h,h=u,u=l+p|0,l=c,c=a,a=s,s=p+x|0;n[0]+=s,n[1]+=a,n[2]+=c,n[3]+=l,n[4]+=u,n[5]+=h,n[6]+=f,n[7]+=d,r+=64,o-=64}return r}var i=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var i=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[i++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(i=n(this.temp,this.state,t,i,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[i++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,i=this.bufferLength,r=e/536870912|0,o=e<<3,s=e%64<56?64:128;this.buffer[i]=128;for(var a=i+1;a<s-8;a++)this.buffer[a]=0;this.buffer[s-8]=r>>>24&255,this.buffer[s-7]=r>>>16&255,this.buffer[s-6]=r>>>8&255,this.buffer[s-5]=r>>>0&255,this.buffer[s-4]=o>>>24&255,this.buffer[s-3]=o>>>16&255,this.buffer[s-2]=o>>>8&255,this.buffer[s-1]=o>>>0&255,n(this.temp,this.state,this.buffer,0,s),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=i;var r=function(){function t(t){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new i).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function o(t){var e=(new i).update(t),n=e.digest();return e.clean(),n}function s(t,e){var n=new r(t).update(e),i=n.digest();return n.clean(),i}function a(t,e,n,i){var r=i[0];if(0===r)throw new Error("hkdf: cannot expand more");e.reset(),r>1&&e.update(t),n&&e.update(n),e.update(i),e.finish(t),i[0]++}t.HMAC=r,t.hash=o,t.default=o,t.hmac=s;var c=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,i){void 0===e&&(e=c),void 0===i&&(i=32);for(var o=new Uint8Array([1]),l=s(e,t),u=new r(l),h=new Uint8Array(u.digestLength),f=h.length,d=new Uint8Array(i),y=0;y<i;y++)f===h.length&&(a(h,u,n,o),f=0),d[y]=h[f++];return u.clean(),h.fill(0),o.fill(0),d},t.pbkdf2=function(t,e,n,i){for(var o=new r(t),s=o.digestLength,a=new Uint8Array(4),c=new Uint8Array(s),l=new Uint8Array(s),u=new Uint8Array(i),h=0;h*s<i;h++){var f=h+1;a[0]=f>>>24&255,a[1]=f>>>16&255,a[2]=f>>>8&255,a[3]=f>>>0&255,o.reset(),o.update(e),o.update(a),o.finish(l);for(var d=0;d<s;d++)c[d]=l[d];for(d=2;d<=n;d++){o.reset(),o.update(l).finish(l);for(var y=0;y<s;y++)c[y]^=l[y]}for(d=0;d<s&&h*s+d<i;d++)u[h*s+d]=c[d]}for(h=0;h<s;h++)c[h]=l[h]=0;for(h=0;h<4;h++)a[h]=0;return o.clean(),u}}(e);var r=e.default;for(var o in e)r[o]=e[o];"object"==typeof t.exports?t.exports=r:void 0===(i=function(){return r}.call(e,n,e,t))||(t.exports=i)}()},944:(t,e)=>{"use strict";e.Vb=void 0,e.Vb=function(t,e,n){var i=function(t,e,n){if(0===t.length||0===e.length)return 0;if(n&&!n.caseSensitive&&(t=t.toUpperCase(),e=e.toUpperCase()),t===e)return 1;for(var i=0,r=t.length,o=e.length,s=Math.floor(Math.max(r,o)/2)-1,a=new Array(r),c=new Array(o),l=0;l<r;l++)for(var u=Math.max(0,l-s);u<=Math.min(o,l+s+1);u++)if(!a[l]&&!c[u]&&t[l]===e[u]){++i,a[l]=c[u]=!0;break}if(0===i)return 0;var h=0,f=0;for(l=0;l<r;l++)if(a[l]){for(;!c[f];)f++;t.charAt(l)!==e.charAt(f++)&&h++}return(i/r+i/o+(i-(h/=2))/i)/3}(t,e,n),r=0;if(i>.7){for(var o=Math.min(t.length,e.length),s=0;t[s]===e[s]&&s<4&&s<o;)++r,s++;i+=.1*r*(1-i)}return i}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,loaded:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=t,n.amdO={},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.u=t=>t+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=i[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href;var i={};(()=>{"use strict";n.r(i),n.d(i,{_package:()=>_t,test:()=>Et,tests:()=>f});const t=DG,e=grok;n(9982);const r=t.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');r.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var o=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};const s=3e4,a=108e5,c=console.log.bind(console),l=console.info.bind(console),u=console.warn.bind(console),h=console.error.bind(console),f={},d="Auto Tests",y="Demo",g="Detectors",m="Core",p={};let x;var C,A,v,b,_,E,N,w,M,S;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(C||(C={}));class I{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class O{constructor(t,e,n,i){var r;this.category=t,this.name=e,null!=i||(i={}),null!==(r=i.timeout)&&void 0!==r||(i.timeout=s),this.options=i,this.test=()=>o(this,void 0,void 0,(function*(){return new Promise(((t,e)=>o(this,void 0,void 0,(function*(){let i="";try{i=yield n()}catch(t){e(t)}t(i)}))))}))}}function T(t,e,n){null==f[x]&&(f[x]={}),null==f[x].tests&&(f[x].tests=[]),f[x].tests.push(new O(x,t,e,n))}function L(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function R(t,e,n){var i;x=t,e(),f[x]&&(f[x].clear=null===(i=null==n?void 0:n.clear)||void 0===i||i,f[x].timeout=null==n?void 0:n.timeout,f[x].benchmarks=null==n?void 0:n.benchmarks)}function D(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function k(e){return o(this,void 0,void 0,(function*(){return`${e.toString()}\n${e.stack?yield t.Logger.translateStackTrace(e.stack):""}`}))}function P(n,i,r,l,u,f){var d,y,g,m,p,x,C,A;return o(this,void 0,void 0,(function*(){let o;r.length=0;let v="package";const b=null!=i&&n.name.toLowerCase()!==i.toLowerCase();let _=(null===(d=n.options)||void 0===d?void 0:d.skipReason)||b,E=b?"skipped":null===(y=n.options)||void 0===y?void 0:y.skipReason;if(t.Test.isInBenchmark&&!(null===(g=n.options)||void 0===g?void 0:g.benchmark))return void c(`SKIPPED: ${n.category} ${n.name} doesnt available in benchmark mode`);_||c(`Started ${n.category} ${n.name}`);const N=Date.now();try{if(_)o={success:!0,result:E,ms:0,skipped:!0};else{let e=(null===(m=n.options)||void 0===m?void 0:m.timeout)===s&&l?l:null===(p=n.options)||void 0===p?void 0:p.timeout;e=t.Test.isInBenchmark?a:e,o={success:!0,result:null!==(x=yield U(n.test,e))&&void 0!==x?x:"OK",ms:0,skipped:!1}}}catch(t){h(t),o={success:!1,result:yield k(t),ms:0,skipped:!1}}if((null===(C=n.options)||void 0===C?void 0:C.isAggregated)&&o.result.constructor===t.DataFrame){const t=o.result.col("success");if(t&&(o.success=t.stats.sum===t.length),!f){const t=o.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),o.result=t}o.result=o.result.toCsv()}if(o.logs=r.join("\n"),o.ms=Date.now()-N,_||c(`Finished ${n.category} ${n.name} for ${o.ms} ms`),o.category=n.category,o.name=n.name,!b){let i={success:o.success,result:o.result,ms:o.ms,skipped:o.skipped,package:u,category:n.category,name:n.name,logs:o.logs};if(o.result.constructor==Object){const t=Object.keys(o.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:o.result[e]})),{});i=Object.assign(Object.assign({},i),t)}i.result instanceof t.DataFrame&&(i.result=JSON.stringify(null===(A=i.result)||void 0===A?void 0:A.toJson())||""),null!=e.shell.reportTest?yield e.shell.reportTest(v,i):yield fetch(`${e.dapi.root}/log/tests/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(i)})}return o}))}function H(t){return o(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function U(t,e,n="EXECUTION TIMEOUT"){return o(this,void 0,void 0,(function*(){let i=null;const r=new Promise(((t,r)=>{i=setTimeout((()=>{r(n)}),e)}));try{return yield Promise.race([t(),r])}finally{i&&clearTimeout(i)}}))}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]),function(t){t.UMAP="UMAP",t.T_SNE="t-SNE"}(A||(A={})),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(v||(v={})),function(t){t.Euclidean="Euclidean"}(b||(b={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(_||(_={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(E||(E={})),(S=N||(N={})).Vector="Vector",S.String="String",S.BitArray="BitArray",S.MacroMolecule="MacroMolecule",S.Number="Number",S.IntArray="IntArray",S.NumberArray="NumberArray",function(t){t.Difference="Difference"}(w||(w={})),function(t){t.CommonItems="Common Items"}(M||(M={}));const B=new Uint32Array(65536),F=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return 0===e.length?t.length:t.length<=32?((t,e)=>{const n=t.length,i=e.length,r=1<<n-1;let o=-1,s=0,a=n,c=n;for(;c--;)B[t.charCodeAt(c)]|=1<<c;for(c=0;c<i;c++){let t=B[e.charCodeAt(c)];const n=t|s;t|=(t&o)+o^o,s|=~(t|o),o&=t,s&r&&a++,o&r&&a--,s=s<<1|1,o=o<<1|~(n|s),s&=n}for(c=n;c--;)B[t.charCodeAt(c)]=0;return a})(t,e):((t,e)=>{const n=e.length,i=t.length,r=[],o=[],s=Math.ceil(n/32),a=Math.ceil(i/32);for(let t=0;t<s;t++)o[t]=-1,r[t]=0;let c=0;for(;c<a-1;c++){let s=0,a=-1;const l=32*c,u=Math.min(32,i)+l;for(let e=l;e<u;e++)B[t.charCodeAt(e)]|=1<<e;for(let t=0;t<n;t++){const n=B[e.charCodeAt(t)],i=o[t/32|0]>>>t&1,c=r[t/32|0]>>>t&1,l=n|s,u=((n|c)&a)+a^a|n|c;let h=s|~(u|a),f=a&u;h>>>31^i&&(o[t/32|0]^=1<<t),f>>>31^c&&(r[t/32|0]^=1<<t),h=h<<1|i,f=f<<1|c,a=f|~(l|h),s=h&l}for(let e=l;e<u;e++)B[t.charCodeAt(e)]=0}let l=0,u=-1;const h=32*c,f=Math.min(32,i-h)+h;for(let e=h;e<f;e++)B[t.charCodeAt(e)]|=1<<e;let d=i;for(let t=0;t<n;t++){const n=B[e.charCodeAt(t)],s=o[t/32|0]>>>t&1,a=r[t/32|0]>>>t&1,c=n|l,h=((n|a)&u)+u^u|n|a;let f=l|~(h|u),y=u&h;d+=f>>>i-1&1,d-=y>>>i-1&1,f>>>31^s&&(o[t/32|0]^=1<<t),y>>>31^a&&(r[t/32|0]^=1<<t),f=f<<1|s,y=y<<1|a,u=y|~(c|f),l=f&c}for(let e=h;e<f;e++)B[t.charCodeAt(e)]=0;return d})(t,e)};var W=n(944);class V{constructor(t,e=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof t){const n=t,i=V._createBuffer(n);if(e)for(let t=0;t<i.length;t++)i[t]=-1;this._data=i,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,i){if(t<e||t>n)throw new Error(`Argument ${i} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let i=0;i<n;i++)e[i]=t[i]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new V(t._length);n._length=t._length,n._data=V._createBuffer(n._length),n._version=0;const i=t.lengthInInts;for(let r=0;r<i;r++)n._data[r]=t._data[r]&e._data[r];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new V(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new V(t);for(let i=0;i<t;++i)n.setBit(i,e(i));return n._version=0,n}static fromString(t){return V.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new V(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new V(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let i=0,r=0;for(;e-r>=4;)n._data[i++]=255&t[r]|(255&t[r+1])<<8|(255&t[r+2])<<16|(255&t[r+3])<<24,r+=4;return e-r==3&&(n._data[i]=(255&t[r+2])<<16),e-r==2&&(n._data[i]|=(255&t[r+1])<<8),e-r==1&&(n._data[i]|=255&t[r]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new V(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,i=this.lengthInInts;for(let t=0;t<i;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,i=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(i)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,i=!0,r=!0){if(n&&r&&this.setAll(!e,!1),r)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(i)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let i=t;i<e;++i)n.push(this.getBit(i));return V.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let i=t;i<e;++i)n.push(this.getBit(i));return n}setRange(t,e,n,i=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const r=Math.min(t,e),o=Math.max(t,e);if(n)for(let t=r;t<=o;t++)this.setTrue(t);else for(let t=r;t<=o;t++)this.setFalse(t);return this.incrementVersion(i),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const i=this._length;this.setLength(this._length+e);for(let n=i-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let i=t;i<t+e;i++)this.setBit(i,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let i=-1;-1!=(i=t.findNext(i,!e));)this.setFast(n++,this.getBit(i));this._length=n,this._version++}return this}getBit(t){return!!(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=V._onBitCount[255&t];let n=this._data[e];const i=31&this._length;for(0!=i&&(n&=~(4294967295<<i));0!=n;n>>>=8)this._selectedCount+=V._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const i=this.lengthInInts;let r=0;for(;r<i-1;r++)for(let e=this._data[r]&t._data[r];0!=e;e>>>=8)n+=V._onBitCount[255&e];let o=this._data[r]&t._data[r];const s=31&this._length;for(0!=s&&(o&=~(4294967295<<s));0!=o;o>>>=8)n+=V._onBitCount[255&o];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const i=this.lengthInInts;for(let r=Math.floor(t/32);r<i;r++){let i=e?this._data[r]:~this._data[r];if(0!=n)i&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==i)continue;for(let e=0;0!=i;e+=8,i>>>=8){const n=V._firstOnBit[255&i];if(n>=0)return(t=n+32*r+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let i=Math.floor(t/32);i>=0;i--){let t=e?this._data[i]:~this._data[i];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=V._lastOnBit[t>>>24];if(n>=0)return n+32*i+e}}return-1}}function G(t={}){const e=function(){if(!t||!t.scoringMatrix||!t.alphabetIndexes)return(t,e)=>t===e?0:1;if(t.scoringMatrix.length!==Object.keys(t.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const e=t.alphabetIndexes,n=t.scoringMatrix,i=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,r=new Float32Array((n.length+i)*(n.length+i));return Object.entries(e).forEach((([t,i])=>{const o=n[i];Object.entries(e).forEach((([e,i])=>{r[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=o[i]}))})),(t,e)=>1-r[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,i)=>{let r=0;const o=t.length,s=i.length,a=Math.ceil(Math.max(o,s)*(1-n));o!==s&&(r=Math.abs(o-s));let c=0;for(let n=0;n<Math.min(o,s);n++)if(t[n]!==i[n]&&(c+=e(t[n],i[n]),c>a))return 1;return c+=r,c/=Math.max(o,s),c}}V._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),V._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),V._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]);const j={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var $;!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}($||($={}));const K={[$.HAMMING]:G,[$.LEVENSHTEIN]:function(){return(t,e)=>F(t,e)/Math.max(t.length,e.length)},[$.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:n,gapExtend:i,scoringMatrix:r,alphabetIndexes:o}={...j,...t};Object.entries(o).forEach((([t,n])=>e[t.charCodeAt(0)]=n));const s=[new Float32Array(1e4),new Float32Array(1e4)];return(t,o)=>{const a=new Array(t.length+1).fill(!1),c=new Array(t.length+1).fill(!1);let l=0,u=1;for(let e=1;e<t.length+1;e++)s[0][e]=-n-(e-1)*i,s[1][e]=0;s[0][0]=0;for(let h=1;h<o.length+1;h++){s[u][0]=-n-(h-1)*i;for(let f=1;f<t.length+1;f++){const d=s[l][f-1]+r[e[t.charCodeAt(f-1)]][e[o.charCodeAt(h-1)]],y=s[l][f]-(a[f]?i:n),g=s[u][f-1]-(c[f-1]?i:n);s[u][f]=Math.max(d,g,y),s[u][f]===d?(a[f]=!1,c[f]=!1):s[u][f]===g?(a[f]=!1,c[f]=!0):(a[f]=!0,c[f]=!1)}l=u,u=(u+1)%2}const h=Math.max(t.length,o.length);return(h-s[l][t.length])/h}},[$.MONOMER_CHEMICAL_DISTANCE]:G};function Y(t,e){const n=t.trueCount()+e.trueCount();if(0==n)return 1;const i=t.andWithCountBits(e,!0);return i/(n-i)}function z(t){return 0===t?3402823e32:1/t-1}_.Tanimoto,_.Dice,_.Asymmetric,_.BraunBlanquet,_.Cosine,_.Kulczynski,_.McConnaughey,_.RogotGoldberg,_.Russel,_.Sokal,_.Hamming,_.Euclidean,_.Tanimoto,_.Dice,_.Asymmetric,_.BraunBlanquet,_.Cosine,_.Kulczynski,_.McConnaughey,_.RogotGoldberg,_.Russel,_.Sokal,_.Hamming,_.Euclidean,_.Tanimoto,_.Dice,_.Cosine,_.Tanimoto,_.Asymmetric,_.Cosine,_.Sokal,$.HAMMING,$.LEVENSHTEIN,$.MONOMER_CHEMICAL_DISTANCE,$.NEEDLEMANN_WUNSCH;const Q={[b.Euclidean]:function(t,e){let n=0;const i=t.length;if(i!==e.length)throw new Error("The dimensionality of the vectors must match");for(let r=0;r<i;++r)n+=Math.pow(t[r]-e[r],2);return Math.sqrt(n)}},q={[v.Levenshtein]:F,[v.JaroWinkler]:W.Vb,[v.Manhattan]:function(t,e){if(t.length!==e.length)return 1;{let n=0;for(let i=1;i<t.length;i++)n+=t[i]==e[i]?0:1;return n/t.length}},[v.Onehot]:function(t,e){return t===e?0:1}},X={[_.Tanimoto]:function(t,e){return 1-Y(t,e)},[_.Dice]:function(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount();return 0==n?0:2*t.andWithCountBits(e,!0)/n}(t,e)},[_.Asymmetric]:function(t,e){return 1-function(t,e){const n=Math.min(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e)},[_.BraunBlanquet]:function(t,e){return z(function(t,e){const n=Math.max(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e))},[_.Cosine]:function(t,e){return 1-function(t,e){const n=t.trueCount()*e.trueCount();return 0==n?0:t.andWithCountBits(e,!0)/Math.sqrt(n)}(t,e)},[_.Kulczynski]:function(t,e){return z(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:t.andWithCountBits(e,!0)*n/(2*i)}(t,e))},[_.McConnaughey]:function(t,e){return z(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:(t.andWithCountBits(e,!0)*n-i)/i}(t,e))},[_.RogotGoldberg]:function(t,e){return z(function(t,e){const n=t.andWithCountBits(e,!0),i=t.countBits(!0)+e.countBits(!0),r=t.length,o=r-i+n;return n==r||o==r?1:n/i+o/(2*r-i)}(t,e))},[_.Russel]:function(t,e){return z(function(t,e){return 0==t.length?0:t.andWithCountBits(e,!0)/t.length}(t,e))},[_.Sokal]:function(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount(),i=t.andWithCountBits(e,!0);return i/(2*n-3*i)}(t,e)},[_.Hamming]:function(t,e){return t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0)},[_.Euclidean]:function(t,e){return Math.sqrt(t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0))}},J={[E.TanimotoIntArray]:function(t,e){return z(Y(new V(t,32*t.length),new V(e,32*e.length)))}},Z={[w.Difference]:function(t){if(t&&null!=t.range&&t.range>0){const e=t.range;return(t,n)=>Math.abs(t-n)/e}return(t,e)=>Math.abs(t-e)}},tt={[M.CommonItems]:function(t){const e=function(t){const e=t?.mostCommon??new Set;return(t,n)=>{const i=t.length,r=n.length;let o=0,s=0,a=0;for(;s<i&&a<r;)t[s]===n[a]?(e?.has(t[s])||++o,++s,++a):t[s]<n[a]?++s:++a;return o}}(t);return(t,n)=>0===n.length||0===t.length?1e4:Math.min(t.length,n.length)/(e(t,n)+1e-4)}},et={[N.Vector]:{[b.Euclidean]:Q[b.Euclidean]},[N.String]:{[v.Levenshtein]:q[v.Levenshtein],[v.JaroWinkler]:q[v.JaroWinkler],[v.Manhattan]:q[v.Manhattan],[v.Onehot]:q[v.Onehot]},[N.BitArray]:{[_.Tanimoto]:X[_.Tanimoto],[_.Dice]:X[_.Dice],[_.Asymmetric]:X[_.Asymmetric],[_.BraunBlanquet]:X[_.BraunBlanquet],[_.Cosine]:X[_.Cosine],[_.Kulczynski]:X[_.Kulczynski],[_.McConnaughey]:X[_.McConnaughey],[_.RogotGoldberg]:X[_.RogotGoldberg],[_.Russel]:X[_.Russel],[_.Sokal]:X[_.Sokal]},[N.MacroMolecule]:{[$.HAMMING]:K[$.HAMMING],[$.LEVENSHTEIN]:K[$.LEVENSHTEIN],[$.NEEDLEMANN_WUNSCH]:K[$.NEEDLEMANN_WUNSCH],[$.MONOMER_CHEMICAL_DISTANCE]:K[$.MONOMER_CHEMICAL_DISTANCE]},[N.Number]:{[w.Difference]:Z[w.Difference]},[N.IntArray]:{[E.TanimotoIntArray]:J[E.TanimotoIntArray]},[N.NumberArray]:{[M.CommonItems]:tt[M.CommonItems]}};Object.keys(et).reduce(((t,e)=>{for(const n of Object.keys(et[e]))t[n]=e;return t}),{});const nt=ui,it="bypassLargeDataWarning",rt="show-scatterplot-progress";var ot,st,at,ct,lt,ut,ht,ft=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};n(5540),(st=ot||(ot={})).EUCLIDEAN="EUCLIDEAN",st.MANHATTAN="MANHATTAN",ot.EUCLIDEAN,ot.MANHATTAN,(ct=at||(at={})).HAMMING="Hamming",ct.EUCLIDEAN="Euclidean",ct.MANHATTAN="Manhattan",ct.TANIMOTO="Tanimoto",ct.LEVENSTEIN="Levenshtein",ct.NEEDLEMAN_WUNSCH="Needlemann-Wunsch",ct.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance",ct.SOKAL="Sokal",ct.COSINE="Cosine",ct.ASYMMETRIC="Asymmetric",ct.Difference="Difference",ct.OneHot="One-Hot",at.HAMMING,at.EUCLIDEAN,at.MANHATTAN,at.TANIMOTO,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.MONOMER_CHEMICAL_DISTANCE,at.SOKAL,at.COSINE,at.ASYMMETRIC,at.Difference,at.OneHot,at.HAMMING,at.EUCLIDEAN,at.MANHATTAN,at.TANIMOTO,at.SOKAL,at.COSINE,at.ASYMMETRIC,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.MONOMER_CHEMICAL_DISTANCE,at.Difference,at.OneHot,new Set([at.HAMMING,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.MONOMER_CHEMICAL_DISTANCE,at.OneHot]),new Set([at.HAMMING,at.EUCLIDEAN,at.MANHATTAN,at.MONOMER_CHEMICAL_DISTANCE,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.TANIMOTO,at.COSINE,at.SOKAL,at.ASYMMETRIC,at.OneHot,at.Difference]),new Set([at.EUCLIDEAN,at.MANHATTAN,at.OneHot,at.Difference]),new Set([at.EUCLIDEAN,at.MANHATTAN,at.Difference]),new Set([at.EUCLIDEAN,at.MANHATTAN,at.Difference]),new Set([at.TANIMOTO,at.COSINE,at.SOKAL,at.ASYMMETRIC]),function(t){t.ADD="ADD",t.SUB="SUB",t.MULT="MULT"}(lt||(lt={})),function(t){t.SQUARE="SQUARE",t.INVERSE="INVERSE",t.TRANSPOSE="TRANSPOSE",t.NORM="NORM",t.COLUMN_NORM="COLUMN_NORM"}(ut||(ut={})),function(t){t.SCALARMULT="SCALARMULT",t.SCALARADD="SCALARADD",t.SCALARPOW="SCALARPOW"}(ht||(ht={})),Object.prototype.toString;const dt="dimensionality-reducer-terminate-event";var yt,gt;(gt=yt||(yt={})).EUCLIDEAN="EUCLIDEAN",gt.MANHATTAN="MANHATTAN";const mt=t=>null==t;function pt(t,e){return`${e} (${t.length>4?`${t.length} columns`:t.map((t=>t.name)).join(", ")})`}async function xt(i,r,o,s,a,c,l,u=!0,h=!1,f={preprocessingFuncArgs:[]},d={},y=null,g={}){const m={showXAxis:!1,showYAxis:!1,showXSelector:!1,showYSelector:!1};if(r.length!==s.length||r.length!==c.length||r.length!==a.length||r.length!==f.preprocessingFuncArgs.length)throw new Error("columns, metrics and preprocessing functions, weights and function argumentsmust have the same length");const p=u?e.shell.tableView(i.name)??e.shell.addTableView(i):null,x=async()=>{const x=t.TaskBarProgressIndicator.create(`Initializing ${d.scatterPlotName??"dimensionality reduction"} ...`);let C;try{const A=function(t){const e=["Embed_X","Embed_Y"],n=t.columns.names().filter((t=>t.includes(e[0]))).length+1;return e.map((t=>`${t}_${n}`))}(i);function v(e,n,s){let a=null,c=null;i.columns.names().includes(A[0])?(a=i.columns.byName(A[0]),c=i.columns.byName(A[1])):(a=i.columns.add(t.Column.float(A[0],i.rowCount)),c=i.columns.add(t.Column.float(A[1],i.rowCount)),u&&!C&&(C=p.scatterPlot({...m,x:A[0],y:A[1],title:d.scatterPlotName??pt(r,o)}))),d[rt]&&(C?.root&&nt.setUpdateIndicator(C.root,!1),a.init((t=>s[0]?s[0][t]:void 0)),c.init((t=>s[1]?s[1][t]:void 0)));const l=e/n*100;x.update(l,`Running ${d.scatterPlotName??"dimensionality reduction"}... ${l.toFixed(0)}%`)}async function b(){i.columns.add(t.Column.float(A[0],i.rowCount)),i.columns.add(t.Column.float(A[1],i.rowCount));let h=null;u&&(C=p.scatterPlot({...m,x:A[0],y:A[1],title:d.scatterPlotName??pt(r,o)}),nt.setUpdateIndicator(C.root,!0));const y=e.events.onViewerClosed.subscribe((t=>{const n=t.args.viewer;n?.getOptions()?.look?.title&&C?.getOptions()?.look?.title&&n?.getOptions()?.look?.title===C?.getOptions()?.look?.title&&(e.events.fireCustomEvent(dt,{}),y.unsubscribe(),h?.(),x.close())})),g=new Promise((async(t,i)=>{try{h=t;const i=[];for(let t=0;t<c.length;++t){const e=c[t];if(f.distanceFnArgs||(f.distanceFnArgs=[]),e){const n=e.inputs[0].name,o=e.inputs[1].name,{entries:a,options:c}=await e.apply({[n]:r[t],[o]:s[t],...f.preprocessingFuncArgs[t]??{}});i.push({entries:a,options:c}),f.distanceFnArgs.push(c)}else{const e=r[t].toList(),n={};i.push({entries:e,options:n}),f.distanceFnArgs.push(n)}}t(await async function(t,i,r,o,s,a,c){let l=await async function(t,i,r,o,s,a,c){if(!a.distanceFnArgs)throw new Error("options.distanceFnArgs must be defined");if(t.length!==i.length||t.length!==a.distanceFnArgs.length||t.length!==o.length)throw new Error("data, metrics and options and weights must have the same length");return new Promise((function(l,u){const h=new Worker(new URL(n.p+n.u(234),n.b));h.postMessage({columnsData:t,distanceMetrics:i,method:r,options:a,weights:o,aggregationMethod:s});const f=e.events.onCustomEvent(dt).subscribe((()=>{try{h?.terminate()}finally{f.unsubscribe()}}));h.onmessage=({data:{error:t,embedding:e,epochNum:n,epochsLength:i}})=>{mt(n)||mt(i)?(f.unsubscribe(),t?u(t):l(e),setTimeout((()=>h.terminate()),100)):c&&c(n,i,e)}}))}(t,r,i,o,s,a,c);return l=l.map((t=>function(t){const e=t.length;let n=0,i=0;for(let r=0;r<e;++r)n+=t[r],i+=Math.pow(t[r],2);const r=n/e,o=1/Math.sqrt(i/e-Math.pow(r,2));for(let n=0;n<e;++n)t[n]=(t[n]-r)*o;return t}(t))),l}(i.map((t=>t.entries)),o,s,a,l,f,d[it]?void 0:v))}catch(t){i(t)}})),b=await g;return x.close(),y.unsubscribe(),b}const _=await b();if(h&&_){const E=t.TaskBarProgressIndicator.create("Clustering embeddings ...");try{const N=await function(t,e,i,r){return ft(this,void 0,void 0,(function*(){return new Promise((function(o,s){const a=new Worker(new URL(n.p+n.u(682),n.b));a.postMessage({embedX:t,embedY:e,minPts:r,epsilon:i}),a.onmessage=({data:{error:t,clusters:e}})=>{a.terminate(),t?s(t):o(e)}}))}))}(_[0],_[1],f.dbScanEpsilon??.01,f.dbScanMinPts??4),w=i.columns.getUnusedName("Cluster (DBSCAN)");i.columns.addNewString(w).init((t=>N[t].toString())),C&&(C.props.colorColumnName=w)}catch(M){e.shell.error("Clustering embeddings failed"),console.error(M)}finally{E.close()}}if(_){const S=i.columns.byName(A[0]),I=i.columns.byName(A[1]);if(S.init((t=>_[0][t])),I.init((t=>_[1][t])),y)try{const O=y.inputs[0].name,T=y.inputs[1].name;await y.prepare({[O]:S,[T]:I,...g}).call(!0)}catch(L){e.shell.error("Post-processing failed"),console.error(L)}if(C)return nt.setUpdateIndicator(C.root,!1),C.helpUrl="/help/compute/sequence-space",C}}catch(R){e.shell.error("Dimensionality reduction failed"),console.error(R),x.close(),C&&nt.setUpdateIndicator(C.root,!1)}};return new Promise((async(t,e)=>{try{if(d.fastRowCount&&i.rowCount>d.fastRowCount&&!d[it])nt.dialog().add(nt.divText("Analysis might take several minutes. Do you want to continue?")).onOK((async()=>{try{const e=await x();t(e)}catch(t){e(t)}})).onCancel((()=>t(void 0))).show();else{const e=await x();t(e)}}catch(t){e(t)}}))}var Ct=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};const At={SUBJ:"subj",STUDY:"study",SITE:"site",AGE:"age",SEX:"sex",RACE:"race",DISEASE:"disease",WEIGHT:"weight",HEIGHT:"height"};function vt(t,n,i){return Ct(this,void 0,void 0,(function*(){const r=e.data.demo.demog(100);e.shell.addTableView(r),L(!!(yield xt(r,t.map((t=>r.col(t))),n,i,t.map((()=>1)),t.map((()=>{})),"EUCLIDEAN",!0,!0,{preprocessingFuncArgs:t.map((()=>({})))})),!0,"No scatterplot returned");const o=r.columns.names().filter((t=>t.toLowerCase().startsWith("embed")));L(o.length,2,"Wrong number of embeddings added"),L(!!r.columns.names().find((t=>t.toLowerCase().startsWith("cluster"))),!0,"No cluster column added");for(const t of o){const e=r.col(t);L(new Array(e.length).fill(null).every(((t,n)=>!e.isNone(n)&&!isNaN(e.get(n)))),!0,"Embedding column has null-ish values")}yield new Promise((t=>setTimeout(t,500)))}))}R("Dimensionality reduction: UMAP",(()=>{T("Numeric column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.AGE],A.UMAP,[w.Difference])}))),{timeout:3e4}),T("String column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX],A.UMAP,[v.Onehot])}))),{timeout:3e4}),T("Numeric and string columns",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX,At.AGE],A.UMAP,[v.Onehot,w.Difference])})))),T("All demog columns",(()=>Ct(void 0,void 0,void 0,(function*(){const n=e.data.demo.demog(10).columns.toList().filter((t=>Object.values(At).includes(t.name))),i=n.map((e=>e.type===t.COLUMN_TYPE.STRING?v.Onehot:w.Difference)),r=n.map((t=>t.name));yield vt(r,A.UMAP,i)}))))})),R("Dimensionality reduction: T-SNE",(()=>{T("Numeric column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.AGE],A.T_SNE,[w.Difference])}))),{timeout:3e4}),T("String column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX],A.T_SNE,[v.Onehot])}))),{timeout:3e4}),T("Numeric and string columns",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX,At.AGE],A.T_SNE,[v.Onehot,w.Difference])})))),T("All demog columns",(()=>Ct(void 0,void 0,void 0,(function*(){const n=e.data.demo.demog(10).columns.toList().filter((t=>Object.values(At).includes(t.name))),i=n.map((e=>e.type===t.COLUMN_TYPE.STRING?v.Onehot:w.Difference)),r=n.map((t=>t.name));yield vt(r,A.T_SNE,i)}))))}));var bt=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};const _t=new t.Package;function Et(n,i,a){return bt(this,void 0,void 0,(function*(){const x=yield function(n){var i,a,x,C,A,v,b,_;return o(this,void 0,void 0,(function*(){const E=null===(a=null===(i=e.functions.getCurrentCall())||void 0===i?void 0:i.func)||void 0===a?void 0:a.package;yield function(t){var n;return o(this,void 0,void 0,(function*(){const i=t.id;if(p[i])return;const a=f;if(void 0!==a[d]||void 0!==a[y]||Object.keys(a).find((t=>t.startsWith(d)||t.startsWith(m))))return void(p[i]=!0);if("DevTools"===t.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g),i=null!==(n=e.pop())&&void 0!==n?n:t.name,r=e.length?m+": "+e.join(": "):m;void 0===a[r]&&(a[r]={tests:[],clear:!0}),a[r].tests.push(new O(r,i,t.test,{isAggregated:!1,timeout:s}))}const c=[],l=[],u=[],h=yield e.dapi.functions.filter(`package.id = "${i}"`).list(),x=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const t of h){const n=t.options.test,i=t.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let i=0;i<n.length;i++){const r=n[i].matchAll(x),s={};Array.from(r).forEach((t=>{t[0].startsWith("skip")?s.skip=t[1]:t[0].startsWith("wait")?s.wait=parseInt(t[2]):t[0].startsWith("cat")?s.cat=t[3]:t[0].startsWith("timeout")&&(s.timeout=parseInt(t[4]))}));const l=new O(d,1===n.length?t.name:`${t.name} ${i+1}`,(()=>o(this,void 0,void 0,(function*(){const r=yield e.functions.eval(D(n[i],t));if(s.wait&&(yield H(s.wait)),"boolean"==typeof r&&!r)throw`Failed: ${n[i]}, expected true, got ${r}`}))),{skipReason:s.skip,timeout:s.timeout});if(s.cat){const t=d+": "+s.cat;l.category=t,void 0===a[t]&&(a[t]={tests:[],clear:!0}),a[t].tests.push(l)}else c.push(l)}if(i){const n=t.options.demoWait?parseInt(t.options.demoWait):void 0,i=new O(y,t.friendlyName,(()=>o(this,void 0,void 0,(function*(){e.shell.clearLastError(),yield t.apply(),yield H(n||2e3);const i=yield e.shell.lastError;if(i)throw new Error(i)}))),{skipReason:t.options.demoSkip});l.push(i)}if(t.hasTag("semTypeDetector")){const e=new O(g,t.friendlyName,(()=>o(this,void 0,void 0,(function*(){const e=[];for(const n of r.clone().columns){const i=yield t.apply([n]);e.push(i||n.semType)}L(e.filter((t=>t)).length,1)}))),{skipReason:t.options.skipTest});u.push(e)}}p[i]=!0,c.length&&(a[d]={tests:c,clear:!0}),l.length&&(a[y]={tests:l,clear:!0}),u.length&&(a[g]={tests:u,clear:!1})}))}(E);const N=[];console.log("Running tests"),null!=n||(n={}),null!==(x=(_=n).testContext)&&void 0!==x||(_.testContext=new I),e.shell.clearLastError();const w=[],M=function(){const t=[];return console.log=(...e)=>{t.push(...e),c(...e)},console.info=(...e)=>{t.push(...e),l(...e)},console.warn=(...e)=>{t.push(...e),u(...e)},console.error=(...e)=>{t.push(...e),h(...e)},t}();try{for(const[i,r]of Object.entries(f)){if((null==n?void 0:n.category)&&!i.toLowerCase().startsWith(null==n?void 0:n.category.toLowerCase())||(null===(C=n.exclude)||void 0===C?void 0:C.some((t=>i.startsWith(t)))))continue;c(`Started ${i} category`),w.push(i);const s=null===(A=r.tests)||void 0===A?void 0:A.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{r.before&&!s&&(yield U((()=>o(this,void 0,void 0,(function*(){yield r.before()}))),1e5,`before ${n.category}: timeout error`))}catch(t){r.beforeStatus=yield k(t)}const a=null!==(v=r.tests)&&void 0!==v?v:[],l=[];if(r.clear)for(let i=0;i<a.length;i++){a[i].options&&void 0===(null===(b=a[i].options)||void 0===b?void 0:b.benchmark)&&(a[i].options||(a[i].options={}),a[i].options.benchmark=r.isAllTestsEnabledBenchmarkMode||!1);let o=yield P(a[i],null==n?void 0:n.test,M,r.timeout,E.name,n.verbose);o&&l.push(o),e.shell.closeAll(),t.Balloon.closeAll()}else for(let t=0;t<a.length;t++){let e=yield P(a[t],null==n?void 0:n.test,M,r.timeout,E.name,n.verbose);e&&l.push(e)}const u=l.filter((t=>"skipped"!=t.result));try{r.after&&!s&&(yield U((()=>o(this,void 0,void 0,(function*(){yield r.after()}))),1e5,`After ${n.category}: timeout error`))}catch(t){r.afterStatus=yield k(t)}r.afterStatus&&u.push({category:i,name:"after",result:r.afterStatus,success:!1,ms:0,skipped:!1}),r.beforeStatus&&u.push({category:i,name:"before",result:r.beforeStatus,success:!1,ms:0,skipped:!1}),N.push(...u)}}finally{console.log=c,console.info=l,console.warn=u,console.error=h}if(n.testContext.catchUnhandled){yield H(1e3);const t=yield e.shell.lastError,n={category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1};N.push(n),n.package=E.name,null!=e.shell.reportTest?yield e.shell.reportTest("package",n):yield fetch(`${e.dapi.root}/log/tests/package`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)})}return N}))}({category:n,test:i,testContext:a});return t.DataFrame.fromObjects(x)}))}})(),eda_test=i})();
1
+ var eda_test;(()=>{var t={5540:(t,e,n)=>{"use strict";t=n.hmd(t);var i,r=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,n,r=void 0!==t?t:{};r.ready=new Promise((function(t,i){e=t,n=i}));var o,s=Object.assign({},r),a="object"==typeof window,c="function"==typeof importScripts,l=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(a||c)&&(c?l=self.location.href:"undefined"!=typeof document&&document.currentScript&&(l=document.currentScript.src),i&&(l=i),l=0!==l.indexOf("blob:")?l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c&&(o=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),r.print||console.log.bind(console);var u,h,f=r.printErr||console.warn.bind(console);Object.assign(r,s),s=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(u=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&E("no native wasm support detected");var d,y,g,m=!1;function p(){var t=h.buffer;r.HEAP8=d=new Int8Array(t),r.HEAP16=new Int16Array(t),r.HEAP32=new Int32Array(t),r.HEAPU8=y=new Uint8Array(t),r.HEAPU16=new Uint16Array(t),r.HEAPU32=g=new Uint32Array(t),r.HEAPF32=new Float32Array(t),r.HEAPF64=new Float64Array(t)}var x=[],C=[],A=[],v=0,b=null,_=null;function E(t){r.onAbort&&r.onAbort(t),f(t="Aborted("+t+")"),m=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}var N,w;function M(t){return t.startsWith("data:application/octet-stream;base64,")}function S(t){try{if(t==N&&u)return new Uint8Array(u);if(o)return o(t);throw"both async and sync fetching of the wasm failed"}catch(t){E(t)}}function I(t,e,n){return function(t){return u||!a&&!c||"function"!=typeof fetch?Promise.resolve().then((function(){return S(t)})):fetch(t,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((function(){return S(t)}))}(t).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(n,(function(t){f("failed to asynchronously prepare wasm: "+t),E(t)}))}function O(t){for(;t.length>0;)t.shift()(r)}function T(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){g[this.ptr+4>>2]=t},this.get_type=function(){return g[this.ptr+4>>2]},this.set_destructor=function(t){g[this.ptr+8>>2]=t},this.get_destructor=function(){return g[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,d[this.ptr+12|0]=t},this.get_caught=function(){return 0!=d[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,d[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=d[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)},this.set_adjusted_ptr=function(t){g[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return g[this.ptr+16>>2]},this.get_exception_ptr=function(){if(W(this.get_type()))return g[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function L(t){var e=h.buffer;try{return h.grow(t-e.byteLength+65535>>>16),p(),1}catch(t){}}function R(t){return r["_"+t]}M(N="wasmDbscan.wasm")||(w=N,N=r.locateFile?r.locateFile(w,l):l+w);var D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(t,e,n,i,r){var o={string:t=>{var e=0;return null!=t&&0!==t&&(e=function(t){var e=function(t){for(var e=0,n=0;n<t.length;++n){var i=t.charCodeAt(n);i<=127?e++:i<=2047?e+=2:i>=55296&&i<=57343?(e+=4,++n):e+=3}return e}(t)+1,n=F(e);return function(t,e,n){!function(t,e,n,i){if(!(i>0))return 0;for(var r=n+i-1,o=0;o<t.length;++o){var s=t.charCodeAt(o);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++o)),s<=127){if(n>=r)break;e[n++]=s}else if(s<=2047){if(n+1>=r)break;e[n++]=192|s>>6,e[n++]=128|63&s}else if(s<=65535){if(n+2>=r)break;e[n++]=224|s>>12,e[n++]=128|s>>6&63,e[n++]=128|63&s}else{if(n+3>=r)break;e[n++]=240|s>>18,e[n++]=128|s>>12&63,e[n++]=128|s>>6&63,e[n++]=128|63&s}}e[n]=0}(t,y,e,n)}(t,n,e),n}(t)),e},array:t=>{var e,n,i=F(t.length);return e=t,n=i,d.set(e,n),i}},s=R(t),a=[],c=0;if(i)for(var l=0;l<i.length;l++){var u=o[n[l]];u?(0===c&&(c=B()),a[l]=u(i[l])):a[l]=i[l]}var h=s.apply(null,a);return function(t){return 0!==c&&U(c),function(t){return"string"===e?(n=t)?function(t,e,n){for(var i=e+n,r=e;t[r]&&!(r>=i);)++r;if(r-e>16&&t.buffer&&D)return D.decode(t.subarray(e,r));for(var o="";e<r;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var c=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|c:(7&s)<<18|a<<12|c<<6|63&t[e++])<65536)o+=String.fromCharCode(s);else{var l=s-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}(y,n,i):"":"boolean"===e?Boolean(t):t;var n,i}(t)}(h)}var P,H={__cxa_throw:function(t,e,n){throw new T(t).init(e,n),t},abort:function(){E("")},emscripten_memcpy_big:function(t,e,n){y.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){var e,n=y.length,i=2147483648;if((t>>>=0)>i)return!1;for(var r=1;r<=4;r*=2){var o=n*(1+.2/r);if(o=Math.min(o,t+100663296),L(Math.min(i,(e=Math.max(t,o))+(65536-e%65536)%65536)))return!0}return!1}},B=(function(){var t,e,i,o,s={env:H,wasi_snapshot_preview1:H};function a(t,e){var n,i=t.exports;return r.asm=i,h=r.asm.memory,p(),r.asm.__indirect_function_table,n=r.asm.__wasm_call_ctors,C.unshift(n),function(){if(v--,r.monitorRunDependencies&&r.monitorRunDependencies(v),0==v&&(null!==b&&(clearInterval(b),b=null),_)){var t=_;_=null,t()}}(),i}if(v++,r.monitorRunDependencies&&r.monitorRunDependencies(v),r.instantiateWasm)try{return r.instantiateWasm(s,a)}catch(t){f("Module.instantiateWasm callback failed with error: "+t),n(t)}(t=u,e=N,i=s,o=function(t){a(t.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||M(e)||"function"!=typeof fetch?I(e,i,o):fetch(e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(o,(function(t){return f("wasm streaming compile failed: "+t),f("falling back to ArrayBuffer instantiation"),I(e,i,o)}))}))).catch(n)}(),r._dbscan=function(){return(r._dbscan=r.asm.dbscan).apply(null,arguments)},r._malloc=function(){return(r._malloc=r.asm.malloc).apply(null,arguments)},r._free=function(){return(r._free=r.asm.free).apply(null,arguments)},function(){return(B=r.asm.stackSave).apply(null,arguments)}),U=function(){return(U=r.asm.stackRestore).apply(null,arguments)},F=function(){return(F=r.asm.stackAlloc).apply(null,arguments)},W=function(){return(W=r.asm.__cxa_is_pointer_type).apply(null,arguments)};function V(){function t(){P||(P=!0,r.calledRun=!0,m||(O(C),e(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)t=r.postRun.shift(),A.unshift(t);var t;O(A)}()))}v>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)t=r.preRun.shift(),x.unshift(t);var t;O(x)}(),v>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t()))}if(r.ccall=k,r.cwrap=function(t,e,n,i){var r=!n||n.every((t=>"number"===t||"boolean"===t));return"string"!==e&&r&&!i?R(t):function(){return k(t,e,n,arguments)}},_=function t(){P||V(),P||(_=t)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return V(),t.ready});"object"==typeof exports?t.exports=r:"function"==typeof define&&n.amdO?define([],(function(){return r})):"object"==typeof exports&&(exports.exportCppDbscanLib=r)},9982:function(t,e,n){var i;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([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]);function n(t,n,i,r,o){for(var s,a,c,l,u,h,f,d,y,g,m,p,x;o>=64;){for(s=n[0],a=n[1],c=n[2],l=n[3],u=n[4],h=n[5],f=n[6],d=n[7],g=0;g<16;g++)m=r+4*g,t[g]=(255&i[m])<<24|(255&i[m+1])<<16|(255&i[m+2])<<8|255&i[m+3];for(g=16;g<64;g++)p=((y=t[g-2])>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,x=((y=t[g-15])>>>7|y<<25)^(y>>>18|y<<14)^y>>>3,t[g]=(p+t[g-7]|0)+(x+t[g-16]|0);for(g=0;g<64;g++)p=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&h^~u&f)|0)+(d+(e[g]+t[g]|0)|0)|0,x=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&a^s&c^a&c)|0,d=f,f=h,h=u,u=l+p|0,l=c,c=a,a=s,s=p+x|0;n[0]+=s,n[1]+=a,n[2]+=c,n[3]+=l,n[4]+=u,n[5]+=h,n[6]+=f,n[7]+=d,r+=64,o-=64}return r}var i=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var i=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[i++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(i=n(this.temp,this.state,t,i,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[i++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,i=this.bufferLength,r=e/536870912|0,o=e<<3,s=e%64<56?64:128;this.buffer[i]=128;for(var a=i+1;a<s-8;a++)this.buffer[a]=0;this.buffer[s-8]=r>>>24&255,this.buffer[s-7]=r>>>16&255,this.buffer[s-6]=r>>>8&255,this.buffer[s-5]=r>>>0&255,this.buffer[s-4]=o>>>24&255,this.buffer[s-3]=o>>>16&255,this.buffer[s-2]=o>>>8&255,this.buffer[s-1]=o>>>0&255,n(this.temp,this.state,this.buffer,0,s),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=i;var r=function(){function t(t){this.inner=new i,this.outer=new i,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new i).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function o(t){var e=(new i).update(t),n=e.digest();return e.clean(),n}function s(t,e){var n=new r(t).update(e),i=n.digest();return n.clean(),i}function a(t,e,n,i){var r=i[0];if(0===r)throw new Error("hkdf: cannot expand more");e.reset(),r>1&&e.update(t),n&&e.update(n),e.update(i),e.finish(t),i[0]++}t.HMAC=r,t.hash=o,t.default=o,t.hmac=s;var c=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,i){void 0===e&&(e=c),void 0===i&&(i=32);for(var o=new Uint8Array([1]),l=s(e,t),u=new r(l),h=new Uint8Array(u.digestLength),f=h.length,d=new Uint8Array(i),y=0;y<i;y++)f===h.length&&(a(h,u,n,o),f=0),d[y]=h[f++];return u.clean(),h.fill(0),o.fill(0),d},t.pbkdf2=function(t,e,n,i){for(var o=new r(t),s=o.digestLength,a=new Uint8Array(4),c=new Uint8Array(s),l=new Uint8Array(s),u=new Uint8Array(i),h=0;h*s<i;h++){var f=h+1;a[0]=f>>>24&255,a[1]=f>>>16&255,a[2]=f>>>8&255,a[3]=f>>>0&255,o.reset(),o.update(e),o.update(a),o.finish(l);for(var d=0;d<s;d++)c[d]=l[d];for(d=2;d<=n;d++){o.reset(),o.update(l).finish(l);for(var y=0;y<s;y++)c[y]^=l[y]}for(d=0;d<s&&h*s+d<i;d++)u[h*s+d]=c[d]}for(h=0;h<s;h++)c[h]=l[h]=0;for(h=0;h<4;h++)a[h]=0;return o.clean(),u}}(e);var r=e.default;for(var o in e)r[o]=e[o];"object"==typeof t.exports?t.exports=r:void 0===(i=function(){return r}.call(e,n,e,t))||(t.exports=i)}()},944:(t,e)=>{"use strict";e.Vb=void 0,e.Vb=function(t,e,n){var i=function(t,e,n){if(0===t.length||0===e.length)return 0;if(n&&!n.caseSensitive&&(t=t.toUpperCase(),e=e.toUpperCase()),t===e)return 1;for(var i=0,r=t.length,o=e.length,s=Math.floor(Math.max(r,o)/2)-1,a=new Array(r),c=new Array(o),l=0;l<r;l++)for(var u=Math.max(0,l-s);u<=Math.min(o,l+s+1);u++)if(!a[l]&&!c[u]&&t[l]===e[u]){++i,a[l]=c[u]=!0;break}if(0===i)return 0;var h=0,f=0;for(l=0;l<r;l++)if(a[l]){for(;!c[f];)f++;t.charAt(l)!==e.charAt(f++)&&h++}return(i/r+i/o+(i-(h/=2))/i)/3}(t,e,n),r=0;if(i>.7){for(var o=Math.min(t.length,e.length),s=0;t[s]===e[s]&&s<4&&s<o;)++r,s++;i+=.1*r*(1-i)}return i}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={id:i,loaded:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=t,n.amdO={},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.u=t=>t+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=i[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href;var i={};(()=>{"use strict";n.r(i),n.d(i,{_package:()=>_t,test:()=>Et,tests:()=>f});const t=DG,e=grok;n(9982);const r=t.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');r.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var o=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};const s=3e4,a=108e5,c=console.log.bind(console),l=console.info.bind(console),u=console.warn.bind(console),h=console.error.bind(console),f={},d="Auto Tests",y="Demo",g="Detectors",m="Core",p={};let x;var C,A,v,b,_,E,N,w,M,S;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(C||(C={}));class I{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class O{constructor(t,e,n,i){var r;this.category=t,this.name=e,null!=i||(i={}),null!==(r=i.timeout)&&void 0!==r||(i.timeout=s),this.options=i,this.test=()=>o(this,void 0,void 0,(function*(){return new Promise(((t,e)=>o(this,void 0,void 0,(function*(){let i="";try{i=yield n()}catch(t){e(t)}t(i)}))))}))}}function T(t,e,n){null==f[x]&&(f[x]={}),null==f[x].tests&&(f[x].tests=[]),f[x].tests.push(new O(x,t,e,n))}function L(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function R(t,e,n){var i;x=t,e(),f[x]&&(f[x].clear=null===(i=null==n?void 0:n.clear)||void 0===i||i,f[x].timeout=null==n?void 0:n.timeout,f[x].benchmarks=null==n?void 0:n.benchmarks)}function D(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function k(e){return o(this,void 0,void 0,(function*(){return`${e.toString()}\n${e.stack?yield t.Logger.translateStackTrace(e.stack):""}`}))}function P(n,i,r,l,u,f){var d,y,g,m,p,x,C,A;return o(this,void 0,void 0,(function*(){let o;r.length=0;let v="package";const b=null!=i&&n.name.toLowerCase()!==i.toLowerCase();let _=(null===(d=n.options)||void 0===d?void 0:d.skipReason)||b,E=b?"skipped":null===(y=n.options)||void 0===y?void 0:y.skipReason;if(t.Test.isInBenchmark&&!(null===(g=n.options)||void 0===g?void 0:g.benchmark))return void c(`SKIPPED: ${n.category} ${n.name} doesnt available in benchmark mode`);_||c(`Started ${n.category} ${n.name}`);const N=Date.now();try{if(_)o={success:!0,result:E,ms:0,skipped:!0};else{let e=(null===(m=n.options)||void 0===m?void 0:m.timeout)===s&&l?l:null===(p=n.options)||void 0===p?void 0:p.timeout;e=e===s&&t.Test.isInBenchmark?a:e,o={success:!0,result:null!==(x=yield B(n.test,e))&&void 0!==x?x:"OK",ms:0,skipped:!1}}}catch(t){h(t),o={success:!1,result:yield k(t),ms:0,skipped:!1}}if((null===(C=n.options)||void 0===C?void 0:C.isAggregated)&&o.result.constructor===t.DataFrame){const t=o.result.col("success");if(t&&(o.success=t.stats.sum===t.length),!f){const t=o.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),o.result=t}o.result=o.result.toCsv()}if(o.logs=r.join("\n"),o.ms=Date.now()-N,_||c(`Finished ${n.category} ${n.name} for ${o.ms} ms`),o.category=n.category,o.name=n.name,!b){let i={success:o.success,result:o.result,ms:o.ms,skipped:o.skipped,package:u,category:n.category,name:n.name,logs:o.logs};if(o.result.constructor==Object){const t=Object.keys(o.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:o.result[e]})),{});i=Object.assign(Object.assign({},i),t)}i.result instanceof t.DataFrame&&(i.result=JSON.stringify(null===(A=i.result)||void 0===A?void 0:A.toJson())||""),null!=e.shell.reportTest?yield e.shell.reportTest(v,i):yield fetch(`${e.dapi.root}/log/tests/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(i)})}return o}))}function H(t){return o(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function B(t,e,n="EXECUTION TIMEOUT"){return o(this,void 0,void 0,(function*(){let i=null;const r=new Promise(((t,r)=>{i=setTimeout((()=>{r(n)}),e)}));try{return yield Promise.race([t(),r])}finally{i&&clearTimeout(i)}}))}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]),function(t){t.UMAP="UMAP",t.T_SNE="t-SNE"}(A||(A={})),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(v||(v={})),function(t){t.Euclidean="Euclidean"}(b||(b={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(_||(_={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(E||(E={})),(S=N||(N={})).Vector="Vector",S.String="String",S.BitArray="BitArray",S.MacroMolecule="MacroMolecule",S.Number="Number",S.IntArray="IntArray",S.NumberArray="NumberArray",function(t){t.Difference="Difference"}(w||(w={})),function(t){t.CommonItems="Common Items"}(M||(M={}));const U=new Uint32Array(65536),F=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return 0===e.length?t.length:t.length<=32?((t,e)=>{const n=t.length,i=e.length,r=1<<n-1;let o=-1,s=0,a=n,c=n;for(;c--;)U[t.charCodeAt(c)]|=1<<c;for(c=0;c<i;c++){let t=U[e.charCodeAt(c)];const n=t|s;t|=(t&o)+o^o,s|=~(t|o),o&=t,s&r&&a++,o&r&&a--,s=s<<1|1,o=o<<1|~(n|s),s&=n}for(c=n;c--;)U[t.charCodeAt(c)]=0;return a})(t,e):((t,e)=>{const n=e.length,i=t.length,r=[],o=[],s=Math.ceil(n/32),a=Math.ceil(i/32);for(let t=0;t<s;t++)o[t]=-1,r[t]=0;let c=0;for(;c<a-1;c++){let s=0,a=-1;const l=32*c,u=Math.min(32,i)+l;for(let e=l;e<u;e++)U[t.charCodeAt(e)]|=1<<e;for(let t=0;t<n;t++){const n=U[e.charCodeAt(t)],i=o[t/32|0]>>>t&1,c=r[t/32|0]>>>t&1,l=n|s,u=((n|c)&a)+a^a|n|c;let h=s|~(u|a),f=a&u;h>>>31^i&&(o[t/32|0]^=1<<t),f>>>31^c&&(r[t/32|0]^=1<<t),h=h<<1|i,f=f<<1|c,a=f|~(l|h),s=h&l}for(let e=l;e<u;e++)U[t.charCodeAt(e)]=0}let l=0,u=-1;const h=32*c,f=Math.min(32,i-h)+h;for(let e=h;e<f;e++)U[t.charCodeAt(e)]|=1<<e;let d=i;for(let t=0;t<n;t++){const n=U[e.charCodeAt(t)],s=o[t/32|0]>>>t&1,a=r[t/32|0]>>>t&1,c=n|l,h=((n|a)&u)+u^u|n|a;let f=l|~(h|u),y=u&h;d+=f>>>i-1&1,d-=y>>>i-1&1,f>>>31^s&&(o[t/32|0]^=1<<t),y>>>31^a&&(r[t/32|0]^=1<<t),f=f<<1|s,y=y<<1|a,u=y|~(c|f),l=f&c}for(let e=h;e<f;e++)U[t.charCodeAt(e)]=0;return d})(t,e)};var W=n(944);class V{constructor(t,e=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof t){const n=t,i=V._createBuffer(n);if(e)for(let t=0;t<i.length;t++)i[t]=-1;this._data=i,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,i){if(t<e||t>n)throw new Error(`Argument ${i} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let i=0;i<n;i++)e[i]=t[i]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new V(t._length);n._length=t._length,n._data=V._createBuffer(n._length),n._version=0;const i=t.lengthInInts;for(let r=0;r<i;r++)n._data[r]=t._data[r]&e._data[r];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new V(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new V(t);for(let i=0;i<t;++i)n.setBit(i,e(i));return n._version=0,n}static fromString(t){return V.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new V(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new V(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let i=0,r=0;for(;e-r>=4;)n._data[i++]=255&t[r]|(255&t[r+1])<<8|(255&t[r+2])<<16|(255&t[r+3])<<24,r+=4;return e-r==3&&(n._data[i]=(255&t[r+2])<<16),e-r==2&&(n._data[i]|=(255&t[r+1])<<8),e-r==1&&(n._data[i]|=255&t[r]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new V(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,i=this.lengthInInts;for(let t=0;t<i;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,i=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(i)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,i=!0,r=!0){if(n&&r&&this.setAll(!e,!1),r)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(i)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let i=t;i<e;++i)n.push(this.getBit(i));return V.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let i=t;i<e;++i)n.push(this.getBit(i));return n}setRange(t,e,n,i=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const r=Math.min(t,e),o=Math.max(t,e);if(n)for(let t=r;t<=o;t++)this.setTrue(t);else for(let t=r;t<=o;t++)this.setFalse(t);return this.incrementVersion(i),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const i=this._length;this.setLength(this._length+e);for(let n=i-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let i=t;i<t+e;i++)this.setBit(i,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let i=-1;-1!=(i=t.findNext(i,!e));)this.setFast(n++,this.getBit(i));this._length=n,this._version++}return this}getBit(t){return!!(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=V._onBitCount[255&t];let n=this._data[e];const i=31&this._length;for(0!=i&&(n&=~(4294967295<<i));0!=n;n>>>=8)this._selectedCount+=V._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const i=this.lengthInInts;let r=0;for(;r<i-1;r++)for(let e=this._data[r]&t._data[r];0!=e;e>>>=8)n+=V._onBitCount[255&e];let o=this._data[r]&t._data[r];const s=31&this._length;for(0!=s&&(o&=~(4294967295<<s));0!=o;o>>>=8)n+=V._onBitCount[255&o];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const i=this.lengthInInts;for(let r=Math.floor(t/32);r<i;r++){let i=e?this._data[r]:~this._data[r];if(0!=n)i&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==i)continue;for(let e=0;0!=i;e+=8,i>>>=8){const n=V._firstOnBit[255&i];if(n>=0)return(t=n+32*r+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let i=Math.floor(t/32);i>=0;i--){let t=e?this._data[i]:~this._data[i];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=V._lastOnBit[t>>>24];if(n>=0)return n+32*i+e}}return-1}}function j(t={}){const e=function(){if(!t||!t.scoringMatrix||!t.alphabetIndexes)return(t,e)=>t===e?0:1;if(t.scoringMatrix.length!==Object.keys(t.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const e=t.alphabetIndexes,n=t.scoringMatrix,i=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,r=new Float32Array((n.length+i)*(n.length+i));return Object.entries(e).forEach((([t,i])=>{const o=n[i];Object.entries(e).forEach((([e,i])=>{r[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=o[i]}))})),(t,e)=>1-r[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,i)=>{let r=0;const o=t.length,s=i.length,a=Math.ceil(Math.max(o,s)*(1-n));o!==s&&(r=Math.abs(o-s));let c=0;for(let n=0;n<Math.min(o,s);n++)if(t[n]!==i[n]&&(c+=e(t[n],i[n]),c>a))return 1;return c+=r,c/=Math.max(o,s),c}}V._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),V._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),V._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]);const G={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var $;!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}($||($={}));const K={[$.HAMMING]:j,[$.LEVENSHTEIN]:function(){return(t,e)=>F(t,e)/Math.max(t.length,e.length)},[$.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:n,gapExtend:i,scoringMatrix:r,alphabetIndexes:o}={...G,...t};Object.entries(o).forEach((([t,n])=>e[t.charCodeAt(0)]=n));const s=[new Float32Array(1e4),new Float32Array(1e4)];return(t,o)=>{const a=new Array(t.length+1).fill(!1),c=new Array(t.length+1).fill(!1);let l=0,u=1;for(let e=1;e<t.length+1;e++)s[0][e]=-n-(e-1)*i,s[1][e]=0;s[0][0]=0;for(let h=1;h<o.length+1;h++){s[u][0]=-n-(h-1)*i;for(let f=1;f<t.length+1;f++){const d=s[l][f-1]+r[e[t.charCodeAt(f-1)]][e[o.charCodeAt(h-1)]],y=s[l][f]-(a[f]||1===h||h===o.length?i:n),g=s[u][f-1]-(c[f-1]||1===f||f===t.length?i:n);s[u][f]=Math.max(d,g,y),s[u][f]===d?(a[f]=!1,c[f]=!1):s[u][f]===g?(a[f]=!1,c[f]=!0):(a[f]=!0,c[f]=!1)}l=u,u=(u+1)%2}const h=Math.min(t.length,o.length);return(h-s[l][t.length])/h}},[$.MONOMER_CHEMICAL_DISTANCE]:j};function Y(t,e){const n=t.trueCount()+e.trueCount();if(0==n)return 1;const i=t.andWithCountBits(e,!0);return i/(n-i)}function z(t){return 0===t?3402823e32:1/t-1}_.Tanimoto,_.Dice,_.Asymmetric,_.BraunBlanquet,_.Cosine,_.Kulczynski,_.McConnaughey,_.RogotGoldberg,_.Russel,_.Sokal,_.Hamming,_.Euclidean,_.Tanimoto,_.Dice,_.Asymmetric,_.BraunBlanquet,_.Cosine,_.Kulczynski,_.McConnaughey,_.RogotGoldberg,_.Russel,_.Sokal,_.Hamming,_.Euclidean,_.Tanimoto,_.Dice,_.Cosine,_.Tanimoto,_.Asymmetric,_.Cosine,_.Sokal,$.HAMMING,$.LEVENSHTEIN,$.MONOMER_CHEMICAL_DISTANCE,$.NEEDLEMANN_WUNSCH;const Q={[b.Euclidean]:function(t,e){let n=0;const i=t.length;if(i!==e.length)throw new Error("The dimensionality of the vectors must match");for(let r=0;r<i;++r)n+=Math.pow(t[r]-e[r],2);return Math.sqrt(n)}},q={[v.Levenshtein]:F,[v.JaroWinkler]:W.Vb,[v.Manhattan]:function(t,e){if(t.length!==e.length)return 1;{let n=0;for(let i=1;i<t.length;i++)n+=t[i]==e[i]?0:1;return n/t.length}},[v.Onehot]:function(t,e){return t===e?0:1}},X={[_.Tanimoto]:function(t,e){return 1-Y(t,e)},[_.Dice]:function(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount();return 0==n?0:2*t.andWithCountBits(e,!0)/n}(t,e)},[_.Asymmetric]:function(t,e){return 1-function(t,e){const n=Math.min(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e)},[_.BraunBlanquet]:function(t,e){return z(function(t,e){const n=Math.max(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e))},[_.Cosine]:function(t,e){return 1-function(t,e){const n=t.trueCount()*e.trueCount();return 0==n?0:t.andWithCountBits(e,!0)/Math.sqrt(n)}(t,e)},[_.Kulczynski]:function(t,e){return z(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:t.andWithCountBits(e,!0)*n/(2*i)}(t,e))},[_.McConnaughey]:function(t,e){return z(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:(t.andWithCountBits(e,!0)*n-i)/i}(t,e))},[_.RogotGoldberg]:function(t,e){return z(function(t,e){const n=t.andWithCountBits(e,!0),i=t.countBits(!0)+e.countBits(!0),r=t.length,o=r-i+n;return n==r||o==r?1:n/i+o/(2*r-i)}(t,e))},[_.Russel]:function(t,e){return z(function(t,e){return 0==t.length?0:t.andWithCountBits(e,!0)/t.length}(t,e))},[_.Sokal]:function(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount(),i=t.andWithCountBits(e,!0);return i/(2*n-3*i)}(t,e)},[_.Hamming]:function(t,e){return t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0)},[_.Euclidean]:function(t,e){return Math.sqrt(t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0))}},J={[E.TanimotoIntArray]:function(t,e){return z(Y(new V(t,32*t.length),new V(e,32*e.length)))}},Z={[w.Difference]:function(t){if(t&&null!=t.range&&t.range>0){const e=t.range;return(t,n)=>Math.abs(t-n)/e}return(t,e)=>Math.abs(t-e)}},tt={[M.CommonItems]:function(t){const e=function(t){const e=t?.mostCommon??new Set;return(t,n)=>{const i=t.length,r=n.length;let o=0,s=0,a=0;for(;s<i&&a<r;)t[s]===n[a]?(e?.has(t[s])||++o,++s,++a):t[s]<n[a]?++s:++a;return o}}(t);return(t,n)=>0===n.length||0===t.length?1e4:Math.min(t.length,n.length)/(e(t,n)+1e-4)}},et={[N.Vector]:{[b.Euclidean]:Q[b.Euclidean]},[N.String]:{[v.Levenshtein]:q[v.Levenshtein],[v.JaroWinkler]:q[v.JaroWinkler],[v.Manhattan]:q[v.Manhattan],[v.Onehot]:q[v.Onehot]},[N.BitArray]:{[_.Tanimoto]:X[_.Tanimoto],[_.Dice]:X[_.Dice],[_.Asymmetric]:X[_.Asymmetric],[_.BraunBlanquet]:X[_.BraunBlanquet],[_.Cosine]:X[_.Cosine],[_.Kulczynski]:X[_.Kulczynski],[_.McConnaughey]:X[_.McConnaughey],[_.RogotGoldberg]:X[_.RogotGoldberg],[_.Russel]:X[_.Russel],[_.Sokal]:X[_.Sokal]},[N.MacroMolecule]:{[$.HAMMING]:K[$.HAMMING],[$.LEVENSHTEIN]:K[$.LEVENSHTEIN],[$.NEEDLEMANN_WUNSCH]:K[$.NEEDLEMANN_WUNSCH],[$.MONOMER_CHEMICAL_DISTANCE]:K[$.MONOMER_CHEMICAL_DISTANCE]},[N.Number]:{[w.Difference]:Z[w.Difference]},[N.IntArray]:{[E.TanimotoIntArray]:J[E.TanimotoIntArray]},[N.NumberArray]:{[M.CommonItems]:tt[M.CommonItems]}};Object.keys(et).reduce(((t,e)=>{for(const n of Object.keys(et[e]))t[n]=e;return t}),{});const nt=ui,it="bypassLargeDataWarning",rt="show-scatterplot-progress";var ot,st,at,ct,lt,ut,ht,ft=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};n(5540),(st=ot||(ot={})).EUCLIDEAN="EUCLIDEAN",st.MANHATTAN="MANHATTAN",ot.EUCLIDEAN,ot.MANHATTAN,(ct=at||(at={})).HAMMING="Hamming",ct.EUCLIDEAN="Euclidean",ct.MANHATTAN="Manhattan",ct.TANIMOTO="Tanimoto",ct.LEVENSTEIN="Levenshtein",ct.NEEDLEMAN_WUNSCH="Needlemann-Wunsch",ct.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance",ct.SOKAL="Sokal",ct.COSINE="Cosine",ct.ASYMMETRIC="Asymmetric",ct.Difference="Difference",ct.OneHot="One-Hot",at.HAMMING,at.EUCLIDEAN,at.MANHATTAN,at.TANIMOTO,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.MONOMER_CHEMICAL_DISTANCE,at.SOKAL,at.COSINE,at.ASYMMETRIC,at.Difference,at.OneHot,at.HAMMING,at.EUCLIDEAN,at.MANHATTAN,at.TANIMOTO,at.SOKAL,at.COSINE,at.ASYMMETRIC,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.MONOMER_CHEMICAL_DISTANCE,at.Difference,at.OneHot,new Set([at.HAMMING,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.MONOMER_CHEMICAL_DISTANCE,at.OneHot]),new Set([at.HAMMING,at.EUCLIDEAN,at.MANHATTAN,at.MONOMER_CHEMICAL_DISTANCE,at.LEVENSTEIN,at.NEEDLEMAN_WUNSCH,at.TANIMOTO,at.COSINE,at.SOKAL,at.ASYMMETRIC,at.OneHot,at.Difference]),new Set([at.EUCLIDEAN,at.MANHATTAN,at.OneHot,at.Difference]),new Set([at.EUCLIDEAN,at.MANHATTAN,at.Difference]),new Set([at.EUCLIDEAN,at.MANHATTAN,at.Difference]),new Set([at.TANIMOTO,at.COSINE,at.SOKAL,at.ASYMMETRIC]),function(t){t.ADD="ADD",t.SUB="SUB",t.MULT="MULT"}(lt||(lt={})),function(t){t.SQUARE="SQUARE",t.INVERSE="INVERSE",t.TRANSPOSE="TRANSPOSE",t.NORM="NORM",t.COLUMN_NORM="COLUMN_NORM"}(ut||(ut={})),function(t){t.SCALARMULT="SCALARMULT",t.SCALARADD="SCALARADD",t.SCALARPOW="SCALARPOW"}(ht||(ht={})),Object.prototype.toString;const dt="dimensionality-reducer-terminate-event";var yt,gt;(gt=yt||(yt={})).EUCLIDEAN="EUCLIDEAN",gt.MANHATTAN="MANHATTAN";const mt=t=>null==t;function pt(t,e){return`${e} (${t.length>4?`${t.length} columns`:t.map((t=>t.name)).join(", ")})`}async function xt(i,r,o,s,a,c,l,u=!0,h=!1,f={preprocessingFuncArgs:[]},d={},y=null,g={}){const m={showXAxis:!1,showYAxis:!1,showXSelector:!1,showYSelector:!1};if(r.length!==s.length||r.length!==c.length||r.length!==a.length||r.length!==f.preprocessingFuncArgs.length)throw new Error("columns, metrics and preprocessing functions, weights and function argumentsmust have the same length");const p=u?e.shell.tableView(i.name)??e.shell.addTableView(i):null,x=async()=>{const x=t.TaskBarProgressIndicator.create(`Initializing ${d.scatterPlotName??"dimensionality reduction"} ...`);let C;try{const A=function(t){const e=["Embed_X","Embed_Y"],n=t.columns.names().filter((t=>t.includes(e[0]))).length+1;return e.map((t=>`${t}_${n}`))}(i);function v(e,n,s){let a=null,c=null;i.columns.names().includes(A[0])?(a=i.columns.byName(A[0]),c=i.columns.byName(A[1])):(a=i.columns.add(t.Column.float(A[0],i.rowCount)),c=i.columns.add(t.Column.float(A[1],i.rowCount)),u&&!C&&(C=p.scatterPlot({...m,x:A[0],y:A[1],title:d.scatterPlotName??pt(r,o)}))),d[rt]&&(C?.root&&nt.setUpdateIndicator(C.root,!1),a.init((t=>s[0]?s[0][t]:void 0)),c.init((t=>s[1]?s[1][t]:void 0)));const l=e/n*100;x.update(l,`Running ${d.scatterPlotName??"dimensionality reduction"}... ${l.toFixed(0)}%`)}async function b(){i.columns.add(t.Column.float(A[0],i.rowCount)),i.columns.add(t.Column.float(A[1],i.rowCount));let h=null;u&&(C=p.scatterPlot({...m,x:A[0],y:A[1],title:d.scatterPlotName??pt(r,o)}),nt.setUpdateIndicator(C.root,!0));const y=e.events.onViewerClosed.subscribe((t=>{const n=t.args.viewer;n?.getOptions()?.look?.title&&C?.getOptions()?.look?.title&&n?.getOptions()?.look?.title===C?.getOptions()?.look?.title&&(e.events.fireCustomEvent(dt,{}),y.unsubscribe(),h?.(),x.close())})),g=new Promise((async(t,i)=>{try{h=t;const i=[];for(let t=0;t<c.length;++t){const e=c[t];if(f.distanceFnArgs||(f.distanceFnArgs=[]),e){const n=e.inputs[0].name,o=e.inputs[1].name,{entries:a,options:c}=await e.apply({[n]:r[t],[o]:s[t],...f.preprocessingFuncArgs[t]??{}});i.push({entries:a,options:c}),f.distanceFnArgs.push(c)}else{const e=r[t].toList(),n={};i.push({entries:e,options:n}),f.distanceFnArgs.push(n)}}t(await async function(t,i,r,o,s,a,c){let l=await async function(t,i,r,o,s,a,c){if(!a.distanceFnArgs)throw new Error("options.distanceFnArgs must be defined");if(t.length!==i.length||t.length!==a.distanceFnArgs.length||t.length!==o.length)throw new Error("data, metrics and options and weights must have the same length");return new Promise((function(l,u){const h=new Worker(new URL(n.p+n.u(234),n.b));h.postMessage({columnsData:t,distanceMetrics:i,method:r,options:a,weights:o,aggregationMethod:s});const f=e.events.onCustomEvent(dt).subscribe((()=>{try{h?.terminate()}finally{f.unsubscribe()}}));h.onmessage=({data:{error:t,embedding:e,epochNum:n,epochsLength:i}})=>{mt(n)||mt(i)?(f.unsubscribe(),t?u(t):l(e),setTimeout((()=>h.terminate()),100)):c&&c(n,i,e)}}))}(t,r,i,o,s,a,c);return l=l.map((t=>function(t){const e=t.length;let n=0,i=0;for(let r=0;r<e;++r)n+=t[r],i+=Math.pow(t[r],2);const r=n/e,o=1/Math.sqrt(i/e-Math.pow(r,2));for(let n=0;n<e;++n)t[n]=(t[n]-r)*o;return t}(t))),l}(i.map((t=>t.entries)),o,s,a,l,f,d[it]?void 0:v))}catch(t){i(t)}})),b=await g;return x.close(),y.unsubscribe(),b}const _=await b();if(h&&_){const E=t.TaskBarProgressIndicator.create("Clustering embeddings ...");try{const N=await function(t,e,i,r){return ft(this,void 0,void 0,(function*(){return new Promise((function(o,s){const a=new Worker(new URL(n.p+n.u(682),n.b));a.postMessage({embedX:t,embedY:e,minPts:r,epsilon:i}),a.onmessage=({data:{error:t,clusters:e}})=>{a.terminate(),t?s(t):o(e)}}))}))}(_[0],_[1],f.dbScanEpsilon??.01,f.dbScanMinPts??4),w=i.columns.getUnusedName("Cluster (DBSCAN)");i.columns.addNewString(w).init((t=>N[t].toString())),C&&(C.props.colorColumnName=w)}catch(M){e.shell.error("Clustering embeddings failed"),console.error(M)}finally{E.close()}}if(_){const S=i.columns.byName(A[0]),I=i.columns.byName(A[1]);if(S.init((t=>_[0][t])),I.init((t=>_[1][t])),y)try{const O=y.inputs[0].name,T=y.inputs[1].name;await y.prepare({[O]:S,[T]:I,...g}).call(!0)}catch(L){e.shell.error("Post-processing failed"),console.error(L)}if(C)return nt.setUpdateIndicator(C.root,!1),C.helpUrl="/help/compute/sequence-space",C}}catch(R){e.shell.error("Dimensionality reduction failed"),console.error(R),x.close(),C&&nt.setUpdateIndicator(C.root,!1)}};return new Promise((async(t,e)=>{try{if(d.fastRowCount&&i.rowCount>d.fastRowCount&&!d[it])nt.dialog().add(nt.divText("Analysis might take several minutes. Do you want to continue?")).onOK((async()=>{try{const e=await x();t(e)}catch(t){e(t)}})).onCancel((()=>t(void 0))).show();else{const e=await x();t(e)}}catch(t){e(t)}}))}var Ct=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};const At={SUBJ:"subj",STUDY:"study",SITE:"site",AGE:"age",SEX:"sex",RACE:"race",DISEASE:"disease",WEIGHT:"weight",HEIGHT:"height"};function vt(t,n,i){return Ct(this,void 0,void 0,(function*(){const r=e.data.demo.demog(100);e.shell.addTableView(r),L(!!(yield xt(r,t.map((t=>r.col(t))),n,i,t.map((()=>1)),t.map((()=>{})),"EUCLIDEAN",!0,!0,{preprocessingFuncArgs:t.map((()=>({})))})),!0,"No scatterplot returned");const o=r.columns.names().filter((t=>t.toLowerCase().startsWith("embed")));L(o.length,2,"Wrong number of embeddings added"),L(!!r.columns.names().find((t=>t.toLowerCase().startsWith("cluster"))),!0,"No cluster column added");for(const t of o){const e=r.col(t);L(new Array(e.length).fill(null).every(((t,n)=>!e.isNone(n)&&!isNaN(e.get(n)))),!0,"Embedding column has null-ish values")}yield new Promise((t=>setTimeout(t,500)))}))}R("Dimensionality reduction: UMAP",(()=>{T("Numeric column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.AGE],A.UMAP,[w.Difference])}))),{timeout:3e4}),T("String column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX],A.UMAP,[v.Onehot])}))),{timeout:3e4}),T("Numeric and string columns",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX,At.AGE],A.UMAP,[v.Onehot,w.Difference])})))),T("All demog columns",(()=>Ct(void 0,void 0,void 0,(function*(){const n=e.data.demo.demog(10).columns.toList().filter((t=>Object.values(At).includes(t.name))),i=n.map((e=>e.type===t.COLUMN_TYPE.STRING?v.Onehot:w.Difference)),r=n.map((t=>t.name));yield vt(r,A.UMAP,i)}))))})),R("Dimensionality reduction: T-SNE",(()=>{T("Numeric column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.AGE],A.T_SNE,[w.Difference])}))),{timeout:3e4}),T("String column",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX],A.T_SNE,[v.Onehot])}))),{timeout:3e4}),T("Numeric and string columns",(()=>Ct(void 0,void 0,void 0,(function*(){yield vt([At.SEX,At.AGE],A.T_SNE,[v.Onehot,w.Difference])})))),T("All demog columns",(()=>Ct(void 0,void 0,void 0,(function*(){const n=e.data.demo.demog(10).columns.toList().filter((t=>Object.values(At).includes(t.name))),i=n.map((e=>e.type===t.COLUMN_TYPE.STRING?v.Onehot:w.Difference)),r=n.map((t=>t.name));yield vt(r,A.T_SNE,i)}))))}));var bt=function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))};const _t=new t.Package;function Et(n,i,a){return bt(this,void 0,void 0,(function*(){const x=yield function(n){var i,a,x,C,A,v,b,_;return o(this,void 0,void 0,(function*(){const E=null===(a=null===(i=e.functions.getCurrentCall())||void 0===i?void 0:i.func)||void 0===a?void 0:a.package;yield function(n){var i;return o(this,void 0,void 0,(function*(){const a=n.id;if(p[a])return;const c=f;if(void 0!==c[d]||void 0!==c[y]||Object.keys(c).find((t=>t.startsWith(d)||t.startsWith(m))))return void(p[a]=!0);if("DevTools"===n.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let n=null!==(i=e.pop())&&void 0!==i?i:t.name,r=e.length?m+": "+e.join(": "):m,o=n.split(" | ");n=o[o.length-1],o.unshift(r),o.pop(),r=o.join(": "),void 0===c[r]&&(c[r]={tests:[],clear:!0}),c[r].tests.push(new O(r,n,t.test,{isAggregated:!1,timeout:s}))}const l=[],u=[],h=[],x=yield e.dapi.functions.filter(`package.id = "${a}"`).list(),C=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const n of x){const i=n.options.test,s=n.options.demoPath;if(i&&Array.isArray(i)&&i.length)for(let r=0;r<i.length;r++){const s=i[r].matchAll(C),a={};Array.from(s).forEach((t=>{t[0].startsWith("skip")?a.skip=t[1]:t[0].startsWith("wait")?a.wait=parseInt(t[2]):t[0].startsWith("cat")?a.cat=t[3]:t[0].startsWith("timeout")&&(a.timeout=parseInt(t[4]))}));const u=new O(d,1===i.length?n.name:`${n.name} ${r+1}`,(()=>o(this,void 0,void 0,(function*(){const t=yield e.functions.eval(D(i[r],n));if(a.wait&&(yield H(a.wait)),"boolean"==typeof t&&!t)throw`Failed: ${i[r]}, expected true, got ${t}`}))),{skipReason:a.skip,timeout:t.Test.isInBenchmark?a.benchmarkTimeout:a.timeout});if(a.cat){const t=d+": "+a.cat;u.category=t,void 0===c[t]&&(c[t]={tests:[],clear:!0}),c[t].tests.push(u)}else l.push(u)}if(s){const t=n.options.demoWait?parseInt(n.options.demoWait):void 0,i=new O(y,n.friendlyName,(()=>o(this,void 0,void 0,(function*(){e.shell.clearLastError(),yield n.apply(),yield H(t||2e3);const i=yield e.shell.lastError;if(i)throw new Error(i)}))),{skipReason:n.options.demoSkip});u.push(i)}if(n.hasTag("semTypeDetector")){const t=new O(g,n.friendlyName,(()=>o(this,void 0,void 0,(function*(){const t=[];for(const e of r.clone().columns){const i=yield n.apply([e]);t.push(i||e.semType)}L(t.filter((t=>t)).length,1)}))),{skipReason:n.options.skipTest});h.push(t)}}p[a]=!0,l.length&&(c[d]={tests:l,clear:!0}),u.length&&(c[y]={tests:u,clear:!0}),h.length&&(c[g]={tests:h,clear:!1})}))}(E);const N=[];console.log("Running tests"),null!=n||(n={}),null!==(x=(_=n).testContext)&&void 0!==x||(_.testContext=new I),e.shell.clearLastError();const w=[],M=function(){const t=[];return console.log=(...e)=>{t.push(...e),c(...e)},console.info=(...e)=>{t.push(...e),l(...e)},console.warn=(...e)=>{t.push(...e),u(...e)},console.error=(...e)=>{t.push(...e),h(...e)},t}();try{for(const[i,r]of Object.entries(f)){if((null==n?void 0:n.category)&&!i.toLowerCase().startsWith(null==n?void 0:n.category.toLowerCase())||(null===(C=n.exclude)||void 0===C?void 0:C.some((t=>i.startsWith(t)))))continue;c(`Started ${i} category`),w.push(i);const s=null===(A=r.tests)||void 0===A?void 0:A.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{r.before&&!s&&(yield B((()=>o(this,void 0,void 0,(function*(){yield r.before()}))),1e5,`before ${n.category}: timeout error`))}catch(t){r.beforeStatus=yield k(t)}const a=null!==(v=r.tests)&&void 0!==v?v:[],l=[];if(r.clear)for(let i=0;i<a.length;i++){a[i].options&&void 0===(null===(b=a[i].options)||void 0===b?void 0:b.benchmark)&&(a[i].options||(a[i].options={}),a[i].options.benchmark=r.isAllTestsEnabledBenchmarkMode||!1);let o=yield P(a[i],null==n?void 0:n.test,M,t.Test.isInBenchmark?r.benchmarkTimeout:r.timeout,E.name,n.verbose);o&&l.push(o),e.shell.closeAll(),t.Balloon.closeAll()}else for(let e=0;e<a.length;e++){let i=yield P(a[e],null==n?void 0:n.test,M,t.Test.isInBenchmark?r.benchmarkTimeout:r.timeout,E.name,n.verbose);i&&l.push(i)}const u=l.filter((t=>"skipped"!=t.result));try{r.after&&!s&&(yield B((()=>o(this,void 0,void 0,(function*(){yield r.after()}))),1e5,`After ${n.category}: timeout error`))}catch(t){r.afterStatus=yield k(t)}r.afterStatus&&u.push({category:i,name:"after",result:r.afterStatus,success:!1,ms:0,skipped:!1}),r.beforeStatus&&u.push({category:i,name:"before",result:r.beforeStatus,success:!1,ms:0,skipped:!1}),N.push(...u)}}finally{console.log=c,console.info=l,console.warn=u,console.error=h}if(n.testContext.catchUnhandled&&!t.Test.isInBenchmark){yield H(1e3);const t=yield e.shell.lastError,n={category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1};N.push(n),n.package=E.name,null!=e.shell.reportTest?yield e.shell.reportTest("package",n):yield fetch(`${e.dapi.root}/log/tests/package`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(n)})}return N}))}({category:n,test:i,testContext:a});return t.DataFrame.fromObjects(x)}))}})(),eda_test=i})();
2
2
  //# sourceMappingURL=package-test.js.map