@datagrok/helm 2.1.25 → 2.1.27
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.
- package/CHANGELOG.md +15 -1
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +6 -5
- package/src/cell-renderer.ts +0 -30
- package/src/helm-helper.ts +62 -0
- package/src/helm-web-editor.ts +1 -34
- package/src/package-test.ts +1 -0
- package/src/package.ts +64 -41
- package/src/tests/properties-widget-tests.ts +81 -0
- package/src/widgets/properties-widget.ts +43 -0
- package/tsconfig.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Helm changelog
|
|
2
2
|
|
|
3
|
-
## 2.
|
|
3
|
+
## 2.1.27 (2024-02-15)
|
|
4
|
+
|
|
5
|
+
### Bug fixes
|
|
6
|
+
|
|
7
|
+
* Fix dojo patch dependency on package init
|
|
8
|
+
* Fix getMolfiles without current table view
|
|
9
|
+
* Fix initHelm/rewriteLibraries without current table view
|
|
10
|
+
|
|
11
|
+
## 2.1.26 (2024-02-14)
|
|
12
|
+
|
|
13
|
+
### Bug fixes
|
|
14
|
+
|
|
15
|
+
* Fix Properties panel of Context panel for sequences of MSA with gaps
|
|
16
|
+
|
|
17
|
+
## 2.1.25 (2024-02-09)
|
|
4
18
|
|
|
5
19
|
### Features
|
|
6
20
|
|
package/dist/package-test.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var helm_test;(()=>{var t={133:function(t,e,n){var i;!function(e,s){var r={};!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,s,r){for(var o,a,l,h,c,u,f,d,g,y,C,p,x;r>=64;){for(o=n[0],a=n[1],l=n[2],h=n[3],c=n[4],u=n[5],f=n[6],d=n[7],y=0;y<16;y++)C=s+4*y,t[y]=(255&i[C])<<24|(255&i[C+1])<<16|(255&i[C+2])<<8|255&i[C+3];for(y=16;y<64;y++)p=((g=t[y-2])>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,x=((g=t[y-15])>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,t[y]=(p+t[y-7]|0)+(x+t[y-16]|0);for(y=0;y<64;y++)p=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&f)|0)+(d+(e[y]+t[y]|0)|0)|0,x=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&l^a&l)|0,d=f,f=u,u=c,c=h+p|0,h=l,l=a,a=o,o=p+x|0;n[0]+=o,n[1]+=a,n[2]+=l,n[3]+=h,n[4]+=c,n[5]+=u,n[6]+=f,n[7]+=d,s+=64,r-=64}return s}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,s=e/536870912|0,r=e<<3,o=e%64<56?64:128;this.buffer[i]=128;for(var a=i+1;a<o-8;a++)this.buffer[a]=0;this.buffer[o-8]=s>>>24&255,this.buffer[o-7]=s>>>16&255,this.buffer[o-6]=s>>>8&255,this.buffer[o-5]=s>>>0&255,this.buffer[o-4]=r>>>24&255,this.buffer[o-3]=r>>>16&255,this.buffer[o-2]=r>>>8&255,this.buffer[o-1]=r>>>0&255,n(this.temp,this.state,this.buffer,0,o),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 s=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 r(t){var e=(new i).update(t),n=e.digest();return e.clean(),n}function o(t,e){var n=new s(t).update(e),i=n.digest();return n.clean(),i}function a(t,e,n,i){var s=i[0];if(0===s)throw new Error("hkdf: cannot expand more");e.reset(),s>1&&e.update(t),n&&e.update(n),e.update(i),e.finish(t),i[0]++}t.HMAC=s,t.hash=r,t.default=r,t.hmac=o;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,i){void 0===e&&(e=l),void 0===i&&(i=32);for(var r=new Uint8Array([1]),h=o(e,t),c=new s(h),u=new Uint8Array(c.digestLength),f=u.length,d=new Uint8Array(i),g=0;g<i;g++)f===u.length&&(a(u,c,n,r),f=0),d[g]=u[f++];return c.clean(),u.fill(0),r.fill(0),d},t.pbkdf2=function(t,e,n,i){for(var r=new s(t),o=r.digestLength,a=new Uint8Array(4),l=new Uint8Array(o),h=new Uint8Array(o),c=new Uint8Array(i),u=0;u*o<i;u++){var f=u+1;a[0]=f>>>24&255,a[1]=f>>>16&255,a[2]=f>>>8&255,a[3]=f>>>0&255,r.reset(),r.update(e),r.update(a),r.finish(h);for(var d=0;d<o;d++)l[d]=h[d];for(d=2;d<=n;d++){r.reset(),r.update(h).finish(h);for(var g=0;g<o;g++)l[g]^=h[g]}for(d=0;d<o&&u*o+d<i;d++)c[u*o+d]=l[d]}for(u=0;u<o;u++)l[u]=h[u]=0;for(u=0;u<4;u++)a[u]=0;return r.clean(),c}}(r);var o=r.default;for(var a in r)o[a]=r[a];"object"==typeof t.exports?t.exports=o:void 0===(i=function(){return o}.call(r,n,r,t))||(t.exports=i)}()}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},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.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 i={};(()=>{"use strict";n.r(i),n.d(i,{_package:()=>Ct,test:()=>pt,tests:()=>a});const t=DG,e=grok;n(133);const s=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,,,,,,,,,,,,,,,,,,,,,');s.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r=function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};const o=3e4,a={},l="Auto Tests",h={};let c;var u;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(u||(u={}));class f{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class d{constructor(t,e,n,i){var s;this.category=t,this.name=e,null!=i||(i={}),null!==(s=i.timeout)&&void 0!==s||(i.timeout=o),this.options=i,this.test=()=>r(this,void 0,void 0,(function*(){return new Promise(((t,e)=>r(this,void 0,void 0,(function*(){let i="";try{i=yield n()}catch(t){e(t)}t(i)}))))}))}}function g(t,e,n){null==a[c]&&(a[c]={}),null==a[c].tests&&(a[c].tests=[]),a[c].tests.push(new d(c,t,e,n))}function y(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function C(t,e,n=.001,i){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const s=Math.abs(t-e)<n;if(y(s,!0,`${null!=i?i:""} (tolerance = ${n})`),!s)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function p(t,e){for(const[n,i]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&i instanceof Array)x(e,i);else if(e instanceof Object&&i instanceof Object)p(e,i);else if(Number.isFinite(e)&&Number.isFinite(i))C(e,i);else if(e!=i)throw new Error(`Expected (${i}) for key '${n}', got (${e})`)}}function x(t,e){const n=t.length,i=e.length;if(n!=i)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${i}`);for(let i=0;i<n;i++)if(t[i]instanceof Array&&e[i]instanceof Array)x(t[i],e[i]);else if(t[i]instanceof Object&&e[i]instanceof Object)p(t[i],e[i]);else if(t[i]!=e[i])throw new Error(`Expected ${e[i]} at position ${i}, got ${t[i]}`)}function m(t,e,n){var i;c=t,e(),a[c]&&(a[c].clear=null===(i=null==n?void 0:n.clear)||void 0===i||i,a[c].timeout=null==n?void 0:n.timeout)}function A(t){null==a[c]&&(a[c]={}),a[c].before=t}function _(t){null==a[c]&&(a[c]={}),a[c].after=t}function b(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function N(e){return`${e.toString()}\n${e.stack?t.Logger.translateStackTrace(e.stack):""}`}function E(n,i,s,a){var l,h,c,u,f;return r(this,void 0,void 0,(function*(){let r;const d=null!=i&&n.name.toLowerCase()!==i.toLowerCase(),g=(null===(l=n.options)||void 0===l?void 0:l.skipReason)||d,y=d?"skipped":null===(h=n.options)||void 0===h?void 0:h.skipReason;g||console.log(`Started ${n.category} ${n.name}`);const C=Date.now();try{if(g)r={success:!0,result:y,ms:0,skipped:!0};else{let e=(null===(c=n.options)||void 0===c?void 0:c.timeout)===o&&s?s:null===(u=n.options)||void 0===u?void 0:u.timeout;e=t.Test.isInBenchmark&&e===o?108e5:e,r={success:!0,result:null!==(f=yield T(n.test,e))&&void 0!==f?f:"OK",ms:0,skipped:!1}}}catch(t){r={success:!1,result:N(t),ms:0,skipped:!1}}if(r.ms=Date.now()-C,g||console.log(`Finished ${n.category} ${n.name} for ${r.ms} ms`),r.category=n.category,r.name=n.name,!d){let t={success:r.success,result:r.result,ms:r.ms,skipped:r.skipped,type:"package",packageName:a,category:n.category,test:n.name};if(r.result.constructor==Object){const e=Object.keys(r.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:r.result[e]})),{});t=Object.assign(Object.assign({},t),e)}e.log.usage(`${a}: ${n.category}: ${n.name}`,t,`test-package ${a}: ${n.category}: ${n.name}`)}return r}))}function v(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function T(t,e){return r(this,void 0,void 0,(function*(){let n=null;const i=new Promise(((t,i)=>{n=setTimeout((()=>{i("EXECUTION TIMEOUT")}),e)}));try{return yield Promise.race([t(),i])}finally{n&&clearTimeout(n)}}))}function O(t){t=L(t,"$")[0];const e=[];if(!scil.Utils.isNullOrEmpty(t)){const n=L(t,"|");for(let i=0;i<n.length;++i){let s=(t=S(n[i]).str).indexOf("{");s=(t=t.substring(s+1)).indexOf("}");const r=L(t=t.substring(0,s),".");for(const t of r)if(t&&""!==t)if(t.startsWith("[")&&t.includes("]")){const n=I(t,1,"[","]"),i=t.substring(1,n);e.push(i);const s=t.substring(n+1);r.push(s)}else if(t.includes("[")&&t.endsWith("]")){const n=w(t,t.length-2,"[","]"),i=t.substring(n+1,t.length-1);e.push(i);const s=t.substring(0,n);r.push(s)}else if(t.includes("(")&&t.includes(")")){const e=t.substring(0,t.indexOf("(")),n=t.substring(t.lastIndexOf(")")+1),i=[e,t.substring(e.length+1,t.length-n.length-1),n];for(const t of i)r.push(t)}else e.push(t)}}return e}function I(t,e,n,i){let s=e,r=0;for(;s<t.length;){if(t[s]===n&&r++,t[s]===i){if(0===r)return s;r--}s++}return-1}function w(t,e,n,i){let s=e,r=0;for(;s>=0;){if(t[s]===i&&r++,t[s]===n){if(0===r)return s;r--}s--}return-1}function L(t,e){const n=[];let i="",s=0,r=0,o=0,a=0;for(let l=0;l<t.length;++l){let h=t.substring(l,l+1);if(h==e&&0==r&&0==s&&0==o&&0==a)n.push(i),i="";else{if(i+=h,a>0&&"\\"==h&&l+1<t.length){++l;const e=t.substring(l,l+1);i+=e,h+=e}'"'==h?l>0&&"\\"==t.substring(l-1,l)||(a=0==a?1:0):"["==h?++r:"]"==h?--r:"("==h?++s:")"==h?--s:"{"==h?++o:"}"==h&&--o}}return n.push(i),n}function S(t){const e=M(t,'"');if(null!=e.tag)return e;const n=M(t,"'");return{tag:e.tag,repeat:n.tag,str:n.str}}function M(t,e){let n=null;if(scil.Utils.endswith(t,e)){let i=t.length-1;for(;i>0&&(i=t.lastIndexOf(e,i-1),!(i<=0||"\\"!=t.substring(i-1,i))););i>0&&i<t.length-1&&(n=t.substring(i+1,t.length-1),t=t.substring(0,i))}return null!=n&&(n=function(t){return scil.Utils.isNullOrEmpty(t)?t:t.replace(/[\\]./g,(function(t){switch(t){case"\\r":return"\r";case"\\n":return"\n";case"\\t":return"\t";default:return t.substring(1)}}))}(n.replace(new RegExp("\\"+e,"g"),e))),{tag:n,str:t}}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]);var P,R,D=function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};m("Helm",(()=>{const t=[["L-hArg(Et,Et)","E","F","G","C","E"],["L-hArg(Et,Et)","L-hArg(Et,Et)","E","F","G"],["dhp","m1A","p","r","T","p","r","T","p","r","G","p"],["r","mo6pur","p","r","T","p","r","T","p","r","G","p"],["afhna","mo6pur","36SS","r","T","p"]],e=["comples-monomer","complex-monomer+side-chain","complex-monomer+side-chain-RNA","complex-side-chain","complex+side-chain+linker"];g("parseHelm",(()=>D(void 0,void 0,void 0,(function*(){const t=[["meI","hHis","Aca","N","T","dK","Thr_PO3H2","D-Tyr_Et","Aze","dV","E","Phe_4Me"],["A","C","T","G","W","E","Q"],["R","U","P","T","A"],["A","*","G","C"]],e=["PEPTIDE1{meI.hHis.Aca.N.T.dK.Thr_PO3H2.Aca.D-Tyr_Et.Aze.dV.E.N.dV.Phe_4Me}$$$","PEPTIDE1{A.C.T.G.C.T.W.G.T.W.E.C.W.C.Q.W}|PEPTIDE2{A.C.T.G.C.T.W.G.T.W.E.Q}$PEPTIDE1,PEPTIDE1,5:R3-14:R3|PEPTIDE2,PEPTIDE1,2:R3-12:R3$$$","RNA1{R(U)P.R(T)P}|RNA2{P.R(A)P.R(A)}$RNA1,RNA2,2:pair-6:pair|RNA1,RNA2,5:pair-3:pair$$$","PEPTIDE1{A.*.G.C}$$$$V2.0"];for(let n=0;n<e.length;++n){const i=new Set(O(e[n])),s=Array.from(i);y(JSON.stringify(s),JSON.stringify(t[n]))}})))),["PEPTIDE1{[L-hArg(Et,Et)].E.F.G}|PEPTIDE2{C.E}$PEPTIDE1,PEPTIDE2,2:R3-1:R1$$$V2.0","PEPTIDE1{[L-hArg(Et,Et)]([L-hArg(Et,Et)]).E.F.G}$$$$","RNA1{[dhp]([m1A])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{r([mo6pur])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{[afhna]([mo6pur])[36SS].r(T)p}$$$$V2.0"].forEach(((n,i)=>{g(e[i],(()=>D(void 0,void 0,void 0,(function*(){const e=O(n);e.sort();const s=t[i];s.sort(),x(e,s)}))))}))})),new RegExp("[rd]\\((\\w)\\)p?","g"),wu;class k{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}(R=P||(P={})).FASTA="fasta",R.SEPARATOR="separator",R.HELM="helm";const H=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}};new k("PT",H.fasta.peptide,.5),new k("DNA",H.fasta.dna,.55),new k("RNA",H.fasta.rna,.55),Float32Array;class F{static makePalette(t,e=!1,n=F){const i={};return t.forEach((t=>{const n=t[0],s=t[1];n.forEach(((t,n)=>{i[t]=this.colourPalette[s][e?0:n]}))})),new n(i)}constructor(t){this._palette=t}get(t){return this._palette[t]}}F.undefinedColor="rgb(100,100,100)",F.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]};class B extends F{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,B)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,B)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new B({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(t){const e=t in B.aaSynonyms?B.aaSynonyms[t]:t;return super.get(e)}}B.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class V{static getPalette(t="grok"){switch(t){case"grok":return B.GrokGroups;case"lesk":return B.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",i="";for(const s of t)"("==s?e++:")"==s?e--:e?n+=s:i+=s;return isNaN(parseInt(n))?[i,n]:[i,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[i,s]=this.getInnerOuter(t);if(i=i.length>6?`${i.slice(0,3)}...`:i,s=s.length>6?`${s.slice(0,3)}...`:s,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,s,1]:[this.undefinedColor,i,s,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,s,2]:[this.undefinedColor,i,s,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,s,3]:[this.undefinedColor,i,s,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,s,4]:[this.undefinedColor,i,s,4]}return[this.undefinedColor,i,s,0]}}V.SemType="Aminoacids",V.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",V.undefinedColor="rgb(100,100,100)",V.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},V.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},V.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},V.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"};class G{}G.SemType="Nucleotides",G.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",G.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};class U extends class{}{static buildPalette(){return[].concat(...Object.values(F.colourPalette))}get(e){const n=class{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}.hashCode(e)%U.palette.length;return function(e){if(null==e)return"rgb(100,100,100)";const n=t.Color.fromHtml(e),i=t.Color.g(n),s=t.Color.r(n),r=t.Color.b(n),o=Math.sqrt(Math.pow(0-s,2)+Math.pow(0-i,2)+Math.pow(0-r,2));return o>210?`rgb(${s/o*210},${i/o*210},${r/o*210})`:t.Color.toRgb(n)}(U.palette[n])}}U.palette=U.buildPalette();new Uint32Array(65536);var W,K,Y,Q,z,j,J,q;(K=W||(W={})).HAMMING="Hamming",K.LEVENSHTEIN="Levenshtein",K.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",K.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance",W.HAMMING,W.LEVENSHTEIN,W.NEEDLEMANN_WUNSCH,W.MONOMER_CHEMICAL_DISTANCE,new class{constructor(){this.uh=`units-handler.${t.SEMTYPE.MACROMOLECULE}`}},P.FASTA,P.SEPARATOR,P.HELM;class X{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=X._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 X(t._length);n._length=t._length,n._data=X._createBuffer(n._length),n._version=0;const i=t.lengthInInts;for(let s=0;s<i;s++)n._data[s]=t._data[s]&e._data[s];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new X(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 X(t);for(let i=0;i<t;++i)n.setBit(i,e(i));return n._version=0,n}static fromString(t){return X.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new X(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new X(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let i=0,s=0;for(;e-s>=4;)n._data[i++]=255&t[s]|(255&t[s+1])<<8|(255&t[s+2])<<16|(255&t[s+3])<<24,s+=4;return e-s==3&&(n._data[i]=(255&t[s+2])<<16),e-s==2&&(n._data[i]|=(255&t[s+1])<<8),e-s==1&&(n._data[i]|=255&t[s]),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 X(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,s=!0){if(n&&s&&this.setAll(!e,!1),s)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 X.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 s=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=s;t<=r;t++)this.setTrue(t);else for(let t=s;t<=r;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 0!=(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+=X._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+=X._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 s=0;for(;s<i-1;s++)for(let e=this._data[s]&t._data[s];0!=e;e>>>=8)n+=X._onBitCount[255&e];let r=this._data[s]&t._data[s];const o=31&this._length;for(0!=o&&(r&=~(4294967295<<o));0!=r;r>>>=8)n+=X._onBitCount[255&r];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 s=Math.floor(t/32);s<i;s++){let i=e?this._data[s]:~this._data[s];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=X._firstOnBit[255&i];if(n>=0)return(t=n+32*s+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=X._lastOnBit[t>>>24];if(n>=0)return n+32*i+e}}return-1}}async function Z(){const e=t.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===e.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await e[0].prepare().call()).getOutputParamValue()}X._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]),X._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]),X._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]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan"}(Y||(Y={})),function(t){t.Euclidean="Euclidean"}(Q||(Q={})),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"}(z||(z={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(j||(j={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray"}(J||(J={})),function(t){t.NumericDistance="NumericDistance"}(q||(q={})),z.Tanimoto,z.Dice,z.Asymmetric,z.BraunBlanquet,z.Cosine,z.Kulczynski,z.McConnaughey,z.RogotGoldberg,z.Russel,z.Sokal,z.Hamming,z.Euclidean,z.Tanimoto,z.Dice,z.Asymmetric,z.BraunBlanquet,z.Cosine,z.Kulczynski,z.McConnaughey,z.RogotGoldberg,z.Russel,z.Sokal,z.Hamming,z.Euclidean,z.Tanimoto,z.Dice,z.Cosine,z.Tanimoto,z.Asymmetric,z.Cosine,z.Sokal,W.HAMMING,W.LEVENSHTEIN,W.MONOMER_CHEMICAL_DISTANCE;const tt="Libraries",et={explicit:["HELMCoreLibrary.json"],exclude:[]};let nt=Promise.resolve();async function it(){let t;return nt=nt.then((async()=>{const n=await e.dapi.userDataStorage.getValue(tt,"Settings",!0);t=n?JSON.parse(n):{exclude:[],explicit:[]},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await nt,t}async function st(t){nt=nt.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await e.dapi.userDataStorage.postValue(tt,"Settings",JSON.stringify(t),!0)})),await nt}async function rt(){await st(et)}var ot=function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};m("findMonomers",(()=>{let t,e;A((()=>ot(void 0,void 0,void 0,(function*(){t=yield Z(),e=yield it(),yield rt(),yield t.loadLibraries(!0)})))),_((()=>ot(void 0,void 0,void 0,(function*(){yield st(e),yield t.loadLibraries(!0)}))));const n={withoutMissed:{test:"PEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set},withMissed:{test:"PEPTIDE1{meI.missed2.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set(["missed2"])}};for(const[t,e]of Object.entries(n))g(t,(()=>ot(void 0,void 0,void 0,(function*(){i(e.test,e.tgt)}))));function i(t,e){p(function(t){const e=Object.keys(org.helm.webeditor.monomerTypeList()),n=[],i=[];for(let t=0;t<e.length;t++)n.push(new scil.helm.Monomers.getMonomerSet(e[t])),Object.keys(n[t]).forEach((e=>{i.push(n[t][e].id)}));return new Set(t.filter((t=>!i.includes(t))))}(O(t)),e)}}));const at=$;var lt,ht=n.n(at),ct=function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};m("renderers",(()=>{g("missedInLib",(()=>ct(void 0,void 0,void 0,(function*(){yield function(){return ct(this,void 0,void 0,(function*(){const n=yield e.dapi.files.readCsv("System:AppData/Helm/tests/sample_HELM-missedInLib.csv"),i=n.getCol("HELM"),s=e.shell.addTableView(n);yield function(t,e="Timeout exceeded",n=500,i=50){return r(this,void 0,void 0,(function*(){return new Promise(((s,r)=>{setTimeout((()=>{clearInterval(o),r(new Error(e))}),n);const o=setInterval((()=>{t()&&(clearInterval(o),s())}),i)}))}))}((()=>ht()(s.root).find(".d4-grid canvas").length>0),"Table view canvas not found",100),y(i.semType,t.SEMTYPE.MACROMOLECULE),y(i.getTag(t.TAGS.UNITS),P.HELM),y(i.getTag(t.TAGS.CELL_RENDERER),"helm");const o=i.getTag(".cell-renderer.render.error");if(o){const t=JSON.parse(o),e=new Error(t.message);throw e.stack=t.stack,e}}))}()}))))}));class ut extends class{constructor(t){this.init(t)}init(t){this.fileContent=t.replace(/\r/g,""),this._atomCount=void 0,this._atomTypes=void 0,this._bondCount=void 0,this._bondTypes=void 0,this.xyzAtomCoordinates=void 0,this._pairsOfBondedAtoms=void 0}get atomCount(){return void 0===this._atomCount&&this.setAtomAndBondCounts(),this._atomCount}get bondCount(){return void 0===this._bondCount&&this.setAtomAndBondCounts(),this._bondCount}get x(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.x}get y(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.y}get z(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.z}get atomTypes(){var t;return null!==(t=this._atomTypes)&&void 0!==t||(this._atomTypes=this.parseAtomTypes()),this._atomTypes}get pairsOfBondedAtoms(){var t;return null!==(t=this._pairsOfBondedAtoms)&&void 0!==t||(this._pairsOfBondedAtoms=this.parseBondedAtomPairs()),this._pairsOfBondedAtoms}get bondTypes(){var t;return null!==(t=this._bondTypes)&&void 0!==t||(this._bondTypes=this.parseBondTypes()),this._bondTypes}setAtomAndBondCounts(){const{atomCount:t,bondCount:e}=this.parseAtomAndBondCounts();this._atomCount=t,this._bondCount=e}getNextColumnIdx(t){for(;!this.isWhitespace(t);)++t;for(;this.isWhitespace(t);)++t;return t}shiftIdxToSpecifiedColumn(t,e){let n=t;const i=this.isWhitespace(n)?e:e-1;for(let t=0;t<i;t++)n=this.getNextColumnIdx(n);return n}parseAtomTypes(){const t=this.atomCount,e=new Array(t);let n=this.getAtomBlockIdx();for(let i=0;i<t;i++)n=this.shiftIdxToAtomType(n),e[i]=this.parseAtomType(n),n=this.getNextLineIdx(n);return e}parseAtomCoordinates(){const t=new Float32Array(this.atomCount),e=new Float32Array(this.atomCount),n=new Float32Array(this.atomCount);let i=this.getAtomBlockIdx();for(let s=0;s<this.atomCount;s++){i=this.shiftIdxToXColumn(i);for(const r of[t,e,n])r[s]=this.parseFloatValue(i),i=this.getNextColumnIdx(i);i=this.getNextLineIdx(i)}return{x:t,y:e,z:n}}parseBondedAtomPairs(){const t=new Array(this.bondCount);let e=this.getBondBlockIdx();for(let n=0;n<this.bondCount;n++){e=this.shiftIdxToBondedAtomsPair(e);const i=new Uint16Array(2);i[0]=this.parseIntValue(e),e=this.getNextColumnIdx(e),i[1]=this.parseIntValue(e),t[n]=i,e=this.getNextLineIdx(e)}return t}parseBondTypes(){const t=this.bondCount,e=new Uint16Array(t);let n=this.getBondBlockIdx();for(let i=0;i<t;i++)n=this.shiftIdxToBondType(n),e[i]=this.parseIntValue(n),n=this.getNextLineIdx(n);return e}isWhitespace(t){const e=this.fileContent[t];return" "===e||"\t"===e}getNextLineIdx(t){return"\n"!==this.fileContent[t]?this.fileContent.indexOf("\n",t)+1:t+1}parseFloatValue(t){return this.parseNumericValue(parseFloat,t)}parseIntValue(t){return this.parseNumericValue(parseInt,t)}parseNumericValue(t,e){let n=e+1;for(;!this.isWhitespace(n);)++n;return t(this.fileContent.substring(e,n))}}{constructor(t){super(t),this.init(t)}init(t){super.init(t)}parseAtomType(t){let e=t,n=e;return this.isQuote(e)?(n=this.getNextIdenticalChar(e),e++):n=this.fileContent.indexOf(" ",n),this.fileContent.substring(e,n)}isQuote(t){const e=this.fileContent[t].charCodeAt(0);return 39===e||34===e}getNextIdenticalChar(t){const e=this.fileContent[t];return e?this.fileContent.indexOf(e,t+1):-1}isQuery(){return this.isQueryOrFragment(((t,e)=>{return 39===t||34===t||76===t&&!((n=this.fileContent.charCodeAt(e+1))>64&&n<91||n>96&&n<123);var n}))}isFragment(){return this.isQueryOrFragment((t=>82===t||42===t))}isQueryOrFragment(t){const e=this.atomCount;let n=this.getAtomBlockIdx();for(let i=0;i<e;i++){if(n=this.shiftIdxToAtomType(n),t(this.fileContent.charCodeAt(n),n))return!0;n=this.getNextLineIdx(n)}return!1}}!function(t){t.HEADER="V2000",t[t.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",t[t.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",t[t.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",t[t.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",t[t.BOND_TYPE_COL=3]="BOND_TYPE_COL",t[t.RGP_SHIFT=8]="RGP_SHIFT",t.RGP_LINE="M RGP",t.A_LINE="A ",t.END="M END"}(lt||(lt={}));class ft extends ut{constructor(t){super(t)}static validate(t){return-1!==t.indexOf(lt.HEADER)&&-1!==t.indexOf(lt.END)}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,lt.ATOM_TYPE_COL)}getCountsLineIdx(){let t=0;for(let e=0;e<lt.NUM_OF_HEADER_LINES;++e)t=this.getNextLineIdx(t);return t}getAtomBlockIdx(){let t=this.getCountsLineIdx();return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){return this.getNextColumnIdx(t)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,lt.FIRST_BONDED_ATOM_COL)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,lt.BOND_TYPE_COL)}getBondBlockIdx(){let t=this.getAtomBlockIdx();for(let e=0;e<this.atomCount;e++)t=this.getNextLineIdx(t);return t}parseAtomAndBondCounts(){let t=this.getCountsLineIdx(),e=t+lt.NUM_OF_COUNTS_DIGITS;const n=parseInt(this.fileContent.substring(t,e));return t=e,e+=lt.NUM_OF_COUNTS_DIGITS,{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}class dt extends ut{constructor(t){super(t),this.init(t)}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getCountsLineIdx(){return this.fileContent.indexOf("M V30 COUNTS ")}getAtomBlockIdx(){let t=this.fileContent.indexOf("M V30 BEGIN ATOM");return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){let e=this.shiftIdxToAtomType(t);return this.isQuote(e)?(e=this.getNextIdenticalChar(e),e=this.getNextColumnIdx(e),e):this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getBondBlockIdx(){return this.getNextLineIdx(this.fileContent.indexOf("M V30 BEGIN BOND"))}static validate(t){return-1!==t.indexOf("V3000")&&-1!==t.indexOf("M END")}parseAtomAndBondCounts(){let t=this.fileContent.indexOf("M V30 COUNTS ")+14,e=this.fileContent.indexOf(" ",t+1);const n=parseInt(this.fileContent.substring(t,e));return t=e+1,e=this.fileContent.indexOf(" ",t+1),{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}function gt(t,e=5e3){return n=this,i=void 0,o=function*(){yield v(100),yield function(t,e,n,i=0){return r(this,void 0,void 0,(function*(){return new Promise(((s,r)=>{const o=t.subscribe((t=>{try{e(t),s("OK")}catch(t){r(t)}o.unsubscribe(),clearTimeout(a)})),a=setTimeout((()=>{o.unsubscribe(),r("timeout")}),i);n()}))}))}(t.onAfterDrawContent,(()=>{}),(()=>{t.invalidate()}),e)},new((s=void 0)||(s=Promise))((function(t,e){function r(t){try{l(o.next(t))}catch(t){e(t)}}function a(t){try{l(o.throw(t))}catch(t){e(t)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof s?n:new s((function(t){t(n)}))).then(r,a)}l((o=o.apply(n,i||[])).next())}));var n,i,s,o}var yt=function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{l(i.next(t))}catch(t){r(t)}}function a(t){try{l(i.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((i=i.apply(t,e||[])).next())}))};m("getMolfiles",(()=>{let n,i;A((()=>yt(void 0,void 0,void 0,(function*(){n=yield Z(),i=yield it(),yield rt(),yield n.loadLibraries(!0)})))),_((()=>yt(void 0,void 0,void 0,(function*(){yield st(i),yield n.loadLibraries(!0)})))),g("linear1",(()=>yt(void 0,void 0,void 0,(function*(){const n=t.DataFrame.fromCsv("Helm, atoms, bonds\nPEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et.Tyr_ab-dehydroMe.dV}$$$$,11,10\nPEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2.D-Chg.dV}$$$$,11,10\nPEPTIDE1{Lys_Boc.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2}$$$$,9,8"),i=n.getCol("Helm"),s=e.shell.addTableView(n);Ct.logger.debug("Helm/getMolfiles/linear1, grid awaiting 1"),yield gt(s.grid,5e3),Ct.logger.debug("Helm/getMolfiles/linear1, grid awaited 1");const r=yield e.functions.call("Helm:getMolfiles",{col:i});y(r.length,i.length);const o=r.toList().map((t=>class{constructor(){}static getInstance(t){if(ft.validate(t))return new ft(t);if(dt.validate(t))return new dt(t);throw new Error("Malformed molfile")}}.getInstance(t)));x(o.map((t=>t.atomCount)),n.getCol("atoms").toList()),x(o.map((t=>t.bondCount)),n.getCol("bonds").toList()),Ct.logger.debug("Helm/getMolfiles/linear1, grid awaiting 2"),yield gt(s.grid,5e3),Ct.logger.debug("Helm/getMolfiles/linear1, grid awaited 2")}))))}));const Ct=new t.Package;function pt(n,i,o){return c=this,u=void 0,C=function*(){const c=yield function(n,i){var o,c,u,g,C,p;return r(this,void 0,void 0,(function*(){const x=null===(c=null===(o=e.functions.getCurrentCall())||void 0===o?void 0:o.func)||void 0===c?void 0:c.package;yield function(t,n){return r(this,void 0,void 0,(function*(){if(h[t])return;const n=a;if(void 0!==n["Auto Tests"]||void 0!==n.Demo||Object.keys(n).find((t=>t.startsWith(l))))return void(h[t]=!0);const i=[],o=[],c=[],u=yield e.dapi.functions.filter(`package.id = "${t}"`).list(),f=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)/g);for(const t of u){const a=t.options.test,h=t.options.demoPath;if(a&&Array.isArray(a)&&a.length)for(let s=0;s<a.length;s++){const o=a[s].matchAll(f),h={};Array.from(o).forEach((t=>{t[0].startsWith("skip")?h.skip=t[1]:t[0].startsWith("wait")?h.wait=parseInt(t[2]):t[0].startsWith("cat")&&(h.cat=t[3])}));const c=new d(l,1===a.length?t.name:`${t.name} ${s+1}`,(()=>r(this,void 0,void 0,(function*(){const n=yield e.functions.eval(b(a[s],t));if(h.wait&&(yield v(h.wait)),"boolean"==typeof n&&!n)throw`Failed: ${a[s]}, expected true, got ${n}`}))),{skipReason:h.skip});if(h.cat){const t="Auto Tests: "+h.cat;c.category=t,void 0===n[t]&&(n[t]={tests:[],clear:!0}),n[t].tests.push(c)}else i.push(c)}if(h){const n=t.options.demoWait?parseInt(t.options.demoWait):void 0,i=new d("Demo",t.friendlyName,(()=>r(this,void 0,void 0,(function*(){if(e.shell.lastError="",yield t.apply(),yield v(n||2e3),e.shell.lastError)throw new Error(e.shell.lastError)}))),{skipReason:t.options.demoSkip});o.push(i)}if(t.hasTag("semTypeDetector")){const e=new d("Detectors",t.friendlyName,(()=>r(this,void 0,void 0,(function*(){const e=[];for(const n of s.clone().columns){const i=yield t.apply([n]);e.push(i||n.semType)}y(e.filter((t=>t)).length,1)}))),{skipReason:t.options.skipTest});c.push(e)}}h[t]=!0,i.length&&(n["Auto Tests"]={tests:i,clear:!0}),o.length&&(n.Demo={tests:o,clear:!0}),c.length&&(n.Detectors={tests:c,clear:!1})}))}(x.id);const m=[];console.log("Running tests"),null!=n||(n={}),null!==(u=(p=n).testContext)&&void 0!==u||(p.testContext=new f),e.shell.lastError="";const A=[];for(const[s,r]of Object.entries(a)){if((null==n?void 0:n.category)&&!s.toLowerCase().startsWith(null==n?void 0:n.category.toLowerCase())||(null==i?void 0:i.some((t=>s.startsWith(t)))))continue;console.log(`Started ${s} category`),A.push(s);const o=null===(g=r.tests)||void 0===g?void 0:g.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{r.before&&!o&&(yield r.before())}catch(t){r.beforeStatus=N(t)}const a=null!==(C=r.tests)&&void 0!==C?C:[],l=[];if(r.clear)for(let i=0;i<a.length;i++)l.push(yield E(a[i],null==n?void 0:n.test,r.timeout,x.name)),e.shell.closeAll(),t.Balloon.closeAll();else for(let t=0;t<a.length;t++)l.push(yield E(a[t],null==n?void 0:n.test,r.timeout,x.name));const h=(yield Promise.all(l)).filter((t=>"skipped"!=t.result));try{r.after&&!o&&(yield r.after())}catch(t){r.afterStatus=N(t)}r.afterStatus&&h.push({category:s,name:"init",result:r.afterStatus,success:!1,ms:0,skipped:!1}),r.beforeStatus&&h.push({category:s,name:"init",result:r.beforeStatus,success:!1,ms:0,skipped:!1}),m.push(...h)}if(n.testContext.catchUnhandled&&(yield v(1e3),e.shell.lastError.length>0&&m.push({category:"Unhandled exceptions",name:"exceptions",result:e.shell.lastError,success:!1,ms:0,skipped:!1})),!n.test&&m.length){const i=m.filter((t=>t.success)).length,s=m.filter((t=>t.skipped)).length,r=m.filter((t=>!t.success)),o=x.name;for(const t of A){const n=m.filter((e=>e.category===t)),i=n.filter((t=>!t.success)).length,s={success:0===i,passed:n.filter((t=>t.success)).length,skipped:n.filter((t=>t.skipped)).length,failed:i,type:"package",packageName:o,category:t};e.log.usage(`${o}: ${t}`,s,`category-package ${o}: ${t}`)}if(!n.category){const t={success:0===r.length,passed:i,skipped:s,failed:r.length,type:"package",packageName:o};e.log.usage(o,t,`package-package ${o}`)}if(n.testContext.report){const e=new t.Logger,n="Package @package tested: @successful successful, @skipped skipped, @failed failed tests",o={successful:i,skipped:s,failed:r.length,package:x};for(const t of r)Object.assign(o,{[`${t.category} | ${t.name}`]:t.result});e.log(n,o,"package-tested")}}return m}))}({category:n,test:i,testContext:o});return t.DataFrame.fromObjects(c)},new((g=void 0)||(g=Promise))((function(t,e){function n(t){try{s(C.next(t))}catch(t){e(t)}}function i(t){try{s(C.throw(t))}catch(t){e(t)}}function s(e){var s;e.done?t(e.value):(s=e.value,s instanceof g?s:new g((function(t){t(s)}))).then(n,i)}s((C=C.apply(c,u||[])).next())}));var c,u,g,C}})(),helm_test=i})();
|
|
1
|
+
var helm_test;(()=>{var t={8:function(t,e,n){var s;!function(e,i){var r={};!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,s,i,r){for(var o,a,l,h,c,u,g,f,d,p,m,C,y;r>=64;){for(o=n[0],a=n[1],l=n[2],h=n[3],c=n[4],u=n[5],g=n[6],f=n[7],p=0;p<16;p++)m=i+4*p,t[p]=(255&s[m])<<24|(255&s[m+1])<<16|(255&s[m+2])<<8|255&s[m+3];for(p=16;p<64;p++)C=((d=t[p-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,y=((d=t[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,t[p]=(C+t[p-7]|0)+(y+t[p-16]|0);for(p=0;p<64;p++)C=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&g)|0)+(f+(e[p]+t[p]|0)|0)|0,y=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&l^a&l)|0,f=g,g=u,u=c,c=h+C|0,h=l,l=a,a=o,o=C+y|0;n[0]+=o,n[1]+=a,n[2]+=l,n[3]+=h,n[4]+=c,n[5]+=u,n[6]+=g,n[7]+=f,i+=64,r-=64}return i}var s=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 s=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[s++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(s=n(this.temp,this.state,t,s,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[s++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,s=this.bufferLength,i=e/536870912|0,r=e<<3,o=e%64<56?64:128;this.buffer[s]=128;for(var a=s+1;a<o-8;a++)this.buffer[a]=0;this.buffer[o-8]=i>>>24&255,this.buffer[o-7]=i>>>16&255,this.buffer[o-6]=i>>>8&255,this.buffer[o-5]=i>>>0&255,this.buffer[o-4]=r>>>24&255,this.buffer[o-3]=r>>>16&255,this.buffer[o-2]=r>>>8&255,this.buffer[o-1]=r>>>0&255,n(this.temp,this.state,this.buffer,0,o),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=s;var i=function(){function t(t){this.inner=new s,this.outer=new s,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new s).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 r(t){var e=(new s).update(t),n=e.digest();return e.clean(),n}function o(t,e){var n=new i(t).update(e),s=n.digest();return n.clean(),s}function a(t,e,n,s){var i=s[0];if(0===i)throw new Error("hkdf: cannot expand more");e.reset(),i>1&&e.update(t),n&&e.update(n),e.update(s),e.finish(t),s[0]++}t.HMAC=i,t.hash=r,t.default=r,t.hmac=o;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,s){void 0===e&&(e=l),void 0===s&&(s=32);for(var r=new Uint8Array([1]),h=o(e,t),c=new i(h),u=new Uint8Array(c.digestLength),g=u.length,f=new Uint8Array(s),d=0;d<s;d++)g===u.length&&(a(u,c,n,r),g=0),f[d]=u[g++];return c.clean(),u.fill(0),r.fill(0),f},t.pbkdf2=function(t,e,n,s){for(var r=new i(t),o=r.digestLength,a=new Uint8Array(4),l=new Uint8Array(o),h=new Uint8Array(o),c=new Uint8Array(s),u=0;u*o<s;u++){var g=u+1;a[0]=g>>>24&255,a[1]=g>>>16&255,a[2]=g>>>8&255,a[3]=g>>>0&255,r.reset(),r.update(e),r.update(a),r.finish(h);for(var f=0;f<o;f++)l[f]=h[f];for(f=2;f<=n;f++){r.reset(),r.update(h).finish(h);for(var d=0;d<o;d++)l[d]^=h[d]}for(f=0;f<o&&u*o+f<s;f++)c[u*o+f]=l[f]}for(u=0;u<o;u++)l[u]=h[u]=0;for(u=0;u<4;u++)a[u]=0;return r.clean(),c}}(r);var o=r.default;for(var a in r)o[a]=r[a];"object"==typeof t.exports?t.exports=o:void 0===(s=function(){return o}.call(r,n,r,t))||(t.exports=s)}()}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var r=e[s]={exports:{}};return t[s].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},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 s={};(()=>{"use strict";n.r(s),n.d(s,{_package:()=>Xt,test:()=>Zt,tests:()=>g});const t=DG,e=grok;n(8);const i=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,,,,,,,,,,,,,,,,,,,,,');i.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r=function(t,e,n,s){return new(n||(n=Promise))((function(i,r){function o(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((s=s.apply(t,e||[])).next())}))};const o=3e4,a=108e5,l=console.log.bind(console),h=console.info.bind(console),c=console.warn.bind(console),u=console.error.bind(console),g={},f="Auto Tests",d="Demo",p="Detectors",m="Core",C={};let y;var x;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(x||(x={}));class A{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class T{constructor(t,e,n,s){var i;this.category=t,this.name=e,null!=s||(s={}),null!==(i=s.timeout)&&void 0!==i||(s.timeout=o),this.options=s,this.test=()=>r(this,void 0,void 0,(function*(){return new Promise(((t,e)=>r(this,void 0,void 0,(function*(){let s="";try{s=yield n()}catch(t){e(t)}t(s)}))))}))}}function E(t,e,n){null==g[y]&&(g[y]={}),null==g[y].tests&&(g[y].tests=[]),g[y].tests.push(new T(y,t,e,n))}function b(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function _(t,e,n=.001,s){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const i=Math.abs(t-e)<n;if(b(i,!0,`${null!=s?s:""} (tolerance = ${n})`),!i)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function N(t,e){for(const[n,s]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&s instanceof Array)O(e,s);else if(e instanceof Object&&s instanceof Object)N(e,s);else if(Number.isFinite(e)&&Number.isFinite(s))_(e,s);else if(e!=s)throw new Error(`Expected (${s}) for key '${n}', got (${e})`)}}function O(t,e){const n=t.length,s=e.length;if(n!=s)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${s}`);for(let s=0;s<n;s++)if(t[s]instanceof Array&&e[s]instanceof Array)O(t[s],e[s]);else if(t[s]instanceof Object&&e[s]instanceof Object)N(t[s],e[s]);else if(t[s]!=e[s])throw new Error(`Expected ${e[s]} at position ${s}, got ${t[s]}`)}function w(t,e,n){var s;y=t,e(),g[y]&&(g[y].clear=null===(s=null==n?void 0:n.clear)||void 0===s||s,g[y].timeout=null==n?void 0:n.timeout)}function I(t){null==g[y]&&(g[y]={}),g[y].before=t}function S(t){null==g[y]&&(g[y]={}),g[y].after=t}function M(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function L(e){return`${e.toString()}\n${e.stack?t.Logger.translateStackTrace(e.stack):""}`}function v(n,s,i,h,c,u){var g,f,d,p,m,C;return r(this,void 0,void 0,(function*(){let r;i.length=0;let y="package";const x=null!=s&&n.name.toLowerCase()!==s.toLowerCase(),A=(null===(g=n.options)||void 0===g?void 0:g.skipReason)||x,T=x?"skipped":null===(f=n.options)||void 0===f?void 0:f.skipReason;A||l(`Started ${n.category} ${n.name}`);const E=Date.now();try{if(A)r={success:!0,result:T,ms:0,skipped:!0};else{let e=(null===(d=n.options)||void 0===d?void 0:d.timeout)===o&&h?h:null===(p=n.options)||void 0===p?void 0:p.timeout;e=t.Test.isInBenchmark&&e===o?a:e,r={success:!0,result:null!==(m=yield P(n.test,e))&&void 0!==m?m:"OK",ms:0,skipped:!1}}}catch(t){r={success:!1,result:L(t),ms:0,skipped:!1}}if((null===(C=n.options)||void 0===C?void 0:C.isAggregated)&&r.result.constructor===t.DataFrame){const t=r.result.col("success");if(y="core",t&&(r.success=t.stats.sum===t.length),!u){const t=r.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),r.result=t}r.result=r.result.toCsv()}if(r.logs=i.join("\n"),r.ms=Date.now()-E,A||l(`Finished ${n.category} ${n.name} for ${r.ms} ms`),r.category=n.category,r.name=n.name,!x){let t={success:r.success,result:r.result,ms:r.ms,skipped:r.skipped,type:y,packageName:c,category:n.category,test:n.name,logs:r.logs};if(r.result.constructor==Object){const e=Object.keys(r.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:r.result[e]})),{});t=Object.assign(Object.assign({},t),e)}e.log.usage(`${c}: ${n.category}: ${n.name}`,t,`test-${y} ${c}: ${n.category}: ${n.name}`)}return r}))}function R(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function P(t,e){return r(this,void 0,void 0,(function*(){let n=null;const s=new Promise(((t,s)=>{n=setTimeout((()=>{s("EXECUTION TIMEOUT")}),e)}));try{return yield Promise.race([t(),s])}finally{n&&clearTimeout(n)}}))}function H(t){t=k(t,"$")[0];const e=[];if(!scil.Utils.isNullOrEmpty(t)){const n=k(t,"|");for(let s=0;s<n.length;++s){let i=(t=B(n[s]).str).indexOf("{");i=(t=t.substring(i+1)).indexOf("}");const r=k(t=t.substring(0,i),".");for(const t of r)if(t&&""!==t)if(t.startsWith("[")&&t.includes("]")){const n=D(t,1,"[","]"),s=t.substring(1,n);e.push(s);const i=t.substring(n+1);r.push(i)}else if(t.includes("[")&&t.endsWith("]")){const n=F(t,t.length-2,"[","]"),s=t.substring(n+1,t.length-1);e.push(s);const i=t.substring(0,n);r.push(i)}else if(t.includes("(")&&t.includes(")")){const e=t.substring(0,t.indexOf("(")),n=t.substring(t.lastIndexOf(")")+1),s=[e,t.substring(e.length+1,t.length-n.length-1),n];for(const t of s)r.push(t)}else e.push(t)}}return e}function D(t,e,n,s){let i=e,r=0;for(;i<t.length;){if(t[i]===n&&r++,t[i]===s){if(0===r)return i;r--}i++}return-1}function F(t,e,n,s){let i=e,r=0;for(;i>=0;){if(t[i]===s&&r++,t[i]===n){if(0===r)return i;r--}i--}return-1}function k(t,e){const n=[];let s="",i=0,r=0,o=0,a=0;for(let l=0;l<t.length;++l){let h=t.substring(l,l+1);if(h==e&&0==r&&0==i&&0==o&&0==a)n.push(s),s="";else{if(s+=h,a>0&&"\\"==h&&l+1<t.length){++l;const e=t.substring(l,l+1);s+=e,h+=e}'"'==h?l>0&&"\\"==t.substring(l-1,l)||(a=0==a?1:0):"["==h?++r:"]"==h?--r:"("==h?++i:")"==h?--i:"{"==h?++o:"}"==h&&--o}}return n.push(s),n}function B(t){const e=U(t,'"');if(null!=e.tag)return e;const n=U(t,"'");return{tag:e.tag,repeat:n.tag,str:n.str}}function U(t,e){let n=null;if(scil.Utils.endswith(t,e)){let s=t.length-1;for(;s>0&&(s=t.lastIndexOf(e,s-1),!(s<=0||"\\"!=t.substring(s-1,s))););s>0&&s<t.length-1&&(n=t.substring(s+1,t.length-1),t=t.substring(0,s))}return null!=n&&(n=function(t){return scil.Utils.isNullOrEmpty(t)?t:t.replace(/[\\]./g,(function(t){switch(t){case"\\r":return"\r";case"\\n":return"\n";case"\\t":return"\t";default:return t.substring(1)}}))}(n.replace(new RegExp("\\"+e,"g"),e))),{tag:n,str:t}}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]),w("Helm",(()=>{const t=[["L-hArg(Et,Et)","E","F","G","C","E"],["L-hArg(Et,Et)","L-hArg(Et,Et)","E","F","G"],["dhp","m1A","p","r","T","p","r","T","p","r","G","p"],["r","mo6pur","p","r","T","p","r","T","p","r","G","p"],["afhna","mo6pur","36SS","r","T","p"]],e=["comples-monomer","complex-monomer+side-chain","complex-monomer+side-chain-RNA","complex-side-chain","complex+side-chain+linker"];E("parseHelm",(async()=>{const t=[["meI","hHis","Aca","N","T","dK","Thr_PO3H2","D-Tyr_Et","Aze","dV","E","Phe_4Me"],["A","C","T","G","W","E","Q"],["R","U","P","T","A"],["A","*","G","C"]],e=["PEPTIDE1{meI.hHis.Aca.N.T.dK.Thr_PO3H2.Aca.D-Tyr_Et.Aze.dV.E.N.dV.Phe_4Me}$$$","PEPTIDE1{A.C.T.G.C.T.W.G.T.W.E.C.W.C.Q.W}|PEPTIDE2{A.C.T.G.C.T.W.G.T.W.E.Q}$PEPTIDE1,PEPTIDE1,5:R3-14:R3|PEPTIDE2,PEPTIDE1,2:R3-12:R3$$$","RNA1{R(U)P.R(T)P}|RNA2{P.R(A)P.R(A)}$RNA1,RNA2,2:pair-6:pair|RNA1,RNA2,5:pair-3:pair$$$","PEPTIDE1{A.*.G.C}$$$$V2.0"];for(let n=0;n<e.length;++n){const s=new Set(H(e[n])),i=Array.from(s);b(JSON.stringify(i),JSON.stringify(t[n]))}})),["PEPTIDE1{[L-hArg(Et,Et)].E.F.G}|PEPTIDE2{C.E}$PEPTIDE1,PEPTIDE2,2:R3-1:R1$$$V2.0","PEPTIDE1{[L-hArg(Et,Et)]([L-hArg(Et,Et)]).E.F.G}$$$$","RNA1{[dhp]([m1A])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{r([mo6pur])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{[afhna]([mo6pur])[36SS].r(T)p}$$$$V2.0"].forEach(((n,s)=>{E(e[s],(async()=>{const e=H(n);e.sort();const i=t[s];i.sort(),O(e,i)}))}))}));const G=new RegExp("[rd]\\((\\w)\\)p?","g"),V=wu;var W,Y,j=n.n(V);class K{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}class z extends K{constructor(t,e,n){super(t.name,t.alphabet,t.cutoff),this.freq=e,this.similarity=n}}(Y=W||(W={})).FASTA="fasta",Y.SEPARATOR="separator",Y.HELM="helm";const Q=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,q=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}},J=[new K("PT",q.fasta.peptide,.5),new K("DNA",q.fasta.dna,.55),new K("RNA",q.fasta.rna,.55)];class X extends Float32Array{}function Z(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*t[n];return Math.sqrt(e)}class tt{static makePalette(t,e=!1,n=tt){const s={};return t.forEach((t=>{const n=t[0],i=t[1];n.forEach(((t,n)=>{s[t]=this.colourPalette[i][e?0:n]}))})),new n(s)}constructor(t){this._palette=t}get(t){return this._palette[t]}}tt.undefinedColor="rgb(100,100,100)",tt.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]};class et extends tt{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,et)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,et)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new et({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(t){const e=t in et.aaSynonyms?et.aaSynonyms[t]:t;return super.get(e)}}et.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class nt{static getPalette(t="grok"){switch(t){case"grok":return et.GrokGroups;case"lesk":return et.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",s="";for(const i of t)"("==i?e++:")"==i?e--:e?n+=i:s+=i;return isNaN(parseInt(n))?[s,n]:[s,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[s,i]=this.getInnerOuter(t);if(s=s.length>6?`${s.slice(0,3)}...`:s,i=i.length>6?`${i.slice(0,3)}...`:i,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,i,1]:[this.undefinedColor,s,i,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,i,2]:[this.undefinedColor,s,i,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,i,3]:[this.undefinedColor,s,i,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,i,4]:[this.undefinedColor,s,i,4]}return[this.undefinedColor,s,i,0]}}nt.SemType="Aminoacids",nt.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",nt.undefinedColor="rgb(100,100,100)",nt.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},nt.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},nt.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},nt.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"};class st{}st.SemType="Nucleotides",st.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",st.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};class it{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}class rt{}class ot extends rt{static buildPalette(){return[].concat(...Object.values(tt.colourPalette))}get(e){const n=it.hashCode(e)%ot.palette.length;return function(e){if(null==e)return"rgb(100,100,100)";const n=t.Color.fromHtml(e),s=t.Color.g(n),i=t.Color.r(n),r=t.Color.b(n),o=Math.sqrt(Math.pow(0-i,2)+Math.pow(0-s,2)+Math.pow(0-r,2));return o>210?`rgb(${i/o*210},${s/o*210},${r/o*210})`:t.Color.toRgb(n)}(ot.palette[n])}}function at(t){return j()(t.toString().matchAll(Q)).map((t=>t[2]??t[1])).toArray()}function lt(t){return t||[]}function ht(t,e=void 0){return n=>n?n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e):[]}ot.palette=ot.buildPalette();const ct=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,ut=/\[([^\[\]]+)]/g;function gt(t){ct.lastIndex=0;const e=ct.exec(t.toString()),n=e?e[2]:null;return(n?n.split("."):[]).map((t=>{ut.lastIndex=0;const e=ut.exec(t);return e&&e.length>=2?e[1]:t}))}function ft(t,e,n="-"){const s=e.map((e=>{const s=function(t,e,n="-"){const s=new Set([...new Set(Object.keys(t)),...e]);s.delete(n);const i=[],r=[];for(const n of s)i.push(n in t?t[n]:0),r.push(e.has(n)?1:0);const o=new X(i),a=new X(r);return function(t,e){if(t.length!=e.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s];return n}(o,a)/(Z(o)*Z(a))}(t,e.alphabet,n);return new z(e,t,s)}));let i;const r=Math.max(...s.map((t=>t.similarity>t.cutoff?t.similarity:-1)));return i=r>0?s.find((t=>t.similarity===r)).name:"UN",i}function dt(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,s=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,i=new Float32Array((n.length+s)*(n.length+s));return Object.entries(e).forEach((([t,s])=>{const r=n[s];Object.entries(e).forEach((([e,s])=>{i[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=r[s]}))})),(t,e)=>i[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,s)=>{let i=0;const r=t.length,o=s.length,a=Math.max(r,o)*(1-n);r!==o&&(i=Math.abs(r-o));let l=0;for(let n=0;n<Math.min(r,o);n++)if(t[n]!==s[n]&&(l+=e(t[n],s[n]),l>a))return 1;return l+=i,l/=Math.max(r,o),l}}const pt=new Uint32Array(65536),mt={gapOpen:8,gapExtend:2,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 Ct;!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(Ct||(Ct={}));const yt={[Ct.HAMMING]:dt,[Ct.LEVENSHTEIN]:function(){return(t,e)=>((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,s=e.length,i=1<<n-1;let r=-1,o=0,a=n,l=n;for(;l--;)pt[t.charCodeAt(l)]|=1<<l;for(l=0;l<s;l++){let t=pt[e.charCodeAt(l)];const n=t|o;t|=(t&r)+r^r,o|=~(t|r),r&=t,o&i&&a++,r&i&&a--,o=o<<1|1,r=r<<1|~(n|o),o&=n}for(l=n;l--;)pt[t.charCodeAt(l)]=0;return a})(t,e):((t,e)=>{const n=e.length,s=t.length,i=[],r=[],o=Math.ceil(n/32),a=Math.ceil(s/32);for(let t=0;t<o;t++)r[t]=-1,i[t]=0;let l=0;for(;l<a-1;l++){let o=0,a=-1;const h=32*l,c=Math.min(32,s)+h;for(let e=h;e<c;e++)pt[t.charCodeAt(e)]|=1<<e;for(let t=0;t<n;t++){const n=pt[e.charCodeAt(t)],s=r[t/32|0]>>>t&1,l=i[t/32|0]>>>t&1,h=n|o,c=((n|l)&a)+a^a|n|l;let u=o|~(c|a),g=a&c;u>>>31^s&&(r[t/32|0]^=1<<t),g>>>31^l&&(i[t/32|0]^=1<<t),u=u<<1|s,g=g<<1|l,a=g|~(h|u),o=u&h}for(let e=h;e<c;e++)pt[t.charCodeAt(e)]=0}let h=0,c=-1;const u=32*l,g=Math.min(32,s-u)+u;for(let e=u;e<g;e++)pt[t.charCodeAt(e)]|=1<<e;let f=s;for(let t=0;t<n;t++){const n=pt[e.charCodeAt(t)],o=r[t/32|0]>>>t&1,a=i[t/32|0]>>>t&1,l=n|h,u=((n|a)&c)+c^c|n|a;let g=h|~(u|c),d=c&u;f+=g>>>s-1&1,f-=d>>>s-1&1,g>>>31^o&&(r[t/32|0]^=1<<t),d>>>31^a&&(i[t/32|0]^=1<<t),g=g<<1|o,d=d<<1|a,c=d|~(l|g),h=g&l}for(let e=u;e<g;e++)pt[t.charCodeAt(e)]=0;return f})(t,e)})(t,e)/Math.max(t.length,e.length)},[Ct.NEEDLEMANN_WUNSCH]:function(t){return(e,n)=>{const{gapOpen:s,gapExtend:i,scoringMatrix:r,alphabetIndexes:o}={...mt,...t},a=[new Array(e.length+1).fill(0),new Array(e.length+1).fill(0)],l=new Array(e.length+1).fill(!1),h=new Array(e.length+1).fill(!1);let c=0,u=1;for(let t=1;t<e.length+1;t++)a[0][t]=-s-(t-1)*i;for(let t=1;t<n.length+1;t++){a[u][0]=-s-(t-1)*i;for(let g=1;g<e.length+1;g++){const f=a[c][g-1]+r[o[e[g-1]]][o[n[t-1]]],d=a[c][g]-(l[g]?i:s),p=a[u][g-1]-(h[g-1]?i:s);a[u][g]=Math.max(f,p,d),a[u][g]===f?(l[g]=!1,h[g]=!1):a[u][g]===p?(l[g]=!1,h[g]=!0):(l[g]=!0,h[g]=!1)}c=u,u=(u+1)%2}const g=e.split("").map((t=>r[o[t]][o[t]])).reduce(((t,e)=>t+e),0),f=n.split("").map((t=>r[o[t]][o[t]])).reduce(((t,e)=>t+e),0),d=Math.max(g,f);return(d-a[c][e.length])/d}},[Ct.MONOMER_CHEMICAL_DISTANCE]:dt},xt=new class{constructor(){this.uh=`units-handler.${t.SEMTYPE.MACROMOLECULE}`}},At={[W.FASTA]:"-",[W.SEPARATOR]:"",[W.HELM]:"*"};class Tt{static setUnitsToFastaColumn(e){if(e.column.semType!==t.SEMTYPE.MACROMOLECULE||e.column.getTag(t.TAGS.UNITS)!==W.FASTA)throw new Error(`The column of notation '${W.FASTA}' must be '${t.SEMTYPE.MACROMOLECULE}'.`);e.column.setTag(t.TAGS.UNITS,W.FASTA),Tt.setTags(e)}static setUnitsToSeparatorColumn(e,n){if(e.column.semType!==t.SEMTYPE.MACROMOLECULE||e.column.getTag(t.TAGS.UNITS)!==W.SEPARATOR)throw new Error(`The column of notation '${W.SEPARATOR}' must be '${t.SEMTYPE.MACROMOLECULE}'.`);if(!n)throw new Error(`The column of notation '${W.SEPARATOR}' must have the separator tag.`);e.column.setTag(t.TAGS.UNITS,W.SEPARATOR),e.column.setTag("separator",n),Tt.setTags(e)}static setUnitsToHelmColumn(e){if(e.column.semType!==t.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${W.HELM}' must be '${t.SEMTYPE.MACROMOLECULE}'`);e.column.setTag(t.TAGS.UNITS,W.HELM),Tt.setTags(e)}static setTags(e){const n=e.column.getTag(t.TAGS.UNITS),s=e.stats;if(Object.keys(s.freq).some((t=>t.length>1)),[W.FASTA,W.SEPARATOR].includes(n)){if(!e.column.getTag("alphabet")&&0===Object.keys(s.freq).length)throw new Error("Alphabet is empty and not annotated.");let t=e.column.getTag("aligned");null===t&&(t=s.sameLength?"SEQ.MSA":"SEQ",e.column.setTag("aligned",t));let n=e.column.getTag("alphabet");if(null===n&&(n=ft(s.freq,J),e.column.setTag("alphabet",n)),"UN"===n){const t=Object.keys(s.freq).length,n=Object.keys(s.freq).some((t=>t.length>1));e.column.setTag(".alphabetSize",t.toString()),e.column.setTag(".alphabetIsMultichar",n?"true":"false")}}}get column(){return this._column}get units(){return this._units}get notation(){return this._notation}get defaultGapSymbol(){return this._defaultGapSymbol}get separator(){const t=this.column.getTag("separator")??void 0;if(this.notation===W.SEPARATOR&&void 0===t)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return t}get aligned(){const t=this.column.getTag("aligned");if(!t&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return t}get alphabet(){const t=this.column.getTag("alphabet");if(!t&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return t}get helmCompatible(){return this.column.getTag(".isHelmCompatible")}getAlphabetSize(){if(this.notation==W.HELM||"UN"==this.alphabet){const t=this.column.getTag(".alphabetSize");let e;if(t)e=parseInt(t);else{const t=this.stats;e=Object.keys(t.freq).length}return e}switch(this.alphabet){case"PT":return 20;case"DNA":case"RNA":return 4;case"NT":return console.warn("Unexpected alphabet 'NT'."),4;default:throw new Error(`Unexpected alphabet '${this.alphabet}'.`)}}getAlphabetIsMultichar(){return this.notation===W.HELM||"UN"===this.alphabet&&"true"===this.column.getTag(".alphabetIsMultichar")}get splitted(){if(null===this._splitted){const t=this.getSplitter(),e=this._column.length;this._splitted=new Array(e);const n=this._column.getRawData(),s=this._column.categories;for(let i=0;i<e;i++){const e=s[n[i]];this._splitted[i]=t(e)}}return this._splitted}get stats(){if(null===this._stats){const t={};let e=!0,n=null;for(const s of this.splitted){null==n?n=s.length:s.length!==n&&(e=!1);for(const e of s)e in t||(t[e]=0),t[e]+=1}this._stats={freq:t,sameLength:e}}return this._stats}get maxLength(){return null===this._maxLength&&(this._maxLength=0===this.splitted.length?0:Math.max(...this.splitted.map((t=>t.length)))),this._maxLength}get posList(){if(null===this._posList){const t=this.column.getTag(".positionNames");this._posList=t?t.split(", ").map((t=>t.trim())):j().count(1).take(this.maxLength).map((t=>t.toString())).toArray()}return this._posList}isFasta(){return this.notation===W.FASTA}isSeparator(){return this.notation===W.SEPARATOR}isHelm(){return this.notation===W.HELM}isRna(){return"RNA"===this.alphabet}isDna(){return"DNA"===this.alphabet}isPeptide(){return"PT"===this.alphabet}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(t){return!t||this.units===W.FASTA&&t===At[W.FASTA]||this.units===W.HELM&&t===At[W.HELM]}getNotation(){if(this.units.toLowerCase().startsWith(W.FASTA))return W.FASTA;if(this.units.toLowerCase().startsWith(W.SEPARATOR))return W.SEPARATOR;if(this.units.toLowerCase().startsWith(W.HELM))return W.HELM;throw new Error(`Column '${this.column.name}' has unexpected notation '${this.units}'.`)}getHelmWrappers(){return[this.isDna()||this.isRna()||this.isHelmCompatible()?"RNA1{":"PEPTIDE1{",this.isDna()?"d(":this.isRna()?"r(":"",this.isDna()||this.isRna()?")p":"","}$$$$"]}getNewColumn(e,n,s,i){const r=this.column,o=e.toLowerCase()+"("+r.name+")",a=s??r.dataFrame.columns.getUnusedName(o),l=t.Column.fromList("string",a,i??new Array(this.column.length).fill(""));if(l.semType=t.SEMTYPE.MACROMOLECULE,l.setTag(t.TAGS.UNITS,e),e===W.SEPARATOR){if(!n)throw new Error(`Notation '${W.SEPARATOR}' requires separator value.`);l.setTag("separator",n)}l.setTag(t.TAGS.CELL_RENDERER,"Macromolecule");const h=r.getTag("aligned");h&&l.setTag("aligned",h);const c=r.getTag("alphabet");null!=c&&l.setTag("alphabet",c);let u=r.getTag(".alphabetSize");null!=c&&u&&l.setTag(".alphabetSize",u);const g=r.getTag(".alphabetIsMultichar");return null!=c&&void 0!==g&&l.setTag(".alphabetIsMultichar",g),e==W.HELM&&(u=this.getAlphabetSize().toString(),l.setTag(".alphabetSize",u)),l}getNewColumnFromList(t,e){return this.getNewColumn(this.notation,this.separator,t,e)}static getNewColumn(t){const e=Tt.getOrCreate(t),n=e.notation;return e.getNewColumn(n)}static unitsStringIsValid(t){return t=t.toLowerCase(),[W.FASTA,W.SEPARATOR,W.HELM].some((e=>t.startsWith(e.toLowerCase())))}static getNewColumnFromParams(e,n,s){if(!Tt.unitsStringIsValid(s))throw new Error("Invalid format of 'units' parameter");const i=t.Column.fromList("string",n,new Array(e).fill(""));return i.semType=t.SEMTYPE.MACROMOLECULE,i.setTag(t.TAGS.UNITS,s),i}getSplitter(t){if(this.units.toLowerCase().startsWith(W.FASTA))return null===this.column.getTag("alphabet")||this.getAlphabetIsMultichar()?at:lt;if(this.units.toLowerCase().startsWith(W.SEPARATOR))return ht(this.separator,t);if(this.units.toLowerCase().startsWith(W.HELM))return gt;throw new Error(`Unexpected units ${this.units} .`)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");return this.isMsa()?Ct.HAMMING:(this.alphabet,Ct.LEVENSHTEIN)}getDistanceFunction(){return yt[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(".isHelmCompatible"))return"true"===this.column.getTag(".isHelmCompatible");const t=(await Rt()).getBioLib().getMonomerSymbolsByType("PEPTIDE".toString()),e=new Set(t),n=ht(this.separator);for(const t of this.column.categories){const s=n(t);for(const t of s)if(!e.has(t))return this.column.setTag(".isHelmCompatible","false"),!1}return this.column.setTag(".isHelmCompatible","true"),!0}get splitter(){var t;return null===this._splitter&&(this._splitter=(t=this.column,Tt.getOrCreate(t).getSplitter())),this._splitter}toFasta(t){return t===W.FASTA}toSeparator(t){return t===W.SEPARATOR}toHelm(t){return t===W.HELM}convertHelmToFastaSeparator(t,e,n,s){s||(s=this.toFasta(e)?At[W.FASTA]:At[W.SEPARATOR]),n||(n=this.toFasta(e)?"":this.separator);const i=t.startsWith("RNA"),r=this.splitter(t),o=[];for(let t=0;t<r.length;t++){let n=r[t];if(i&&(n=n.replace(G,"")),n===At[W.HELM])o.push(s);else if(this.toFasta(e)&&n.length>1){const t="["+n+"]";o.push(t)}else o.push(n)}return o.join(n)}convert(t,e){const n=this.getConverter(t,e),s=this.getNewColumn(t,e);return s.init((t=>{const e=this.column.get(t);return e?n(e):e})),s}getRegion(t,e,n){const s=this.getNewColumn(this.notation,this.separator);s.name=n,Math.max(...this.splitted.map((t=>t.length)));const i=t??0,r=e??this.maxLength-1,o=this.getJoiner(),a=r-i+1;s.init((t=>{const e=this.splitted[t],n=new Array(a);for(let t=0;t<a;++t){const s=i+t;n[t]=s<e.length?e[s]:At[this.notation]}return o(n)}));const l=t=>{const e=t.split(",").map((t=>t.trim())),n=new Array(a);for(let t=0;t<a;++t){const s=i+t;n[t]=s<e.length?e[s]:"?"}return n.join(", ")},h=this.column.getTag(".positionNames");h&&s.setTag(".positionNames",l(h));const c=this.column.getTag(".positionLabels");return c&&s.setTag(".positionLabels",l(c)),s}getJoiner(){if(void 0===this._joiner){const t=this;if(this.notation===W.FASTA)this._joiner=function(e){return Et(t,e)};else if(this.notation===W.SEPARATOR)this._joiner=function(e){return bt(t,e,t.separator)};else{if(this.notation!==W.HELM)throw new Error;{const e="DNA"===t.alphabet||"RNA"===t.alphabet;this._joiner=function(n){return _t(t,n,e)}}}}return this._joiner}getConverter(t,e=void 0){if(t===W.SEPARATOR&&!e)throw new Error(`Target separator is not specified for target units '${W.SEPARATOR}'.`);const n=this;if(t===W.FASTA)return function(t){return function(t,e){const n=t.isHelm()?Nt(t,e):t.getSplitter()(e);return Et(t,n)}(n,t)};if(t===W.HELM)return function(t){return function(t,e){const n=e.startsWith("DNA")||e.startsWith("RNA"),s=t.getSplitter()(e);return _t(t,s,n)}(n,t)};if(t===W.SEPARATOR)return function(t){return function(t,e,n){const s=t.isHelm()?Nt(t,e):t.getSplitter()(e);return bt(t,s,n)}(n,t,e)};throw new Error}constructor(e){if(this._splitter=null,this._splitted=null,this._stats=null,this._maxLength=null,this._posList=null,this._joiner=void 0,e.type!==t.TYPE.STRING)throw new Error(`Unexpected column type '${e.type}', must be '${t.TYPE.STRING}'.`);this._column=e;const n=this._column.getTag(t.TAGS.UNITS);if(null==n)throw new Error("Units are not specified in column");if(this._units=n,this._notation=this.getNotation(),this._defaultGapSymbol=this.isFasta()?At[W.FASTA]:this.isHelm()?At[W.HELM]:At[W.SEPARATOR],!this.column.tags.has("aligned")||!this.column.tags.has("alphabet")||!this.column.tags.has(".alphabetIsMultichar")&&!this.isHelm()&&"UN"===this.alphabet)if(this.isFasta())Tt.setUnitsToFastaColumn(this);else if(this.isSeparator()){const t=e.getTag("separator");Tt.setUnitsToSeparatorColumn(this,t)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.getTag(t.TAGS.UNITS)}'.`);Tt.setUnitsToHelmColumn(this)}if(!this.column.tags.has(".alphabetIsMultichar"))if(this.isHelm())this.column.setTag(".alphabetIsMultichar","true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '.alphabetIsMultichar' is mandatory.`)}static getOrCreate(t){let e=t.temp[xt.uh];return e||(e=t.temp[xt.uh]=new Tt(t)),e}}function Et(t,e){const n=new Array(e.length);for(const[s,i]of j().enumerate(e)){let r=s;t.isHelm()&&(r=s.replace(G,"$1")),t.isGap(r)?r=At[W.FASTA]:r.length>1&&(r="["+e[i]+"]"),n[i]=r}return n.join("")}function bt(t,e,n){const s=new Array(e.length);for(const[n,i]of j().enumerate(e)){let e=n;t.isGap(e)&&(e=At[W.SEPARATOR]),s[i]=e}return s.map((t=>t??"")).join(n)}function _t(t,e,n){const[s,i,r,o]=t.getHelmWrappers();return`${s}${j()(e).map((e=>{let s=e;return s=t.isGap(s)?At[W.HELM]:n?s.replace(G,"$1"):1==e.length?`${i}${e}${r}`:`${i}[${e}]${r}`,s})).toArray().join(".")}${o}`}function Nt(t,e){const n=t.getSplitter()(e),s=new Array(n.length),i=e.startsWith("DNA"),r=e.startsWith("RNA");for(const[t,e]of j().enumerate(n)){let n=t;(i||r)&&(n=n.replace(G,"$1"),n="p"===n?null:n),s[e]=n}return s.filter((t=>null!==t))}class Ot{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,s=Ot._createBuffer(n);if(e)for(let t=0;t<s.length;t++)s[t]=-1;this._data=s,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,s){if(t<e||t>n)throw new Error(`Argument ${s} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let s=0;s<n;s++)e[s]=t[s]}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 Ot(t._length);n._length=t._length,n._data=Ot._createBuffer(n._length),n._version=0;const s=t.lengthInInts;for(let i=0;i<s;i++)n._data[i]=t._data[i]&e._data[i];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new Ot(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 Ot(t);for(let s=0;s<t;++s)n.setBit(s,e(s));return n._version=0,n}static fromString(t){return Ot.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new Ot(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new Ot(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let s=0,i=0;for(;e-i>=4;)n._data[s++]=255&t[i]|(255&t[i+1])<<8|(255&t[i+2])<<16|(255&t[i+3])<<24,i+=4;return e-i==3&&(n._data[s]=(255&t[i+2])<<16),e-i==2&&(n._data[s]|=(255&t[i+1])<<8),e-i==1&&(n._data[s]|=255&t[i]),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 Ot(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,s=this.lengthInInts;for(let t=0;t<s;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,s=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(s)}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,s=!0,i=!0){if(n&&i&&this.setAll(!e,!1),i)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(s)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return Ot.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return n}setRange(t,e,n,s=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const i=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=i;t<=r;t++)this.setTrue(t);else for(let t=i;t<=r;t++)this.setFalse(t);return this.incrementVersion(s),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 s=this._length;this.setLength(this._length+e);for(let n=s-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let s=t;s<t+e;s++)this.setBit(s,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 s=-1;-1!=(s=t.findNext(s,!e));)this.setFast(n++,this.getBit(s));this._length=n,this._version++}return this}getBit(t){return 0!=(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+=Ot._onBitCount[255&t];let n=this._data[e];const s=31&this._length;for(0!=s&&(n&=~(4294967295<<s));0!=n;n>>>=8)this._selectedCount+=Ot._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 s=this.lengthInInts;let i=0;for(;i<s-1;i++)for(let e=this._data[i]&t._data[i];0!=e;e>>>=8)n+=Ot._onBitCount[255&e];let r=this._data[i]&t._data[i];const o=31&this._length;for(0!=o&&(r&=~(4294967295<<o));0!=r;r>>>=8)n+=Ot._onBitCount[255&r];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 s=this.lengthInInts;for(let i=Math.floor(t/32);i<s;i++){let s=e?this._data[i]:~this._data[i];if(0!=n)s&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==s)continue;for(let e=0;0!=s;e+=8,s>>>=8){const n=Ot._firstOnBit[255&s];if(n>=0)return(t=n+32*i+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 s=Math.floor(t/32);s>=0;s--){let t=e?this._data[s]:~this._data[s];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=Ot._lastOnBit[t>>>24];if(n>=0)return n+32*s+e}}return-1}}var wt,It,St,Mt,Lt,vt;async function Rt(){const e=t.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===e.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await e[0].prepare().call()).getOutputParamValue()}Ot._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]),Ot._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]),Ot._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]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan"}(wt||(wt={})),function(t){t.Euclidean="Euclidean"}(It||(It={})),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"}(St||(St={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(Mt||(Mt={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray"}(Lt||(Lt={})),function(t){t.NumericDistance="NumericDistance"}(vt||(vt={})),St.Tanimoto,St.Dice,St.Asymmetric,St.BraunBlanquet,St.Cosine,St.Kulczynski,St.McConnaughey,St.RogotGoldberg,St.Russel,St.Sokal,St.Hamming,St.Euclidean,St.Tanimoto,St.Dice,St.Asymmetric,St.BraunBlanquet,St.Cosine,St.Kulczynski,St.McConnaughey,St.RogotGoldberg,St.Russel,St.Sokal,St.Hamming,St.Euclidean,St.Tanimoto,St.Dice,St.Cosine,St.Tanimoto,St.Asymmetric,St.Cosine,St.Sokal,Ct.HAMMING,Ct.LEVENSHTEIN,Ct.MONOMER_CHEMICAL_DISTANCE;const Pt="Libraries",Ht={explicit:["HELMCoreLibrary.json"],exclude:[]};let Dt=Promise.resolve();async function Ft(){let t;return Dt=Dt.then((async()=>{const n=await e.dapi.userDataStorage.getValue(Pt,"Settings",!0);t=n?JSON.parse(n):{exclude:[],explicit:[]},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await Dt,t}async function $t(t){Dt=Dt.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await e.dapi.userDataStorage.postValue(Pt,"Settings",JSON.stringify(t),!0)})),await Dt}async function kt(){await $t(Ht)}w("findMonomers",(()=>{let t,e;I((async()=>{t=await Rt(),e=await Ft(),await kt(),await t.loadLibraries(!0)})),S((async()=>{await $t(e),await t.loadLibraries(!0)}));const n={withoutMissed:{test:"PEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set},withMissed:{test:"PEPTIDE1{meI.missed2.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set(["missed2"])}};for(const[t,e]of Object.entries(n))E(t,(async()=>{s(e.test,e.tgt)}));function s(t,e){N(function(t){const e=Object.keys(org.helm.webeditor.monomerTypeList()),n=[],s=[];for(let t=0;t<e.length;t++)n.push(new scil.helm.Monomers.getMonomerSet(e[t])),Object.keys(n[t]).forEach((e=>{s.push(n[t][e].id)}));return new Set(t.filter((t=>!s.includes(t))))}(H(t)),e)}}));const Bt=$;var Ut,Gt=n.n(Bt);w("renderers",(()=>{E("missedInLib",(async()=>{await async function(){const n=await e.dapi.files.readCsv("System:AppData/Helm/tests/sample_HELM-missedInLib.csv"),s=n.getCol("HELM"),i=e.shell.addTableView(n);await function(t,e="Timeout exceeded",n=500,s=50){return r(this,void 0,void 0,(function*(){return new Promise(((i,r)=>{setTimeout((()=>{clearInterval(o),r(new Error(e))}),n);const o=setInterval((()=>{t()&&(clearInterval(o),i())}),s)}))}))}((()=>Gt()(i.root).find(".d4-grid canvas").length>0),"Table view canvas not found",100),b(s.semType,t.SEMTYPE.MACROMOLECULE),b(s.getTag(t.TAGS.UNITS),W.HELM),b(s.getTag(t.TAGS.CELL_RENDERER),"helm");const o=s.getTag(".cell-renderer.render.error");if(o){const t=JSON.parse(o),e=new Error(t.message);throw e.stack=t.stack,e}}()}))}));class Vt{constructor(t){this.init(t)}init(t){this.fileContent=t.replace(/\r/g,""),this._atomCount=void 0,this._atomTypes=void 0,this._bondCount=void 0,this._bondTypes=void 0,this.xyzAtomCoordinates=void 0,this._pairsOfBondedAtoms=void 0}get atomCount(){return void 0===this._atomCount&&this.setAtomAndBondCounts(),this._atomCount}get bondCount(){return void 0===this._bondCount&&this.setAtomAndBondCounts(),this._bondCount}get x(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.x}get y(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.y}get z(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.z}get atomTypes(){var t;return null!==(t=this._atomTypes)&&void 0!==t||(this._atomTypes=this.parseAtomTypes()),this._atomTypes}get pairsOfBondedAtoms(){var t;return null!==(t=this._pairsOfBondedAtoms)&&void 0!==t||(this._pairsOfBondedAtoms=this.parseBondedAtomPairs()),this._pairsOfBondedAtoms}get bondTypes(){var t;return null!==(t=this._bondTypes)&&void 0!==t||(this._bondTypes=this.parseBondTypes()),this._bondTypes}setAtomAndBondCounts(){const{atomCount:t,bondCount:e}=this.parseAtomAndBondCounts();this._atomCount=t,this._bondCount=e}getNextColumnIdx(t){for(;!this.isWhitespace(t);)++t;for(;this.isWhitespace(t);)++t;return t}shiftIdxToSpecifiedColumn(t,e){let n=t;const s=this.isWhitespace(n)?e:e-1;for(let t=0;t<s;t++)n=this.getNextColumnIdx(n);return n}parseAtomTypes(){const t=this.atomCount,e=new Array(t);let n=this.getAtomBlockIdx();for(let s=0;s<t;s++)n=this.shiftIdxToAtomType(n),e[s]=this.parseAtomType(n),n=this.getNextLineIdx(n);return e}parseAtomCoordinates(){const t=new Float32Array(this.atomCount),e=new Float32Array(this.atomCount),n=new Float32Array(this.atomCount);let s=this.getAtomBlockIdx();for(let i=0;i<this.atomCount;i++){s=this.shiftIdxToXColumn(s);for(const r of[t,e,n])r[i]=this.parseFloatValue(s),s=this.getNextColumnIdx(s);s=this.getNextLineIdx(s)}return{x:t,y:e,z:n}}parseBondedAtomPairs(){const t=new Array(this.bondCount);let e=this.getBondBlockIdx();for(let n=0;n<this.bondCount;n++){e=this.shiftIdxToBondedAtomsPair(e);const s=new Uint16Array(2);s[0]=this.parseIntValue(e),e=this.getNextColumnIdx(e),s[1]=this.parseIntValue(e),t[n]=s,e=this.getNextLineIdx(e)}return t}parseBondTypes(){const t=this.bondCount,e=new Uint16Array(t);let n=this.getBondBlockIdx();for(let s=0;s<t;s++)n=this.shiftIdxToBondType(n),e[s]=this.parseIntValue(n),n=this.getNextLineIdx(n);return e}isWhitespace(t){const e=this.fileContent[t];return" "===e||"\t"===e}getNextLineIdx(t){return"\n"!==this.fileContent[t]?this.fileContent.indexOf("\n",t)+1:t+1}parseFloatValue(t){return this.parseNumericValue(parseFloat,t)}parseIntValue(t){return this.parseNumericValue(parseInt,t)}parseNumericValue(t,e){let n=e+1;for(;!this.isWhitespace(n);)++n;return t(this.fileContent.substring(e,n))}}class Wt extends Vt{constructor(t){super(t),this.init(t)}init(t){super.init(t)}parseAtomType(t){let e=t,n=e;return this.isQuote(e)?(n=this.getNextIdenticalChar(e),e++):n=this.fileContent.indexOf(" ",n),this.fileContent.substring(e,n)}isQuote(t){const e=this.fileContent[t].charCodeAt(0);return 39===e||34===e}getNextIdenticalChar(t){const e=this.fileContent[t];return e?this.fileContent.indexOf(e,t+1):-1}isQuery(){return this.isQueryOrFragment(((t,e)=>{return 39===t||34===t||76===t&&!((n=this.fileContent.charCodeAt(e+1))>64&&n<91||n>96&&n<123);var n}))}isFragment(){return this.isQueryOrFragment((t=>82===t||42===t))}isQueryOrFragment(t){const e=this.atomCount;let n=this.getAtomBlockIdx();for(let s=0;s<e;s++){if(n=this.shiftIdxToAtomType(n),t(this.fileContent.charCodeAt(n),n))return!0;n=this.getNextLineIdx(n)}return!1}}!function(t){t.HEADER="V2000",t[t.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",t[t.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",t[t.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",t[t.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",t[t.BOND_TYPE_COL=3]="BOND_TYPE_COL",t[t.RGP_SHIFT=8]="RGP_SHIFT",t.RGP_LINE="M RGP",t.A_LINE="A ",t.END="M END"}(Ut||(Ut={}));class Yt extends Wt{constructor(t){super(t)}static validate(t){return-1!==t.indexOf(Ut.HEADER)&&-1!==t.indexOf(Ut.END)}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,Ut.ATOM_TYPE_COL)}getCountsLineIdx(){let t=0;for(let e=0;e<Ut.NUM_OF_HEADER_LINES;++e)t=this.getNextLineIdx(t);return t}getAtomBlockIdx(){let t=this.getCountsLineIdx();return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){return this.getNextColumnIdx(t)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,Ut.FIRST_BONDED_ATOM_COL)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,Ut.BOND_TYPE_COL)}getBondBlockIdx(){let t=this.getAtomBlockIdx();for(let e=0;e<this.atomCount;e++)t=this.getNextLineIdx(t);return t}parseAtomAndBondCounts(){let t=this.getCountsLineIdx(),e=t+Ut.NUM_OF_COUNTS_DIGITS;const n=parseInt(this.fileContent.substring(t,e));return t=e,e+=Ut.NUM_OF_COUNTS_DIGITS,{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}class jt extends Wt{constructor(t){super(t),this.init(t)}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getCountsLineIdx(){return this.fileContent.indexOf("M V30 COUNTS ")}getAtomBlockIdx(){let t=this.fileContent.indexOf("M V30 BEGIN ATOM");return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){let e=this.shiftIdxToAtomType(t);return this.isQuote(e)?(e=this.getNextIdenticalChar(e),e=this.getNextColumnIdx(e),e):this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getBondBlockIdx(){return this.getNextLineIdx(this.fileContent.indexOf("M V30 BEGIN BOND"))}static validate(t){return-1!==t.indexOf("V3000")&&-1!==t.indexOf("M END")}parseAtomAndBondCounts(){let t=this.fileContent.indexOf("M V30 COUNTS ")+14,e=this.fileContent.indexOf(" ",t+1);const n=parseInt(this.fileContent.substring(t,e));return t=e+1,e=this.fileContent.indexOf(" ",t+1),{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}class Kt{constructor(){}static getInstance(t){if(Yt.validate(t))return new Yt(t);if(jt.validate(t))return new jt(t);throw new Error("Malformed molfile")}}async function zt(t,e=5e3){await R(100),await function(t,e,n,s=0,i="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,o)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){o(t)}a.unsubscribe(),clearTimeout(l)})),l=setTimeout((()=>{a.unsubscribe(),o(i)}),s);n()}))}))}(t.onAfterDrawContent,(()=>{}),(()=>{t.invalidate()}),e)}w("getMolfiles",(()=>{let n,s;I((async()=>{n=await Rt(),s=await Ft(),await kt(),await n.loadLibraries(!0)})),S((async()=>{await $t(s),await n.loadLibraries(!0)})),E("linear1",(async()=>{const n=t.DataFrame.fromCsv("Helm, atoms, bonds\nPEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et.Tyr_ab-dehydroMe.dV}$$$$,11,10\nPEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2.D-Chg.dV}$$$$,11,10\nPEPTIDE1{Lys_Boc.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2}$$$$,9,8"),s=n.getCol("Helm"),i=e.shell.addTableView(n);Xt.logger.debug("Helm/getMolfiles/linear1, grid awaiting 1"),await zt(i.grid,5e3),Xt.logger.debug("Helm/getMolfiles/linear1, grid awaited 1");const r=await e.functions.call("Helm:getMolfiles",{col:s});b(r.length,s.length);const o=r.toList().map((t=>Kt.getInstance(t)));O(o.map((t=>t.atomCount)),n.getCol("atoms").toList()),O(o.map((t=>t.bondCount)),n.getCol("bonds").toList()),Xt.logger.debug("Helm/getMolfiles/linear1, grid awaiting 2"),await zt(i.grid,5e3),Xt.logger.debug("Helm/getMolfiles/linear1, grid awaited 2")}))}));const Qt=ui;const qt={Helm:{seq:"PEPTIDE1{I.H.A.C.T.[Thr_PO3H2].[Aca].[D-Tyr_Et]}|PEPTIDE2{E.A.[meG]}$PEPTIDE1,PEPTIDE2,4:R3-1:R1$$$V2.0",units:W.HELM,res:{formula:"C58H94N13O21SP","molecular weight":1372.48,"extinction coefficient":1.55}},separator:{seq:"I/H/A/C/T/Thr_PO3H2/Aca/D-Tyr_Et",units:W.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C47H77N10O15SP","molecular weight":1085.21,"extinction coefficient":1.55}},separator2:{seq:"meI/hHis/Aca/N/T/dK/Thr_PO3H2/Aca/D-Tyr_Et/Aze/dV/E/N////Phe_4Me",units:W.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C91H146N19O25P","molecular weight":1937.21,"extinction coefficient":1.49}},"separator-gaps":{seq:"I/H/A//T/Thr_PO3H2/Aca/D-Tyr_Et",units:W.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C44H72N9O14P","molecular weight":982.07,"extinction coefficient":1.49}},"fasta-PT":{seq:"IHACTTAY",units:W.FASTA,alphabet:"PT",res:{formula:"C38H58N10O12S","molecular weight":878.99,"extinction coefficient":1.55}},"fasta-DNA":{seq:"ACGTATTCC",units:W.FASTA,alphabet:"DNA",res:{formula:"C87H113N30O56P9","molecular weight":2753.76,"extinction coefficient":91.74}}};function Jt(e,n,s,i,r){const o=t.Column.fromList(t.COLUMN_TYPE.STRING,"seq",[e]);o.semType=t.SEMTYPE.MACROMOLECULE,o.setTag(t.TAGS.UNITS,n),s&&o.setTag("separator",s),i&&o.setTag("alphabet",i),N(function(t,e){const n=(e.isHelm()?t:e.getConverter(W.HELM)(t)).replaceAll(/\.(\*\.)+/g,".").replaceAll(/\{(\*\.)+/g,"{").replaceAll(/(\.\*)+}/g,"}"),s=Qt.div([],{style:{width:"0",height:"0"}});document.documentElement.appendChild(s);try{const t=new JSDraw2.Editor(s,{viewonly:!0});t.setHelm(n);const e=t.getFormula(!0),i=Math.round(100*t.getMolWeight())/100,r=Math.round(100*t.getExtinctionCoefficient(!0))/100;return{formula:e.replace(/<sub>/g,"").replace(/<\/sub>/g,""),"molecular weight":i,"extinction coefficient":r}}finally{Gt()(s).empty(),s.remove()}}(e,Tt.getOrCreate(o)),r)}w("properties-widget",(()=>{for(const[t,e]of Object.entries(qt))E(t,(async()=>{Jt(e.seq,e.units,e.separator,e.alphabet,e.res)}))}));const Xt=new t.Package;async function Zt(n,s,o){const a=await function(n){var s,o,a,y,x,E,_;return r(this,void 0,void 0,(function*(){const N=null===(o=null===(s=e.functions.getCurrentCall())||void 0===s?void 0:s.func)||void 0===o?void 0:o.package;yield function(n,s){return r(this,void 0,void 0,(function*(){const s=n.id;if(C[s])return;const o=g;if(void 0!==o[f]||void 0!==o[d]||Object.keys(o).find((t=>t.startsWith(f))))return void(C[s]=!0);if("DevTools"===n.name){o[m]={tests:[],clear:!0};const e=t.Func.find({tags:["dartTest"]});for(const t of e)o[m].tests.push(new T(m,t.name,(()=>r(this,void 0,void 0,(function*(){return yield t.apply()}))),{isAggregated:t.outputs.length>0,timeout:3e5}))}const a=[],l=[],h=[],c=yield e.dapi.functions.filter(`package.id = "${s}"`).list(),u=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const t of c){const n=t.options.test,s=t.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let s=0;s<n.length;s++){const i=n[s].matchAll(u),l={};Array.from(i).forEach((t=>{t[0].startsWith("skip")?l.skip=t[1]:t[0].startsWith("wait")?l.wait=parseInt(t[2]):t[0].startsWith("cat")?l.cat=t[3]:t[0].startsWith("timeout")&&(l.timeout=parseInt(t[4]))}));const h=new T(f,1===n.length?t.name:`${t.name} ${s+1}`,(()=>r(this,void 0,void 0,(function*(){const i=yield e.functions.eval(M(n[s],t));if(l.wait&&(yield R(l.wait)),"boolean"==typeof i&&!i)throw`Failed: ${n[s]}, expected true, got ${i}`}))),{skipReason:l.skip,timeout:l.timeout});if(l.cat){const t=f+": "+l.cat;h.category=t,void 0===o[t]&&(o[t]={tests:[],clear:!0}),o[t].tests.push(h)}else a.push(h)}if(s){const n=t.options.demoWait?parseInt(t.options.demoWait):void 0,s=new T(d,t.friendlyName,(()=>r(this,void 0,void 0,(function*(){if(e.shell.lastError="",yield t.apply(),yield R(n||2e3),e.shell.lastError)throw new Error(e.shell.lastError)}))),{skipReason:t.options.demoSkip});l.push(s)}if(t.hasTag("semTypeDetector")){const e=new T(p,t.friendlyName,(()=>r(this,void 0,void 0,(function*(){const e=[];for(const n of i.clone().columns){const s=yield t.apply([n]);e.push(s||n.semType)}b(e.filter((t=>t)).length,1)}))),{skipReason:t.options.skipTest});h.push(e)}}C[s]=!0,a.length&&(o[f]={tests:a,clear:!0}),l.length&&(o[d]={tests:l,clear:!0}),h.length&&(o[p]={tests:h,clear:!1})}))}(N);const O=[];console.log("Running tests"),null!=n||(n={}),null!==(a=(_=n).testContext)&&void 0!==a||(_.testContext=new A),e.shell.lastError="";const w=[],I=function(){const t=[];return console.log=(...e)=>{t.push(...e),l(...e)},console.info=(...e)=>{t.push(...e),h(...e)},console.warn=(...e)=>{t.push(...e),c(...e)},console.error=(...e)=>{t.push(...e),u(...e)},t}();for(const[s,i]of Object.entries(g)){if((null==n?void 0:n.category)&&!s.toLowerCase().startsWith(null==n?void 0:n.category.toLowerCase())||(null===(y=n.exclude)||void 0===y?void 0:y.some((t=>s.startsWith(t)))))continue;l(`Started ${s} category`),w.push(s);const r=null===(x=i.tests)||void 0===x?void 0:x.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{i.before&&!r&&(yield i.before())}catch(t){i.beforeStatus=L(t)}const o=null!==(E=i.tests)&&void 0!==E?E:[],a=[];if(i.clear)for(let s=0;s<o.length;s++)a.push(yield v(o[s],null==n?void 0:n.test,I,i.timeout,N.name,n.verbose)),console.log("CLEARING"),e.shell.closeAll(),t.Balloon.closeAll();else for(let t=0;t<o.length;t++)a.push(yield v(o[t],null==n?void 0:n.test,I,i.timeout,N.name,n.verbose));const h=a.filter((t=>"skipped"!=t.result));try{i.after&&!r&&(yield i.after())}catch(t){i.afterStatus=L(t)}i.afterStatus&&h.push({category:s,name:"after",result:i.afterStatus,success:!1,ms:0,skipped:!1}),i.beforeStatus&&h.push({category:s,name:"before",result:i.beforeStatus,success:!1,ms:0,skipped:!1}),O.push(...h)}if(console.log=l,console.info=h,console.warn=c,console.error=u,n.testContext.catchUnhandled&&(yield R(1e3),e.shell.lastError.length>0&&O.push({category:"Unhandled exceptions",name:"exceptions",result:e.shell.lastError,success:!1,ms:0,skipped:!1})),!n.test&&O.length){const s=O.filter((t=>t.success)).length,i=O.filter((t=>t.skipped)).length,r=O.filter((t=>!t.success)),o=N.name;for(const t of w){const n=O.filter((e=>e.category===t)),s=n.filter((t=>!t.success)).length,i={success:0===s,passed:n.filter((t=>t.success)).length,skipped:n.filter((t=>t.skipped)).length,failed:s,type:"package",packageName:o,category:t};e.log.usage(`${o}: ${t}`,i,`category-package ${o}: ${t}`)}if(!n.category){const t={success:0===r.length,passed:s,skipped:i,failed:r.length,type:"package",packageName:o};e.log.usage(o,t,`package-package ${o}`)}if(n.testContext.report){const e=new t.Logger,n="Package @package tested: @successful successful, @skipped skipped, @failed failed tests",o={successful:s,skipped:i,failed:r.length,package:N};for(const t of r)Object.assign(o,{[`${t.category} | ${t.name}`]:t.result});e.log(n,o,"package-tested")}}return O}))}({category:n,test:s,testContext:o});return t.DataFrame.fromObjects(a)}})(),helm_test=s})();
|
|
2
2
|
//# sourceMappingURL=package-test.js.map
|