@datagrok/bio 2.22.5 → 2.22.6
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/dist/package-test.js +2 -2
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/files/tests/to-atomic-level-dna-fasta-output.csv +12765 -12725
- package/files/tests/to-atomic-level-msa-fasta-output.csv +1904 -1868
- package/files/tests/to-atomic-level-msa-separator-output.csv +3167 -3123
- package/files/tests/to-atomic-level-peptides-fasta-output.csv +30795 -30539
- package/files/tests/to-atomic-level-pt-fasta-2.mol +34 -31
- package/package.json +3 -3
- package/src/tests/to-atomic-level-tests.ts +4 -0
- package/test-console-output-1.log +382 -387
- package/test-record-1.mp4 +0 -0
package/dist/package.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var bio;(()=>{var t={8924:(t,e,n)=>{"use strict";var i=n(7362);class o extends i.e{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,o)),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,o)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new o({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 o.aaSynonyms?o.aaSynonyms[t]:t;return super.get(e)}}o.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class r{static getPalette(t="grok"){switch(t){case"grok":return o.GrokGroups;case"lesk":return o.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",i="";for(const o of t)"("==o?e++:")"==o?e--:e?n+=o:i+=o;return isNaN(parseInt(n))?[i,n]:[i,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[i,o]=this.getInnerOuter(t);if(i=i.length>6?`${i.slice(0,3)}...`:i,o=o.length>6?`${o.slice(0,3)}...`:o,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,o,1]:[this.undefinedColor,i,o,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,o,2]:[this.undefinedColor,i,o,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,o,3]:[this.undefinedColor,i,o,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,o,4]:[this.undefinedColor,i,o,4]}return[this.undefinedColor,i,o,0]}}r.SemType="Aminoacids",r.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",r.undefinedColor="rgb(100,100,100)",r.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"},r.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"},r.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(*)*"},r.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"}},6717:(t,e,n)=>{"use strict";n.d(e,{j:()=>o});var i=n(6082);async function o(){const t=i.Func.find({package:"Chem",name:"getRdKitModule"});if(0===t.length)throw new Error('Package "Chem" must be installed for getRdKitModule.');return(await t[0].prepare().call()).getOutputParamValue()}},3599:(t,e,n)=>{"use strict";n.d(e,{o:()=>i.o});var i=n(6869)},9124:(t,e,n)=>{"use strict";n.d(e,{b2:()=>r,fA:()=>s});var i=n(7389),o=n(6082);async function r(){const t="Helm",e=o.Func.find({package:t,name:"getHelmHelper"});if(0===e.length)throw new Error(`Package '${t}' must be installed for HelmHelper.`);return(await e[0].prepare().call()).getOutputParamValue()}function s(t,e){if(!t)throw new Error("Argument 'a' of type Atom or HelmType is mandatory.");let n,i;const o=t;return"ATOM"===o.T?(n=o.biotype(),i=o.elem):(n=t,i=e),[n,i]}o.JsInputBase,Error,i.input.helmAsync=async function(t,e){return(await r()).createHelmInput(t,e)}},8438:(t,e,n)=>{"use strict";function i(t){return t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t}n.d(e,{D:()=>i})},8123:(t,e,n)=>{"use strict";n.d(e,{u:()=>i});const i={V2K_RGP_SHIFT:8,V2K_RGP_LINE:"M RGP",V2K_A_LINE:"A ",V3K_COUNTS_SHIFT:14,V3K_IDX_SHIFT:7,V3K_HEADER_FIRST_LINE:"\nDatagrok macromolecule handler\n\n",V3K_HEADER_SECOND_LINE:" 0 0 0 0 0 0 999 V3000\n",V3K_BEGIN_CTAB_BLOCK:"M V30 BEGIN CTAB\n",V3K_END_CTAB_BLOCK:"M V30 END CTAB\n",V3K_BEGIN_COUNTS_LINE:"M V30 COUNTS ",V3K_COUNTS_LINE_ENDING:" 0 0 0\n",V3K_BEGIN_ATOM_BLOCK:"M V30 BEGIN ATOM\n",V3K_END_ATOM_BLOCK:"M V30 END ATOM\n",V3K_BEGIN_BOND_BLOCK:"M V30 BEGIN BOND\n",V3K_END_BOND_BLOCK:"M V30 END BOND\n",V3K_BOND_CONFIG:" CFG=",V3K_BEGIN_DATA_LINE:"M V30 ",V3K_END:"M END",PRECISION_FACTOR:1e4,DEOXYRIBOSE:{polymerType:"RNA",symbol:"d"},RIBOSE:{polymerType:"RNA",symbol:"r"},PHOSPHATE:{polymerType:"RNA",symbol:"p"},OXYGEN:"O",HYDROGEN:"H"}},4356:(t,e,n)=>{"use strict";n.d(e,{Eu:()=>a,ub:()=>s});var i=n(4328);const o="Libraries";let r=Promise.resolve();async function s(){let t;return r=r.then((async()=>{const e=i.userSettings.getValue(o,"Settings",!0);t=e?JSON.parse(e):{exclude:[],explicit:[],duplicateMonomerPreferences:{}},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],t.duplicateMonomerPreferences=t.duplicateMonomerPreferences instanceof Object?t.duplicateMonomerPreferences:{},console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await r,t}async function a(t){r=r.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),i.userSettings.add(o,"Settings",JSON.stringify(t),!0)})),await r}},5553:(t,e,n)=>{"use strict";n.d(e,{Qc:()=>A,WN:()=>S});var i=n(1991),o=n.n(i);const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,a="object"==typeof process&&process?process:{},l=(t,e,n,i)=>{"function"==typeof a.emitWarning?a.emitWarning(t,e,n,i):console.error(`[${n}] ${e}: ${t}`)};let c=globalThis.AbortController,h=globalThis.AbortSignal;if(void 0===c){h=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},c=class{constructor(){e()}signal=new h;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==a.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,l("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const u=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),d=t=>u(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?p:null:null;class p extends Array{constructor(t){super(t),this.fill(0)}}class m{heap;length;static#t=!1;static create(t){const e=d(t);if(!e)return[];m.#t=!0;const n=new m(t,e);return m.#t=!1,n}constructor(t,e){if(!m.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class f{#e;#n;#i;#o;#r;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#l;#c;#h;#u;#d;#p;#m;#f;#g;#y;#b;#v;#w;#C;#A;#S;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#w,sizes:t.#b,keyMap:t.#c,keyList:t.#h,valList:t.#u,next:t.#d,prev:t.#p,get head(){return t.#m},get tail(){return t.#f},free:t.#g,isBackgroundFetch:e=>t.#x(e),backgroundFetch:(e,n,i,o)=>t.#E(e,n,i,o),moveToTail:e=>t.#T(e),indexes:e=>t.#M(e),rindexes:e=>t.#_(e),isStale:e=>t.#I(e)}}get max(){return this.#e}get maxSize(){return this.#n}get calculatedSize(){return this.#l}get size(){return this.#a}get fetchMethod(){return this.#r}get memoMethod(){return this.#s}get dispose(){return this.#i}get disposeAfter(){return this.#o}constructor(t){const{max:e=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:r,updateAgeOnHas:a,allowStale:c,dispose:h,disposeAfter:p,noDisposeOnSet:g,noUpdateTTL:y,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:w,fetchMethod:C,memoMethod:A,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:T,ignoreFetchAbort:M}=t;if(0!==e&&!u(e))throw new TypeError("max option must be a nonnegative integer");const _=e?d(e):Array;if(!_)throw new Error("invalid max value: "+e);if(this.#e=e,this.#n=b,this.maxEntrySize=v||this.#n,this.sizeCalculation=w,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==A&&"function"!=typeof A)throw new TypeError("memoMethod must be a function if defined");if(this.#s=A,void 0!==C&&"function"!=typeof C)throw new TypeError("fetchMethod must be a function if specified");if(this.#r=C,this.#A=!!C,this.#c=new Map,this.#h=new Array(e).fill(void 0),this.#u=new Array(e).fill(void 0),this.#d=new _(e),this.#p=new _(e),this.#m=0,this.#f=0,this.#g=m.create(e),this.#a=0,this.#l=0,"function"==typeof h&&(this.#i=h),"function"==typeof p?(this.#o=p,this.#y=[]):(this.#o=void 0,this.#y=void 0),this.#C=!!this.#i,this.#S=!!this.#o,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!M,0!==this.maxEntrySize){if(0!==this.#n&&!u(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!u(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#L()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!a,this.ttlResolution=u(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!u(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(0===this.#e&&0===this.ttl&&0===this.#n)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#n){const t="LRU_CACHE_UNBOUNDED";(t=>!s.has(t))(t)&&(s.add(t),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,f))}}getRemainingTTL(t){return this.#c.has(t)?1/0:0}#N(){const t=new p(this.#e),e=new p(this.#e);this.#w=t,this.#v=e,this.#P=(n,i,o=r.now())=>{if(e[n]=0!==i?o:0,t[n]=i,0!==i&&this.ttlAutopurge){const t=setTimeout((()=>{this.#I(n)&&this.#$(this.#h[n],"expire")}),i+1);t.unref&&t.unref()}},this.#R=n=>{e[n]=0!==t[n]?r.now():0},this.#k=(o,r)=>{if(t[r]){const s=t[r],a=e[r];if(!s||!a)return;o.ttl=s,o.start=a,o.now=n||i();const l=o.now-a;o.remainingTTL=s-l}};let n=0;const i=()=>{const t=r.now();if(this.ttlResolution>0){n=t;const e=setTimeout((()=>n=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=o=>{const r=this.#c.get(o);if(void 0===r)return 0;const s=t[r],a=e[r];return s&&a?s-((n||i())-a):1/0},this.#I=o=>{const r=e[o],s=t[o];return!!s&&!!r&&(n||i())-r>s}}#R=()=>{};#k=()=>{};#P=()=>{};#I=()=>!1;#L(){const t=new p(this.#e);this.#l=0,this.#b=t,this.#O=e=>{this.#l-=t[e],t[e]=0},this.#H=(t,e,n,i)=>{if(this.#x(e))return 0;if(!u(n)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(e,t),!u(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#G=(e,n,i)=>{if(t[e]=n,this.#n){const n=this.#n-t[e];for(;this.#l>n;)this.#F(!0)}this.#l+=t[e],i&&(i.entrySize=n,i.totalCalculatedSize=this.#l)}}#O=t=>{};#G=(t,e,n)=>{};#H=(t,e,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#M({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#f;this.#D(e)&&(!t&&this.#I(e)||(yield e),e!==this.#m);)e=this.#p[e]}*#_({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#m;this.#D(e)&&(!t&&this.#I(e)||(yield e),e!==this.#f);)e=this.#d[e]}#D(t){return void 0!==t&&this.#c.get(this.#h[t])===t}*entries(){for(const t of this.#M())void 0===this.#u[t]||void 0===this.#h[t]||this.#x(this.#u[t])||(yield[this.#h[t],this.#u[t]])}*rentries(){for(const t of this.#_())void 0===this.#u[t]||void 0===this.#h[t]||this.#x(this.#u[t])||(yield[this.#h[t],this.#u[t]])}*keys(){for(const t of this.#M()){const e=this.#h[t];void 0===e||this.#x(this.#u[t])||(yield e)}}*rkeys(){for(const t of this.#_()){const e=this.#h[t];void 0===e||this.#x(this.#u[t])||(yield e)}}*values(){for(const t of this.#M())void 0===this.#u[t]||this.#x(this.#u[t])||(yield this.#u[t])}*rvalues(){for(const t of this.#_())void 0===this.#u[t]||this.#x(this.#u[t])||(yield this.#u[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const n of this.#M()){const i=this.#u[n],o=this.#x(i)?i.__staleWhileFetching:i;if(void 0!==o&&t(o,this.#h[n],this))return this.get(this.#h[n],e)}}forEach(t,e=this){for(const n of this.#M()){const i=this.#u[n],o=this.#x(i)?i.__staleWhileFetching:i;void 0!==o&&t.call(e,o,this.#h[n],this)}}rforEach(t,e=this){for(const n of this.#_()){const i=this.#u[n],o=this.#x(i)?i.__staleWhileFetching:i;void 0!==o&&t.call(e,o,this.#h[n],this)}}purgeStale(){let t=!1;for(const e of this.#_({allowStale:!0}))this.#I(e)&&(this.#$(this.#h[e],"expire"),t=!0);return t}info(t){const e=this.#c.get(t);if(void 0===e)return;const n=this.#u[e],i=this.#x(n)?n.__staleWhileFetching:n;if(void 0===i)return;const o={value:i};if(this.#w&&this.#v){const t=this.#w[e],n=this.#v[e];if(t&&n){const e=t-(r.now()-n);o.ttl=e,o.start=Date.now()}}return this.#b&&(o.size=this.#b[e]),o}dump(){const t=[];for(const e of this.#M({allowStale:!0})){const n=this.#h[e],i=this.#u[e],o=this.#x(i)?i.__staleWhileFetching:i;if(void 0===o||void 0===n)continue;const s={value:o};if(this.#w&&this.#v){s.ttl=this.#w[e];const t=r.now()-this.#v[e];s.start=Math.floor(Date.now()-t)}this.#b&&(s.size=this.#b[e]),t.unshift([n,s])}return t}load(t){this.clear();for(const[e,n]of t){if(n.start){const t=Date.now()-n.start;n.start=r.now()-t}this.set(e,n.value,n)}}set(t,e,n={}){if(void 0===e)return this.delete(t),this;const{ttl:i=this.ttl,start:o,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=n;let{noUpdateTTL:l=this.noUpdateTTL}=n;const c=this.#H(t,e,n.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#$(t,"set"),this;let h=0===this.#a?void 0:this.#c.get(t);if(void 0===h)h=0===this.#a?this.#f:0!==this.#g.length?this.#g.pop():this.#a===this.#e?this.#F(!1):this.#a,this.#h[h]=t,this.#u[h]=e,this.#c.set(t,h),this.#d[this.#f]=h,this.#p[h]=this.#f,this.#f=h,this.#a++,this.#G(h,c,a),a&&(a.set="add"),l=!1;else{this.#T(h);const n=this.#u[h];if(e!==n){if(this.#A&&this.#x(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=n;void 0===e||r||(this.#C&&this.#i?.(e,t,"set"),this.#S&&this.#y?.push([e,t,"set"]))}else r||(this.#C&&this.#i?.(n,t,"set"),this.#S&&this.#y?.push([n,t,"set"]));if(this.#O(h),this.#G(h,c,a),this.#u[h]=e,a){a.set="replace";const t=n&&this.#x(n)?n.__staleWhileFetching:n;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===i||this.#w||this.#N(),this.#w&&(l||this.#P(h,i,o),a&&this.#k(a,h)),!r&&this.#S&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}return this}pop(){try{for(;this.#a;){const t=this.#u[this.#m];if(this.#F(!0),this.#x(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#S&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}}}#F(t){const e=this.#m,n=this.#h[e],i=this.#u[e];return this.#A&&this.#x(i)?i.__abortController.abort(new Error("evicted")):(this.#C||this.#S)&&(this.#C&&this.#i?.(i,n,"evict"),this.#S&&this.#y?.push([i,n,"evict"])),this.#O(e),t&&(this.#h[e]=void 0,this.#u[e]=void 0,this.#g.push(e)),1===this.#a?(this.#m=this.#f=0,this.#g.length=0):this.#m=this.#d[e],this.#c.delete(n),this.#a--,e}has(t,e={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=e,o=this.#c.get(t);if(void 0!==o){const t=this.#u[o];if(this.#x(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#I(o))return n&&this.#R(o),i&&(i.has="hit",this.#k(i,o)),!0;i&&(i.has="stale",this.#k(i,o))}else i&&(i.has="miss");return!1}peek(t,e={}){const{allowStale:n=this.allowStale}=e,i=this.#c.get(t);if(void 0===i||!n&&this.#I(i))return;const o=this.#u[i];return this.#x(o)?o.__staleWhileFetching:o}#E(t,e,n,i){const o=void 0===e?void 0:this.#u[e];if(this.#x(o))return o;const r=new c,{signal:s}=n;s?.addEventListener("abort",(()=>r.abort(s.reason)),{signal:r.signal});const a={signal:r.signal,options:n,context:i},l=(i,o=!1)=>{const{aborted:s}=r.signal,l=n.ignoreFetchAbort&&void 0!==i;if(n.status&&(s&&!o?(n.status.fetchAborted=!0,n.status.fetchError=r.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!l&&!o)return h(r.signal.reason);const c=u;return this.#u[e]===u&&(void 0===i?c.__staleWhileFetching?this.#u[e]=c.__staleWhileFetching:this.#$(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,i,a.options))),i},h=i=>{const{aborted:o}=r.signal,s=o&&n.allowStaleOnFetchAbort,a=s||n.allowStaleOnFetchRejection,l=a||n.noDeleteOnFetchRejection,c=u;if(this.#u[e]===u&&(l&&void 0!==c.__staleWhileFetching?s||(this.#u[e]=c.__staleWhileFetching):this.#$(t,"fetch")),a)return n.status&&void 0!==c.__staleWhileFetching&&(n.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw i};n.status&&(n.status.fetchDispatched=!0);const u=new Promise(((e,i)=>{const s=this.#r?.(t,o,a);s&&s instanceof Promise&&s.then((t=>e(void 0===t?void 0:t)),i),r.signal.addEventListener("abort",(()=>{n.ignoreFetchAbort&&!n.allowStaleOnFetchAbort||(e(void 0),n.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))}))})).then(l,(t=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=t),h(t)))),d=Object.assign(u,{__abortController:r,__staleWhileFetching:o,__returned:void 0});return void 0===e?(this.set(t,d,{...a.options,status:void 0}),e=this.#c.get(t)):this.#u[e]=d,d}#x(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof c}async fetch(t,e={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:f=!1,status:g,signal:y}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:g});const b={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:r,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:g,signal:y};let v=this.#c.get(t);if(void 0===v){g&&(g.fetch="miss");const e=this.#E(t,v,b,m);return e.__returned=e}{const e=this.#u[v];if(this.#x(e)){const t=n&&void 0!==e.__staleWhileFetching;return g&&(g.fetch="inflight",t&&(g.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const o=this.#I(v);if(!f&&!o)return g&&(g.fetch="hit"),this.#T(v),i&&this.#R(v),g&&this.#k(g,v),e;const r=this.#E(t,v,b,m),s=void 0!==r.__staleWhileFetching&&n;return g&&(g.fetch=o?"stale":"refresh",s&&o&&(g.returnedStale=!0)),s?r.__staleWhileFetching:r.__returned=r}}async forceFetch(t,e={}){const n=await this.fetch(t,e);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(t,e={}){const n=this.#s;if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:o,...r}=e,s=this.get(t,r);if(!o&&void 0!==s)return s;const a=n(t,s,{options:r,context:i});return this.set(t,a,r),a}get(t,e={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:r}=e,s=this.#c.get(t);if(void 0!==s){const e=this.#u[s],a=this.#x(e);return r&&this.#k(r,s),this.#I(s)?(r&&(r.get="stale"),a?(r&&n&&void 0!==e.__staleWhileFetching&&(r.returnedStale=!0),n?e.__staleWhileFetching:void 0):(o||this.#$(t,"expire"),r&&n&&(r.returnedStale=!0),n?e:void 0)):(r&&(r.get="hit"),a?e.__staleWhileFetching:(this.#T(s),i&&this.#R(s),e))}r&&(r.get="miss")}#B(t,e){this.#p[e]=t,this.#d[t]=e}#T(t){t!==this.#f&&(t===this.#m?this.#m=this.#d[t]:this.#B(this.#p[t],this.#d[t]),this.#B(this.#f,t),this.#f=t)}delete(t){return this.#$(t,"delete")}#$(t,e){let n=!1;if(0!==this.#a){const i=this.#c.get(t);if(void 0!==i)if(n=!0,1===this.#a)this.#V(e);else{this.#O(i);const n=this.#u[i];if(this.#x(n)?n.__abortController.abort(new Error("deleted")):(this.#C||this.#S)&&(this.#C&&this.#i?.(n,t,e),this.#S&&this.#y?.push([n,t,e])),this.#c.delete(t),this.#h[i]=void 0,this.#u[i]=void 0,i===this.#f)this.#f=this.#p[i];else if(i===this.#m)this.#m=this.#d[i];else{const t=this.#p[i];this.#d[t]=this.#d[i];const e=this.#d[i];this.#p[e]=this.#p[i]}this.#a--,this.#g.push(i)}}if(this.#S&&this.#y?.length){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}return n}clear(){return this.#V("delete")}#V(t){for(const e of this.#_({allowStale:!0})){const n=this.#u[e];if(this.#x(n))n.__abortController.abort(new Error("deleted"));else{const i=this.#h[e];this.#C&&this.#i?.(n,i,t),this.#S&&this.#y?.push([n,i,t])}}if(this.#c.clear(),this.#u.fill(void 0),this.#h.fill(void 0),this.#w&&this.#v&&(this.#w.fill(0),this.#v.fill(0)),this.#b&&this.#b.fill(0),this.#m=0,this.#f=0,this.#g.length=0,this.#l=0,this.#a=0,this.#S&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}}}function g(t){window.$monomerHover=t}var y=n(2003),b=n(6077),v=n(3561),w=n(9235);const C="MonomerHoverLinks";async function A(t,e,n,i,r,s=!1){const a=i.getSeqHandler(t),l=a.alphabet==y.YI.RNA||a.alphabet==y.YI.DNA,c=a.isHelm()&&l,h=!a.isHelm()&&l,u=t=>null==t?null:c?s?t:Math.floor(t/3):h&&s?3*t+1:t,d=s?await i.getHelmToMolfileConverter(n):null,p=new f({max:100});function m(t,e){const a=t.get(e);if(null==a)return null;let l=p.get(a);return l||p.set(a,l=function(t,e){const a=i.getSeqHandler(t);if(s){const t=a.getHelm(e);return i.helmToAtomicLevelSingle(t,d,!1,!1).monomers}{const t=a.getSplitted(e),i=a.defaultBiotype,s=o().count(0).take(t.length).map((e=>({position:e,symbol:t.getCanonical(e),biotype:i}))).toArray(),l=a.alphabet,c=l==y.YI.RNA||l==y.YI.DNA?"RNA":"PEPTIDE",h=(0,b.eM)([s],c,l,n,r);return(0,v.gU)(s,h,l,c).monomers}}(t,e)),l}const A={targetCol:e,handler:(e,i,o)=>{const r=o.grid,s=e.tableRowIndex,a=e.gridRow,l=r.cell(o.name,a),c=null!==(h=window.$monomerHover)&&void 0!==h?h:null;var h;if(!c||c&&(c.dataFrameId!=t.dataFrame.id||c.gridRowIdx!=a||c.seqColName!=t.name||c.seqPosition!=i?.position)){if(c&&(g(null),c.gridCell.render()),!i)return g(null),!0;g({gridCell:l,dataFrameId:t.dataFrame.id,gridRowIdx:a,seqColName:t.name,seqPosition:u(i?.position)??-1,getSubstruct:()=>{if(!i||"*"===i.symbol)return;const e=m(t,s);if(!e)return;const o=e.get(u(i?.position));return o?(0,w.H)([o],n):{atoms:[],bonds:[],highlightAtomColors:[],highlightBondColors:[]}}}),l.render()}return!0},getSubstruct:i=>{if("true"!=e.getTag(".sequence-src-highlight-monomers"))return;if(null==i)return;if(!t.get(i))return;const o=m(t,i);return o?(0,w.H)(o.values(),n):void 0}};return function(t,e){let n=t[C];n||(n=t[C]=[]),n.push(e),t[C]=n}(t.temp,A),function(t,e){let n=t["substruct-providers"];n||(n=t["substruct-providers"]=[]),n.push(e),t["substruct-providers"]=n}(e.temp,A),A}function S(t,e){try{const n=t.tableColumn;if(!n)return;const i=function(t){return t.temp[C]??[]}(n);for(let n=i.length-1;n>=0;--n){const o=i[n],r=t.grid.col(o.targetCol.name);if(r&&!o.handler(t,e,r))break}}catch(t){console.error(t)}}},6718:(t,e,n)=>{"use strict";n.d(e,{A7:()=>p,pj:()=>h,uL:()=>u,uX:()=>c});var i=n(6082),o=n(4328),r=n(6295),s=n(3151),a=n(3077),l=n(439);function c(t){const e=[];for(let n=0;n<t.rowCount;n++){const i={};Object.keys(s.Ec).forEach((e=>{if("symbol"===e){const o=t.get(s.Ec[e],n);i[e]="."===o?t.get(s.yw,n):o}else if("rgroups"===e){const o=t.get(s.Ec[e],n).split("\n"),r=[];o.forEach((t=>{const e={},n=t.substring(t.lastIndexOf("]")+1),i=t.match(/\[R(\d+)\]/)[1];e.capGroupSmiles="H"===n?`[*:${i}][H]`:`O[*:${i}]`,e.alternateId="H"===n?`R${i}-H`:`R${i}-OH`,e.capGroupName="H"===n?"H":"OH",e.label=`R${i}`,r.push(e)})),i[e]=r}else s.Ec[e]&&(i[e]=t.get(s.Ec[e],n))})),i.author??(i.author=""),i.id??(i.id=0),i.smiles??(i.smiles=""),i.monomerType??(i.monomerType="Backbone"),i.createDate??(i.createDate=null),e.push(i)}return e}async function h(){const t=i.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===t.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await t[0].prepare().call()).getOutputParamValue()}async function u(t,e,n){t instanceof i.Column&&(t=(0,a.R)(t,n).columns.toList());const r=(await h()).getMonomerLib(),s=new Array(t.length),c=t[0].length,u=new Float32Array(c);for(let n=0;n<t.length;++n){const a=n<e.length?e.getCanonical(n):l._S,h=r.getMonomer("PEPTIDE",a)?.smiles??"",d=t[n],p=d.getRawData(),m=d.categories,f=m.indexOf("");if(s[n]={categories:m,data:p,emptyIndex:f},void 0===a)continue;const g=i.Column.fromStrings("smiles",m.map((t=>r.getMonomer("PEPTIDE",t)?.smiles??""))),y=(i.DataFrame.fromColumns([g]),await o.chem.getSimilarities(g,h)),b=y?y.getRawData():null;for(let t=0;t<c;++t){const e=p[t];a!==l._S&&e!==f?u[t]+=b[e]:a===l._S&&e===f&&(u[t]+=1)}}for(let n=0;n<u.length;++n){let o=u[n]/e.length;for(let r=0;r<t.length;++r){const t=s[r];if(r>=e.length&&t.data[n]!==t.emptyIndex||t.data[n]===t.emptyIndex&&r<e.length){o=i.FLOAT_NULL;break}}u[n]=o}return i.Column.fromFloat32Array("Similarity",u)}async function d(t){const e=(await h()).getMonomerLib(),n=[],r={},s=t.map((t=>e.getMonomer("PEPTIDE",t)?.smiles??"")),a=i.Column.fromStrings("smiles",s);for(let e=0;e<s.length;++e){r[t[e]]=e;const i=s[e],l=""===i?new Array(s.length).fill(0):(await o.chem.getSimilarities(a,i)).getRawData();l[e]=1,n[e]=Array.from(l)}return{scoringMatrix:n,alphabetIndexes:r}}async function p(t,e="Morgan"){const n=(await h()).getMonomerLib(),o=new Array(t.length).fill(0).map((()=>new Array(t.length).fill(0))),s={},a=t.map((t=>n.getMonomer("PEPTIDE",t)?.molfile||n.getMonomer("PEPTIDE",t)?.smiles||"")),l=i.Func.find({package:"Chem",name:"getFingerprints"})[0];if(!l)return console.warn('Function "Chem:getFingerprints" is not found in chem package. falling back to Morgan fingerprints'),await d(t);const c=i.Column.fromStrings("smiles",a),u=(i.DataFrame.fromColumns([c]),(await l.apply({col:c,fingerprintType:e}))?.entries);if(!u)return console.warn(`${e} Fingerprints could not be calculated for monomers from chem package.\n falling back to Morgan fingerprints`),await d(t);for(let e=0;e<u.length;++e)if(o[e][e]=1,s[t[e]]=e,u[e])for(let t=e+1;t<u.length;++t)u[t]&&(o[e][t]=o[t][e]=(0,r.$1)(u[e],u[t]));return{scoringMatrix:o,alphabetIndexes:s}}},6197:(t,e,n)=>{"use strict";n.d(e,{Y:()=>o});var i=n(3599);function o(t){let e;switch(t){case i.o.BASE:case i.o.SUGAR:case i.o.LINKER:case i.o.NUCLEOTIDE:case"nucleotide":e="RNA";break;case i.o.AA:e="PEPTIDE";break;case i.o.CHEM:e="CHEM";break;case i.o.BLOB:e="BLOB";break;default:e="PEPTIDE",console.warn(`Unexpected HelmType '${t}'`)}return e}},9235:(t,e,n)=>{"use strict";n.d(e,{H:()=>c,R:()=>l});var i=n(6082),o=n(1991),r=n.n(o),s=n(330),a=n(3599);async function l(t,e,o,l,c,h,u){const d=t.length,p=t.dataFrame,m=Math.max(navigator.hardwareConcurrency-2,1),f=new Array(m).fill(null).map((()=>new Worker(new URL(n.p+n.u(455),n.b)))),g=d/m,y=new Array(m),b=h.getSeqHandler(t),v="RNA"==l?a.o.NUCLEOTIDE:a.o.AA,w=r().count(0).take(t.length).map((t=>{const e=b.getSplitted(t);return r().count(0).take(e.length).map((t=>({position:t,symbol:e.getCanonical(t),biotype:v}))).toArray()})).toArray();for(let t=0;t<m;t++){const n=f[t],i=Math.floor(t*g),r=t===m-1?d:Math.floor((t+1)*g);y[t]=new Promise((t=>{n.onmessage=e=>{t(e.data)}})),n.postMessage({seqList:w,monomersDict:e,alphabet:o,polymerType:l,start:i,end:r})}const C=[],A=[];await Promise.all(y).then((t=>{for(const e of t)C.push(...e.molfiles),A.push(...e.warnings)})),setTimeout((()=>{f.forEach((t=>{t.terminate()}))}),0);const S=(0,s.qj)(p,t.name),x=i.Column.fromType(i.COLUMN_TYPE.STRING,S,t.length).init((t=>C[t]?.molfile));return x.semType=i.SEMTYPE.MOLECULE,x.meta.units=i.UNITS.Molecule.MOLBLOCK,x.setTag(".sequence-src-col",t.name),{molCol:x,warnings:A}}function c(t,e){const n={},o={};for(const r of t){const t=e.getWebEditorMonomer(r.biotype,r.symbol).backgroundcolor,a=(0,s.vG)(t??i.Color.toRgb(i.Color.mouseOverRows))??[1,0,0,.7];for(const t of r.atoms)n[t]=a;for(const t of r.bonds)o[t]=a}return{atoms:Object.keys(n).map((t=>parseInt(t))),bonds:Object.keys(o).map((t=>parseInt(t))),highlightAtomColors:n,highlightBondColors:o}}},3561:(t,e,n)=>{"use strict";n.d(e,{Hb:()=>l,YN:()=>f,gU:()=>c});var i=n(8123),o=n(294),r=n(3151),s=n(439),a=n(6197);function l(t,e,n){const o=new Map;for(const a of t.getMonomerSymbolsByType(e)){const l=t.getMonomer(e,a);if("RNA"===e&&("Branch"===l.monomerType||n===s.YI.DNA&&l.symbol===i.u.DEOXYRIBOSE.symbol||n===s.YI.RNA&&l.symbol===i.u.RIBOSE.symbol||l.symbol===i.u.PHOSPHATE.symbol)||"PEPTIDE"===e&&"Branch"!==l.monomerType){const t={};r.f6.forEach((e=>{t[e]=l[e]})),o.set(l.symbol,t)}}return o}function c(t,e,n,r){if(0===t.length)return o.vF.createEmpty();const l=m,{atomCount:c,bondCount:u,needsCapping:p}=l(t,e,n,r),g=new Array(c),y=new Array(u);let b,v=null,w=null;"PEPTIDE"===r?b=h:(b=d,v=n===s.YI.DNA?(0,o.xb)(e,i.u.DEOXYRIBOSE):(0,o.xb)(e,i.u.RIBOSE),w=(0,o.xb)(e,i.u.PHOSPHATE));const C={i:0,nodeShift:0,bondShift:0,backbonePositionShift:new Array(2).fill(0),branchPositionShift:new Array(2).fill(0),backboneAttachNode:0,branchAttachNode:0,flipFactor:1},A={sugar:v,phosphate:w,seqLength:t.length,atomCount:c,bondCount:u},S=new o.Cg,x=[];let E,T=0;for(C.i=0;C.i<A.seqLength;++C.i){const n=t[C.i];if(n.symbol===s._S)continue;const i=(0,o.xb)(e,{symbol:n.symbol,polymerType:(0,a.Y)(n.biotype)});E=i.terminalR2Atom;const r=C.nodeShift,l=C.bondShift;b(i,g,y,C,A),i.stereoAtoms?.forEach((t=>x.push(t+T))),T+=i.atoms.x.length;const c=C.nodeShift-r,h=new Array(c);for(let t=0;t<c;++t)h[t]=r+t;const u=C.bondShift-l,d=new Array(u);for(let t=0;t<u;++t)d[t]=l+t;S.set(C.i,{biotype:n.biotype,symbol:n.symbol,atoms:h,bonds:d})}p&&function(t,e,n,o,r=i.u.OXYGEN){const s=n.nodeShift+1;t[o.atomCount]=i.u.V3K_BEGIN_DATA_LINE+s+" "+(r??i.u.OXYGEN)+" "+f(n.backbonePositionShift[0])+" "+n.flipFactor*f(n.backbonePositionShift[1])+" 0.000000 0\n";const a=n.backboneAttachNode,l=s;e[o.bondCount]=i.u.V3K_BEGIN_DATA_LINE+n.bondShift+" 1 "+a+" "+l+"\n"}(g,y,C,A,E??i.u.OXYGEN);const M=i.u.V3K_BEGIN_COUNTS_LINE+c+" "+u+i.u.V3K_COUNTS_LINE_ENDING;let _="";return _+=i.u.V3K_HEADER_FIRST_LINE,_+=i.u.V3K_HEADER_SECOND_LINE,_+=i.u.V3K_BEGIN_CTAB_BLOCK,_+=M,_+=i.u.V3K_BEGIN_ATOM_BLOCK,_+=g.join(""),_+=i.u.V3K_END_ATOM_BLOCK,_+=i.u.V3K_BEGIN_BOND_BLOCK,_+=y.join(""),_+=i.u.V3K_END_BOND_BLOCK,x.length>0&&(_+=function(t){const e=[];let n=`M V30 MDLV30/STEABS ATOMS=(${t.length}`;for(let i=0;i<t.length;i++){const o=`${n} ${t[i]}`;o.length>76?(e.push(`${n} -\n`),n=`M V30 ${t[i]}`):n=o,i===t.length-1&&e.push(`${n})\n`)}return`M V30 BEGIN COLLECTION\n${e.join("")}M V30 END COLLECTION\n`}(x)),_+=i.u.V3K_END_CTAB_BLOCK,_+=i.u.V3K_END,{molfile:_,monomers:S}}function h(t,e,n,i){i.flipFactor=(-1)**(i.i%2),u(t,e,n,i)}function u(t,e,n,o){!function(t,e,n){for(let o=0;o<t.atoms.atomTypes.length;++o){const r=n.nodeShift+o+1;e[n.nodeShift+o]=i.u.V3K_BEGIN_DATA_LINE+r+" "+t.atoms.atomTypes[o]+" "+f(n.backbonePositionShift[0]+t.atoms.x[o])+" "+f(n.backbonePositionShift[1]+n.flipFactor*t.atoms.y[o])+" "+t.atoms.kwargs[o]}}(t,e,o),p(t,n,o),function(t,e,n){if(0!==n.backboneAttachNode){const o=n.bondShift,r=n.backboneAttachNode,s=t.meta.terminalNodes[0]+n.nodeShift;e[n.bondShift-1]=i.u.V3K_BEGIN_DATA_LINE+o+" 1 "+r+" "+s+"\n"}}(t,n,o),null!==t.meta.branchShift&&t.meta.terminalNodes.length>2&&function(t,e){e.branchAttachNode=e.nodeShift+t.meta.terminalNodes[2];for(let n=0;n<2;++n)e.branchPositionShift[n]=e.backbonePositionShift[n]+t.meta.branchShift[n]}(t,o),function(t,e){e.backboneAttachNode=e.nodeShift+t.meta.terminalNodes[1],e.bondShift+=t.bonds.atomPairs.length+1,e.nodeShift+=t.atoms.atomTypes.length,e.backbonePositionShift[0]+=t.meta.backboneShift?.[0]??0,e.backbonePositionShift[1]+=e.flipFactor*(t.meta.backboneShift?.[1]??0)}(t,o)}function d(t,e,n,o,r){if(0===o.i)u(r.sugar,e,n,o);else for(const t of[r.phosphate,r.sugar])u(t,e,n,o);!function(t,e,n,o){(function(t,e,n){for(let o=0;o<t.atoms.atomTypes.length;++o){const r=n.nodeShift+o+1;e[n.nodeShift+o]=i.u.V3K_BEGIN_DATA_LINE+r+" "+t.atoms.atomTypes[o]+" "+f(n.branchPositionShift[0]+t.atoms.x[o])+" "+f(n.branchPositionShift[1]+n.flipFactor*t.atoms.y[o])+" "+t.atoms.kwargs[o]}})(t,e,o),p(t,n,o),function(t,e,n){const o=n.bondShift,r=n.branchAttachNode,s=t.meta.terminalNodes[0]+n.nodeShift;e[o-1]=i.u.V3K_BEGIN_DATA_LINE+o+" 1 "+r+" "+s+"\n"}(t,n,o);const r=o.bondShift,s=o.branchAttachNode,a=t.meta.terminalNodes[0]+o.nodeShift;n[r-1]=i.u.V3K_BEGIN_DATA_LINE+r+" 1 "+s+" "+a+"\n",o.bondShift+=t.bonds.atomPairs.length+1,o.nodeShift+=t.atoms.atomTypes.length}(t,e,n,o)}function p(t,e,n){for(let o=0;o<t.bonds.atomPairs.length;++o){const r=n.bondShift+o+1,s=t.bonds.atomPairs[o][0]+n.nodeShift,a=t.bonds.atomPairs[o][1]+n.nodeShift;let l="";if(t.bonds.bondConfiguration.has(o)){let e=t.bonds.bondConfiguration.get(o);n.flipFactor<0&&(e=1===e?3:1),l=" CFG="+e}const c=t.bonds.kwargs.has(o)?" "+t.bonds.kwargs.get(o):"";e[n.bondShift+o]=i.u.V3K_BEGIN_DATA_LINE+r+" "+t.bonds.bondTypes[o]+" "+s+" "+a+l+c+"\n"}}function m(t,e,n,r){let l=0,c=0,h=0,u=!0,d=null;for(const n of t)if(n.symbol!==s._S){if("*"==n.symbol)throw new Error("Gap canonical symbol is '', not '*");d=(0,o.xb)(e,{symbol:n.symbol,polymerType:(0,a.Y)(n.biotype)}),l+=d.atoms.x.length,c+=d.bonds.bondTypes.length,h++}if("PEPTIDE"===r)l+=1,c+=h,h>0&&((d?.meta?.rNodes?.length??0)<2||d?.terminalR2Atom?.toLowerCase()===i.u.HYDROGEN.toLowerCase())&&(u=!1,l-=1,c-=1);else{const r=n===s.YI.DNA?(0,o.xb)(e,i.u.DEOXYRIBOSE):(0,o.xb)(e,i.u.RIBOSE),a=(0,o.xb)(e,i.u.PHOSPHATE);l+=(t.length-1)*a.atoms.x.length,l+=t.length*r.atoms.x.length,l+=1,c+=(t.length-1)*a.bonds.bondTypes.length,c+=t.length*r.bonds.bondTypes.length,c-=1,c+=3*t.length}return{atomCount:l,bondCount:c,needsCapping:u}}function f(t){return Math.round(i.u.PRECISION_FACTOR*t)/i.u.PRECISION_FACTOR}},6077:(t,e,n)=>{"use strict";n.d(e,{C4:()=>m,eM:()=>f});var i=n(4328),o=n(6082),r=n(1991),s=n.n(r),a=n(439),l=n(3561),c=n(9235),h=n(294),u=n(9192),d=n(330),p=n(8123);async function m(t,e,n,r,l){if(e.semType!==o.SEMTYPE.MACROMOLECULE)return{molCol:null,warnings:[`Only the ${o.SEMTYPE.MACROMOLECULE} columns can be converted to atomic level, the chosen column has semType '${e.semType}'`]};let h=e;const p=r.getSeqHandler(e);let m,g;p.notation!==a.Hi.SEPARATOR&&(h=p.convert(a.Hi.SEPARATOR,"."),h.name=e.name);try{g=r.getSeqHandler(h).alphabet,m=(0,d.pz)(g)}catch(t){const[e,n]=(0,u.AP)(t);return{molCol:null,warnings:[e]}}const y=function(t,e){const n=t.length,o=new Array(n),r=e.getSeqHandler(t);let a=!1;const l=r.defaultBiotype;for(let t=0;t<n;++t){const e=r.getSplitted(t);a||(a=0===e.length),o[t]=s().count(0).take(e.length).filter((t=>!e.isGap(t))).map((t=>({position:t,biotype:l,symbol:e.getCanonical(t)}))).toArray()}return a&&i.shell.warning(`Some values in the "${t.name}" column are empty`),o}(h,r),b=f(y,m,g,n,l),v=h.length,w=await(0,c.R)(h,b,g,m,n,r,l);return w.warnings.length>.05*v&&i.shell.warning(`Molfile conversion resulted in ${w.warnings.length} errors`),w}function f(t,e,n,i,o){const r=(0,l.Hb)(i,e,n),s={},c={value:null};if("RNA"===e){const t=n===a.YI.RNA?[p.u.RIBOSE,p.u.PHOSPHATE]:[p.u.DEOXYRIBOSE,p.u.PHOSPHATE];for(const n of t)g(s,n.symbol,r,o,e,c)}for(let n=0;n<t.length;++n){const i=t[n];for(const t of i){const n=t.symbol;if(""!==n)try{if("RNA"===e&&3===n.split(/\(|\)/).filter((t=>!!t)).length){const t=n.split(/\(|\)/)[1];g(s,t,r,o,e,c),s[e]?.[t]&&(s[e][n]=s[e][t])}else g(s,n,r,o,e,c)}catch(t){const e=t instanceof Error?t.message:t.toString(),i=t instanceof Error?t.stack:void 0;throw console.error(`bio lib: getMonomersDictFromLib() sym='${n}', error:\n${e}\n${i}`),new Error(`Can't get monomer '${n}' from library: ${e}`)}}}return s}function g(t,e,n,i,o,r){const s={polymerType:o,symbol:e};if(!(0,h.bq)(t,s)){const a=function(t,e,n,i,o){if(e.has(t)){const s=e.get(t),a=function(t){const e=[];for(const n of t){let t=n.capGroupSmiles;t||(t=n.capGroupSMILES),t=t.replace(/(\[|\]|\*|:|\d)/g,"").replace("OH","O").replace("Oh","O"),e.push(t)}return e}(s.rgroups),c=(r=s.molfile).includes("V3000")?function(t){const e=new Map,n=/M V30 (\d+) R#.+RGROUPS=\((\d+) (\d+)\).*/gm;let i;for(;null!==(i=n.exec(t));)i.index===n.lastIndex&&n.lastIndex++,e.set(parseInt(i[1]),parseInt(i[3]));return e}(r):function(t){const e=new Map;let n=t.indexOf(p.u.V2K_A_LINE,0),i=n;for(;-1!==n;){i=t.indexOf("\n",n);const o=parseInt(t.substring(n,i).replace(/^A\s+/,""));n=t.indexOf("R",i),i=t.indexOf("\n",n);const r=parseInt(t.substring(n,i).replace(/^R/,""));e.set(o,r),n=t.indexOf(p.u.V2K_A_LINE,i)}for(n=t.indexOf(p.u.V2K_RGP_LINE,0),i=t.indexOf("\n",n);-1!==n;){n+=p.u.V2K_RGP_SHIFT,i=t.indexOf("\n",n);const o=t.substring(n,i).replaceAll(/\s+/g," ").split(" ").map((t=>parseInt(t))).slice(1);for(let t=0;t<o.length;t+=2){if(e.has(o[t])&&e.get(o[t])!==o[t+1])throw new Error(`r-group index ${o[t]} has already been added with a different value`);e.set(o[t],o[t+1])}n=t.indexOf(p.u.V2K_RGP_LINE,i)}return e}(r),h=s.molfile.includes("V3000")?s.molfile:function(t,e){const n=e.get_mol(function(t){return t.split("\n").map((t=>{const e=t.indexOf(" R# "),n=t.indexOf(" R ");if(-1===e&&-1===n)return t;const i=-1!==e?e:n,o=t.split("");for(let t=i+5;t<o.length;t++)" "!==o[t]&&(o[t]="0");return o.join("")})).join("\n")}(t)),i=n.get_v3Kmolblock();return n.delete(),i}(function(t){let e=t.indexOf(p.u.V2K_A_LINE,0);-1===e&&(e=t.indexOf(p.u.V2K_RGP_LINE));const n=t.indexOf(p.u.V3K_END,e);return t.substring(0,e)+t.substring(n)}(s.molfile),n),u=function(t){let e=(t=t.replaceAll("\r","")).indexOf(p.u.V3K_BEGIN_COUNTS_LINE)+p.u.V3K_COUNTS_SHIFT,n=t.indexOf(" ",e+1);const i=parseInt(t.substring(e,n));return e=n+1,n=t.indexOf(" ",e+1),{atomCount:i,bondCount:parseInt(t.substring(e,n))}}(h),d=function(t,e){const n=new Array(e),i=new Float32Array(e),o=new Float32Array(e),r=new Array(e);let s=t.indexOf(p.u.V3K_BEGIN_ATOM_BLOCK);s=t.indexOf("\n",s);let a=s;for(let l=0;l<e;l++){s=t.indexOf(p.u.V3K_BEGIN_DATA_LINE,s)+p.u.V3K_IDX_SHIFT,a=t.indexOf(" ",s),s=a+1,a=t.indexOf(" ",s),n[l]=t.substring(s,a);const e=new Array(2);for(let n=0;n<2;++n)s=a+1,a=t.indexOf(" ",s),e[n]=parseFloat(t.substring(s,a));i[l]=e[0],o[l]=e[1],s=a,a=t.indexOf("\n",s)+1,r[l]=t.slice(s,a),s=a}return{atomTypes:n,x:i,y:o,kwargs:r}}(h,u.atomCount),m=function(t,e){const n=new Uint32Array(e),i=new Array(e),o=new Map,r=new Map;let s=t.indexOf(p.u.V3K_BEGIN_BOND_BLOCK);s=t.indexOf("\n",s);let a=s;for(let l=0;l<e;++l){const e=new Array(3);s=t.indexOf(p.u.V3K_BEGIN_DATA_LINE,a)+p.u.V3K_IDX_SHIFT,a=t.indexOf(" ",s);for(let n=0;n<3;++n)s=a+1,a=Math.min(t.indexOf("\n",s),t.indexOf(" ",s)),e[n]=parseInt(t.slice(s,a));n[l]=e[0],i[l]=e.slice(1);const c=t.indexOf("\n",s);let h=t.slice(a,c),u=h.indexOf(p.u.V3K_BOND_CONFIG);if(-1!==u){u=h.indexOf("=",u)+1;let t=h.indexOf(" ",u);-1===t&&(t=h.length);const e=parseInt(h.slice(u,t));o.set(l,e);const n=p.u.V3K_BOND_CONFIG+e.toString();h=h.replace(n,"")}h||r.set(l,h)}return{bondTypes:n,atomPairs:i,bondConfiguration:o,kwargs:r}}(h,u.bondCount),f=function(t,e,n,i){const o={backboneShift:null,branchShift:null,terminalNodes:[],rNodes:[]};if(n&&i&&[1,2].some((t=>!Array.from(i.values()).find((e=>e==t))))){const o=[1,2].find((t=>!Array.from(i.values()).find((e=>e==t)))),r=[1,2].find((t=>Array.from(i.values()).find((e=>e==t)))),s=Array.from(i.keys()).find((t=>i.get(t)===r))-1,a=t.x[s],l=t.y[s],c=e.atomPairs.find((t=>t.includes(s+1))).find((t=>t!==s+1))-1;let h=t.x.reduce(((e,n,i)=>{if(i===s)return e;if(i===c)return e;const o=t.y[i];return Math.sqrt((n-a)**2+(o-l)**2)>Math.sqrt((t.x[e]-a)**2+(t.y[e]-l)**2)?i:e}),-1);if(-1===h&&(h=t.x.length,t.x=new Float32Array([...t.x,-a]),t.y=new Float32Array([...t.y,-l]),t.atomTypes=[...t.atomTypes,"H"],t.kwargs=[...t.kwargs,""],e.atomPairs.push([c+1,h+1]),e.bondTypes=new Uint32Array([...e.bondTypes,1]),e.kwargs.set(e.atomPairs.length-1,"")),i.set(h+1,o),1===o)n.unshift(t.atomTypes[h]);else{if(2!==o)throw new Error(`Unexpected missing R-group: ${o}`);n.splice(1,0,t.atomTypes[h])}}return function(t,e,n){for(const[i,o]of n)t.atomTypes[i-1]=e[o-1]}(t,n,i),function(t,e){e.rNodes=Array.from(t.keys());for(let n=0;n<e.rNodes.length;n++)for(const i of[1,2])if(t.get(e.rNodes[n])===i){const t=e.rNodes[i-1];e.rNodes[i-1]=e.rNodes[n],e.rNodes[n]=t}}(i,o),y(e,o),o}(d,m,a,c),g=function(t){let e=[],n=t.indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==n;){n+=28;const i=t.indexOf(")",n);e=e.concat(t.substring(n,i).split(" ").slice(1).map((t=>parseInt(t)))),n=i,n=t.indexOf("M V30 MDLV30/STEABS ATOMS=(",n)}return e}(h),v={atoms:d,bonds:m,meta:f,stereoAtoms:g};return"PEPTIDE"===i?function(t){const e=t.meta.terminalNodes[0]-1,n=t.meta.rNodes[0]-1,i=t.atoms.x,o=t.atoms.y;T(t,-i[e],-o[e]);const r=A(i[n],o[n]);S(t.atoms,-r),i[t.meta.rNodes[1]-1]<0&&x(t);const s=function(t){const e=function(t){const e=new Map;for(const n of t.bonds.atomPairs)for(let t=0;t<2;t++){const i=n[t],o=n[(t+1)%2];e.has(i)?e.get(i)?.push(o):e.set(i,new Array(1).fill(o))}return e}(t);let n=0;const i=t.atoms.atomTypes.length;let o=0;if(t.meta.terminalNodes.length<2)return null;for(;0===n;){const r=e.get(t.meta.terminalNodes[1])[o];if(t.atoms.atomTypes[r-1]===p.u.OXYGEN&&r!==t.meta.rNodes[1]&&(n=r),o++,o>i)return null}return n}(t);null!=s&&(function(t,e){t.atoms.y[t.meta.rNodes[1]-1]<0&&t.atoms.y[e-1]<0&&(function(t){E(t,!0)}(t),S(t.atoms,-function(t,e){return A(t,e)+Math.PI/2}(t.atoms.x[t.meta.terminalNodes[1]-1],t.atoms.y[t.meta.terminalNodes[1]-1])))}(t,s),function(t,e){const n=t.atoms.x;n[t.meta.rNodes[1]-1]>n[e-1]&&function(t,e,n){const i=e-1,o=n-1,r=t.atoms.x,s=t.atoms.y,a=r[i],l=s[i];r[i]=r[o],s[i]=s[o],r[o]=a,s[o]=l}(t,e,t.meta.rNodes[1])}(t,s))}(v):t===p.u.RIBOSE.symbol||t===p.u.DEOXYRIBOSE.symbol?function(t,e){const n=t.atoms.x,i=t.atoms.y;let o=t.meta.terminalNodes[0]-1;const r=t.meta.rNodes[1]-1;T(t,-n[o],-i[o]);const s=A(n[t.meta.rNodes[2]-1],i[t.meta.rNodes[2]-1]);S(t.atoms,-s),n[t.meta.rNodes[0]-1]>n[t.meta.rNodes[1]-1]&&x(t);const a=A(n[r],i[r]);S(t.atoms,3*Math.PI/2-a),e.value=function(t){const e=t.atoms.x,n=t.atoms.y,i=t.meta.rNodes[2]-1,o=t.meta.terminalNodes[2]-1,r=e[i]-e[o],s=n[i]-n[o];return Math.atan2(r,s)}(t),o=t.meta.terminalNodes[0]-1,T(t,-n[o],-i[o])}(v,o):t===p.u.PHOSPHATE.symbol?function(t){const e=t.meta.rNodes[1]-1,n=t.meta.rNodes[0]-1,i=t.atoms.x,o=t.atoms.y;T(t,-i[e],-o[e]);const r=A(i[n],o[n]);S(t.atoms,Math.PI/2-r)}(v):function(t,e){const n=t.atoms.x,i=t.atoms.y,o=t.meta.terminalNodes[0]-1,r=t.meta.rNodes[0]-1;T(t,-n[o],-i[o]);const s=A(n[r],i[r]),a=e.value;if(!a)throw new Error("The value of sugarBranchToOYAngle is null");S(t.atoms,Math.PI-s+a);const c=function(t,e){return(0,l.YN)(Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}({x:n[t.meta.rNodes[0]-1],y:i[t.meta.rNodes[0]-1]},{x:n[t.meta.terminalNodes[0]-1],y:i[t.meta.terminalNodes[0]-1]});if(1!=c)for(let t=0;t<n.length;++t)n[t]=(0,l.YN)(n[t]/c),i[t]=(0,l.YN)(i[t]/c)}(v,o),function(t,e,n){if("PEPTIDE"===t){b(e,t);const n=w(e,e.meta.rNodes[1]);n?.removedAtom&&(e.terminalR2Atom=n.removedAtom)}else n===p.u.RIBOSE.symbol||n===p.u.DEOXYRIBOSE.symbol?(w(e,e.meta.rNodes[1]),e.meta.rNodes[1]=e.meta.terminalNodes[1],y(e.bonds,e.meta),b(e,t),w(e,e.meta.rNodes[1]),w(e,e.meta.rNodes[0]),w(e,e.meta.rNodes[2])):n===p.u.PHOSPHATE.symbol&&(e.meta.terminalNodes[0]=e.meta.rNodes[0],T(e,-e.atoms.x[e.meta.terminalNodes[0]-1],-e.atoms.y[e.meta.terminalNodes[0]-1]),b(e,t),w(e,e.meta.rNodes[1]))}(i,v,t),function(t){let e=0;for(;e<t.atoms.atomTypes.length;)t.atoms.atomTypes[e]===p.u.HYDROGEN&&(w(t,e+1),--e),++e}(v),function(t){let e=0;for(;e<t.atoms.atomTypes.length;)"oh"===t.atoms.atomTypes[e]?.toLowerCase()&&(t.atoms.atomTypes[e]="O"),"?"===t.atoms.atomTypes[e]&&(t.atoms.atomTypes[e]="H"),++e}(v),function(t){const e=" RGROUPS=(1 1)";for(let n=0;n<(t.atoms.kwargs?.length??0);n++){const i=t.atoms.kwargs[n];i&&i.includes(e)&&(t.atoms.kwargs[n]=i.replace(e,""))}}(v),v}var r;return null}(e,n,i,o,r);if(!a)throw new Error(`Monomer with symbol '${e}' is absent the monomer library`);(0,h.LQ)(t,s,a)}}function y(t,e){const n=e.rNodes;e.terminalNodes=new Array(n.length).fill(0);const i=e.terminalNodes,o=t.atomPairs;let r=0,s=0;for(;r<o.length&&s<i.length;){for(let t=0;t<i.length;++t)for(let e=0;e<2;++e)o[r][e]===n[t]&&(i[t]=o[r][(e+1)%2],n.length,++s);++r}}function b(t,e){t.meta.rNodes.length>1&&(t.meta.backboneShift=v(t,t.meta.rNodes[1]-1,t.meta.terminalNodes[0]-1)),"RNA"===e&&t.meta.rNodes.length>2&&(t.meta.branchShift=v(t,t.meta.rNodes[2]-1,t.meta.terminalNodes[0]-1))}function v(t,e,n){return[(0,l.YN)(t.atoms.x[e]-t.atoms.x[n]),(0,l.YN)(t.atoms.y[e]-t.atoms.y[n])]}function w(t,e){if(void 0!==e){const n=e-1,i=t.atoms,o=t.bonds,r=t.meta,s=i.atomTypes.splice(n,1)[0];i.x=C(Float32Array,i.x,n,1),i.y=C(Float32Array,i.y,n,1),i.kwargs.splice(n,1);for(let t=0;t<r.terminalNodes.length;++t)r.terminalNodes[t]>e?--r.terminalNodes[t]:r.terminalNodes[t]===e&&(r.terminalNodes[t]=-1);for(let t=0;t<r.rNodes.length;++t)r.rNodes[t]>e?--r.rNodes[t]:r.rNodes[t]===e&&(r.rNodes[t]=-1);let a=0;for(;a<o.atomPairs.length;){const t=o.atomPairs[a][0],n=o.atomPairs[a][1];t===e||n===e?(o.atomPairs.splice(a,1),o.bondTypes=C(Uint32Array,o.bondTypes,a,1),o.bondConfiguration.has(a)&&o.bondConfiguration.delete(a),o.kwargs.has(a)&&o.kwargs.delete(a),--a):(o.atomPairs[a][0]=t>e?t-1:t,o.atomPairs[a][1]=n>e?n-1:n),++a}let l=Array.from(o.bondConfiguration.keys());return l.forEach((t=>{if(o.bondConfiguration.has(t)&&t>n){const e=o.bondConfiguration.get(t);o.bondConfiguration.delete(t),o.bondConfiguration.set(t-1,e)}})),l=Array.from(o.kwargs.keys()),l.forEach((t=>{if(o.kwargs.has(t)&&t>n){const e=o.kwargs.get(t);o.kwargs.delete(t),o.kwargs.set(t-1,e)}})),s?{removedAtom:s}:void 0}}function C(t,e,n,i){const o=new t(e.length-i);let r=0,s=0;for(;r<e.length;)r===n&&(r+=i),o[s]=e[r],++s,++r;return o}function A(t,e){let n;if(0===t)n=e>0?0:Math.PI;else if(0===e)n=t>0?-Math.PI/2:Math.PI/2;else{const i=e/t,o=Math.atan(i);n=t<0?Math.PI/2+o:-Math.PI/2+o}return n}function S(t,e){if(0!==e){const n=t.x,i=t.y,o=Math.cos(e),r=Math.sin(e);for(let t=0;t<n.length;++t){const e=n[t];n[t]=(0,l.YN)(e*o-i[t]*r),i[t]=(0,l.YN)(e*r+i[t]*o)}}}function x(t){E(t,!1)}function E(t,e){if(e){const e=t.atoms.y;for(let t=0;t<e.length;t++)e[t]=-e[t]}else{const e=t.atoms.x;for(let t=0;t<e.length;t++)e[t]=-e[t]}const n=t.bonds.bondConfiguration;for(const[t,e]of n){const i=1===e?3:1;n.set(t,i)}}function T(t,e,n){const i=t.atoms.x,o=t.atoms.y;for(let t=0;t<i.length;++t)i[t]=(0,l.YN)(i[t]+e),void 0!==n&&(o[t]=(0,l.YN)(o[t]+n))}},294:(t,e,n)=>{"use strict";function i(t,e){return t[e.polymerType]?.[e.symbol]}function o(t,e){return!!t[e.polymerType]?.[e.symbol]}function r(t,e,n){let i=t[e.polymerType];i||(i=t[e.polymerType]={}),i[e.symbol]=n}n.d(e,{Cg:()=>s,LQ:()=>r,bq:()=>o,vF:()=>a,xb:()=>i});class s extends Map{constructor(t){super(t)}}class a{constructor(t,e){this.molfile=t,this.monomers=e}static createEmpty(){return new a("",new s(null))}}},330:(t,e,n)=>{"use strict";n.d(e,{kA:()=>o,pz:()=>s,qj:()=>r,vG:()=>a});var i=n(2003);function o(t,e){return t?t.columns.getUnusedName(e):e}function r(t,e){return o(t,`molfile(${e})`)}function s(t){let e;if(t===i.YI.PT||t===i.YI.UN)e="PEPTIDE";else{if(t!==i.YI.RNA&&t!==i.YI.DNA)throw new Error(`Unexpected alphabet '${t}'.`);e="RNA"}return e}function a(t){const e=7===t.length?/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t):/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16)/256,parseInt(e[2],16)/256,parseInt(e[3],16)/256,e.length>4?parseInt(e[4],16)/256:.3]:null}},1093:(t,e,n)=>{"use strict";n(7362);class i{}i.SemType="Nucleotides",i.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",i.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"}},7362:(t,e,n)=>{"use strict";n.d(e,{e:()=>i});class i{static makePalette(t,e=!1,n=i){const o={};return t.forEach((t=>{const n=t[0],i=t[1];n.forEach(((t,n)=>{o[t]=this.colourPalette[i][e?0:n]}))})),new n(o)}constructor(t){this._palette=t}get(t,e){return this._palette[t]}}i.undefinedColor="rgb(100,100,100)",i.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)"]}},4574:(t,e,n)=>{"use strict";n.d(e,{O:()=>r,n:()=>o});var i=n(1858);class o{constructor(t,e=!0,n){return this.substructure=t,this.readOnly=e,this.logger=n,new Proxy(this,{set:(t,e,n)=>{if(this.logger?.debug(`BioFilterProps.set ${e.toString()}( '${n}' )`),this.readOnly)throw new Error("Properties are immutable.");return t[e]=n,!0}})}}class r{constructor(){this.onChanged=new i.Subject,this._props=null,this._propsChanging=!1}get props(){return this._props||(this._props=this.emptyProps),this._props}set props(t){this._propsChanging=!0;try{this._props=t,this.applyProps(),this.onChanged.next()}finally{this._propsChanging=!1}}saveProps(){const t={};for(const[e,n]of Object.entries(this.props))"_onChanged"!==e&&"logger"!==e&&(t[e]=this.props[e]);return t}async detach(){}get filterSummary(){return this.props.substructure}get isFiltering(){return""!==this.props.substructure}resetFilter(){this.props=this.emptyProps,this.onChanged.next()}}},4152:(t,e,n)=>{"use strict";var i=n(6082),o=n(7362),r=n(6718);function s(t,e=!0){if(null==t)return"rgb(100,100,100)";const n=i.Color.fromHtml(t);if(e){const t=i.Color.g(n),e=i.Color.r(n),o=i.Color.b(n),r=Math.sqrt(Math.pow(0-e,2)+Math.pow(0-t,2)+Math.pow(0-o,2));if(r>210)return`rgb(${e/r*210},${t/r*210},${o/r*210})`}return i.Color.toRgb(n)}class a{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 l{}class c extends l{static get palette(){return c._pallete||(c._pallete=c.buildPalette()),c._pallete}static buildPalette(){return(0,r.pj)().then((t=>{t.awaitLoaded(1/0).then((()=>{const e=t.getMonomerLib();e.onChanged.subscribe((()=>{c.customMonomerColors={},c.polymerTypes=e.getPolymerTypes();for(const t of this.polymerTypes){const n=e.getMonomerSymbolsByType(t);for(const i of n){const n=e.getMonomer(t,i);n?.meta?.colors?.default?.background&&(this.customMonomerColors[i]||(this.customMonomerColors[i]={}),this.customMonomerColors[i][t]=s(n.meta.colors.default.background))}}}))}))})),[].concat(...Object.values(o.e.colourPalette))}get(t,e){const n=c.palette.length,i=c.customMonomerColors[t],o=e??"PEPTIDE";if(i&&i[o])return i[o];const r=a.hashCode(t)%n;return s(c.palette[r])}}c._pallete=null,c.customMonomerColors={},c.polymerTypes=[]},6642:(t,e,n)=>{"use strict";n.d(e,{BG:()=>s,sD:()=>l});var i=n(4328),o=n(1858),r=n(8070);function s(t){let e=null,n=null;try{n=t.dart?t.gridColumn:null,e=n?n.temp:null}catch{[n,e]=[null,null]}const i=t.cell.column;if(e=e??(i?i.temp:null),!e)throw new Error("Grid cell renderer back store (GridColumn or Column) not found.");return[n,i,e]}class a{onKeyDown(t,e){}onKeyPress(t,e){}onMouseEnter(t,e){}onMouseLeave(t,e){}onMouseDown(t,e){}onMouseUp(t,e){}onMouseMove(t,e){}onClick(t,e){}onDoubleClick(t,e){}}class l extends a{constructor(t,e,n){super(),this.gridCol=t,this.tableCol=e,this.logger=n,this.subs=[],this.dirty=!0,this.destroyed=!1,this.viewerId=++l.viewerCounter,this.errors=[],this._onRendered=new o.Subject,this.tableCol&&this.tableCol.dataFrame&&(this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{this.dirty=!0}))),this.subs.push(this.tableCol.dataFrame.onColumnsRemoved.subscribe((t=>{try{this.destroyed||!this.tableCol||this.tableCol.dataFrame||this.destroy()}catch(t){this.logger.error(t)}})))),this.tableCol&&this.subs.push(i.events.onTableRemoved.subscribe((t=>{try{const e=t.args.dataFrame;this.tableCol?.dataFrame.id!==e.id||this.destroyed||this.destroy()}catch(t){this.logger.error(t)}}))),this.gridCol&&this.subs.push(i.events.onViewRemoving.subscribe((t=>{try{const e=t.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===e.id&&!this.destroyed&&this.destroy()}catch(t){this.logger.error(t)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const t of this.subs)t.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}reset(){this.dirty=!1}get onRendered(){return this._onRendered}invalidate(t){this.invalidateGrid()}async awaitRendered(t=1e4,e=`${t} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,r.PE)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),t,`${n}, ${e}`),this.errors.length>0){const t=this.errors[0];throw this.errors=[],t}this.logger.debug(`${n}, end`)}}l.viewerCounter=-1},673:(t,e,n)=>{"use strict";n.d(e,{s:()=>i});const i={true:"1",false:"0"}},6882:(t,e,n)=>{"use strict";n.d(e,{Jy:()=>b,S$:()=>y,U0:()=>v});var i=n(7389),o=n(6082),r=n(1991),s=n.n(r),a=n(8312),l=n(2003),c=n(6642),h=n(6718),u=n(9192),d=n(3856),p=n(673),m=n(3599),f=n(5553),g=n(9713);const y="rgb(100,100,100)";class b extends c.sD{get separatorWidth(){return this.props?.fontCharWidth?this.props?.fontCharWidth:5}constructor(t,e,n,i,r){if(super(t,e,n),this.monomerLengthLimit=i,this.propsProvider=r,this.colWidth=0,this._monomerLengthList=null,this._processedMaxVisibleSeqLength=0,this._monomerLengthMap={},this._monomerStructureMap={},this._ellipsisBounds=void 0,this._totalLinesNeeded=0,this._lineHeight=20,this._cellBounds=new Map,this.sysMonomerLib=null,this.padding=5,this._leftThreeDotsPadding=0,this.props=this.propsProvider(),this._processedRows=o.BitSet.create(this.tableCol.length),this.gridCol&&this.subs.push(this.gridCol.grid.onAfterDrawContent.subscribe((()=>{this._onRendered.next()}))),this.tableCol&&this.gridCol){this.subs.push(this.tableCol.dataFrame.onCurrentRowChanged.subscribe((()=>{-1===this.tableCol.dataFrame.currentRowIdx&&(this.tableCol.temp["reference-sequence"]=null,this.tableCol.temp["current-word"]=null,this.invalidateGrid())})));const t=[l.gp.positionShift,"renderMultiline"];this.subs.push(o.debounce(this.tableCol.dataFrame.onMetadataChanged.pipe(g.filter((e=>e.args.source===this.tableCol&&t.includes(e.args.key)))),200).subscribe((t=>{this.reset()}))),this.subs.push(o.debounce(this.tableCol.dataFrame.onMetadataChanged.pipe(g.filter((t=>t.args.source===this.tableCol&&t.args.key===l.gp.positionShift))),200).subscribe((t=>{this.reset()})))}}calculateFontBasedSpacing(t){const e=t.measureText("M");let n=12;if(this.tableCol?.temp[".mm.cellRenderer.fontSize"]){const t=this.tableCol.temp[".mm.cellRenderer.fontSize"];"number"!=typeof t||isNaN(t)||(n=Math.max(t,1))}return{lineHeight:Math.max(1.4*n,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent+4),monomerSpacing:Math.max(2,.2*this.props.fontCharWidth)}}shouldUseMultilineRendering(t){return"true"===t.getTag("renderMultiline")}calculateMultiLineLayoutDynamic(t,e,n,i,o,r){if(this.dirty)try{this.reset()}catch(t){const[e,n]=(0,u.AP)(t);this.logger.error(e,void 0,n)}const{lineHeight:s,monomerSpacing:a}=this.calculateFontBasedSpacing(t),l=e-2*this.padding;let c=0;const h=[];if(i.length>0)for(let e=o;e<i.length;e++){const n=i.getOriginal(e),o=this.props.monomerToShort(n,r);h.push({text:o,posIdx:e}),c=Math.max(c,t.measureText(o).width)}if(0===h.length)return{lineLayouts:[],lineHeight:s};const d=c;let p=Math.floor((l+a)/(d+a));p=Math.max(1,p);const m=n-2*this.padding,f=Math.max(0,Math.floor(m/s)),g=[];let y=0;for(let t=0;t<f&&y<h.length;t++){const e=[];for(let t=0;t<p&&y<h.length;t++){const n=h[y],i=this.padding+t*(d+a);e.push({posIdx:n.posIdx,x:i,width:d,om:n.text,isSeparator:!1}),y++}g.push({lineIdx:t,elements:e})}return{lineLayouts:g,lineHeight:s}}async init(){await Promise.all([(async()=>{this.seqHelper=await(0,a.Q)(),this.invalidateGrid()})(),(async()=>{const t=await(0,h.pj)();this.sysMonomerLib=t.getMonomerLib()})()]),this.subs.push(this.sysMonomerLib.onChanged.subscribe((()=>{this.reset()}))),this.reset()}static getFontSettings(t){let e=12;return t&&t.temp[".mm.cellRenderer.fontSize"]&&"number"==typeof t.temp[".mm.cellRenderer.fontSize"]&&!isNaN(t.temp[".mm.cellRenderer.fontSize"])&&(e=Math.max(t.temp[".mm.cellRenderer.fontSize"],1)),{font:`${e}px monospace`,fontWidth:.6*e}}toLog(){return`MonomerPlacer<${this.viewerId}>`}getMonomerLib(){return this.tableCol.temp[".mm.cellRenderer.overriddenLibrary"]??this.sysMonomerLib}reset(){this.propsProvider&&(this.props=this.propsProvider()),this._processedRows=o.BitSet.create(this.tableCol.length),this._monomerLengthList=null,this._monomerLengthMap={},this._monomerStructureMap={},this._cellBounds.clear(),super.reset(),this.invalidateGrid()}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}getCellMonomerLengths(t,e){const n=this.seqHelper.getSeqHandler(this.tableCol);if(this.colWidth<e&&(this.colWidth=e,this.dirty=!0),this.dirty)try{this.reset()}catch(t){const[e,n]=(0,u.AP)(t);this.logger.error(e,void 0,n)}const i=n.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(t);return[i,this.getSummedMonomerLengths(i)]}getSummedMonomerLengths(t){const e=new Array(t.length+1);e[0]=this.padding;for(let n=1;n<e.length;n++)e[n]=e[n-1]+t[n-1];let n=e[0];for(let t=1;t<e.length;t++)e[t]?n=e[t]:e[t]=n;return e}getCellMonomerLengthsForSeqValue(t,e){const n=this.seqHelper.getSeqHandler(this.tableCol),i=this.props.separatorWidth+1*this.props.fontCharWidth,o=this.positionShift,r=Math.ceil(e/i)+o,s=n.splitter(t),a=Math.min(r,s.length),l=new Array(a-o);let c=0;for(let t=o;t<a;++t){const i=s.getOriginal(t),r=this.props.monomerToShort(i,this.monomerLengthLimit),a=(n.isSeparator()?this.separatorWidth:this.props.separatorWidth)+r.length*this.props.fontCharWidth;if(l[t-o]=a,c+=a,c>e)break}return l}getCellMonomerLengthsForSeq(t){this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.tableCol.length).fill(null));const e=this.positionShift,n=this.seqHelper.getSeqHandler(this.tableCol),i=this.props.separatorWidth+1*this.props.fontCharWidth,o=Math.ceil(this.colWidth/i)+e,r=n.getSplitted(t),s=Math.min(o,r.length);let a=this._monomerLengthList[t];if(null===a||a.length!=s-e){a=this._monomerLengthList[t]=new Array(r.length);let i=0;for(let t=e;t<s;++t){const o=r.getOriginal(t),s=this.props.monomerToShort(o,this.monomerLengthLimit),l=(n.isSeparator()?this.separatorWidth:this.props.separatorWidth)+s.length*this.props.fontCharWidth;if(a[t-e]=l,i+=l,i>this.colWidth)break}}return a}getCellMonomerLengthsForSeqMsa(){var t;this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null)),(t=this._monomerLengthList)[0]??(t[0]=new Array(0));const e=this._monomerLengthList[0],{startIdx:n,endIdx:i}=(()=>{try{const t=this.gridCol&&this.gridCol.dart?this.gridCol.grid:null;return t&&t.dart?{startIdx:Math.max(Math.floor((t?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((t?.vertScroll.max??0)+10),this.tableCol.length)}:{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}catch(t){return{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}})(),o=this.props.separatorWidth+1*this.props.fontCharWidth,r=this.positionShift,s=Math.ceil(this.colWidth/o)+r;for(let t=n;t<i;t++){if(this._processedRows.get(t)&&s<=this._processedMaxVisibleSeqLength)continue;const n=this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t,s),i=Math.min(s,n.length);i-r>e.length&&e.push(...new Array(i-r-e.length).fill(o));let a=0;for(let t=r;t<i;++t){const i=n.getOriginal(t),o=this.props.monomerToShort(i,this.monomerLengthLimit),s=this.props.separatorWidth+o.length*this.props.fontCharWidth;if(e[t-r]=Math.max(e[t-r]??0,s),a+=s,a>=this.colWidth)break}this._processedMaxVisibleSeqLength=Math.max(this._processedMaxVisibleSeqLength,s),this._processedRows.set(t,!0)}return e}getPosition(t,e,n,i){const[o,r]=this.getCellMonomerLengths(t,n);return 0===this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t).length?null:function(t,e,n){if((n??0)>0&&e<(t[0]??0)+n)return-1;e-=n??0;let i,o=100,r=0,s=t.length-1;for(;r<=s;){if(i=Math.floor((s+r)/2),t[i]<=e&&e<t[i+1])return i;if(e<t[i]?s=i-1:r=i+1,--o<=0)throw new Error(`Get position for pointer x = ${e} searching has not converged on ${JSON.stringify(t)}. `)}return null}(r,e,i)}setMonomerLengthLimit(t){this.monomerLengthLimit!=t&&(this.monomerLengthLimit=t,this.dirty=!0)}setSeparatorWidth(t){this.separatorWidth!=t&&(this.props.separatorWidth=t,this.dirty=!0)}get positionShift(){const t=Number.parseInt(this.tableCol?.tags[l.gp.positionShift]??"0")??0;return isNaN(t)?0:Math.max(t,0)}render(t,e,n,i,r,a,c){const h=a.grid?.canvas===t.canvas;if(!this.seqHelper)return;const m=this.tableCol,f=this.positionShift;t.save();try{const c=this.seqHelper.getSeqHandler(m);let u=this.monomerLengthLimit;if(d.gp.maxMonomerLength in m.tags){const t=parseInt(m.getTag(d.gp.maxMonomerLength));u=!isNaN(t)&&t?t:50}if(m.temp[".mm.cellRenderer.settingsChanged"]===p.s.true||this.monomerLengthLimit!=u){let t=0;const e=8;t=m.temp[".mm.cellRenderer.gapLength"]??t,this.setMonomerLengthLimit(u),this.setSeparatorWidth(c.isMsa()?e:t),m.temp[".mm.cellRenderer.settingsChanged"]=p.s.false,this.dirty=!0}const g=a.cell.rowIndex,b=a.cell.value;h&&(i=v(a.grid,t,e,i,window.devicePixelRatio)),t.beginPath(),t.rect(e,n,i,r),t.clip(),t.font=this.props?.font??"12px monospace",t.textBaseline="top";const w=m.meta.units,C=m.getTag(l.gp.aligned),A=m.getTag(l.gp.separator)??"",S=h?c.getSplitted(g):c.splitter(b);let x=d.yg.classic;C?.includes("MSA")&&w===l.Hi.SEPARATOR&&(x=d.yg.MSA);const E=m.temp["reference-sequence"],T=this.tableCol.temp["current-word"],M=(()=>{const t=(0,c.splitter)(null!=E&&""!==E?E:T??"");return s().count(0).take(t.length).slice(f).map((e=>t.getCanonical(e))).toArray()})(),_=Number.parseInt(m.getTag(l.gp.selectedPosition)??"-200");if(this.shouldUseMultilineRendering(m)){const s=[],l=this.calculateMultiLineLayoutDynamic(t,i,r,S,f,u);let h=n+this.padding;1===l.lineLayouts.length&&(h=n+(r-l.lineHeight)/2);for(const i of l.lineLayouts){const r=h+i.lineIdx*l.lineHeight;for(const h of i.elements){const u=e+h.x,p=h,g=p.posIdx,b=S.getCanonical(g);let v=y;const w=this.getMonomerLib();w&&(v=w.getMonomerTextColor(c.defaultBiotype,b));let C=0;if(a.tableRowIndex!==m.dataFrame.currentRowIdx&&M.length>0){const t=g-f;t>=0&&t<M.length&&b===M[t]&&(C=.7)}s.push({lineIdx:i.lineIdx,monomerIdx:g-f,bounds:new o.Rect(h.x,r-n,h.width,l.lineHeight),sequencePosition:g}),(0,d.oZ)(t,p.om,u,r,h.width,l.lineHeight,{color:v,isMultiLineContext:!0,transparencyRate:C,selectedPosition:isNaN(_)||_<1?void 0:_,wordIdx:g})}}null!==a.tableRowIndex&&this._cellBounds.set(a.tableRowIndex,s)}else{this._leftThreeDotsPadding=this.shouldRenderShiftedThreeDots(f)?t.measureText("...").width:0;let[,o]=this.getCellMonomerLengths(a.tableRowIndex,i);h||(o=this.getSummedMonomerLengths(this.getCellMonomerLengthsForSeqValue(b,i)));const s=this.props.separatorWidth+1*this.props.fontCharWidth,l=Math.min(S.length,Math.ceil(i/s)+f);for(let s=f;s<l;++s){const l=s<S.length?S.getOriginal(s):c.defaultGapOriginal,h=s<S.length?S.getCanonical(s):c.defaultGapOriginal;let p=y;this.getMonomerLib()&&(p=this.getMonomerLib().getMonomerTextColor(c.defaultBiotype,h));const m={color:p,pivot:0,left:!0,transparencyRate:0,separator:A,last:s===S.length-1,drawStyle:x,maxWord:o,wordIdx:s-f,gridCell:a,referenceSequence:M,maxLengthOfMonomer:u,monomerTextSizeMap:this._monomerLengthMap,logger:this.logger,selectedPosition:isNaN(_)||_<1?void 0:_-f};(0,d.oZ)(t,l,e+this.padding+this._leftThreeDotsPadding,n,i,r,m)}if(this.shouldRenderShiftedThreeDots(f)){const s={color:y,pivot:0,left:!0,transparencyRate:0,separator:A,last:!1,drawStyle:x,maxWord:o,wordIdx:0,gridCell:a,maxLengthOfMonomer:u,monomerTextSizeMap:this._monomerLengthMap,logger:this.logger};(0,d.oZ)(t,"...",e+this.padding,n,i,r,s)}}}catch(t){const[e,n]=(0,u.AP)(t);this.logger.error(e,void 0,n),this.errors.push(t)}finally{t.restore()}}shouldRenderShiftedThreeDots(t){return t>0&&(!this.gridCol||!this.gridCol.dart||!this.gridCol.grid||!this.gridCol.grid.dart||(this.gridCol.grid.props.colHeaderHeight??0)<=50)}onMouseMove(t,e){const n=`${this.toLog()}.onMouseMove()`;if(!this.seqHelper||null==t.tableRowIndex)return;const o=this.positionShift,r=t.bounds,s=e.offsetX-t.gridColumn.left+(t.gridColumn.left-r.x),a=e.offsetY-r.y;this.gridCol?.grid?.canvas&&(this.gridCol.grid.canvas.style.cursor="default");let c=null;const h=this._cellBounds.get(t.tableRowIndex);if(h){for(const t of h)if(t.bounds.contains(s,a)){c=t.monomerIdx;break}}else{const e=this.shouldRenderShiftedThreeDots(o)&&(this._leftThreeDotsPadding??0)>0?this._leftThreeDotsPadding:0;c=this.getPosition(t.tableRowIndex,s,r.width,e)}this.logger.debug(`${n}, argsX: ${s}, argsY: ${a}, left: ${c}`);const u=this.seqHelper.getSeqHandler(this.tableCol),d=u.getSplitted(t.tableRowIndex);if(null!==c&&c>=0&&c+o<d.length){const n=u.alphabet??l.YI.UN,r={position:c,biotype:n===l.YI.RNA||n===l.YI.DNA?m.o.NUCLEOTIDE:m.o.AA,symbol:d.getCanonical(c+o)},s=[];let a=this._monomerStructureMap[r.symbol];if(!a){const t=this.getMonomerLib();a=this._monomerStructureMap[r.symbol]=t?t.getTooltip(r.biotype,r.symbol):i.divText("Monomer library is not available")}s.push(a),i.tooltip.show(i.divV(s),e.x+16,e.y+16),(0,f.WN)(t,r)}else-1===c?i.tooltip.show(i.divText(`${Math.min(o,d.length)} hidden monomers`),e.x+16,e.y+16):i.tooltip.hide(),(0,f.WN)(t,null)}}function v(t,e,n,i,o){return t?Math.max(Math.min(t.canvas.width/o-n,i)):Math.max(e.canvas.width/o-n,0)}},3856:(t,e,n)=>{"use strict";n.d(e,{Mn:()=>h,gp:()=>c,oZ:()=>p,yg:()=>u});var i=n(6082),o=n(7278);const r="rgb(100,100,100)",s="#808080",a="rgb(0,0,0)",l=o.zS;var c,h,u;!function(t){t.maxMonomerLength=".mm.cellRenderer.maxMonomerLength"}(c||(c={})),function(t){t.applyToBackground=".m.cellRenderer.applyToBackground"}(h||(h={})),function(t){t.MSA="MSA",t.classic="classic"}(u||(u={}));const d=new class{constructor(){this.color=r,this.pivot=0,this.left=!1,this.transparencyRate=0,this.separator="",this.last=!1,this.drawStyle=u.classic,this.maxWord=[],this.wordIdx=0,this.gridCell=null,this.referenceSequence=null,this.maxLengthOfMonomer=null,this.monomerTextSizeMap={},this.logger=void 0,this.selectedPosition=void 0,this.isMultiLineContext=!1,this.lineNumber=0}};function p(t,e,n,o,c,h,p){var m,f,g;const y={...d,...p};if(y.isMultiLineContext){t.textBaseline="middle",t.textAlign="center";let i=e;null!=y.maxLengthOfMonomer&&(i=l(i,y.maxLengthOfMonomer));const s=Math.max(.1,1-(y.transparencyRate??0));t.globalAlpha=s;const u=t.measureText(i),d=u.fontBoundingBoxAscent+u.fontBoundingBoxDescent,p=o+(h-d)/2+u.fontBoundingBoxAscent;let m=y.color??r;return m&&m!==r||(m=a),t.fillStyle=m,y.selectedPosition===y.wordIdx+1&&(t.save(),t.fillStyle="rgba(60, 177, 115, 0.2)",t.fillRect(n,o,c,h),t.restore(),t.fillStyle=m),t.fillText(i,n+c/2,p),t.globalAlpha=1,t.textBaseline="top",t.textAlign="start",n+c}p.logger?.debug("Bio: printLeftOrCentered(), start"),t.textAlign="start";let b=e.substring(0),v=y.last?"":y.separator;y.drawStyle===u.MSA&&(v="");let w=!0,C=!0,A="difference";if(null!=y.gridCell&&null!=y.gridCell.cell.column&&(w=y.gridCell.cell.column.temp["color-code"]??!0,C=y.gridCell.cell.column.temp["compare-with-current"]??!0,A=y.gridCell.cell.column.temp["highlight-difference"]??"difference"),y.referenceSequence){const t=y.referenceSequence[y.wordIdx];C&&y.referenceSequence.length>0&&"difference"===A&&(y.transparencyRate=b==t?.7:y.transparencyRate),C&&y.referenceSequence.length>0&&"equal"===A&&(y.transparencyRate=b!=t?.7:y.transparencyRate)}null!=y.maxLengthOfMonomer&&(b=l(b,y.maxLengthOfMonomer));const S=b+v;(m=y.monomerTextSizeMap)[S]??(m[S]=t.measureText(S));let x=y.monomerTextSizeMap[S];(f=y.monomerTextSizeMap)[b]??(f[b]=t.measureText(b));let E=y.monomerTextSizeMap[b].width;const T=h/2-(x.fontBoundingBoxAscent+x.fontBoundingBoxDescent)/2+1;(g=y.monomerTextSizeMap)[v]??(g[v]=t.measureText(v));const M=y.monomerTextSizeMap[v].width;function _(e,r){let l=w?y.color:a;y.selectedPosition===y.wordIdx+1&&(t.fillStyle="rgba(60, 177, 115, 0.2)",t.fillRect(n+e-4,o-5,y.monomerTextSizeMap[b].width+8,h+10),l=i.Color.toHtml(i.Color.setAlpha(i.Color.fromHtml(l),255))),t.fillStyle=l,t.globalAlpha=1-y.transparencyRate,y.drawStyle===u.classic&&(t.fillText(b,n+e,o+T),t.fillStyle=s,t.fillText(v,n+r,o+T)),y.drawStyle===u.MSA&&t.fillText(b,n+e,o+T),t.globalAlpha=1}x=x.width,y.drawStyle===u.MSA&&(E=y.maxWord[y.wordIdx],x=y.maxWord[y.wordIdx]);const I=(y.maxWord[y.wordIdx]??0)-(y.maxWord[0]??0);if(y.left||x>c)return _(I,I+E),n+I+E+M;{const t=(c-x)/2;return _(t,t+E),n+I+t+E}}},6307:(t,e,n)=>{"use strict";n.d(e,{F:()=>s});var i=n(7389),o=n(6082),r=n(439);function s(t,e,n){let s=0,a=null;for(const e of Object.values(t))s+=e,a=null===a?e:Math.max(a,e);const l=a/s,c=Object.assign({},...Array.from(Object.entries(t)).sort(((t,e)=>e[1]-t[1])).map((([t,a])=>{const c=a/s;let h;try{const i=n.getMonomerColors(e,t);h=i?.backgroundcolor||"#CCCCCC"}catch(e){console.warn(`Failed to get colors for monomer ${t}:`,e),h="#CCCCCC"}const u=i.div("",{classes:"macromolecule-cell-comp-analysis-bar"});u.style.width=50*c/l+"px",u.style.backgroundColor=h,r._S===t&&(u.style.borderWidth="1px",u.style.borderStyle="solid",u.style.borderColor=o.Color.toHtml(o.Color.lightGray));const d=r._S===t?"-":t,p=i.div(`${(100*c).toFixed(2)}%`),m=i.div([u,p],{classes:"macromolecule-cell-comp-analysis-value"});return{[d]:m}}))),h=i.tableFromMap(c);return Array.from(h.rows).forEach((t=>{const e=t.getElementsByClassName("macromolecule-cell-comp-analysis-bar")[0].style.backgroundColor;t.cells[0].style.color=e})),h}},3151:(t,e,n)=>{"use strict";n.d(e,{EK:()=>l,Ec:()=>r,f6:()=>i,pe:()=>s,q7:()=>a,yw:()=>o});const i=["symbol","molfile","rgroups","name"],o="MonomerName",r={monomerType:null,smiles:null,name:"Name",author:null,molfile:"molecule",naturalAnalog:"MonomerNaturalAnalogCode",rgroups:"MonomerCaps",createDate:null,id:null,polymerType:"MonomerType",symbol:"MonomerName"},s={monomerType:"Backbone",smiles:"",name:"",author:"Datagrok",molfile:"",naturalAnalog:"",rgroups:[],createDate:null,id:0,polymerType:"PEPTIDE",symbol:""},a="p",l=new RegExp(`[rd]\\((\\w)\\)${a}?`,"g")},9192:(t,e,n)=>{"use strict";function i(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?i(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function o(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?o(t.$thrownJsError):void 0}function r(t){return[i(t),o(t)]}n.d(e,{AP:()=>r})},3516:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=n(6082),o=n(439);class r{get descriptionsArray(){return this._descriptionsArray}get sequencesArray(){return this._sequencesArray}parseMacromolecule(t,e){return this._fileContent.slice(t,e).split(/\s/).join("")}parseColumns(){const t=/^>(.*)$/gm;let e,n=0;for(;e=t.exec(this._fileContent);){const i=this._fileContent.substring(e.index+1,t.lastIndex);this._descriptionsArray.push(i),0!==n&&this._sequencesArray.push(this.parseMacromolecule(n,e.index)),n=t.lastIndex+1}this._sequencesArray.push(this.parseMacromolecule(n,-1))}importFasta(){const t=i.Column.fromStrings("description",this.descriptionsArray),e=i.Column.fromStrings("sequence",this.sequencesArray);return e.semType=i.SEMTYPE.MACROMOLECULE,e.meta.units=o.Hi.FASTA,[i.DataFrame.fromColumns([t,e])]}constructor(t){this._descriptionsArray=[],this._sequencesArray=[],this._fileContent=t,this.parseColumns()}}},6873:(t,e,n)=>{"use strict";n.d(e,{Hx:()=>h,dW:()=>c});var i=n(6082),o=n(1991),r=n.n(o),s=n(2003),a=n(7278),l=n(439);function c(t=10**5){const e="meI/hHis/Aca/N//dE/Thr_PO3H2/Aca/D-Tyr_Et/Tyr_ab-dehydroMe".repeat(Math.ceil(t/10)).slice(0,-1),n=i.Column.fromList(i.COLUMN_TYPE.STRING,"MSA",new Array(100).fill(e));n.semType=i.SEMTYPE.MACROMOLECULE,n.meta.units=s.Hi.SEPARATOR,n.setTag(s.gp.separator,"/"),n.setTag(s.gp.alphabet,s.YI.UN),n.setTag(s.gp.alphabetIsMultichar,"true");const o=[];return o.push(n),o.push(i.Column.fromList(i.COLUMN_TYPE.FLOAT,"Activity",new Array(100).fill(7.30751))),o}function h(t,e=s.Hi.SEPARATOR,n=s.YI.PT,o=(e===s.Hi.SEPARATOR?"-":void 0),c=void 0,h="seq",u=100,d=10**6){const p=n===s.YI.UN?c?.getMonomerSymbolsByType("PEPTIDE")??[]:Array.from((0,s.Qf)(n)),m=p.length,f=i.Column.fromType(i.COLUMN_TYPE.STRING,h,u);f.semType=i.SEMTYPE.MACROMOLECULE,f.meta.units=e,f.setTag(s.gp.alphabet,n),e==s.Hi.SEPARATOR&&f.setTag(s.gp.separator,o);const g=t.getSeqHandler(f);for(let t=0;t<u;t++){const n=r().count(0).take(d).map((t=>p[Math.floor(Math.random()*m)])).toArray(),i=g.joiner(new a.Mu(n,l.b9[e]));f.set(t,i)}return f}},439:(t,e,n)=>{"use strict";n.d(e,{B5:()=>l,Hi:()=>i,Vl:()=>c,YI:()=>o,_S:()=>u,b9:()=>d,gp:()=>r,ot:()=>p,q7:()=>h,z1:()=>a});var i,o,r,s=n(2738);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm",t.CUSTOM="custom"}(i||(i={})),function(t){t.DNA="DNA",t.RNA="RNA",t.PT="PT",t.UN="UN"}(o||(o={})),function(t){t.aligned="aligned",t.alphabet="alphabet",t.alphabetSize=".alphabetSize",t.alphabetIsMultichar=".alphabetIsMultichar",t.separator="separator",t.isHelmCompatible=".isHelmCompatible",t.positionNames=".positionNames",t.positionLabels=".positionLabels",t.regions=".regions",t.positionShift=".positionShift",t.selectedPosition=".selectedPosition"}(r||(r={}));const a=", ",l=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,c=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"])}}},h=[new s.a(o.PT,c.fasta.peptide,.5),new s.a(o.DNA,c.fasta.dna,.55),new s.a(o.RNA,c.fasta.rna,.55)],u="",d={[i.FASTA]:"-",[i.SEPARATOR]:"",[i.HELM]:"*"},p=" , "},2003:(t,e,n)=>{"use strict";n.d(e,{Hi:()=>i.Hi,J9:()=>o.J9,Qf:()=>o.Qf,YI:()=>i.YI,dh:()=>o.dh,gp:()=>i.gp,mn:()=>o.mn,q7:()=>i.q7,qp:()=>o.qp,z1:()=>i.z1,zS:()=>o.zS});var i=n(439),o=n(7278)},2738:(t,e,n)=>{"use strict";n.d(e,{X:()=>o,a:()=>i});class i{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}class o extends i{constructor(t,e,n){super(t.name,t.alphabet,t.cutoff),this.freq=e,this.similarity=n}}},7278:(t,e,n)=>{"use strict";n.d(e,{Iv:()=>y,J9:()=>p,Mu:()=>u,Qf:()=>w,dh:()=>f,mn:()=>S,p0:()=>A,pc:()=>C,qp:()=>g,tm:()=>m,zS:()=>v});var i=n(6082),o=n(1991),r=n.n(o),s=n(3527),a=n(3629),l=n(2738),c=n(439),h=(n(8924),n(1093),n(4152),n(8438));class u{get length(){return this.mList.length}isGap(t){return this.getOriginal(t)===this.gapOriginalMonomer}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");const e=this.mList[t];return e!==this.gapOriginalMonomer?e:c._S}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}getCanonicalRegion(t,e){const n=Math.min(Math.max(0,t),this.length),i=Math.max(Math.min(this.length,e),0)-n,o=this.gapOriginalMonomer;return new Array(i).fill(null).map(((t,e)=>{const i=this.mList[e+n];return i===o?c._S:i}))}getOriginalRegion(t,e){const n=Math.min(Math.max(0,t),this.length),i=Math.max(Math.min(this.length,e),0);return new Array(i-n).fill(null).map(((t,e)=>this.mList[e+n]))}get gapOriginal(){return this.gapOriginalMonomer}constructor(t,e){this.mList=t,this.gapOriginalMonomer=e}}class d{get length(){return this.seqS.length}isGap(t){return this.getOriginal(t)===c.b9[c.Hi.FASTA]}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");return this.isGap(t)?c._S:this.seqS[t]}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.seqS[t]}getCanonicalRegion(t,e){const n=Math.max(0,t),i=Math.min(this.length,e)-n,o=c.b9[c.Hi.FASTA];return new Array(i).fill(null).map(((t,e)=>{const i=this.seqS[e+n];return i===o?c._S:i}))}getOriginalRegion(t,e){const n=Math.max(0,t),i=Math.min(this.length,e);return this.seqS.slice(n,i)}get gapOriginal(){return c.b9[c.Hi.FASTA]}constructor(t){this.seqS=t}}const p=t=>{const e=r()(t.toString().matchAll(c.B5)).map((t=>t[2]??t[1])).toArray();return new u(e,c.b9[c.Hi.FASTA])},m=t=>t?new d(t):new u([],c.b9[c.Hi.FASTA]);function f(t,e=void 0){return n=>{if(n){let i;const o=new RegExp(`(?<=^|\\${t})("-"|'-'|[^\\${t}]*)(?=\\${t}|$)`,"g");return void 0!==e?(o.lastIndex=0,i=r()(n.matchAll(o)).take(e).map((t=>t[0])).toArray()):i=n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e),new u(i,c.b9[c.Hi.SEPARATOR])}return new u([],c.b9[c.Hi.SEPARATOR])}}const g=t=>{const e=t.split("$")[0].split("|"),n=r()(e.map((t=>(t.match(/(?<=\{).+(?=})/)?.[0]?.split(".")??[]).map((t=>(0,h.D)(t)))))).flatten().toArray();return new u(n,c.b9[c.Hi.HELM])};function y(t,e,n=void 0){if(t.toLowerCase().startsWith(c.Hi.FASTA))return p;if(t.toLowerCase().startsWith(c.Hi.SEPARATOR))return f(e,n);if(t.toLowerCase().startsWith(c.Hi.HELM))return g;throw new Error(`Unexpected units ${t} .`)}const b=/([^\W_]+)/g;function v(t,e){if(t.length<=e)return t;const n=t.match(b),i=t.length>e||(n?.length??0)>1,o=n?.[0]??" ";return i?o.substring(0,e-1)+"…":o}function w(t){switch(t){case c.YI.DNA:return c.Vl.fasta.dna;case c.YI.RNA:return c.Vl.fasta.rna;case c.YI.PT:return c.Vl.fasta.peptide;default:throw new Error(`Unsupported alphabet '${t}'.`)}}function C(t,e,n="-"){const i=e.map((e=>{const i=function(t,e,n="-"){const i=new Set([...new Set(Object.keys(t)),...e]);i.delete(n);const o=[],r=[];for(const n of i)o.push(n in t?t[n]:0),r.push(e.has(n)?1:0);const l=new s.Mi(o),c=new s.Mi(r);return(0,a.KE)(l,c)/((0,a.wQ)(l)*(0,a.wQ)(c))}(t,e.alphabet,n);return new l.X(e,t,i)}));let o;const r=Math.max(...i.map((t=>t.similarity>t.cutoff?t.similarity:-1)));return o=r>0?i.find((t=>t.similarity===r)).name:c.YI.UN,o}function A(t,e,n="-"){const i=Object.keys(t),o=/\(|\)/;return C(i.filter((t=>3===t.split(o).filter((t=>!!t)).length)).length>.8*i.length?Object.entries(t).reduce(((t,[e,n])=>{const i=e.split(o)[1];return i&&(t[i]=n),t}),{}):t,e,n)}function S(t){const e=t.columns.bySemTypeAll(i.SEMTYPE.MACROMOLECULE);let n=e.find((t=>{const e=t.meta.units;return!!e&&-1!==e.indexOf("MSA")}))??null;return!n&&e.length>0&&(n=e[0]),n}},8312:(t,e,n)=>{"use strict";n.d(e,{Q:()=>o});var i=n(6082);async function o(){const t=i.Func.find({package:"Bio",name:"getSeqHelper"});if(0===t.length)throw new Error("Package 'Bio' must be installed for SeqHelper.");return(await t[0].prepare().call()).getOutputParamValue()}},3077:(t,e,n)=>{"use strict";n.d(e,{R:()=>o});var i=n(6082);function o(t,e){const n=t=>{const e=s.columns.addNewString((t+1).toString());return o.push(e),e},o=[],r=t.length,s=i.DataFrame.create(r),a=e.getSeqHandler(t);for(let t=0;t<r;++t){const e=a.getSplitted(t);for(let i=0;i<e.length;++i){const r=e.getCanonical(i);((o[i]??null)||n(i)).set(t,r,!1)}}return s}},7602:(t,e,n)=>{"use strict";n.d(e,{g:()=>r});var i,o=n(9192);!function(t){t[t.error=0]="error",t[t.warning=1]="warning",t[t.info=2]="info",t[t.debug=3]="debug"}(i||(i={}));class r{constructor(t){this.logger=t,this.promise=Promise.resolve(),this.errors=[],this.syncCounter=0}sync(t,e){const n=++this.syncCounter;this.logger.debug(`${t}, SYNC syncId = ${n}, IN `),this.promise=this.promise.then((async()=>{this.logger.debug(`${t}, SYNC syncId = ${n}, START `),await e(),this.logger.debug(`${t}, SYNC syncId = ${n}, END `)})).catch((e=>{const[i,r]=(0,o.AP)(e);this.logger.error(`${t}, SYNC syncId = ${n}, ERROR:\n${i}`,void 0,r),this.errors.push(e)}))}resetErrors(){const t=this.errors;return this.errors=[],t}}},4326:(t,e,n)=>{"use strict";n.d(e,{Fo:()=>h,Lp:()=>r,P4:()=>s,fH:()=>o,gp:()=>i,lT:()=>l,mH:()=>a});var i,o,r,s,a,l,c=n(6082);!function(t){t.tooltipWebLogo=".tooltipWebLogo"}(i||(i={})),function(t){t.Entropy="Entropy",t.full="100%"}(o||(o={})),function(t){t.TOP="top",t.MIDDLE="middle",t.BOTTOM="bottom"}(r||(r={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(s||(s={})),function(t){t.AUTO="auto",t.ON="on",t.OFF="off"}(a||(a={})),function(t){t.Filtered="Filtered",t.Selected="Selected"}(l||(l={}));const h=new class{constructor(){this.sequenceColumnName=null,this.valueAggrType=c.AGG.TOTAL_COUNT,this.valueColumnName="Activity",this.startPositionName=null,this.endPositionName=null,this.skipEmptySequences=!0,this.skipEmptyPositions=!1,this.shrinkEmptyTail=!0,this.backgroundColor=4294967295,this.positionHeight=o.Entropy,this.positionWidth=20,this.verticalAlignment=r.MIDDLE,this.horizontalAlignment=s.CENTER,this.fixWidth=!1,this.fitArea=!0,this.minHeight=25,this.maxHeight=300,this.maxMonomerLetters=5,this.showPositionLabels=!0,this.positionMarginState=a.AUTO,this.positionMargin=0,this.filterSource=l.Filtered}}},6869:(t,e,n)=>{"use strict";var i;n.d(e,{o:()=>i}),function(t){t.BASE="HELM_BASE",t.SUGAR="HELM_SUGAR",t.LINKER="HELM_LINKER",t.AA="HELM_AA",t.CHEM="HELM_CHEM",t.BLOB="HELM_BLOB",t.NUCLEOTIDE="HELM_NUCLETIDE"}(i||(i={}))},5540:(t,e,n)=>{"use strict";t=n.hmd(t);var i,o=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,n,o=void 0!==t?t:{};o.ready=new Promise((function(t,i){e=t,n=i}));var r,s=Object.assign({},o),a="object"==typeof window,l="function"==typeof importScripts,c=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(a||l)&&(l?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),i&&(c=i),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",l&&(r=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),o.print||console.log.bind(console);var h,u,d=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&o.thisProgram,o.quit&&o.quit,o.wasmBinary&&(h=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&T("no native wasm support detected");var p,m,f,g=!1;function y(){var t=u.buffer;o.HEAP8=p=new Int8Array(t),o.HEAP16=new Int16Array(t),o.HEAP32=new Int32Array(t),o.HEAPU8=m=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAPU32=f=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=new Float64Array(t)}var b,v,w=[],C=[],A=[],S=0,x=null,E=null;function T(t){o.onAbort&&o.onAbort(t),d(t="Aborted("+t+")"),g=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function M(t){return t.startsWith("data:application/octet-stream;base64,")}function _(t){try{if(t==b&&h)return new Uint8Array(h);if(r)return r(t);throw"both async and sync fetching of the wasm failed"}catch(t){T(t)}}function I(t,e,n){return function(t){return h||!a&&!l||"function"!=typeof fetch?Promise.resolve().then((function(){return _(t)})):fetch(t,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((function(){return _(t)}))}(t).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(n,(function(t){d("failed to asynchronously prepare wasm: "+t),T(t)}))}function L(t){for(;t.length>0;)t.shift()(o)}function N(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){f[this.ptr+4>>2]=t},this.get_type=function(){return f[this.ptr+4>>2]},this.set_destructor=function(t){f[this.ptr+8>>2]=t},this.get_destructor=function(){return f[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,p[this.ptr+12|0]=t},this.get_caught=function(){return 0!=p[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,p[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=p[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)},this.set_adjusted_ptr=function(t){f[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return f[this.ptr+16>>2]},this.get_exception_ptr=function(){if(B(this.get_type()))return f[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function P(t){var e=u.buffer;try{return u.grow(t-e.byteLength+65535>>>16),y(),1}catch(t){}}function $(t){return o["_"+t]}M(b="wasmDbscan.wasm")||(v=b,b=o.locateFile?o.locateFile(v,c):c+v);var R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(t,e,n,i,o){var r={string:t=>{var e=0;return null!=t&&0!==t&&(e=function(t){var e=function(t){for(var e=0,n=0;n<t.length;++n){var i=t.charCodeAt(n);i<=127?e++:i<=2047?e+=2:i>=55296&&i<=57343?(e+=4,++n):e+=3}return e}(t)+1,n=D(e);return function(t,e,n){!function(t,e,n,i){if(!(i>0))return 0;for(var o=n+i-1,r=0;r<t.length;++r){var s=t.charCodeAt(r);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++r)),s<=127){if(n>=o)break;e[n++]=s}else if(s<=2047){if(n+1>=o)break;e[n++]=192|s>>6,e[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;e[n++]=224|s>>12,e[n++]=128|s>>6&63,e[n++]=128|63&s}else{if(n+3>=o)break;e[n++]=240|s>>18,e[n++]=128|s>>12&63,e[n++]=128|s>>6&63,e[n++]=128|63&s}}e[n]=0}(t,m,e,n)}(t,n,e),n}(t)),e},array:t=>{var e,n,i=D(t.length);return e=t,n=i,p.set(e,n),i}},s=$(t),a=[],l=0;if(i)for(var c=0;c<i.length;c++){var h=r[n[c]];h?(0===l&&(l=G()),a[c]=h(i[c])):a[c]=i[c]}var u=s.apply(null,a);return function(t){return 0!==l&&F(l),function(t){return"string"===e?(n=t)?function(t,e,n){for(var i=e+n,o=e;t[o]&&!(o>=i);)++o;if(o-e>16&&t.buffer&&R)return R.decode(t.subarray(e,o));for(var r="";e<o;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var l=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|l:(7&s)<<18|a<<12|l<<6|63&t[e++])<65536)r+=String.fromCharCode(s);else{var c=s-65536;r+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else r+=String.fromCharCode((31&s)<<6|a)}else r+=String.fromCharCode(s)}return r}(m,n,i):"":"boolean"===e?Boolean(t):t;var n,i}(t)}(u)}var O,H={__cxa_throw:function(t,e,n){throw new N(t).init(e,n),t},abort:function(){T("")},emscripten_memcpy_big:function(t,e,n){m.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){var e,n=m.length,i=2147483648;if((t>>>=0)>i)return!1;for(var o=1;o<=4;o*=2){var r=n*(1+.2/o);if(r=Math.min(r,t+100663296),P(Math.min(i,(e=Math.max(t,r))+(65536-e%65536)%65536)))return!0}return!1}},G=(function(){var t,e,i,r,s={env:H,wasi_snapshot_preview1:H};function a(t,e){var n,i=t.exports;return o.asm=i,u=o.asm.memory,y(),o.asm.__indirect_function_table,n=o.asm.__wasm_call_ctors,C.unshift(n),function(){if(S--,o.monitorRunDependencies&&o.monitorRunDependencies(S),0==S&&(null!==x&&(clearInterval(x),x=null),E)){var t=E;E=null,t()}}(),i}if(S++,o.monitorRunDependencies&&o.monitorRunDependencies(S),o.instantiateWasm)try{return o.instantiateWasm(s,a)}catch(t){d("Module.instantiateWasm callback failed with error: "+t),n(t)}(t=h,e=b,i=s,r=function(t){a(t.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||M(e)||"function"!=typeof fetch?I(e,i,r):fetch(e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(r,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),I(e,i,r)}))}))).catch(n)}(),o._dbscan=function(){return(o._dbscan=o.asm.dbscan).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.malloc).apply(null,arguments)},o._free=function(){return(o._free=o.asm.free).apply(null,arguments)},function(){return(G=o.asm.stackSave).apply(null,arguments)}),F=function(){return(F=o.asm.stackRestore).apply(null,arguments)},D=function(){return(D=o.asm.stackAlloc).apply(null,arguments)},B=function(){return(B=o.asm.__cxa_is_pointer_type).apply(null,arguments)};function V(){function t(){O||(O=!0,o.calledRun=!0,g||(L(C),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),A.unshift(t);var t;L(A)}()))}S>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),w.unshift(t);var t;L(w)}(),S>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o.ccall=k,o.cwrap=function(t,e,n,i){var o=!n||n.every((t=>"number"===t||"boolean"===t));return"string"!==e&&o&&!i?$(t):function(){return k(t,e,n,arguments)}},E=function t(){O||V(),O||(E=t)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return V(),t.ready});"object"==typeof exports?t.exports=o:"function"==typeof define&&n.amdO?define([],(function(){return o})):"object"==typeof exports&&(exports.exportCppDbscanLib=o)},6295:(t,e,n)=>{"use strict";n.d(e,{$1:()=>s,Hf:()=>h,Hr:()=>E,Ii:()=>g,Qj:()=>m,T6:()=>x,TK:()=>A,be:()=>f,gt:()=>v,ij:()=>w,jL:()=>c,lO:()=>p,lP:()=>b,rR:()=>y,tO:()=>a,v_:()=>l,w_:()=>u,yK:()=>C,zn:()=>d});var i=n(8774),o=n(8498),r=n(6863);function s(t,e){const n=t.trueCount()+e.trueCount();if(0==n)return 1;const i=t.andWithCountBits(e,!0);return i/(n-i)}function a(t,e){return 1-s(t,e)}function l(t,e){return S(s(new i.A(t,32*t.length),new i.A(e,32*e.length)))}function c(t,e){let n=0;for(let i=0;i<t.length;i++)n+=Math.pow(t[i]-e[i],2);return Math.sqrt(n)}function h(t,e){let n=0;for(let i=0;i<t.length;i++)n+=Math.abs(t[i]-e[i]);return n}function u(t,e){let n=0,i=0,o=0;for(let r=0;r<t.length;r++)n+=t[r]*e[r],i+=t[r]*t[r],o+=e[r]*e[r];return(1-n/(Math.sqrt(i)*Math.sqrt(o)))/2}function d(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount();return 0==n?0:2*t.andWithCountBits(e,!0)/n}(t,e)}function p(t,e){return 1-function(t,e){const n=t.trueCount()*e.trueCount();return 0==n?0:t.andWithCountBits(e,!0)/Math.sqrt(n)}(t,e)}function m(t,e){return Math.sqrt(t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0))}function f(t,e){return t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0)}function g(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount(),i=t.andWithCountBits(e,!0);return i/(2*n-3*i)}(t,e)}function y(t,e){return S(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:t.andWithCountBits(e,!0)*n/(2*i)}(t,e))}function b(t,e){return S(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:(t.andWithCountBits(e,!0)*n-i)/i}(t,e))}function v(t,e){return 1-function(t,e){const n=Math.min(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e)}function w(t,e){return S(function(t,e){const n=Math.max(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e))}function C(t,e){return S(function(t,e){return 0==t.length?0:t.andWithCountBits(e,!0)/t.length}(t,e))}function A(t,e){return S(function(t,e){const n=t.andWithCountBits(e,!0),i=t.countBits(!0)+e.countBits(!0),o=t.length,r=o-i+n;return n==o||r==o?1:n/i+r/(2*o-i)}(t,e))}function S(t){return t<=0?3402823e32:1/t-1}function x(t){if(t&&null!=t.range&&t.range>0){const e=t.range;return(t,n)=>Math.abs(t-n)/e}return(t,e)=>Math.abs(t-e)}function E(t){const e=function(t){const e=t?.mostCommon??new Set;return(t,n)=>{const i=t.length,o=n.length;let r=0,s=0,a=0;for(;s<i&&a<o;)t[s]===n[a]?(e?.has(t[s])||++r,++s,++a):t[s]<n[a]?++s:++a;return r}}(t);return(t,n)=>0===n.length||0===t.length?1e4:Math.min(t.length,n.length)/(e(t,n)+1e-4)}o.aT.Tanimoto,o.aT.Dice,o.aT.Asymmetric,o.aT.BraunBlanquet,o.aT.Cosine,o.aT.Kulczynski,o.aT.McConnaughey,o.aT.RogotGoldberg,o.aT.Russel,o.aT.Sokal,o.aT.Hamming,o.aT.Euclidean,o.aT.Tanimoto,o.aT.Dice,o.aT.Asymmetric,o.aT.BraunBlanquet,o.aT.Cosine,o.aT.Kulczynski,o.aT.McConnaughey,o.aT.RogotGoldberg,o.aT.Russel,o.aT.Sokal,o.aT.Hamming,o.aT.Euclidean,o.aT.Tanimoto,o.aT.Dice,o.aT.Cosine,o.aT.Tanimoto,o.aT.Asymmetric,o.aT.Cosine,o.aT.Sokal,r.Z.HAMMING,r.Z.LEVENSHTEIN,r.Z.MONOMER_CHEMICAL_DISTANCE,r.Z.NEEDLEMANN_WUNSCH},684:(t,e,n)=>{"use strict";n.d(e,{C0:()=>r,GP:()=>i,Gi:()=>a,YP:()=>c,_X:()=>s,n3:()=>o,vb:()=>l});const i="dim-red-preprocessing-function",o="supportedSemTypes",r="supportedTypes",s="supportedUnits",a="supportedDistanceFunctions",l="bypassLargeDataWarning",c="show-scatterplot-progress"},6863:(t,e,n)=>{"use strict";function i(t={}){const e=function(){if(!t||!t.scoringMatrix||!t.alphabetIndexes)return(t,e)=>t===e?0:1;if(t.scoringMatrix.length!==Object.keys(t.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const e=t.alphabetIndexes,n=t.scoringMatrix,i=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,o=new Float32Array((n.length+i)*(n.length+i));return Object.entries(e).forEach((([t,i])=>{const r=n[i];Object.entries(e).forEach((([e,i])=>{o[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=r[i]}))})),(t,e)=>1-o[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,i)=>{let o=0;const r=t.length,s=i.length,a=Math.ceil(Math.max(r,s)*(1-n));r!==s&&(o=Math.abs(r-s));let l=0;for(let n=0;n<Math.min(r,s);n++)if(t[n]!==i[n]&&(l+=e(t[n],i[n]),l>a))return 1;return l+=o,l/=Math.max(r,s),l}}n.d(e,{Z:()=>s,V:()=>a});var o=n(2787);const r={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var s;!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(s||(s={}));const a={[s.HAMMING]:i,[s.LEVENSHTEIN]:function(){return(t,e)=>(0,o.I)(t,e)/Math.max(t.length,e.length)},[s.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:n,gapExtend:i,scoringMatrix:o,alphabetIndexes:s}={...r,...t};Object.entries(s).forEach((([t,n])=>e[t.charCodeAt(0)]=n));const a=[new Float32Array(1e4),new Float32Array(1e4)];return(t,r)=>{const s=new Array(t.length+1).fill(!1),l=new Array(t.length+1).fill(!1);let c=0,h=1;for(let e=1;e<t.length+1;e++)a[0][e]=-i-(e-1)*i,a[1][e]=0;a[0][0]=0;for(let u=1;u<r.length+1;u++){a[h][0]=-i-(u-1)*i;for(let d=1;d<t.length+1;d++){const p=a[c][d-1]+o[e[t.charCodeAt(d-1)]][e[r.charCodeAt(u-1)]],m=a[c][d]-(s[d]||1===u||u===r.length?i:n),f=a[h][d-1]-(l[d-1]||1===d||d===t.length?i:n);a[h][d]=Math.max(p,f,m),a[h][d]===p?(s[d]=!1,l[d]=!1):a[h][d]===f?(s[d]=!1,l[d]=!0):(s[d]=!0,l[d]=!1)}c=h,h=(h+1)%2}const u=Math.min(t.length,r.length);return(u-a[c][t.length])/u}},[s.MONOMER_CHEMICAL_DISTANCE]:i}},8060:(t,e,n)=>{"use strict";n.d(e,{S:()=>i});const i="dimensionality-reducer-terminate-event"},9039:(t,e,n)=>{"use strict";var i;n.d(e,{c:()=>i}),function(t){t.UMAP="UMAP",t.T_SNE="t-SNE"}(i||(i={}))},8498:(t,e,n)=>{"use strict";var i,o,r,s,a,l,c;n.d(e,{EG:()=>a,Pn:()=>o,RR:()=>l,Wn:()=>c,aT:()=>r,m6:()=>s,xL:()=>i}),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan String",t.Onehot="One-Hot"}(i||(i={})),function(t){t.Euclidean="Euclidean",t.Manhattan="Manhattan",t.Cosine="Vector Cosine"}(o||(o={})),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 BitArray"}(r||(r={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(s||(s={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(a||(a={})),function(t){t.Difference="Difference"}(l||(l={})),function(t){t.CommonItems="Common Items"}(c||(c={}))},2780:(t,e,n)=>{"use strict";n(8498),n(9336)},9336:(t,e,n)=>{"use strict";var i=n(2787),o=n(944),r=n(6295),s=n(6863),a=n(8498);const l={[a.Pn.Euclidean]:r.jL,[a.Pn.Manhattan]:r.Hf,[a.Pn.Cosine]:r.w_},c={[a.xL.Levenshtein]:i.I,[a.xL.JaroWinkler]:o.Vb,[a.xL.Manhattan]:function(t,e){if(t.length!==e.length)return 1;{let n=0;for(let i=1;i<t.length;i++)n+=t[i]==e[i]?0:1;return n/t.length}},[a.xL.Onehot]:function(t,e){return t===e?0:1}},h={[a.aT.Tanimoto]:r.tO,[a.aT.Dice]:r.zn,[a.aT.Asymmetric]:r.gt,[a.aT.BraunBlanquet]:r.ij,[a.aT.Cosine]:r.lO,[a.aT.Kulczynski]:r.rR,[a.aT.McConnaughey]:r.lP,[a.aT.RogotGoldberg]:r.TK,[a.aT.Russel]:r.yK,[a.aT.Sokal]:r.Ii,[a.aT.Hamming]:r.be,[a.aT.Euclidean]:r.Qj},u={[a.m6.TanimotoIntArray]:r.v_},d={[a.RR.Difference]:r.T6},p={[a.Wn.CommonItems]:r.Hr},m={[a.EG.Vector]:{[a.Pn.Euclidean]:l[a.Pn.Euclidean],[a.Pn.Manhattan]:l[a.Pn.Manhattan],[a.Pn.Cosine]:l[a.Pn.Cosine]},[a.EG.String]:{[a.xL.Levenshtein]:c[a.xL.Levenshtein],[a.xL.JaroWinkler]:c[a.xL.JaroWinkler],[a.xL.Manhattan]:c[a.xL.Manhattan],[a.xL.Onehot]:c[a.xL.Onehot]},[a.EG.BitArray]:{[a.aT.Tanimoto]:h[a.aT.Tanimoto],[a.aT.Dice]:h[a.aT.Dice],[a.aT.Asymmetric]:h[a.aT.Asymmetric],[a.aT.BraunBlanquet]:h[a.aT.BraunBlanquet],[a.aT.Cosine]:h[a.aT.Cosine],[a.aT.Kulczynski]:h[a.aT.Kulczynski],[a.aT.McConnaughey]:h[a.aT.McConnaughey],[a.aT.RogotGoldberg]:h[a.aT.RogotGoldberg],[a.aT.Russel]:h[a.aT.Russel],[a.aT.Sokal]:h[a.aT.Sokal]},[a.EG.MacroMolecule]:{[s.Z.HAMMING]:s.V[s.Z.HAMMING],[s.Z.LEVENSHTEIN]:s.V[s.Z.LEVENSHTEIN],[s.Z.NEEDLEMANN_WUNSCH]:s.V[s.Z.NEEDLEMANN_WUNSCH],[s.Z.MONOMER_CHEMICAL_DISTANCE]:s.V[s.Z.MONOMER_CHEMICAL_DISTANCE]},[a.EG.Number]:{[a.RR.Difference]:d[a.RR.Difference]},[a.EG.IntArray]:{[a.m6.TanimotoIntArray]:u[a.m6.TanimotoIntArray]},[a.EG.NumberArray]:{[a.Wn.CommonItems]:p[a.Wn.CommonItems]}};Object.keys(m).reduce(((t,e)=>{for(const n of Object.keys(m[e]))t[n]=e;return t}),{})},8774:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});class i{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,o=i._createBuffer(n);if(e)for(let t=0;t<o.length;t++)o[t]=-1;this._data=o,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 i(t._length);n._length=t._length,n._data=i._createBuffer(n._length),n._version=0;const o=t.lengthInInts;for(let i=0;i<o;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 i(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 i(t);for(let i=0;i<t;++i)n.setBit(i,e(i));return n._version=0,n}static fromString(t){return i.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new i(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new i(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let o=0,r=0;for(;e-r>=4;)n._data[o++]=255&t[r]|(255&t[r+1])<<8|(255&t[r+2])<<16|(255&t[r+3])<<24,r+=4;return e-r==3&&(n._data[o]=(255&t[r+2])<<16),e-r==2&&(n._data[o]|=(255&t[r+1])<<8),e-r==1&&(n._data[o]|=255&t[r]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new i(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,o=!0){if(n&&o&&this.setAll(!e,!1),o)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 i.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 o=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=o;t<=r;t++)this.setTrue(t);else for(let t=o;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!!(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+=i._onBitCount[255&t];let n=this._data[e];const o=31&this._length;for(0!=o&&(n&=~(4294967295<<o));0!=n;n>>>=8)this._selectedCount+=i._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 o=this.lengthInInts;let r=0;for(;r<o-1;r++)for(let e=this._data[r]&t._data[r];0!=e;e>>>=8)n+=i._onBitCount[255&e];let s=this._data[r]&t._data[r];const a=31&this._length;for(0!=a&&(s&=~(4294967295<<a));0!=s;s>>>=8)n+=i._onBitCount[255&s];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 o=this.lengthInInts;for(let r=Math.floor(t/32);r<o;r++){let o=e?this._data[r]:~this._data[r];if(0!=n)o&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==o)continue;for(let e=0;0!=o;e+=8,o>>>=8){const n=i._firstOnBit[255&o];if(n>=0)return(t=n+32*r+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let o=Math.floor(t/32);o>=0;o--){let t=e?this._data[o]:~this._data[o];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=i._lastOnBit[t>>>24];if(n>=0)return n+32*o+e}}return-1}}i._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]),i._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]),i._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])},8070:(t,e,n)=>{"use strict";n.d(e,{cb:()=>a,PE:()=>s}),n(4328);var i=n(6082);n(9982),i.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,,,,,,,,,,,,,,,,,,,,,').columns.add(i.Column.fromList(i.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var o,r=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function s(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?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function s(t,e,n,i=0,o="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,s)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){s(t)}finally{a.unsubscribe(),clearTimeout(l)}})),l=setTimeout((()=>{a.unsubscribe(),s(o)}),i);n()}))}))}function a(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}console.log.bind(console),console.info.bind(console),console.warn.bind(console),console.error.bind(console),function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(o||(o={})),i.DataFrame.fromColumns([i.Column.fromStrings("col",["val1","val2","val3"])])},3527:(t,e,n)=>{"use strict";n.d(e,{Mi:()=>i});class i extends Float32Array{}},3629:(t,e,n)=>{"use strict";n.d(e,{KE:()=>a,S8:()=>l,dC:()=>r,vA:()=>o,wQ:()=>s});var i=n(3527);function o(t=!1,e="Assertion error."){if(!t)throw new Error(e)}function r(t,e,n=1){const r=t.length;o(r==e.length,"Vector lengths do not match.");const s=new i.Mi(r);for(let i=0;i<t.length;++i)s[i]=t[i]+n*e[i];return s}function s(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*t[n];return Math.sqrt(e)}function a(t,e){if(t.length!=e.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i];return n}function l(t){const e=t.length;let n=0,i=0;for(let o=0;o<e;++o)n+=t[o],i+=Math.pow(t[o],2);const o=n/e,r=1/Math.sqrt(i/e-Math.pow(o,2));for(let n=0;n<e;++n)t[n]=(t[n]-o)*r;return t}},1913:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3282),o=n(9029),r=n(1520),s=n(2586),a=n(8708),l=n(2023),c="errorMessage",h=new i.Name("emUsed"),u={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,p=/\$\{([^}]+)\}/g,m=/^""\s*\+\s*|\s*\+\s*""$/g;const f=(t,e={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(function(t){return{keyword:c,schemaType:["string","object"],post:!0,code(e){const{gen:n,data:f,schema:g,schemaValue:y,it:b}=e;if(!1===b.createErrors)return;const v=g,w=o.strConcat(l.default.instancePath,b.errorPath);function C(t,e){return o.and(i._`${t}.keyword !== ${c}`,i._`!${t}.${h}`,i._`${t}.instancePath === ${w}`,i._`${t}.keyword in ${e}`,i._`${t}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${b.errSchemaPath.length}))`)}function A(t,e){const i=[];for(const n in t){const t=e[n];d.test(t)&&i.push([n,x(t)])}return n.object(...i)}function S(t){return d.test(t)?new r._Code(r.safeStringify(t).replace(p,((t,e)=>`" + JSON.stringify(${s.getData(e,b)}) + "`)).replace(m,"")):i.stringify(t)}function x(t){return i._`function(){return ${S(t)}}`}n.if(i._`${l.default.errors} > 0`,(()=>{if("object"==typeof v){const[r,s]=function(t){let e,n;for(const i in t){if("properties"===i||"items"===i)continue;const o=t[i];if("object"==typeof o){e||(e={});const t=e[i]={};for(const e in o)t[e]=[]}else n||(n={}),n[i]=[]}return[e,n]}(v);s&&function(o){const r=n.const("emErrors",i.stringify(o)),s=n.const("templates",A(o,g));n.forOf("err",l.default.vErrors,(t=>n.if(C(t,r),(()=>n.code(i._`${r}[${t}.keyword].push(${t})`).assign(i._`${t}.${h}`,!0)))));const{singleError:c}=t;if(c){const t=n.let("message",i._`""`),o=n.let("paramsErrors",i._`[]`);u((e=>{n.if(t,(()=>n.code(i._`${t} += ${"string"==typeof c?c:";"}`))),n.code(i._`${t} += ${d(e)}`),n.assign(o,i._`${o}.concat(${r}[${e}])`)})),a.reportError(e,{message:t,params:i._`{errors: ${o}}`})}else u((t=>a.reportError(e,{message:d(t),params:i._`{errors: ${r}[${t}]}`})));function u(t){n.forIn("key",r,(e=>n.if(i._`${r}[${e}].length`,(()=>t(e)))))}function d(t){return i._`${t} in ${s} ? ${s}[${t}]() : ${y}[${t}]`}}(s),r&&function(t){const o=n.const("emErrors",i.stringify(t)),r=[];for(const e in t)r.push([e,A(t[e],g[e])]);const s=n.const("templates",n.object(...r)),c=n.scopeValue("obj",{ref:u,code:i.stringify(u)}),d=n.let("emPropParams"),p=n.let("emParamsErrors");n.forOf("err",l.default.vErrors,(t=>n.if(C(t,o),(()=>{n.assign(d,i._`${c}[${t}.keyword]`),n.assign(p,i._`${o}[${t}.keyword][${t}.params[${d}]]`),n.if(p,(()=>n.code(i._`${p}.push(${t})`).assign(i._`${t}.${h}`,!0)))})))),n.forIn("key",o,(t=>n.forIn("keyProp",i._`${o}[${t}]`,(r=>{n.assign(p,i._`${o}[${t}][${r}]`),n.if(i._`${p}.length`,(()=>{const o=n.const("tmpl",i._`${s}[${t}] && ${s}[${t}][${r}]`);a.reportError(e,{message:i._`${o} ? ${o}() : ${y}[${t}][${r}]`,params:i._`{errors: ${p}}`})}))}))))}(r),function(t){const{props:r,items:s}=t;if(!r&&!s)return;const u=i._`typeof ${f} == "object"`,d=i._`Array.isArray(${f})`,p=n.let("emErrors");let m,b;const v=n.let("templates");function C(t,e){n.assign(p,i.stringify(t)),n.assign(v,A(t,e))}r&&s?(m=n.let("emChildKwd"),n.if(u),n.if(d,(()=>{C(s,g.items),n.assign(m,i.str`items`)}),(()=>{C(r,g.properties),n.assign(m,i.str`properties`)})),b=i._`[${m}]`):s?(n.if(d),C(s,g.items),b=i._`.items`):r&&(n.if(o.and(u,o.not(d))),C(r,g.properties),b=i._`.properties`),n.forOf("err",l.default.vErrors,(t=>function(t,e,r){n.if(o.and(i._`${t}.keyword !== ${c}`,i._`!${t}.${h}`,i._`${t}.instancePath.indexOf(${w}) === 0`),(()=>{const o=n.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=n.const("emMatches",i._`${o}.exec(${t}.instancePath.slice(${w}.length))`),a=n.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);n.if(i._`${a} !== undefined && ${a} in ${e}`,(()=>r(a)))}))}(t,p,(e=>n.code(i._`${p}[${e}].push(${t})`).assign(i._`${t}.${h}`,!0))))),n.forIn("key",p,(t=>n.if(i._`${p}[${t}].length`,(()=>{a.reportError(e,{message:i._`${t} in ${v} ? ${v}[${t}]() : ${y}${b}[${t}]`,params:i._`{errors: ${p}[${t}]}`}),n.assign(i._`${l.default.vErrors}[${l.default.errors}-1].instancePath`,i._`${w} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),n.endIf()}(function({properties:t,items:e}){const n={};if(t){n.props={};for(const e in t)n.props[e]=[]}if(e){n.items={};for(let t=0;t<e.length;t++)n.items[t]=[]}return n}(v))}const r="string"==typeof v?v:v._;r&&function(t){const r=n.const("emErrs",i._`[]`);n.forOf("err",l.default.vErrors,(t=>n.if(function(t){return o.and(i._`${t}.keyword !== ${c}`,i._`!${t}.${h}`,o.or(i._`${t}.instancePath === ${w}`,o.and(i._`${t}.instancePath.indexOf(${w}) === 0`,i._`${t}.instancePath[${w}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,i._`${t}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(t),(()=>n.code(i._`${r}.push(${t})`).assign(i._`${t}.${h}`,!0))))),n.if(i._`${r}.length`,(()=>a.reportError(e,{message:S(t),params:i._`{errors: ${r}}`})))}(r),t.keepErrors||function(){const t=n.const("emErrs",i._`[]`);n.forOf("err",l.default.vErrors,(e=>n.if(i._`!${e}.${h}`,(()=>n.code(i._`${t}.push(${e})`))))),n.assign(l.default.vErrors,t).assign(l.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(e))};e.default=f,t.exports=f,t.exports.default=f},7433:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const i=n(4042),o=n(6105),r=n(6653),s=n(9572),a="https://json-schema.org/draft/2020-12/schema";class l extends i.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),o.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:e}=this.opts;e&&(s.default.call(this,t),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv2020=l,t.exports=e=l,t.exports.Ajv2020=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=n(2586);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var h=n(9029);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var u=n(3558);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=n(4551);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},3282:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const i=n(4042),o=n(6144),r=n(6653),s=n(2079),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends i.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(t,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var h=n(2586);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var u=n(9029);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=n(3558);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=n(4551);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},1520:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends n{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=i;class o extends n{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function r(t,...e){const n=[t[0]];let i=0;for(;i<e.length;)l(n,e[i]),n.push(t[++i]);return new o(n)}e._Code=o,e.nil=new o(""),e._=r;const s=new o("+");function a(t,...e){const n=[h(t[0])];let i=0;for(;i<e.length;)n.push(s),l(n,e[i]),n.push(s,h(t[++i]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const n=c(t[e-1],t[e+1]);if(void 0!==n){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}(n),new o(n)}function l(t,e){var n;e instanceof o?t.push(...e._items):e instanceof i?t.push(e):t.push("number"==typeof(n=e)||"boolean"==typeof n||null===n?n:h(Array.isArray(n)?n.join(","):n))}function c(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof i||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof i?void 0:`"${t}${e.slice(1)}`}function h(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=a,e.addCodeArg=l,e.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:a`${t}${e}`},e.stringify=function(t){return new o(h(t))},e.safeStringify=h,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new o(`.${t}`):r`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new o(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(t){return new o(t.toString())}},9029:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const i=n(1520),o=n(7845);var r=n(1520);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var s=n(7845);Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class a{optimizeNodes(){return this}optimizeNames(t,e){return this}}class l extends a{constructor(t,e,n){super(),this.varKind=t,this.name=e,this.rhs=n}render({es5:t,_n:e}){const n=t?o.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,t,e)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(t,e,n){super(),this.lhs=t,this.rhs=e,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,e){if(!(this.lhs instanceof i.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=N(this.rhs,t,e),this}get names(){return L(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class h extends c{constructor(t,e,n,i){super(t,n,i),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class u extends a{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class d extends a{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class p extends a{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class m extends a{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=N(this.code,t,e),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class f extends a{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,n)=>e+n.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const n=t[e].optimizeNodes();Array.isArray(n)?t.splice(e,1,...n):n?t[e]=n:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:n}=this;let i=n.length;for(;i--;){const o=n[i];o.optimizeNames(t,e)||(P(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>I(t,e.names)),{})}}class g extends f{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class y extends f{}class b extends g{}b.kind="else";class v extends g{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new b(t):t}return e?!1===t?e instanceof v?e:e.nodes:this.nodes.length?this:new v($(t),e instanceof v?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=N(this.condition,t,e),this}get names(){const t=super.names;return L(t,this.condition),this.else&&I(t,this.else.names),t}}v.kind="if";class w extends g{}w.kind="for";class C extends w{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=N(this.iteration,t,e),this}get names(){return I(super.names,this.iteration.names)}}class A extends w{constructor(t,e,n,i){super(),this.varKind=t,this.name=e,this.from=n,this.to=i}render(t){const e=t.es5?o.varKinds.var:this.varKind,{name:n,from:i,to:r}=this;return`for(${e} ${n}=${i}; ${n}<${r}; ${n}++)`+super.render(t)}get names(){const t=L(super.names,this.from);return L(t,this.to)}}class S extends w{constructor(t,e,n,i){super(),this.loop=t,this.varKind=e,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=N(this.iterable,t,e),this}get names(){return I(super.names,this.iterable.names)}}class x extends g{constructor(t,e,n){super(),this.name=t,this.args=e,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}x.kind="func";class E extends f{render(t){return"return "+super.render(t)}}E.kind="return";class T extends g{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var n,i;return super.optimizeNames(t,e),null===(n=this.catch)||void 0===n||n.optimizeNames(t,e),null===(i=this.finally)||void 0===i||i.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&I(t,this.catch.names),this.finally&&I(t,this.finally.names),t}}class M extends g{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}M.kind="catch";class _ extends g{render(t){return"finally"+super.render(t)}}function I(t,e){for(const n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function L(t,e){return e instanceof i._CodeOrName?I(t,e.names):t}function N(t,e,n){return t instanceof i.Name?r(t):(o=t)instanceof i._Code&&o._items.some((t=>t instanceof i.Name&&1===e[t.str]&&void 0!==n[t.str]))?new i._Code(t._items.reduce(((t,e)=>(e instanceof i.Name&&(e=r(e)),e instanceof i._Code?t.push(...e._items):t.push(e),t)),[])):t;var o;function r(t){const i=n[t.str];return void 0===i||1!==e[t.str]?t:(delete e[t.str],i)}}function P(t,e){for(const n in e)t[n]=(t[n]||0)-(e[n]||0)}function $(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:i._`!${H(t)}`}_.kind="finally",e.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new o.Scope({parent:t}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const n=this._extScope.value(t,e);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,n,i){const o=this._scope.toName(e);return void 0!==n&&i&&(this._constants[o.str]=n),this._leafNode(new l(t,o,n)),o}const(t,e,n){return this._def(o.varKinds.const,t,e,n)}let(t,e,n){return this._def(o.varKinds.let,t,e,n)}var(t,e,n){return this._def(o.varKinds.var,t,e,n)}assign(t,e,n){return this._leafNode(new c(t,e,n))}add(t,n){return this._leafNode(new h(t,e.operators.ADD,n))}code(t){return"function"==typeof t?t():t!==i.nil&&this._leafNode(new m(t)),this}object(...t){const e=["{"];for(const[n,o]of t)e.length>1&&e.push(","),e.push(n),(n!==o||this.opts.es5)&&(e.push(":"),(0,i.addCodeArg)(e,o));return e.push("}"),new i._Code(e)}if(t,e,n){if(this._blockNode(new v(t)),e&&n)this.code(e).else().code(n).endIf();else if(e)this.code(e).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new v(t))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new C(t),e)}forRange(t,e,n,i,r=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(t);return this._for(new A(r,s,e,n),(()=>i(s)))}forOf(t,e,n,r=o.varKinds.const){const s=this._scope.toName(t);if(this.opts.es5){const t=e instanceof i.Name?e:this.var("_arr",e);return this.forRange("_i",0,i._`${t}.length`,(e=>{this.var(s,i._`${t}[${e}]`),n(s)}))}return this._for(new S("of",r,s,e),(()=>n(s)))}forIn(t,e,n,r=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,i._`Object.keys(${e})`,n);const s=this._scope.toName(t);return this._for(new S("in",r,s,e),(()=>n(s)))}endFor(){return this._endBlockNode(w)}label(t){return this._leafNode(new u(t))}break(t){return this._leafNode(new d(t))}return(t){const e=new E;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(t,e,n){if(!e&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new T;if(this._blockNode(i),this.code(t),e){const t=this.name("e");this._currNode=i.catch=new M(t),e(t)}return n&&(this._currNode=i.finally=new _,this.code(n)),this._endBlockNode(M,_)}throw(t){return this._leafNode(new p(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-e;if(n<0||void 0!==t&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=e,this}func(t,e=i.nil,n,o){return this._blockNode(new x(t,e,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const n=this._currNode;if(n instanceof t||e&&n instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},e.not=$;const R=O(e.operators.AND);e.and=function(...t){return t.reduce(R)};const k=O(e.operators.OR);function O(t){return(e,n)=>e===i.nil?n:n===i.nil?e:i._`${H(e)} ${t} ${H(n)}`}function H(t){return t instanceof i.Name?t:i._`(${t})`}e.or=function(...t){return t.reduce(k)}},7845:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const i=n(1520);class o extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var r;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(r||(e.UsedValueState=r={})),e.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class s{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof i.Name?t:this.name(t)}name(t){return new i.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,n;if((null===(n=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===n?void 0:n.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}e.Scope=s;class a extends i.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:e,itemIndex:n}){this.value=t,this.scopePath=i._`.${new i.Name(e)}[${n}]`}}e.ValueScopeName=a;const l=i._`\n`;e.ValueScope=class extends s{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?l:i.nil}}get(){return this._scope}name(t){return new a(t,this._newName(t))}value(t,e){var n;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(t),{prefix:o}=i,r=null!==(n=e.key)&&void 0!==n?n:e.ref;let s=this._values[o];if(s){const t=s.get(r);if(t)return t}else s=this._values[o]=new Map;s.set(r,i);const a=this._scope[o]||(this._scope[o]=[]),l=a.length;return a[l]=e.ref,i.setValue(e,{property:o,itemIndex:l}),i}getValue(t,e){const n=this._values[t];if(n)return n.get(e)}scopeRefs(t,e=this._values){return this._reduceValues(e,(e=>{if(void 0===e.scopePath)throw new Error(`CodeGen: name "${e}" has no value`);return i._`${t}${e.scopePath}`}))}scopeCode(t=this._values,e,n){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,n)}_reduceValues(t,n,s={},a){let l=i.nil;for(const c in t){const h=t[c];if(!h)continue;const u=s[c]=s[c]||new Map;h.forEach((t=>{if(u.has(t))return;u.set(t,r.Started);let s=n(t);if(s){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;l=i._`${l}${n} ${t} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(t)))throw new o(t);l=i._`${l}${s}${this.opts._n}`}u.set(t,r.Completed)}))}return l}}},8708:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const i=n(9029),o=n(4227),r=n(2023);function s(t,e){const n=t.const("err",e);t.if(i._`${r.default.vErrors} === null`,(()=>t.assign(r.default.vErrors,i._`[${n}]`)),i._`${r.default.vErrors}.push(${n})`),t.code(i._`${r.default.errors}++`)}function a(t,e){const{gen:n,validateName:o,schemaEnv:r}=t;r.$async?n.throw(i._`new ${t.ValidationError}(${e})`):(n.assign(i._`${o}.errors`,e),n.return(!1))}e.keywordError={message:({keyword:t})=>i.str`must pass "${t}" keyword validation`},e.keyword$DataError={message:({keyword:t,schemaType:e})=>e?i.str`"${t}" keyword must be ${e} ($data)`:i.str`"${t}" keyword is invalid ($data)`},e.reportError=function(t,n=e.keywordError,o,r){const{it:l}=t,{gen:h,compositeRule:u,allErrors:d}=l,p=c(t,n,o);(null!=r?r:u||d)?s(h,p):a(l,i._`[${p}]`)},e.reportExtraError=function(t,n=e.keywordError,i){const{it:o}=t,{gen:l,compositeRule:h,allErrors:u}=o;s(l,c(t,n,i)),h||u||a(o,r.default.vErrors)},e.resetErrorsCount=function(t,e){t.assign(r.default.errors,e),t.if(i._`${r.default.vErrors} !== null`,(()=>t.if(e,(()=>t.assign(i._`${r.default.vErrors}.length`,e)),(()=>t.assign(r.default.vErrors,null)))))},e.extendErrors=function({gen:t,keyword:e,schemaValue:n,data:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const l=t.name("err");t.forRange("i",s,r.default.errors,(s=>{t.const(l,i._`${r.default.vErrors}[${s}]`),t.if(i._`${l}.instancePath === undefined`,(()=>t.assign(i._`${l}.instancePath`,(0,i.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(i._`${l}.schemaPath`,i.str`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign(i._`${l}.schema`,n),t.assign(i._`${l}.data`,o))}))};const l={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function c(t,e,n){const{createErrors:o}=t.it;return!1===o?i._`{}`:function(t,e,n={}){const{gen:o,it:s}=t,a=[h(s,n),u(t,n)];return function(t,{params:e,message:n},o){const{keyword:s,data:a,schemaValue:c,it:h}=t,{opts:u,propertyName:d,topSchemaRef:p,schemaPath:m}=h;o.push([l.keyword,s],[l.params,"function"==typeof e?e(t):e||i._`{}`]),u.messages&&o.push([l.message,"function"==typeof n?n(t):n]),u.verbose&&o.push([l.schema,c],[l.parentSchema,i._`${p}${m}`],[r.default.data,a]),d&&o.push([l.propertyName,d])}(t,e,a),o.object(...a)}(t,e,n)}function h({errorPath:t},{instancePath:e}){const n=e?i.str`${t}${(0,o.getErrorPath)(e,o.Type.Str)}`:t;return[r.default.instancePath,(0,i.strConcat)(r.default.instancePath,n)]}function u({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let s=r?e:i.str`${e}/${t}`;return n&&(s=i.str`${s}${(0,o.getErrorPath)(n,o.Type.Str)}`),[l.schemaPath,s]}},3835:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;const i=n(9029),o=n(3558),r=n(2023),s=n(6939),a=n(4227),l=n(2586);class c{constructor(t){var e;let n;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,s.normalizeId)(null==n?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function h(t){const e=d.call(this,t);if(e)return e;const n=(0,s.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:h}=this.opts,u=new i.CodeGen(this.scope,{es5:a,lines:c,ownProperties:h});let p;t.$async&&(p=u.scopeValue("Error",{ref:o.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const m=u.scopeName("validate");t.validateName=m;const f={gen:u,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,i.stringify)(t.schema)}:{ref:t.schema}),validateName:m,ValidationError:p,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:i.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(t),(0,l.validateFunctionCode)(f),u.optimize(this.opts.code.optimize);const e=u.toString();g=`${u.scopeRefs(r.default.scope)}return ${e}`,this.opts.code.process&&(g=this.opts.code.process(g,t));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:n}),n.errors=null,n.schema=t.schema,n.schemaEnv=t,t.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:m,validateCode:e,scopeValues:u._values}),this.opts.unevaluated){const{props:t,items:e}=f;n.evaluated={props:t instanceof i.Name?void 0:t,items:e instanceof i.Name?void 0:e,dynamicProps:t instanceof i.Name,dynamicItems:e instanceof i.Name},n.source&&(n.source.evaluated=(0,i.stringify)(n.evaluated))}return t.validate=n,t}catch(e){throw delete t.validate,delete t.validateName,g&&this.logger.error("Error compiling schema, function code:",g),e}finally{this._compilations.delete(t)}}function u(t){return(0,s.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:h.call(this,t)}function d(t){for(const i of this._compilations)if(n=t,(e=i).schema===n.schema&&e.root===n.root&&e.baseId===n.baseId)return i;var e,n}function p(t,e){let n;for(;"string"==typeof(n=this.refs[e]);)e=n;return n||this.schemas[e]||m.call(this,t,e)}function m(t,e){const n=this.opts.uriResolver.parse(e),i=(0,s._getFullPath)(this.opts.uriResolver,n);let o=(0,s.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===o)return g.call(this,n,t);const r=(0,s.normalizeId)(i),a=this.refs[r]||this.schemas[r];if("string"==typeof a){const e=m.call(this,t,a);if("object"!=typeof(null==e?void 0:e.schema))return;return g.call(this,n,e)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||h.call(this,a),r===(0,s.normalizeId)(e)){const{schema:e}=a,{schemaId:n}=this.opts,i=e[n];return i&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,i)),new c({schema:e,schemaId:n,root:t,baseId:o})}return g.call(this,n,a)}}e.SchemaEnv=c,e.compileSchema=h,e.resolveRef=function(t,e,n){var i;n=(0,s.resolveUrl)(this.opts.uriResolver,e,n);const o=t.refs[n];if(o)return o;let r=p.call(this,t,n);if(void 0===r){const o=null===(i=t.localRefs)||void 0===i?void 0:i[n],{schemaId:s}=this.opts;o&&(r=new c({schema:o,schemaId:s,root:t,baseId:e}))}return void 0!==r?t.refs[n]=u.call(this,r):void 0},e.getCompilingSchema=d,e.resolveSchema=m;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(t,{baseId:e,schema:n,root:i}){var o;if("/"!==(null===(o=t.fragment)||void 0===o?void 0:o[0]))return;for(const i of t.fragment.slice(1).split("/")){if("boolean"==typeof n)return;const t=n[(0,a.unescapeFragment)(i)];if(void 0===t)return;const o="object"==typeof(n=t)&&n[this.opts.schemaId];!f.has(i)&&o&&(e=(0,s.resolveUrl)(this.opts.uriResolver,e,o))}let r;if("boolean"!=typeof n&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){const t=(0,s.resolveUrl)(this.opts.uriResolver,e,n.$ref);r=m.call(this,i,t)}const{schemaId:l}=this.opts;return r=r||new c({schema:n,schemaId:l,root:i,baseId:e}),r.schema!==r.root.schema?r:void 0}},2023:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(9029),o={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};e.default=o},4551:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6939);class o extends Error{constructor(t,e,n,o){super(o||`can't resolve reference ${n} from id ${e}`),this.missingRef=(0,i.resolveUrl)(t,e,n),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(t,this.missingRef))}}e.default=o},6939:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const i=n(4227),o=n(2017),r=n(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!l(t):!!e&&c(t)<=e)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(t){for(const e in t){if(a.has(e))return!0;const n=t[e];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(t){let e=0;for(const n in t){if("$ref"===n)return 1/0;if(e++,!s.has(n)&&("object"==typeof t[n]&&(0,i.eachItem)(t[n],(t=>e+=c(t))),e===1/0))return 1/0}return e}function h(t,e="",n){!1!==n&&(e=p(e));const i=t.parse(e);return u(t,i)}function u(t,e){return t.serialize(e).split("#")[0]+"#"}e.getFullPath=h,e._getFullPath=u;const d=/#\/?$/;function p(t){return t?t.replace(d,""):""}e.normalizeId=p,e.resolveUrl=function(t,e,n){return n=p(n),t.resolve(e,n)};const m=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(t,e){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:i}=this.opts,s=p(t[n]||e),a={"":s},l=h(i,s,!1),c={},u=new Set;return r(t,{allKeys:!0},((t,e,i,o)=>{if(void 0===o)return;const r=l+e;let s=a[o];function h(e){const n=this.opts.uriResolver.resolve;if(e=p(s?n(s,e):e),u.has(e))throw f(e);u.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?d(t,i.schema,e):e!==p(r)&&("#"===e[0]?(d(t,c[e],e),c[e]=t):this.refs[e]=r),e}function g(t){if("string"==typeof t){if(!m.test(t))throw new Error(`invalid anchor "${t}"`);h.call(this,`#${t}`)}}"string"==typeof t[n]&&(s=h.call(this,t[n])),g.call(this,t.$anchor),g.call(this,t.$dynamicAnchor),a[e]=s})),c;function d(t,e,n){if(void 0!==e&&!o(t,e))throw f(n)}function f(t){return new Error(`reference "${t}" resolves to more than one schema`)}}},396:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(t){return"string"==typeof t&&n.has(t)},e.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}},4227:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const i=n(9029),o=n(1520);function r(t,e=t.schema){const{opts:n,self:i}=t;if(!n.strictSchema)return;if("boolean"==typeof e)return;const o=i.RULES.keywords;for(const n in e)o[n]||m(t,`unknown keyword: "${n}"`)}function s(t,e){if("boolean"==typeof t)return!t;for(const n in t)if(e[n])return!0;return!1}function a(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function l(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:o}){return(r,s,a,l)=>{const c=void 0===a?s:a instanceof i.Name?(s instanceof i.Name?t(r,s,a):e(r,s,a),a):s instanceof i.Name?(e(r,a,s),s):n(s,a);return l!==i.Name||c instanceof i.Name?c:o(r,c)}}function h(t,e){if(!0===e)return t.var("props",!0);const n=t.var("props",i._`{}`);return void 0!==e&&u(t,n,e),n}function u(t,e,n){Object.keys(n).forEach((n=>t.assign(i._`${e}${(0,i.getProperty)(n)}`,!0)))}e.toHash=function(t){const e={};for(const n of t)e[n]=!0;return e},e.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(r(t,e),!s(e,t.self.RULES.all))},e.checkUnknownRules=r,e.schemaHasRules=s,e.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const n in t)if("$ref"!==n&&e.all[n])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:t,schemaPath:e},n,o,r){if(!r){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return i._`${n}`}return i._`${t}${e}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(t){return l(decodeURIComponent(t))},e.escapeFragment=function(t){return encodeURIComponent(a(t))},e.escapeJsonPointer=a,e.unescapeJsonPointer=l,e.eachItem=function(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)},e.mergeEvaluated={props:c({mergeNames:(t,e,n)=>t.if(i._`${n} !== true && ${e} !== undefined`,(()=>{t.if(i._`${e} === true`,(()=>t.assign(n,!0)),(()=>t.assign(n,i._`${n} || {}`).code(i._`Object.assign(${n}, ${e})`)))})),mergeToName:(t,e,n)=>t.if(i._`${n} !== true`,(()=>{!0===e?t.assign(n,!0):(t.assign(n,i._`${n} || {}`),u(t,n,e))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:h}),items:c({mergeNames:(t,e,n)=>t.if(i._`${n} !== true && ${e} !== undefined`,(()=>t.assign(n,i._`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`))),mergeToName:(t,e,n)=>t.if(i._`${n} !== true`,(()=>t.assign(n,!0===e||i._`${n} > ${e} ? ${n} : ${e}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},e.evaluatedPropsToName=h,e.setEvaluated=u;const d={};var p;function m(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,!0===n)throw new Error(e);t.self.logger.warn(e)}}e.useFunc=function(t,e){return t.scopeValue("func",{ref:e,code:d[e.code]||(d[e.code]=new o._Code(e.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(p||(e.Type=p={})),e.getErrorPath=function(t,e,n){if(t instanceof i.Name){const o=e===p.Num;return n?o?i._`"[" + ${t} + "]"`:i._`"['" + ${t} + "']"`:o?i._`"/" + ${t}`:i._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,i.getProperty)(t).toString():"/"+a(t)},e.checkStrictMode=m},7887:(t,e)=>{"use strict";function n(t,e){return e.rules.some((e=>i(t,e)))}function i(t,e){var n;return void 0!==t[e.keyword]||(null===(n=e.definition.implements)||void 0===n?void 0:n.some((e=>void 0!==t[e])))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:t,self:e},i){const o=e.RULES.types[i];return o&&!0!==o&&n(t,o)},e.shouldUseGroup=n,e.shouldUseRule=i},8727:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const i=n(8708),o=n(9029),r=n(2023),s={message:"boolean schema is false"};function a(t,e){const{gen:n,data:o}=t,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,i.reportError)(r,s,void 0,e)}e.topBoolOrEmptySchema=function(t){const{gen:e,schema:n,validateName:i}=t;!1===n?a(t,!1):"object"==typeof n&&!0===n.$async?e.return(r.default.data):(e.assign(o._`${i}.errors`,null),e.return(!0))},e.boolOrEmptySchema=function(t,e){const{gen:n,schema:i}=t;!1===i?(n.var(e,!1),a(t)):n.var(e,!0)}},208:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const i=n(396),o=n(7887),r=n(8708),s=n(9029),a=n(4227);var l;function c(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(i.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(l||(e.DataType=l={})),e.getSchemaTypes=function(t){const e=c(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},e.getJSONTypes=c,e.coerceAndCheckDataType=function(t,e){const{gen:n,data:i,opts:r}=t,a=function(t,e){return e?t.filter((t=>h.has(t)||"array"===e&&"array"===t)):[]}(e,r.coerceTypes),c=e.length>0&&!(0===a.length&&1===e.length&&(0,o.schemaHasRulesForType)(t,e[0]));if(c){const o=d(e,i,r.strictNumbers,l.Wrong);n.if(o,(()=>{a.length?function(t,e,n){const{gen:i,data:o,opts:r}=t,a=i.let("dataType",s._`typeof ${o}`),l=i.let("coerced",s._`undefined`);"array"===r.coerceTypes&&i.if(s._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>i.assign(o,s._`${o}[0]`).assign(a,s._`typeof ${o}`).if(d(e,o,r.strictNumbers),(()=>i.assign(l,o))))),i.if(s._`${l} !== undefined`);for(const t of n)(h.has(t)||"array"===t&&"array"===r.coerceTypes)&&c(t);function c(t){switch(t){case"string":return void i.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(l,s._`"" + ${o}`).elseIf(s._`${o} === null`).assign(l,s._`""`);case"number":return void i.elseIf(s._`${a} == "boolean" || ${o} === null
|
|
1
|
+
var bio;(()=>{var t={8924:(t,e,n)=>{"use strict";var i=n(7362);class o extends i.e{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,o)),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,o)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new o({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 o.aaSynonyms?o.aaSynonyms[t]:t;return super.get(e)}}o.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class r{static getPalette(t="grok"){switch(t){case"grok":return o.GrokGroups;case"lesk":return o.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",i="";for(const o of t)"("==o?e++:")"==o?e--:e?n+=o:i+=o;return isNaN(parseInt(n))?[i,n]:[i,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[i,o]=this.getInnerOuter(t);if(i=i.length>6?`${i.slice(0,3)}...`:i,o=o.length>6?`${o.slice(0,3)}...`:o,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,o,1]:[this.undefinedColor,i,o,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,o,2]:[this.undefinedColor,i,o,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,o,3]:[this.undefinedColor,i,o,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,o,4]:[this.undefinedColor,i,o,4]}return[this.undefinedColor,i,o,0]}}r.SemType="Aminoacids",r.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",r.undefinedColor="rgb(100,100,100)",r.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"},r.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"},r.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(*)*"},r.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"}},6717:(t,e,n)=>{"use strict";n.d(e,{j:()=>o});var i=n(6082);async function o(){const t=i.Func.find({package:"Chem",name:"getRdKitModule"});if(0===t.length)throw new Error('Package "Chem" must be installed for getRdKitModule.');return(await t[0].prepare().call()).getOutputParamValue()}},3599:(t,e,n)=>{"use strict";n.d(e,{o:()=>i.o});var i=n(6869)},9124:(t,e,n)=>{"use strict";n.d(e,{b2:()=>r,fA:()=>s});var i=n(7389),o=n(6082);async function r(){const t="Helm",e=o.Func.find({package:t,name:"getHelmHelper"});if(0===e.length)throw new Error(`Package '${t}' must be installed for HelmHelper.`);return(await e[0].prepare().call()).getOutputParamValue()}function s(t,e){if(!t)throw new Error("Argument 'a' of type Atom or HelmType is mandatory.");let n,i;const o=t;return"ATOM"===o.T?(n=o.biotype(),i=o.elem):(n=t,i=e),[n,i]}o.JsInputBase,Error,i.input.helmAsync=async function(t,e){return(await r()).createHelmInput(t,e)}},8438:(t,e,n)=>{"use strict";function i(t){return t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t}n.d(e,{D:()=>i})},8123:(t,e,n)=>{"use strict";n.d(e,{u:()=>i});const i={V2K_RGP_SHIFT:8,V2K_RGP_LINE:"M RGP",V2K_A_LINE:"A ",V3K_COUNTS_SHIFT:14,V3K_IDX_SHIFT:7,V3K_HEADER_FIRST_LINE:"\nDatagrok macromolecule handler\n\n",V3K_HEADER_SECOND_LINE:" 0 0 0 0 0 0 999 V3000\n",V3K_BEGIN_CTAB_BLOCK:"M V30 BEGIN CTAB\n",V3K_END_CTAB_BLOCK:"M V30 END CTAB\n",V3K_BEGIN_COUNTS_LINE:"M V30 COUNTS ",V3K_COUNTS_LINE_ENDING:" 0 0 0\n",V3K_BEGIN_ATOM_BLOCK:"M V30 BEGIN ATOM\n",V3K_END_ATOM_BLOCK:"M V30 END ATOM\n",V3K_BEGIN_BOND_BLOCK:"M V30 BEGIN BOND\n",V3K_END_BOND_BLOCK:"M V30 END BOND\n",V3K_BOND_CONFIG:" CFG=",V3K_BEGIN_DATA_LINE:"M V30 ",V3K_END:"M END",PRECISION_FACTOR:1e4,DEOXYRIBOSE:{polymerType:"RNA",symbol:"d"},RIBOSE:{polymerType:"RNA",symbol:"r"},PHOSPHATE:{polymerType:"RNA",symbol:"p"},OXYGEN:"O",HYDROGEN:"H"}},4356:(t,e,n)=>{"use strict";n.d(e,{Eu:()=>a,ub:()=>s});var i=n(4328);const o="Libraries";let r=Promise.resolve();async function s(){let t;return r=r.then((async()=>{const e=i.userSettings.getValue(o,"Settings",!0);t=e?JSON.parse(e):{exclude:[],explicit:[],duplicateMonomerPreferences:{}},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],t.duplicateMonomerPreferences=t.duplicateMonomerPreferences instanceof Object?t.duplicateMonomerPreferences:{},console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await r,t}async function a(t){r=r.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),i.userSettings.add(o,"Settings",JSON.stringify(t),!0)})),await r}},5553:(t,e,n)=>{"use strict";n.d(e,{Qc:()=>A,WN:()=>S});var i=n(1991),o=n.n(i);const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,a="object"==typeof process&&process?process:{},l=(t,e,n,i)=>{"function"==typeof a.emitWarning?a.emitWarning(t,e,n,i):console.error(`[${n}] ${e}: ${t}`)};let c=globalThis.AbortController,h=globalThis.AbortSignal;if(void 0===c){h=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},c=class{constructor(){e()}signal=new h;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==a.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,l("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const u=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),d=t=>u(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?p:null:null;class p extends Array{constructor(t){super(t),this.fill(0)}}class m{heap;length;static#t=!1;static create(t){const e=d(t);if(!e)return[];m.#t=!0;const n=new m(t,e);return m.#t=!1,n}constructor(t,e){if(!m.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class f{#e;#n;#i;#o;#r;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#l;#c;#h;#u;#d;#p;#m;#f;#g;#y;#b;#v;#w;#C;#A;#S;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#w,sizes:t.#b,keyMap:t.#c,keyList:t.#h,valList:t.#u,next:t.#d,prev:t.#p,get head(){return t.#m},get tail(){return t.#f},free:t.#g,isBackgroundFetch:e=>t.#x(e),backgroundFetch:(e,n,i,o)=>t.#E(e,n,i,o),moveToTail:e=>t.#T(e),indexes:e=>t.#M(e),rindexes:e=>t.#_(e),isStale:e=>t.#I(e)}}get max(){return this.#e}get maxSize(){return this.#n}get calculatedSize(){return this.#l}get size(){return this.#a}get fetchMethod(){return this.#r}get memoMethod(){return this.#s}get dispose(){return this.#i}get disposeAfter(){return this.#o}constructor(t){const{max:e=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:r,updateAgeOnHas:a,allowStale:c,dispose:h,disposeAfter:p,noDisposeOnSet:g,noUpdateTTL:y,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:w,fetchMethod:C,memoMethod:A,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:E,allowStaleOnFetchAbort:T,ignoreFetchAbort:M}=t;if(0!==e&&!u(e))throw new TypeError("max option must be a nonnegative integer");const _=e?d(e):Array;if(!_)throw new Error("invalid max value: "+e);if(this.#e=e,this.#n=b,this.maxEntrySize=v||this.#n,this.sizeCalculation=w,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==A&&"function"!=typeof A)throw new TypeError("memoMethod must be a function if defined");if(this.#s=A,void 0!==C&&"function"!=typeof C)throw new TypeError("fetchMethod must be a function if specified");if(this.#r=C,this.#A=!!C,this.#c=new Map,this.#h=new Array(e).fill(void 0),this.#u=new Array(e).fill(void 0),this.#d=new _(e),this.#p=new _(e),this.#m=0,this.#f=0,this.#g=m.create(e),this.#a=0,this.#l=0,"function"==typeof h&&(this.#i=h),"function"==typeof p?(this.#o=p,this.#y=[]):(this.#o=void 0,this.#y=void 0),this.#C=!!this.#i,this.#S=!!this.#o,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!E,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!M,0!==this.maxEntrySize){if(0!==this.#n&&!u(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!u(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#L()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!a,this.ttlResolution=u(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!u(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(0===this.#e&&0===this.ttl&&0===this.#n)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#n){const t="LRU_CACHE_UNBOUNDED";(t=>!s.has(t))(t)&&(s.add(t),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,f))}}getRemainingTTL(t){return this.#c.has(t)?1/0:0}#N(){const t=new p(this.#e),e=new p(this.#e);this.#w=t,this.#v=e,this.#P=(n,i,o=r.now())=>{if(e[n]=0!==i?o:0,t[n]=i,0!==i&&this.ttlAutopurge){const t=setTimeout((()=>{this.#I(n)&&this.#$(this.#h[n],"expire")}),i+1);t.unref&&t.unref()}},this.#R=n=>{e[n]=0!==t[n]?r.now():0},this.#k=(o,r)=>{if(t[r]){const s=t[r],a=e[r];if(!s||!a)return;o.ttl=s,o.start=a,o.now=n||i();const l=o.now-a;o.remainingTTL=s-l}};let n=0;const i=()=>{const t=r.now();if(this.ttlResolution>0){n=t;const e=setTimeout((()=>n=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=o=>{const r=this.#c.get(o);if(void 0===r)return 0;const s=t[r],a=e[r];return s&&a?s-((n||i())-a):1/0},this.#I=o=>{const r=e[o],s=t[o];return!!s&&!!r&&(n||i())-r>s}}#R=()=>{};#k=()=>{};#P=()=>{};#I=()=>!1;#L(){const t=new p(this.#e);this.#l=0,this.#b=t,this.#O=e=>{this.#l-=t[e],t[e]=0},this.#H=(t,e,n,i)=>{if(this.#x(e))return 0;if(!u(n)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(e,t),!u(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#G=(e,n,i)=>{if(t[e]=n,this.#n){const n=this.#n-t[e];for(;this.#l>n;)this.#F(!0)}this.#l+=t[e],i&&(i.entrySize=n,i.totalCalculatedSize=this.#l)}}#O=t=>{};#G=(t,e,n)=>{};#H=(t,e,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#M({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#f;this.#D(e)&&(!t&&this.#I(e)||(yield e),e!==this.#m);)e=this.#p[e]}*#_({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#m;this.#D(e)&&(!t&&this.#I(e)||(yield e),e!==this.#f);)e=this.#d[e]}#D(t){return void 0!==t&&this.#c.get(this.#h[t])===t}*entries(){for(const t of this.#M())void 0===this.#u[t]||void 0===this.#h[t]||this.#x(this.#u[t])||(yield[this.#h[t],this.#u[t]])}*rentries(){for(const t of this.#_())void 0===this.#u[t]||void 0===this.#h[t]||this.#x(this.#u[t])||(yield[this.#h[t],this.#u[t]])}*keys(){for(const t of this.#M()){const e=this.#h[t];void 0===e||this.#x(this.#u[t])||(yield e)}}*rkeys(){for(const t of this.#_()){const e=this.#h[t];void 0===e||this.#x(this.#u[t])||(yield e)}}*values(){for(const t of this.#M())void 0===this.#u[t]||this.#x(this.#u[t])||(yield this.#u[t])}*rvalues(){for(const t of this.#_())void 0===this.#u[t]||this.#x(this.#u[t])||(yield this.#u[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const n of this.#M()){const i=this.#u[n],o=this.#x(i)?i.__staleWhileFetching:i;if(void 0!==o&&t(o,this.#h[n],this))return this.get(this.#h[n],e)}}forEach(t,e=this){for(const n of this.#M()){const i=this.#u[n],o=this.#x(i)?i.__staleWhileFetching:i;void 0!==o&&t.call(e,o,this.#h[n],this)}}rforEach(t,e=this){for(const n of this.#_()){const i=this.#u[n],o=this.#x(i)?i.__staleWhileFetching:i;void 0!==o&&t.call(e,o,this.#h[n],this)}}purgeStale(){let t=!1;for(const e of this.#_({allowStale:!0}))this.#I(e)&&(this.#$(this.#h[e],"expire"),t=!0);return t}info(t){const e=this.#c.get(t);if(void 0===e)return;const n=this.#u[e],i=this.#x(n)?n.__staleWhileFetching:n;if(void 0===i)return;const o={value:i};if(this.#w&&this.#v){const t=this.#w[e],n=this.#v[e];if(t&&n){const e=t-(r.now()-n);o.ttl=e,o.start=Date.now()}}return this.#b&&(o.size=this.#b[e]),o}dump(){const t=[];for(const e of this.#M({allowStale:!0})){const n=this.#h[e],i=this.#u[e],o=this.#x(i)?i.__staleWhileFetching:i;if(void 0===o||void 0===n)continue;const s={value:o};if(this.#w&&this.#v){s.ttl=this.#w[e];const t=r.now()-this.#v[e];s.start=Math.floor(Date.now()-t)}this.#b&&(s.size=this.#b[e]),t.unshift([n,s])}return t}load(t){this.clear();for(const[e,n]of t){if(n.start){const t=Date.now()-n.start;n.start=r.now()-t}this.set(e,n.value,n)}}set(t,e,n={}){if(void 0===e)return this.delete(t),this;const{ttl:i=this.ttl,start:o,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=n;let{noUpdateTTL:l=this.noUpdateTTL}=n;const c=this.#H(t,e,n.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#$(t,"set"),this;let h=0===this.#a?void 0:this.#c.get(t);if(void 0===h)h=0===this.#a?this.#f:0!==this.#g.length?this.#g.pop():this.#a===this.#e?this.#F(!1):this.#a,this.#h[h]=t,this.#u[h]=e,this.#c.set(t,h),this.#d[this.#f]=h,this.#p[h]=this.#f,this.#f=h,this.#a++,this.#G(h,c,a),a&&(a.set="add"),l=!1;else{this.#T(h);const n=this.#u[h];if(e!==n){if(this.#A&&this.#x(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=n;void 0===e||r||(this.#C&&this.#i?.(e,t,"set"),this.#S&&this.#y?.push([e,t,"set"]))}else r||(this.#C&&this.#i?.(n,t,"set"),this.#S&&this.#y?.push([n,t,"set"]));if(this.#O(h),this.#G(h,c,a),this.#u[h]=e,a){a.set="replace";const t=n&&this.#x(n)?n.__staleWhileFetching:n;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===i||this.#w||this.#N(),this.#w&&(l||this.#P(h,i,o),a&&this.#k(a,h)),!r&&this.#S&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}return this}pop(){try{for(;this.#a;){const t=this.#u[this.#m];if(this.#F(!0),this.#x(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#S&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}}}#F(t){const e=this.#m,n=this.#h[e],i=this.#u[e];return this.#A&&this.#x(i)?i.__abortController.abort(new Error("evicted")):(this.#C||this.#S)&&(this.#C&&this.#i?.(i,n,"evict"),this.#S&&this.#y?.push([i,n,"evict"])),this.#O(e),t&&(this.#h[e]=void 0,this.#u[e]=void 0,this.#g.push(e)),1===this.#a?(this.#m=this.#f=0,this.#g.length=0):this.#m=this.#d[e],this.#c.delete(n),this.#a--,e}has(t,e={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=e,o=this.#c.get(t);if(void 0!==o){const t=this.#u[o];if(this.#x(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#I(o))return n&&this.#R(o),i&&(i.has="hit",this.#k(i,o)),!0;i&&(i.has="stale",this.#k(i,o))}else i&&(i.has="miss");return!1}peek(t,e={}){const{allowStale:n=this.allowStale}=e,i=this.#c.get(t);if(void 0===i||!n&&this.#I(i))return;const o=this.#u[i];return this.#x(o)?o.__staleWhileFetching:o}#E(t,e,n,i){const o=void 0===e?void 0:this.#u[e];if(this.#x(o))return o;const r=new c,{signal:s}=n;s?.addEventListener("abort",(()=>r.abort(s.reason)),{signal:r.signal});const a={signal:r.signal,options:n,context:i},l=(i,o=!1)=>{const{aborted:s}=r.signal,l=n.ignoreFetchAbort&&void 0!==i;if(n.status&&(s&&!o?(n.status.fetchAborted=!0,n.status.fetchError=r.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!l&&!o)return h(r.signal.reason);const c=u;return this.#u[e]===u&&(void 0===i?c.__staleWhileFetching?this.#u[e]=c.__staleWhileFetching:this.#$(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,i,a.options))),i},h=i=>{const{aborted:o}=r.signal,s=o&&n.allowStaleOnFetchAbort,a=s||n.allowStaleOnFetchRejection,l=a||n.noDeleteOnFetchRejection,c=u;if(this.#u[e]===u&&(l&&void 0!==c.__staleWhileFetching?s||(this.#u[e]=c.__staleWhileFetching):this.#$(t,"fetch")),a)return n.status&&void 0!==c.__staleWhileFetching&&(n.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw i};n.status&&(n.status.fetchDispatched=!0);const u=new Promise(((e,i)=>{const s=this.#r?.(t,o,a);s&&s instanceof Promise&&s.then((t=>e(void 0===t?void 0:t)),i),r.signal.addEventListener("abort",(()=>{n.ignoreFetchAbort&&!n.allowStaleOnFetchAbort||(e(void 0),n.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))}))})).then(l,(t=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=t),h(t)))),d=Object.assign(u,{__abortController:r,__staleWhileFetching:o,__returned:void 0});return void 0===e?(this.set(t,d,{...a.options,status:void 0}),e=this.#c.get(t)):this.#u[e]=d,d}#x(t){if(!this.#A)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof c}async fetch(t,e={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:f=!1,status:g,signal:y}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:g});const b={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:r,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:g,signal:y};let v=this.#c.get(t);if(void 0===v){g&&(g.fetch="miss");const e=this.#E(t,v,b,m);return e.__returned=e}{const e=this.#u[v];if(this.#x(e)){const t=n&&void 0!==e.__staleWhileFetching;return g&&(g.fetch="inflight",t&&(g.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const o=this.#I(v);if(!f&&!o)return g&&(g.fetch="hit"),this.#T(v),i&&this.#R(v),g&&this.#k(g,v),e;const r=this.#E(t,v,b,m),s=void 0!==r.__staleWhileFetching&&n;return g&&(g.fetch=o?"stale":"refresh",s&&o&&(g.returnedStale=!0)),s?r.__staleWhileFetching:r.__returned=r}}async forceFetch(t,e={}){const n=await this.fetch(t,e);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(t,e={}){const n=this.#s;if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:o,...r}=e,s=this.get(t,r);if(!o&&void 0!==s)return s;const a=n(t,s,{options:r,context:i});return this.set(t,a,r),a}get(t,e={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:r}=e,s=this.#c.get(t);if(void 0!==s){const e=this.#u[s],a=this.#x(e);return r&&this.#k(r,s),this.#I(s)?(r&&(r.get="stale"),a?(r&&n&&void 0!==e.__staleWhileFetching&&(r.returnedStale=!0),n?e.__staleWhileFetching:void 0):(o||this.#$(t,"expire"),r&&n&&(r.returnedStale=!0),n?e:void 0)):(r&&(r.get="hit"),a?e.__staleWhileFetching:(this.#T(s),i&&this.#R(s),e))}r&&(r.get="miss")}#B(t,e){this.#p[e]=t,this.#d[t]=e}#T(t){t!==this.#f&&(t===this.#m?this.#m=this.#d[t]:this.#B(this.#p[t],this.#d[t]),this.#B(this.#f,t),this.#f=t)}delete(t){return this.#$(t,"delete")}#$(t,e){let n=!1;if(0!==this.#a){const i=this.#c.get(t);if(void 0!==i)if(n=!0,1===this.#a)this.#V(e);else{this.#O(i);const n=this.#u[i];if(this.#x(n)?n.__abortController.abort(new Error("deleted")):(this.#C||this.#S)&&(this.#C&&this.#i?.(n,t,e),this.#S&&this.#y?.push([n,t,e])),this.#c.delete(t),this.#h[i]=void 0,this.#u[i]=void 0,i===this.#f)this.#f=this.#p[i];else if(i===this.#m)this.#m=this.#d[i];else{const t=this.#p[i];this.#d[t]=this.#d[i];const e=this.#d[i];this.#p[e]=this.#p[i]}this.#a--,this.#g.push(i)}}if(this.#S&&this.#y?.length){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}return n}clear(){return this.#V("delete")}#V(t){for(const e of this.#_({allowStale:!0})){const n=this.#u[e];if(this.#x(n))n.__abortController.abort(new Error("deleted"));else{const i=this.#h[e];this.#C&&this.#i?.(n,i,t),this.#S&&this.#y?.push([n,i,t])}}if(this.#c.clear(),this.#u.fill(void 0),this.#h.fill(void 0),this.#w&&this.#v&&(this.#w.fill(0),this.#v.fill(0)),this.#b&&this.#b.fill(0),this.#m=0,this.#f=0,this.#g.length=0,this.#l=0,this.#a=0,this.#S&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#o?.(...e)}}}function g(t){window.$monomerHover=t}var y=n(2003),b=n(6077),v=n(3561),w=n(9235);const C="MonomerHoverLinks";async function A(t,e,n,i,r,s=!1){const a=i.getSeqHandler(t),l=a.alphabet==y.YI.RNA||a.alphabet==y.YI.DNA,c=a.isHelm()&&l,h=!a.isHelm()&&l,u=t=>null==t?null:c?s?t:Math.floor(t/3):h&&s?3*t+1:t,d=s?await i.getHelmToMolfileConverter(n):null,p=new f({max:100});function m(t,e){const a=t.get(e);if(null==a)return null;let l=p.get(a);return l||p.set(a,l=function(t,e){const a=i.getSeqHandler(t);if(s){const t=a.getHelm(e);return i.helmToAtomicLevelSingle(t,d,!1,!1).monomers}{const t=a.getSplitted(e),i=a.defaultBiotype,s=o().count(0).take(t.length).map((e=>({position:e,symbol:t.getCanonical(e),biotype:i}))).toArray(),l=a.alphabet,c=l==y.YI.RNA||l==y.YI.DNA?"RNA":"PEPTIDE",h=(0,b.eM)([s],c,l,n,r);return(0,v.gU)(s,h,l,c).monomers}}(t,e)),l}const A={targetCol:e,handler:(e,i,o)=>{const r=o.grid,s=e.tableRowIndex,a=e.gridRow,l=r.cell(o.name,a),c=null!==(h=window.$monomerHover)&&void 0!==h?h:null;var h;if(!c||c&&(c.dataFrameId!=t.dataFrame.id||c.gridRowIdx!=a||c.seqColName!=t.name||c.seqPosition!=i?.position)){if(c&&(g(null),c.gridCell.render()),!i)return g(null),!0;g({gridCell:l,dataFrameId:t.dataFrame.id,gridRowIdx:a,seqColName:t.name,seqPosition:u(i?.position)??-1,getSubstruct:()=>{if(!i||"*"===i.symbol)return;const e=m(t,s);if(!e)return;const o=e.get(u(i?.position));return o?(0,w.H)([o],n):{atoms:[],bonds:[],highlightAtomColors:[],highlightBondColors:[]}}}),l.render()}return!0},getSubstruct:i=>{if("true"!=e.getTag(".sequence-src-highlight-monomers"))return;if(null==i)return;if(!t.get(i))return;const o=m(t,i);return o?(0,w.H)(o.values(),n):void 0}};return function(t,e){let n=t[C];n||(n=t[C]=[]),n.push(e),t[C]=n}(t.temp,A),function(t,e){let n=t["substruct-providers"];n||(n=t["substruct-providers"]=[]),n.push(e),t["substruct-providers"]=n}(e.temp,A),A}function S(t,e){try{const n=t.tableColumn;if(!n)return;const i=function(t){return t.temp[C]??[]}(n);for(let n=i.length-1;n>=0;--n){const o=i[n],r=t.grid.col(o.targetCol.name);if(r&&!o.handler(t,e,r))break}}catch(t){console.error(t)}}},6718:(t,e,n)=>{"use strict";n.d(e,{A7:()=>p,pj:()=>h,uL:()=>u,uX:()=>c});var i=n(6082),o=n(4328),r=n(6295),s=n(3151),a=n(3077),l=n(439);function c(t){const e=[];for(let n=0;n<t.rowCount;n++){const i={};Object.keys(s.Ec).forEach((e=>{if("symbol"===e){const o=t.get(s.Ec[e],n);i[e]="."===o?t.get(s.yw,n):o}else if("rgroups"===e){const o=t.get(s.Ec[e],n).split("\n"),r=[];o.forEach((t=>{const e={},n=t.substring(t.lastIndexOf("]")+1),i=t.match(/\[R(\d+)\]/)[1];e.capGroupSmiles="H"===n?`[*:${i}][H]`:`O[*:${i}]`,e.alternateId="H"===n?`R${i}-H`:`R${i}-OH`,e.capGroupName="H"===n?"H":"OH",e.label=`R${i}`,r.push(e)})),i[e]=r}else s.Ec[e]&&(i[e]=t.get(s.Ec[e],n))})),i.author??(i.author=""),i.id??(i.id=0),i.smiles??(i.smiles=""),i.monomerType??(i.monomerType="Backbone"),i.createDate??(i.createDate=null),e.push(i)}return e}async function h(){const t=i.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===t.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await t[0].prepare().call()).getOutputParamValue()}async function u(t,e,n){t instanceof i.Column&&(t=(0,a.R)(t,n).columns.toList());const r=(await h()).getMonomerLib(),s=new Array(t.length),c=t[0].length,u=new Float32Array(c);for(let n=0;n<t.length;++n){const a=n<e.length?e.getCanonical(n):l._S,h=r.getMonomer("PEPTIDE",a)?.smiles??"",d=t[n],p=d.getRawData(),m=d.categories,f=m.indexOf("");if(s[n]={categories:m,data:p,emptyIndex:f},void 0===a)continue;const g=i.Column.fromStrings("smiles",m.map((t=>r.getMonomer("PEPTIDE",t)?.smiles??""))),y=(i.DataFrame.fromColumns([g]),await o.chem.getSimilarities(g,h)),b=y?y.getRawData():null;for(let t=0;t<c;++t){const e=p[t];a!==l._S&&e!==f?u[t]+=b[e]:a===l._S&&e===f&&(u[t]+=1)}}for(let n=0;n<u.length;++n){let o=u[n]/e.length;for(let r=0;r<t.length;++r){const t=s[r];if(r>=e.length&&t.data[n]!==t.emptyIndex||t.data[n]===t.emptyIndex&&r<e.length){o=i.FLOAT_NULL;break}}u[n]=o}return i.Column.fromFloat32Array("Similarity",u)}async function d(t){const e=(await h()).getMonomerLib(),n=[],r={},s=t.map((t=>e.getMonomer("PEPTIDE",t)?.smiles??"")),a=i.Column.fromStrings("smiles",s);for(let e=0;e<s.length;++e){r[t[e]]=e;const i=s[e],l=""===i?new Array(s.length).fill(0):(await o.chem.getSimilarities(a,i)).getRawData();l[e]=1,n[e]=Array.from(l)}return{scoringMatrix:n,alphabetIndexes:r}}async function p(t,e="Morgan"){const n=(await h()).getMonomerLib(),o=new Array(t.length).fill(0).map((()=>new Array(t.length).fill(0))),s={},a=t.map((t=>n.getMonomer("PEPTIDE",t)?.molfile||n.getMonomer("PEPTIDE",t)?.smiles||"")),l=i.Func.find({package:"Chem",name:"getFingerprints"})[0];if(!l)return console.warn('Function "Chem:getFingerprints" is not found in chem package. falling back to Morgan fingerprints'),await d(t);const c=i.Column.fromStrings("smiles",a),u=(i.DataFrame.fromColumns([c]),(await l.apply({col:c,fingerprintType:e}))?.entries);if(!u)return console.warn(`${e} Fingerprints could not be calculated for monomers from chem package.\n falling back to Morgan fingerprints`),await d(t);for(let e=0;e<u.length;++e)if(o[e][e]=1,s[t[e]]=e,u[e])for(let t=e+1;t<u.length;++t)u[t]&&(o[e][t]=o[t][e]=(0,r.$1)(u[e],u[t]));return{scoringMatrix:o,alphabetIndexes:s}}},6197:(t,e,n)=>{"use strict";n.d(e,{Y:()=>o});var i=n(3599);function o(t){let e;switch(t){case i.o.BASE:case i.o.SUGAR:case i.o.LINKER:case i.o.NUCLEOTIDE:case"nucleotide":e="RNA";break;case i.o.AA:e="PEPTIDE";break;case i.o.CHEM:e="CHEM";break;case i.o.BLOB:e="BLOB";break;default:e="PEPTIDE",console.warn(`Unexpected HelmType '${t}'`)}return e}},9235:(t,e,n)=>{"use strict";n.d(e,{H:()=>c,R:()=>l});var i=n(6082),o=n(1991),r=n.n(o),s=n(330),a=n(3599);async function l(t,e,o,l,c,h,u){const d=t.length,p=t.dataFrame,m=Math.max(navigator.hardwareConcurrency-2,1),f=new Array(m).fill(null).map((()=>new Worker(new URL(n.p+n.u(455),n.b)))),g=d/m,y=new Array(m),b=h.getSeqHandler(t),v="RNA"==l?a.o.NUCLEOTIDE:a.o.AA,w=r().count(0).take(t.length).map((t=>{const e=b.getSplitted(t);return r().count(0).take(e.length).map((t=>({position:t,symbol:e.getCanonical(t),biotype:v}))).toArray()})).toArray();for(let t=0;t<m;t++){const n=f[t],i=Math.floor(t*g),r=t===m-1?d:Math.floor((t+1)*g);y[t]=new Promise((t=>{n.onmessage=e=>{t(e.data)}})),n.postMessage({seqList:w,monomersDict:e,alphabet:o,polymerType:l,start:i,end:r})}const C=[],A=[];await Promise.all(y).then((t=>{for(const e of t)C.push(...e.molfiles),A.push(...e.warnings)})),setTimeout((()=>{f.forEach((t=>{t.terminate()}))}),0);const S=(0,s.qj)(p,t.name),x=i.Column.fromType(i.COLUMN_TYPE.STRING,S,t.length).init((t=>C[t]?.molfile));return x.semType=i.SEMTYPE.MOLECULE,x.meta.units=i.UNITS.Molecule.MOLBLOCK,x.setTag(".sequence-src-col",t.name),{molCol:x,warnings:A}}function c(t,e){const n={},o={};for(const r of t){const t=e.getWebEditorMonomer(r.biotype,r.symbol).backgroundcolor,a=(0,s.vG)(t??i.Color.toRgb(i.Color.mouseOverRows))??[1,0,0,.7];for(const t of r.atoms)n[t]=a;for(const t of r.bonds)o[t]=a}return{atoms:Object.keys(n).map((t=>parseInt(t))),bonds:Object.keys(o).map((t=>parseInt(t))),highlightAtomColors:n,highlightBondColors:o}}},3561:(t,e,n)=>{"use strict";n.d(e,{Hb:()=>l,YN:()=>f,gU:()=>c});var i=n(8123),o=n(294),r=n(3151),s=n(439),a=n(6197);function l(t,e,n){const o=new Map;for(const a of t.getMonomerSymbolsByType(e)){const l=t.getMonomer(e,a);if("RNA"===e&&("Branch"===l.monomerType||n===s.YI.DNA&&l.symbol===i.u.DEOXYRIBOSE.symbol||n===s.YI.RNA&&l.symbol===i.u.RIBOSE.symbol||l.symbol===i.u.PHOSPHATE.symbol)||"PEPTIDE"===e&&"Branch"!==l.monomerType){const t={};r.f6.forEach((e=>{t[e]=l[e]})),o.set(l.symbol,t)}}return o}function c(t,e,n,r){if(0===t.length)return o.vF.createEmpty();const l=m,{atomCount:c,bondCount:u,needsCapping:p}=l(t,e,n,r),g=new Array(c),y=new Array(u);let b,v=null,w=null;"PEPTIDE"===r?b=h:(b=d,v=n===s.YI.DNA?(0,o.xb)(e,i.u.DEOXYRIBOSE):(0,o.xb)(e,i.u.RIBOSE),w=(0,o.xb)(e,i.u.PHOSPHATE));const C={i:0,nodeShift:0,bondShift:0,backbonePositionShift:new Array(2).fill(0),branchPositionShift:new Array(2).fill(0),backboneAttachNode:0,branchAttachNode:0,flipFactor:1},A={sugar:v,phosphate:w,seqLength:t.length,atomCount:c,bondCount:u},S=new o.Cg,x=[];let E,T=0;for(C.i=0;C.i<A.seqLength;++C.i){const n=t[C.i];if(n.symbol===s._S)continue;const i=(0,o.xb)(e,{symbol:n.symbol,polymerType:(0,a.Y)(n.biotype)});E=i.terminalR2Atom;const r=C.nodeShift,l=C.bondShift;b(i,g,y,C,A),i.stereoAtoms?.forEach((t=>x.push(t+T))),T+=i.atoms.x.length;const c=C.nodeShift-r,h=new Array(c);for(let t=0;t<c;++t)h[t]=r+t;const u=C.bondShift-l,d=new Array(u);for(let t=0;t<u;++t)d[t]=l+t;S.set(C.i,{biotype:n.biotype,symbol:n.symbol,atoms:h,bonds:d})}p&&function(t,e,n,o,r=i.u.OXYGEN){const s=n.nodeShift+1;t[o.atomCount]=i.u.V3K_BEGIN_DATA_LINE+s+" "+(r??i.u.OXYGEN)+" "+f(n.backbonePositionShift[0])+" "+n.flipFactor*f(n.backbonePositionShift[1])+" 0.000000 0\n";const a=n.backboneAttachNode,l=s;e[o.bondCount]=i.u.V3K_BEGIN_DATA_LINE+n.bondShift+" 1 "+a+" "+l+"\n"}(g,y,C,A,E??i.u.OXYGEN);const M=i.u.V3K_BEGIN_COUNTS_LINE+c+" "+u+i.u.V3K_COUNTS_LINE_ENDING;let _="";return _+=i.u.V3K_HEADER_FIRST_LINE,_+=i.u.V3K_HEADER_SECOND_LINE,_+=i.u.V3K_BEGIN_CTAB_BLOCK,_+=M,_+=i.u.V3K_BEGIN_ATOM_BLOCK,_+=g.join(""),_+=i.u.V3K_END_ATOM_BLOCK,_+=i.u.V3K_BEGIN_BOND_BLOCK,_+=y.join(""),_+=i.u.V3K_END_BOND_BLOCK,x.length>0&&(_+=function(t){const e=[];let n=`M V30 MDLV30/STEABS ATOMS=(${t.length}`;for(let i=0;i<t.length;i++){const o=`${n} ${t[i]}`;o.length>76?(e.push(`${n} -\n`),n=`M V30 ${t[i]}`):n=o,i===t.length-1&&e.push(`${n})\n`)}return`M V30 BEGIN COLLECTION\n${e.join("")}M V30 END COLLECTION\n`}(x)),_+=i.u.V3K_END_CTAB_BLOCK,_+=i.u.V3K_END,{molfile:_,monomers:S}}function h(t,e,n,i){i.flipFactor=(-1)**(i.i%2),u(t,e,n,i)}function u(t,e,n,o){!function(t,e,n){for(let o=0;o<t.atoms.atomTypes.length;++o){const r=n.nodeShift+o+1;e[n.nodeShift+o]=i.u.V3K_BEGIN_DATA_LINE+r+" "+t.atoms.atomTypes[o]+" "+f(n.backbonePositionShift[0]+t.atoms.x[o])+" "+f(n.backbonePositionShift[1]+n.flipFactor*t.atoms.y[o])+" "+t.atoms.kwargs[o]}}(t,e,o),p(t,n,o),function(t,e,n){if(0!==n.backboneAttachNode){const o=n.bondShift,r=n.backboneAttachNode,s=t.meta.terminalNodes[0]+n.nodeShift;e[n.bondShift-1]=i.u.V3K_BEGIN_DATA_LINE+o+" 1 "+r+" "+s+"\n"}}(t,n,o),null!==t.meta.branchShift&&t.meta.terminalNodes.length>2&&function(t,e){e.branchAttachNode=e.nodeShift+t.meta.terminalNodes[2];for(let n=0;n<2;++n)e.branchPositionShift[n]=e.backbonePositionShift[n]+t.meta.branchShift[n]}(t,o),function(t,e){e.backboneAttachNode=e.nodeShift+t.meta.terminalNodes[1],e.bondShift+=t.bonds.atomPairs.length+1,e.nodeShift+=t.atoms.atomTypes.length,e.backbonePositionShift[0]+=t.meta.backboneShift?.[0]??0,e.backbonePositionShift[1]+=e.flipFactor*(t.meta.backboneShift?.[1]??0)}(t,o)}function d(t,e,n,o,r){if(0===o.i)u(r.sugar,e,n,o);else for(const t of[r.phosphate,r.sugar])u(t,e,n,o);!function(t,e,n,o){(function(t,e,n){for(let o=0;o<t.atoms.atomTypes.length;++o){const r=n.nodeShift+o+1;e[n.nodeShift+o]=i.u.V3K_BEGIN_DATA_LINE+r+" "+t.atoms.atomTypes[o]+" "+f(n.branchPositionShift[0]+t.atoms.x[o])+" "+f(n.branchPositionShift[1]+n.flipFactor*t.atoms.y[o])+" "+t.atoms.kwargs[o]}})(t,e,o),p(t,n,o),function(t,e,n){const o=n.bondShift,r=n.branchAttachNode,s=t.meta.terminalNodes[0]+n.nodeShift;e[o-1]=i.u.V3K_BEGIN_DATA_LINE+o+" 1 "+r+" "+s+"\n"}(t,n,o);const r=o.bondShift,s=o.branchAttachNode,a=t.meta.terminalNodes[0]+o.nodeShift;n[r-1]=i.u.V3K_BEGIN_DATA_LINE+r+" 1 "+s+" "+a+"\n",o.bondShift+=t.bonds.atomPairs.length+1,o.nodeShift+=t.atoms.atomTypes.length}(t,e,n,o)}function p(t,e,n){for(let o=0;o<t.bonds.atomPairs.length;++o){const r=n.bondShift+o+1,s=t.bonds.atomPairs[o][0]+n.nodeShift,a=t.bonds.atomPairs[o][1]+n.nodeShift;let l="";if(t.bonds.bondConfiguration.has(o)){let e=t.bonds.bondConfiguration.get(o);n.flipFactor<0&&(e=1===e?3:1),l=" CFG="+e}const c=t.bonds.kwargs.has(o)?" "+t.bonds.kwargs.get(o):"";e[n.bondShift+o]=i.u.V3K_BEGIN_DATA_LINE+r+" "+t.bonds.bondTypes[o]+" "+s+" "+a+l+c+"\n"}}function m(t,e,n,r){let l=0,c=0,h=0,u=!0,d=null;for(const n of t)if(n.symbol!==s._S){if("*"==n.symbol)throw new Error("Gap canonical symbol is '', not '*");d=(0,o.xb)(e,{symbol:n.symbol,polymerType:(0,a.Y)(n.biotype)}),l+=d.atoms.x.length,c+=d.bonds.bondTypes.length,h++}if("PEPTIDE"===r)l+=1,c+=h,h>0&&((d?.meta?.rNodes?.length??0)<2||d?.terminalR2Atom?.toLowerCase()===i.u.HYDROGEN.toLowerCase())&&(u=!1,l-=1,c-=1);else{const r=n===s.YI.DNA?(0,o.xb)(e,i.u.DEOXYRIBOSE):(0,o.xb)(e,i.u.RIBOSE),a=(0,o.xb)(e,i.u.PHOSPHATE);l+=(t.length-1)*a.atoms.x.length,l+=t.length*r.atoms.x.length,l+=1,c+=(t.length-1)*a.bonds.bondTypes.length,c+=t.length*r.bonds.bondTypes.length,c-=1,c+=3*t.length}return{atomCount:l,bondCount:c,needsCapping:u}}function f(t){return Math.round(i.u.PRECISION_FACTOR*t)/i.u.PRECISION_FACTOR}},6077:(t,e,n)=>{"use strict";n.d(e,{C4:()=>m,eM:()=>f});var i=n(4328),o=n(6082),r=n(1991),s=n.n(r),a=n(439),l=n(3561),c=n(9235),h=n(294),u=n(9192),d=n(330),p=n(8123);async function m(t,e,n,r,l){if(e.semType!==o.SEMTYPE.MACROMOLECULE)return{molCol:null,warnings:[`Only the ${o.SEMTYPE.MACROMOLECULE} columns can be converted to atomic level, the chosen column has semType '${e.semType}'`]};let h=e;const p=r.getSeqHandler(e);let m,g;p.notation!==a.Hi.SEPARATOR&&(h=p.convert(a.Hi.SEPARATOR,"."),h.name=e.name);try{g=r.getSeqHandler(h).alphabet,m=(0,d.pz)(g)}catch(t){const[e,n]=(0,u.AP)(t);return{molCol:null,warnings:[e]}}const y=function(t,e){const n=t.length,o=new Array(n),r=e.getSeqHandler(t);let a=!1;const l=r.defaultBiotype;for(let t=0;t<n;++t){const e=r.getSplitted(t);a||(a=0===e.length),o[t]=s().count(0).take(e.length).filter((t=>!e.isGap(t))).map((t=>({position:t,biotype:l,symbol:e.getCanonical(t)}))).toArray()}return a&&i.shell.warning(`Some values in the "${t.name}" column are empty`),o}(h,r),b=f(y,m,g,n,l),v=h.length,w=await(0,c.R)(h,b,g,m,n,r,l);w.warnings.length>.05*v&&i.shell.warning(`Molfile conversion resulted in ${w.warnings.length} errors`);const C=o.Func.find({name:"convertToV3KViaOCL"})[0];if(C&&w.molCol)try{const t=w.molCol.toList(),e=await C.apply({mols:t});w.molCol.init((n=>e[n]?e[n]:t[n]))}catch(t){console.error(t)}return w}function f(t,e,n,i,o){const r=(0,l.Hb)(i,e,n),s={},c={value:null};if("RNA"===e){const t=n===a.YI.RNA?[p.u.RIBOSE,p.u.PHOSPHATE]:[p.u.DEOXYRIBOSE,p.u.PHOSPHATE];for(const n of t)g(s,n.symbol,r,o,e,c)}for(let n=0;n<t.length;++n){const i=t[n];for(const t of i){const n=t.symbol;if(""!==n)try{if("RNA"===e&&3===n.split(/\(|\)/).filter((t=>!!t)).length){const t=n.split(/\(|\)/)[1];g(s,t,r,o,e,c),s[e]?.[t]&&(s[e][n]=s[e][t])}else g(s,n,r,o,e,c)}catch(t){const e=t instanceof Error?t.message:t.toString(),i=t instanceof Error?t.stack:void 0;throw console.error(`bio lib: getMonomersDictFromLib() sym='${n}', error:\n${e}\n${i}`),new Error(`Can't get monomer '${n}' from library: ${e}`)}}}return s}function g(t,e,n,i,o,r){const s={polymerType:o,symbol:e};if(!(0,h.bq)(t,s)){const a=function(t,e,n,i,o){if(e.has(t)){const s=e.get(t),a=function(t){const e=[];for(const n of t){let t=n.capGroupSmiles;t||(t=n.capGroupSMILES),t=t.replace(/(\[|\]|\*|:|\d)/g,"").replace("OH","O").replace("Oh","O"),e.push(t)}return e}(s.rgroups),c=(r=s.molfile).includes("V3000")?function(t){const e=new Map,n=/M V30 (\d+) R#.+RGROUPS=\((\d+) (\d+)\).*/gm;let i;for(;null!==(i=n.exec(t));)i.index===n.lastIndex&&n.lastIndex++,e.set(parseInt(i[1]),parseInt(i[3]));return e}(r):function(t){const e=new Map;let n=t.indexOf(p.u.V2K_A_LINE,0),i=n;for(;-1!==n;){i=t.indexOf("\n",n);const o=parseInt(t.substring(n,i).replace(/^A\s+/,""));n=t.indexOf("R",i),i=t.indexOf("\n",n);const r=parseInt(t.substring(n,i).replace(/^R/,""));e.set(o,r),n=t.indexOf(p.u.V2K_A_LINE,i)}for(n=t.indexOf(p.u.V2K_RGP_LINE,0),i=t.indexOf("\n",n);-1!==n;){n+=p.u.V2K_RGP_SHIFT,i=t.indexOf("\n",n);const o=t.substring(n,i).replaceAll(/\s+/g," ").split(" ").map((t=>parseInt(t))).slice(1);for(let t=0;t<o.length;t+=2){if(e.has(o[t])&&e.get(o[t])!==o[t+1])throw new Error(`r-group index ${o[t]} has already been added with a different value`);e.set(o[t],o[t+1])}n=t.indexOf(p.u.V2K_RGP_LINE,i)}return e}(r),h=s.molfile.includes("V3000")?s.molfile:function(t,e){const n=e.get_mol(function(t){return t.split("\n").map((t=>{const e=t.indexOf(" R# "),n=t.indexOf(" R ");if(-1===e&&-1===n)return t;const i=-1!==e?e:n,o=t.split("");for(let t=i+5;t<o.length;t++)" "!==o[t]&&(o[t]="0");return o.join("")})).join("\n")}(t)),i=n.get_v3Kmolblock();return n.delete(),i}(function(t){let e=t.indexOf(p.u.V2K_A_LINE,0);-1===e&&(e=t.indexOf(p.u.V2K_RGP_LINE));const n=t.indexOf(p.u.V3K_END,e);return t.substring(0,e)+t.substring(n)}(s.molfile),n),u=function(t){let e=(t=t.replaceAll("\r","")).indexOf(p.u.V3K_BEGIN_COUNTS_LINE)+p.u.V3K_COUNTS_SHIFT,n=t.indexOf(" ",e+1);const i=parseInt(t.substring(e,n));return e=n+1,n=t.indexOf(" ",e+1),{atomCount:i,bondCount:parseInt(t.substring(e,n))}}(h),d=function(t,e){const n=new Array(e),i=new Float32Array(e),o=new Float32Array(e),r=new Array(e);let s=t.indexOf(p.u.V3K_BEGIN_ATOM_BLOCK);s=t.indexOf("\n",s);let a=s;for(let l=0;l<e;l++){s=t.indexOf(p.u.V3K_BEGIN_DATA_LINE,s)+p.u.V3K_IDX_SHIFT,a=t.indexOf(" ",s),s=a+1,a=t.indexOf(" ",s),n[l]=t.substring(s,a);const e=new Array(2);for(let n=0;n<2;++n)s=a+1,a=t.indexOf(" ",s),e[n]=parseFloat(t.substring(s,a));i[l]=e[0],o[l]=e[1],s=a,a=t.indexOf("\n",s)+1,r[l]=t.slice(s,a),s=a}return{atomTypes:n,x:i,y:o,kwargs:r}}(h,u.atomCount),m=function(t,e){const n=new Uint32Array(e),i=new Array(e),o=new Map,r=new Map;let s=t.indexOf(p.u.V3K_BEGIN_BOND_BLOCK);s=t.indexOf("\n",s);let a=s;for(let l=0;l<e;++l){const e=new Array(3);s=t.indexOf(p.u.V3K_BEGIN_DATA_LINE,a)+p.u.V3K_IDX_SHIFT,a=t.indexOf(" ",s);for(let n=0;n<3;++n)s=a+1,a=Math.min(t.indexOf("\n",s),t.indexOf(" ",s)),e[n]=parseInt(t.slice(s,a));n[l]=e[0],i[l]=e.slice(1);const c=t.indexOf("\n",s);let h=t.slice(a,c),u=h.indexOf(p.u.V3K_BOND_CONFIG);if(-1!==u){u=h.indexOf("=",u)+1;let t=h.indexOf(" ",u);-1===t&&(t=h.length);const e=parseInt(h.slice(u,t));o.set(l,e);const n=p.u.V3K_BOND_CONFIG+e.toString();h=h.replace(n,"")}h||r.set(l,h)}return{bondTypes:n,atomPairs:i,bondConfiguration:o,kwargs:r}}(h,u.bondCount),f=function(t,e,n,i){const o={backboneShift:null,branchShift:null,terminalNodes:[],rNodes:[]};if(n&&i&&[1,2].some((t=>!Array.from(i.values()).find((e=>e==t))))){const o=[1,2].find((t=>!Array.from(i.values()).find((e=>e==t)))),r=[1,2].find((t=>Array.from(i.values()).find((e=>e==t)))),s=Array.from(i.keys()).find((t=>i.get(t)===r))-1,a=t.x[s],l=t.y[s],c=e.atomPairs.find((t=>t.includes(s+1))).find((t=>t!==s+1))-1;let h=t.x.reduce(((e,n,i)=>{if(i===s)return e;if(i===c)return e;const o=t.y[i];return Math.sqrt((n-a)**2+(o-l)**2)>Math.sqrt((t.x[e]-a)**2+(t.y[e]-l)**2)?i:e}),-1);if(-1===h&&(h=t.x.length,t.x=new Float32Array([...t.x,-a]),t.y=new Float32Array([...t.y,-l]),t.atomTypes=[...t.atomTypes,"H"],t.kwargs=[...t.kwargs,""],e.atomPairs.push([c+1,h+1]),e.bondTypes=new Uint32Array([...e.bondTypes,1]),e.kwargs.set(e.atomPairs.length-1,"")),i.set(h+1,o),1===o)n.unshift(t.atomTypes[h]);else{if(2!==o)throw new Error(`Unexpected missing R-group: ${o}`);n.splice(1,0,t.atomTypes[h])}}return function(t,e,n){for(const[i,o]of n)t.atomTypes[i-1]=e[o-1]}(t,n,i),function(t,e){e.rNodes=Array.from(t.keys());for(let n=0;n<e.rNodes.length;n++)for(const i of[1,2])if(t.get(e.rNodes[n])===i){const t=e.rNodes[i-1];e.rNodes[i-1]=e.rNodes[n],e.rNodes[n]=t}}(i,o),y(e,o),o}(d,m,a,c),g=function(t){let e=[],n=t.indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==n;){n+=28;const i=t.indexOf(")",n);e=e.concat(t.substring(n,i).split(" ").slice(1).map((t=>parseInt(t)))),n=i,n=t.indexOf("M V30 MDLV30/STEABS ATOMS=(",n)}return e}(h),v={atoms:d,bonds:m,meta:f,stereoAtoms:g};return"PEPTIDE"===i?function(t){const e=t.meta.terminalNodes[0]-1,n=t.meta.rNodes[0]-1,i=t.atoms.x,o=t.atoms.y;T(t,-i[e],-o[e]);const r=A(i[n],o[n]);S(t.atoms,-r),i[t.meta.rNodes[1]-1]<0&&x(t);const s=function(t){const e=function(t){const e=new Map;for(const n of t.bonds.atomPairs)for(let t=0;t<2;t++){const i=n[t],o=n[(t+1)%2];e.has(i)?e.get(i)?.push(o):e.set(i,new Array(1).fill(o))}return e}(t);let n=0;const i=t.atoms.atomTypes.length;let o=0;if(t.meta.terminalNodes.length<2)return null;for(;0===n;){const r=e.get(t.meta.terminalNodes[1])[o];if(t.atoms.atomTypes[r-1]===p.u.OXYGEN&&r!==t.meta.rNodes[1]&&(n=r),o++,o>i)return null}return n}(t);null!=s&&(function(t,e){t.atoms.y[t.meta.rNodes[1]-1]<0&&t.atoms.y[e-1]<0&&(function(t){E(t,!0)}(t),S(t.atoms,-function(t,e){return A(t,e)+Math.PI/2}(t.atoms.x[t.meta.terminalNodes[1]-1],t.atoms.y[t.meta.terminalNodes[1]-1])))}(t,s),function(t,e){const n=t.atoms.x;n[t.meta.rNodes[1]-1]>n[e-1]&&function(t,e,n){const i=e-1,o=n-1,r=t.atoms.x,s=t.atoms.y,a=r[i],l=s[i];r[i]=r[o],s[i]=s[o],r[o]=a,s[o]=l}(t,e,t.meta.rNodes[1])}(t,s))}(v):t===p.u.RIBOSE.symbol||t===p.u.DEOXYRIBOSE.symbol?function(t,e){const n=t.atoms.x,i=t.atoms.y;let o=t.meta.terminalNodes[0]-1;const r=t.meta.rNodes[1]-1;T(t,-n[o],-i[o]);const s=A(n[t.meta.rNodes[2]-1],i[t.meta.rNodes[2]-1]);S(t.atoms,-s),n[t.meta.rNodes[0]-1]>n[t.meta.rNodes[1]-1]&&x(t);const a=A(n[r],i[r]);S(t.atoms,3*Math.PI/2-a),e.value=function(t){const e=t.atoms.x,n=t.atoms.y,i=t.meta.rNodes[2]-1,o=t.meta.terminalNodes[2]-1,r=e[i]-e[o],s=n[i]-n[o];return Math.atan2(r,s)}(t),o=t.meta.terminalNodes[0]-1,T(t,-n[o],-i[o])}(v,o):t===p.u.PHOSPHATE.symbol?function(t){const e=t.meta.rNodes[1]-1,n=t.meta.rNodes[0]-1,i=t.atoms.x,o=t.atoms.y;T(t,-i[e],-o[e]);const r=A(i[n],o[n]);S(t.atoms,Math.PI/2-r)}(v):function(t,e){const n=t.atoms.x,i=t.atoms.y,o=t.meta.terminalNodes[0]-1,r=t.meta.rNodes[0]-1;T(t,-n[o],-i[o]);const s=A(n[r],i[r]),a=e.value;if(!a)throw new Error("The value of sugarBranchToOYAngle is null");S(t.atoms,Math.PI-s+a);const c=function(t,e){return(0,l.YN)(Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2))}({x:n[t.meta.rNodes[0]-1],y:i[t.meta.rNodes[0]-1]},{x:n[t.meta.terminalNodes[0]-1],y:i[t.meta.terminalNodes[0]-1]});if(1!=c)for(let t=0;t<n.length;++t)n[t]=(0,l.YN)(n[t]/c),i[t]=(0,l.YN)(i[t]/c)}(v,o),function(t,e,n){if("PEPTIDE"===t){b(e,t);const n=w(e,e.meta.rNodes[1]);n?.removedAtom&&(e.terminalR2Atom=n.removedAtom)}else n===p.u.RIBOSE.symbol||n===p.u.DEOXYRIBOSE.symbol?(w(e,e.meta.rNodes[1]),e.meta.rNodes[1]=e.meta.terminalNodes[1],y(e.bonds,e.meta),b(e,t),w(e,e.meta.rNodes[1]),w(e,e.meta.rNodes[0]),w(e,e.meta.rNodes[2])):n===p.u.PHOSPHATE.symbol&&(e.meta.terminalNodes[0]=e.meta.rNodes[0],T(e,-e.atoms.x[e.meta.terminalNodes[0]-1],-e.atoms.y[e.meta.terminalNodes[0]-1]),b(e,t),w(e,e.meta.rNodes[1]))}(i,v,t),function(t){let e=0;for(;e<t.atoms.atomTypes.length;)t.atoms.atomTypes[e]===p.u.HYDROGEN&&(w(t,e+1),--e),++e}(v),function(t){let e=0;for(;e<t.atoms.atomTypes.length;)"oh"===t.atoms.atomTypes[e]?.toLowerCase()&&(t.atoms.atomTypes[e]="O"),"?"===t.atoms.atomTypes[e]&&(t.atoms.atomTypes[e]="H"),++e}(v),function(t){const e=" RGROUPS=(1 1)";for(let n=0;n<(t.atoms.kwargs?.length??0);n++){const i=t.atoms.kwargs[n];i&&i.includes(e)&&(t.atoms.kwargs[n]=i.replace(e,""))}}(v),v}var r;return null}(e,n,i,o,r);if(!a)throw new Error(`Monomer with symbol '${e}' is absent the monomer library`);(0,h.LQ)(t,s,a)}}function y(t,e){const n=e.rNodes;e.terminalNodes=new Array(n.length).fill(0);const i=e.terminalNodes,o=t.atomPairs;let r=0,s=0;for(;r<o.length&&s<i.length;){for(let t=0;t<i.length;++t)for(let e=0;e<2;++e)o[r][e]===n[t]&&(i[t]=o[r][(e+1)%2],n.length,++s);++r}}function b(t,e){t.meta.rNodes.length>1&&(t.meta.backboneShift=v(t,t.meta.rNodes[1]-1,t.meta.terminalNodes[0]-1)),"RNA"===e&&t.meta.rNodes.length>2&&(t.meta.branchShift=v(t,t.meta.rNodes[2]-1,t.meta.terminalNodes[0]-1))}function v(t,e,n){return[(0,l.YN)(t.atoms.x[e]-t.atoms.x[n]),(0,l.YN)(t.atoms.y[e]-t.atoms.y[n])]}function w(t,e){if(void 0!==e){const n=e-1,i=t.atoms,o=t.bonds,r=t.meta,s=i.atomTypes.splice(n,1)[0];i.x=C(Float32Array,i.x,n,1),i.y=C(Float32Array,i.y,n,1),i.kwargs.splice(n,1);for(let t=0;t<r.terminalNodes.length;++t)r.terminalNodes[t]>e?--r.terminalNodes[t]:r.terminalNodes[t]===e&&(r.terminalNodes[t]=-1);for(let t=0;t<r.rNodes.length;++t)r.rNodes[t]>e?--r.rNodes[t]:r.rNodes[t]===e&&(r.rNodes[t]=-1);let a=0;for(;a<o.atomPairs.length;){const t=o.atomPairs[a][0],n=o.atomPairs[a][1];t===e||n===e?(o.atomPairs.splice(a,1),o.bondTypes=C(Uint32Array,o.bondTypes,a,1),o.bondConfiguration.has(a)&&o.bondConfiguration.delete(a),o.kwargs.has(a)&&o.kwargs.delete(a),--a):(o.atomPairs[a][0]=t>e?t-1:t,o.atomPairs[a][1]=n>e?n-1:n),++a}let l=Array.from(o.bondConfiguration.keys());return l.forEach((t=>{if(o.bondConfiguration.has(t)&&t>n){const e=o.bondConfiguration.get(t);o.bondConfiguration.delete(t),o.bondConfiguration.set(t-1,e)}})),l=Array.from(o.kwargs.keys()),l.forEach((t=>{if(o.kwargs.has(t)&&t>n){const e=o.kwargs.get(t);o.kwargs.delete(t),o.kwargs.set(t-1,e)}})),s?{removedAtom:s}:void 0}}function C(t,e,n,i){const o=new t(e.length-i);let r=0,s=0;for(;r<e.length;)r===n&&(r+=i),o[s]=e[r],++s,++r;return o}function A(t,e){let n;if(0===t)n=e>0?0:Math.PI;else if(0===e)n=t>0?-Math.PI/2:Math.PI/2;else{const i=e/t,o=Math.atan(i);n=t<0?Math.PI/2+o:-Math.PI/2+o}return n}function S(t,e){if(0!==e){const n=t.x,i=t.y,o=Math.cos(e),r=Math.sin(e);for(let t=0;t<n.length;++t){const e=n[t];n[t]=(0,l.YN)(e*o-i[t]*r),i[t]=(0,l.YN)(e*r+i[t]*o)}}}function x(t){E(t,!1)}function E(t,e){if(e){const e=t.atoms.y;for(let t=0;t<e.length;t++)e[t]=-e[t]}else{const e=t.atoms.x;for(let t=0;t<e.length;t++)e[t]=-e[t]}const n=t.bonds.bondConfiguration;for(const[t,e]of n){const i=1===e?3:1;n.set(t,i)}}function T(t,e,n){const i=t.atoms.x,o=t.atoms.y;for(let t=0;t<i.length;++t)i[t]=(0,l.YN)(i[t]+e),void 0!==n&&(o[t]=(0,l.YN)(o[t]+n))}},294:(t,e,n)=>{"use strict";function i(t,e){return t[e.polymerType]?.[e.symbol]}function o(t,e){return!!t[e.polymerType]?.[e.symbol]}function r(t,e,n){let i=t[e.polymerType];i||(i=t[e.polymerType]={}),i[e.symbol]=n}n.d(e,{Cg:()=>s,LQ:()=>r,bq:()=>o,vF:()=>a,xb:()=>i});class s extends Map{constructor(t){super(t)}}class a{constructor(t,e){this.molfile=t,this.monomers=e}static createEmpty(){return new a("",new s(null))}}},330:(t,e,n)=>{"use strict";n.d(e,{kA:()=>o,pz:()=>s,qj:()=>r,vG:()=>a});var i=n(2003);function o(t,e){return t?t.columns.getUnusedName(e):e}function r(t,e){return o(t,`molfile(${e})`)}function s(t){let e;if(t===i.YI.PT||t===i.YI.UN)e="PEPTIDE";else{if(t!==i.YI.RNA&&t!==i.YI.DNA)throw new Error(`Unexpected alphabet '${t}'.`);e="RNA"}return e}function a(t){const e=7===t.length?/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t):/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16)/256,parseInt(e[2],16)/256,parseInt(e[3],16)/256,e.length>4?parseInt(e[4],16)/256:.3]:null}},1093:(t,e,n)=>{"use strict";n(7362);class i{}i.SemType="Nucleotides",i.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",i.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"}},7362:(t,e,n)=>{"use strict";n.d(e,{e:()=>i});class i{static makePalette(t,e=!1,n=i){const o={};return t.forEach((t=>{const n=t[0],i=t[1];n.forEach(((t,n)=>{o[t]=this.colourPalette[i][e?0:n]}))})),new n(o)}constructor(t){this._palette=t}get(t,e){return this._palette[t]}}i.undefinedColor="rgb(100,100,100)",i.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)"]}},4574:(t,e,n)=>{"use strict";n.d(e,{O:()=>r,n:()=>o});var i=n(1858);class o{constructor(t,e=!0,n){return this.substructure=t,this.readOnly=e,this.logger=n,new Proxy(this,{set:(t,e,n)=>{if(this.logger?.debug(`BioFilterProps.set ${e.toString()}( '${n}' )`),this.readOnly)throw new Error("Properties are immutable.");return t[e]=n,!0}})}}class r{constructor(){this.onChanged=new i.Subject,this._props=null,this._propsChanging=!1}get props(){return this._props||(this._props=this.emptyProps),this._props}set props(t){this._propsChanging=!0;try{this._props=t,this.applyProps(),this.onChanged.next()}finally{this._propsChanging=!1}}saveProps(){const t={};for(const[e,n]of Object.entries(this.props))"_onChanged"!==e&&"logger"!==e&&(t[e]=this.props[e]);return t}async detach(){}get filterSummary(){return this.props.substructure}get isFiltering(){return""!==this.props.substructure}resetFilter(){this.props=this.emptyProps,this.onChanged.next()}}},4152:(t,e,n)=>{"use strict";var i=n(6082),o=n(7362),r=n(6718);function s(t,e=!0){if(null==t)return"rgb(100,100,100)";const n=i.Color.fromHtml(t);if(e){const t=i.Color.g(n),e=i.Color.r(n),o=i.Color.b(n),r=Math.sqrt(Math.pow(0-e,2)+Math.pow(0-t,2)+Math.pow(0-o,2));if(r>210)return`rgb(${e/r*210},${t/r*210},${o/r*210})`}return i.Color.toRgb(n)}class a{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 l{}class c extends l{static get palette(){return c._pallete||(c._pallete=c.buildPalette()),c._pallete}static buildPalette(){return(0,r.pj)().then((t=>{t.awaitLoaded(1/0).then((()=>{const e=t.getMonomerLib();e.onChanged.subscribe((()=>{c.customMonomerColors={},c.polymerTypes=e.getPolymerTypes();for(const t of this.polymerTypes){const n=e.getMonomerSymbolsByType(t);for(const i of n){const n=e.getMonomer(t,i);n?.meta?.colors?.default?.background&&(this.customMonomerColors[i]||(this.customMonomerColors[i]={}),this.customMonomerColors[i][t]=s(n.meta.colors.default.background))}}}))}))})),[].concat(...Object.values(o.e.colourPalette))}get(t,e){const n=c.palette.length,i=c.customMonomerColors[t],o=e??"PEPTIDE";if(i&&i[o])return i[o];const r=a.hashCode(t)%n;return s(c.palette[r])}}c._pallete=null,c.customMonomerColors={},c.polymerTypes=[]},6642:(t,e,n)=>{"use strict";n.d(e,{BG:()=>s,sD:()=>l});var i=n(4328),o=n(1858),r=n(8070);function s(t){let e=null,n=null;try{n=t.dart?t.gridColumn:null,e=n?n.temp:null}catch{[n,e]=[null,null]}const i=t.cell.column;if(e=e??(i?i.temp:null),!e)throw new Error("Grid cell renderer back store (GridColumn or Column) not found.");return[n,i,e]}class a{onKeyDown(t,e){}onKeyPress(t,e){}onMouseEnter(t,e){}onMouseLeave(t,e){}onMouseDown(t,e){}onMouseUp(t,e){}onMouseMove(t,e){}onClick(t,e){}onDoubleClick(t,e){}}class l extends a{constructor(t,e,n){super(),this.gridCol=t,this.tableCol=e,this.logger=n,this.subs=[],this.dirty=!0,this.destroyed=!1,this.viewerId=++l.viewerCounter,this.errors=[],this._onRendered=new o.Subject,this.tableCol&&this.tableCol.dataFrame&&(this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{this.dirty=!0}))),this.subs.push(this.tableCol.dataFrame.onColumnsRemoved.subscribe((t=>{try{this.destroyed||!this.tableCol||this.tableCol.dataFrame||this.destroy()}catch(t){this.logger.error(t)}})))),this.tableCol&&this.subs.push(i.events.onTableRemoved.subscribe((t=>{try{const e=t.args.dataFrame;this.tableCol?.dataFrame.id!==e.id||this.destroyed||this.destroy()}catch(t){this.logger.error(t)}}))),this.gridCol&&this.subs.push(i.events.onViewRemoving.subscribe((t=>{try{const e=t.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===e.id&&!this.destroyed&&this.destroy()}catch(t){this.logger.error(t)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const t of this.subs)t.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}reset(){this.dirty=!1}get onRendered(){return this._onRendered}invalidate(t){this.invalidateGrid()}async awaitRendered(t=1e4,e=`${t} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,r.PE)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),t,`${n}, ${e}`),this.errors.length>0){const t=this.errors[0];throw this.errors=[],t}this.logger.debug(`${n}, end`)}}l.viewerCounter=-1},673:(t,e,n)=>{"use strict";n.d(e,{s:()=>i});const i={true:"1",false:"0"}},6882:(t,e,n)=>{"use strict";n.d(e,{Jy:()=>b,S$:()=>y,U0:()=>v});var i=n(7389),o=n(6082),r=n(1991),s=n.n(r),a=n(8312),l=n(2003),c=n(6642),h=n(6718),u=n(9192),d=n(3856),p=n(673),m=n(3599),f=n(5553),g=n(9713);const y="rgb(100,100,100)";class b extends c.sD{get separatorWidth(){return this.props?.fontCharWidth?this.props?.fontCharWidth:5}constructor(t,e,n,i,r){if(super(t,e,n),this.monomerLengthLimit=i,this.propsProvider=r,this.colWidth=0,this._monomerLengthList=null,this._processedMaxVisibleSeqLength=0,this._monomerLengthMap={},this._monomerStructureMap={},this._ellipsisBounds=void 0,this._totalLinesNeeded=0,this._lineHeight=20,this._cellBounds=new Map,this.sysMonomerLib=null,this.padding=5,this._leftThreeDotsPadding=0,this.props=this.propsProvider(),this._processedRows=o.BitSet.create(this.tableCol.length),this.gridCol&&this.subs.push(this.gridCol.grid.onAfterDrawContent.subscribe((()=>{this._onRendered.next()}))),this.tableCol&&this.gridCol){this.subs.push(this.tableCol.dataFrame.onCurrentRowChanged.subscribe((()=>{-1===this.tableCol.dataFrame.currentRowIdx&&(this.tableCol.temp["reference-sequence"]=null,this.tableCol.temp["current-word"]=null,this.invalidateGrid())})));const t=[l.gp.positionShift,"renderMultiline"];this.subs.push(o.debounce(this.tableCol.dataFrame.onMetadataChanged.pipe(g.filter((e=>e.args.source===this.tableCol&&t.includes(e.args.key)))),200).subscribe((t=>{this.reset()}))),this.subs.push(o.debounce(this.tableCol.dataFrame.onMetadataChanged.pipe(g.filter((t=>t.args.source===this.tableCol&&t.args.key===l.gp.positionShift))),200).subscribe((t=>{this.reset()})))}}calculateFontBasedSpacing(t){const e=t.measureText("M");let n=12;if(this.tableCol?.temp[".mm.cellRenderer.fontSize"]){const t=this.tableCol.temp[".mm.cellRenderer.fontSize"];"number"!=typeof t||isNaN(t)||(n=Math.max(t,1))}return{lineHeight:Math.max(1.4*n,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent+4),monomerSpacing:Math.max(2,.2*this.props.fontCharWidth)}}shouldUseMultilineRendering(t){return"true"===t.getTag("renderMultiline")}calculateMultiLineLayoutDynamic(t,e,n,i,o,r){if(this.dirty)try{this.reset()}catch(t){const[e,n]=(0,u.AP)(t);this.logger.error(e,void 0,n)}const{lineHeight:s,monomerSpacing:a}=this.calculateFontBasedSpacing(t),l=e-2*this.padding;let c=0;const h=[];if(i.length>0)for(let e=o;e<i.length;e++){const n=i.getOriginal(e),o=this.props.monomerToShort(n,r);h.push({text:o,posIdx:e}),c=Math.max(c,t.measureText(o).width)}if(0===h.length)return{lineLayouts:[],lineHeight:s};const d=c;let p=Math.floor((l+a)/(d+a));p=Math.max(1,p);const m=n-2*this.padding,f=Math.max(0,Math.floor(m/s)),g=[];let y=0;for(let t=0;t<f&&y<h.length;t++){const e=[];for(let t=0;t<p&&y<h.length;t++){const n=h[y],i=this.padding+t*(d+a);e.push({posIdx:n.posIdx,x:i,width:d,om:n.text,isSeparator:!1}),y++}g.push({lineIdx:t,elements:e})}return{lineLayouts:g,lineHeight:s}}async init(){await Promise.all([(async()=>{this.seqHelper=await(0,a.Q)(),this.invalidateGrid()})(),(async()=>{const t=await(0,h.pj)();this.sysMonomerLib=t.getMonomerLib()})()]),this.subs.push(this.sysMonomerLib.onChanged.subscribe((()=>{this.reset()}))),this.reset()}static getFontSettings(t){let e=12;return t&&t.temp[".mm.cellRenderer.fontSize"]&&"number"==typeof t.temp[".mm.cellRenderer.fontSize"]&&!isNaN(t.temp[".mm.cellRenderer.fontSize"])&&(e=Math.max(t.temp[".mm.cellRenderer.fontSize"],1)),{font:`${e}px monospace`,fontWidth:.6*e}}toLog(){return`MonomerPlacer<${this.viewerId}>`}getMonomerLib(){return this.tableCol.temp[".mm.cellRenderer.overriddenLibrary"]??this.sysMonomerLib}reset(){this.propsProvider&&(this.props=this.propsProvider()),this._processedRows=o.BitSet.create(this.tableCol.length),this._monomerLengthList=null,this._monomerLengthMap={},this._monomerStructureMap={},this._cellBounds.clear(),super.reset(),this.invalidateGrid()}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}getCellMonomerLengths(t,e){const n=this.seqHelper.getSeqHandler(this.tableCol);if(this.colWidth<e&&(this.colWidth=e,this.dirty=!0),this.dirty)try{this.reset()}catch(t){const[e,n]=(0,u.AP)(t);this.logger.error(e,void 0,n)}const i=n.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(t);return[i,this.getSummedMonomerLengths(i)]}getSummedMonomerLengths(t){const e=new Array(t.length+1);e[0]=this.padding;for(let n=1;n<e.length;n++)e[n]=e[n-1]+t[n-1];let n=e[0];for(let t=1;t<e.length;t++)e[t]?n=e[t]:e[t]=n;return e}getCellMonomerLengthsForSeqValue(t,e){const n=this.seqHelper.getSeqHandler(this.tableCol),i=this.props.separatorWidth+1*this.props.fontCharWidth,o=this.positionShift,r=Math.ceil(e/i)+o,s=n.splitter(t),a=Math.min(r,s.length),l=new Array(a-o);let c=0;for(let t=o;t<a;++t){const i=s.getOriginal(t),r=this.props.monomerToShort(i,this.monomerLengthLimit),a=(n.isSeparator()?this.separatorWidth:this.props.separatorWidth)+r.length*this.props.fontCharWidth;if(l[t-o]=a,c+=a,c>e)break}return l}getCellMonomerLengthsForSeq(t){this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.tableCol.length).fill(null));const e=this.positionShift,n=this.seqHelper.getSeqHandler(this.tableCol),i=this.props.separatorWidth+1*this.props.fontCharWidth,o=Math.ceil(this.colWidth/i)+e,r=n.getSplitted(t),s=Math.min(o,r.length);let a=this._monomerLengthList[t];if(null===a||a.length!=s-e){a=this._monomerLengthList[t]=new Array(r.length);let i=0;for(let t=e;t<s;++t){const o=r.getOriginal(t),s=this.props.monomerToShort(o,this.monomerLengthLimit),l=(n.isSeparator()?this.separatorWidth:this.props.separatorWidth)+s.length*this.props.fontCharWidth;if(a[t-e]=l,i+=l,i>this.colWidth)break}}return a}getCellMonomerLengthsForSeqMsa(){var t;this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null)),(t=this._monomerLengthList)[0]??(t[0]=new Array(0));const e=this._monomerLengthList[0],{startIdx:n,endIdx:i}=(()=>{try{const t=this.gridCol&&this.gridCol.dart?this.gridCol.grid:null;return t&&t.dart?{startIdx:Math.max(Math.floor((t?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((t?.vertScroll.max??0)+10),this.tableCol.length)}:{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}catch(t){return{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}})(),o=this.props.separatorWidth+1*this.props.fontCharWidth,r=this.positionShift,s=Math.ceil(this.colWidth/o)+r;for(let t=n;t<i;t++){if(this._processedRows.get(t)&&s<=this._processedMaxVisibleSeqLength)continue;const n=this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t,s),i=Math.min(s,n.length);i-r>e.length&&e.push(...new Array(i-r-e.length).fill(o));let a=0;for(let t=r;t<i;++t){const i=n.getOriginal(t),o=this.props.monomerToShort(i,this.monomerLengthLimit),s=this.props.separatorWidth+o.length*this.props.fontCharWidth;if(e[t-r]=Math.max(e[t-r]??0,s),a+=s,a>=this.colWidth)break}this._processedMaxVisibleSeqLength=Math.max(this._processedMaxVisibleSeqLength,s),this._processedRows.set(t,!0)}return e}getPosition(t,e,n,i){const[o,r]=this.getCellMonomerLengths(t,n);return 0===this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t).length?null:function(t,e,n){if((n??0)>0&&e<(t[0]??0)+n)return-1;e-=n??0;let i,o=100,r=0,s=t.length-1;for(;r<=s;){if(i=Math.floor((s+r)/2),t[i]<=e&&e<t[i+1])return i;if(e<t[i]?s=i-1:r=i+1,--o<=0)throw new Error(`Get position for pointer x = ${e} searching has not converged on ${JSON.stringify(t)}. `)}return null}(r,e,i)}setMonomerLengthLimit(t){this.monomerLengthLimit!=t&&(this.monomerLengthLimit=t,this.dirty=!0)}setSeparatorWidth(t){this.separatorWidth!=t&&(this.props.separatorWidth=t,this.dirty=!0)}get positionShift(){const t=Number.parseInt(this.tableCol?.tags[l.gp.positionShift]??"0")??0;return isNaN(t)?0:Math.max(t,0)}render(t,e,n,i,r,a,c){const h=a.grid?.canvas===t.canvas;if(!this.seqHelper)return;const m=this.tableCol,f=this.positionShift;t.save();try{const c=this.seqHelper.getSeqHandler(m);let u=this.monomerLengthLimit;if(d.gp.maxMonomerLength in m.tags){const t=parseInt(m.getTag(d.gp.maxMonomerLength));u=!isNaN(t)&&t?t:50}if(m.temp[".mm.cellRenderer.settingsChanged"]===p.s.true||this.monomerLengthLimit!=u){let t=0;const e=8;t=m.temp[".mm.cellRenderer.gapLength"]??t,this.setMonomerLengthLimit(u),this.setSeparatorWidth(c.isMsa()?e:t),m.temp[".mm.cellRenderer.settingsChanged"]=p.s.false,this.dirty=!0}const g=a.cell.rowIndex,b=a.cell.value;h&&(i=v(a.grid,t,e,i,window.devicePixelRatio)),t.beginPath(),t.rect(e,n,i,r),t.clip(),t.font=this.props?.font??"12px monospace",t.textBaseline="top";const w=m.meta.units,C=m.getTag(l.gp.aligned),A=m.getTag(l.gp.separator)??"",S=h?c.getSplitted(g):c.splitter(b);let x=d.yg.classic;C?.includes("MSA")&&w===l.Hi.SEPARATOR&&(x=d.yg.MSA);const E=m.temp["reference-sequence"],T=this.tableCol.temp["current-word"],M=(()=>{const t=(0,c.splitter)(null!=E&&""!==E?E:T??"");return s().count(0).take(t.length).slice(f).map((e=>t.getCanonical(e))).toArray()})(),_=Number.parseInt(m.getTag(l.gp.selectedPosition)??"-200");if(this.shouldUseMultilineRendering(m)){const s=[],l=this.calculateMultiLineLayoutDynamic(t,i,r,S,f,u);let h=n+this.padding;1===l.lineLayouts.length&&(h=n+(r-l.lineHeight)/2);for(const i of l.lineLayouts){const r=h+i.lineIdx*l.lineHeight;for(const h of i.elements){const u=e+h.x,p=h,g=p.posIdx,b=S.getCanonical(g);let v=y;const w=this.getMonomerLib();w&&(v=w.getMonomerTextColor(c.defaultBiotype,b));let C=0;if(a.tableRowIndex!==m.dataFrame.currentRowIdx&&M.length>0){const t=g-f;t>=0&&t<M.length&&b===M[t]&&(C=.7)}s.push({lineIdx:i.lineIdx,monomerIdx:g-f,bounds:new o.Rect(h.x,r-n,h.width,l.lineHeight),sequencePosition:g}),(0,d.oZ)(t,p.om,u,r,h.width,l.lineHeight,{color:v,isMultiLineContext:!0,transparencyRate:C,selectedPosition:isNaN(_)||_<1?void 0:_,wordIdx:g})}}null!==a.tableRowIndex&&this._cellBounds.set(a.tableRowIndex,s)}else{this._leftThreeDotsPadding=this.shouldRenderShiftedThreeDots(f)?t.measureText("...").width:0;let[,o]=this.getCellMonomerLengths(a.tableRowIndex,i);h||(o=this.getSummedMonomerLengths(this.getCellMonomerLengthsForSeqValue(b,i)));const s=this.props.separatorWidth+1*this.props.fontCharWidth,l=Math.min(S.length,Math.ceil(i/s)+f);for(let s=f;s<l;++s){const l=s<S.length?S.getOriginal(s):c.defaultGapOriginal,h=s<S.length?S.getCanonical(s):c.defaultGapOriginal;let p=y;this.getMonomerLib()&&(p=this.getMonomerLib().getMonomerTextColor(c.defaultBiotype,h));const m={color:p,pivot:0,left:!0,transparencyRate:0,separator:A,last:s===S.length-1,drawStyle:x,maxWord:o,wordIdx:s-f,gridCell:a,referenceSequence:M,maxLengthOfMonomer:u,monomerTextSizeMap:this._monomerLengthMap,logger:this.logger,selectedPosition:isNaN(_)||_<1?void 0:_-f};(0,d.oZ)(t,l,e+this.padding+this._leftThreeDotsPadding,n,i,r,m)}if(this.shouldRenderShiftedThreeDots(f)){const s={color:y,pivot:0,left:!0,transparencyRate:0,separator:A,last:!1,drawStyle:x,maxWord:o,wordIdx:0,gridCell:a,maxLengthOfMonomer:u,monomerTextSizeMap:this._monomerLengthMap,logger:this.logger};(0,d.oZ)(t,"...",e+this.padding,n,i,r,s)}}}catch(t){const[e,n]=(0,u.AP)(t);this.logger.error(e,void 0,n),this.errors.push(t)}finally{t.restore()}}shouldRenderShiftedThreeDots(t){return t>0&&(!this.gridCol||!this.gridCol.dart||!this.gridCol.grid||!this.gridCol.grid.dart||(this.gridCol.grid.props.colHeaderHeight??0)<=50)}onMouseMove(t,e){const n=`${this.toLog()}.onMouseMove()`;if(!this.seqHelper||null==t.tableRowIndex)return;const o=this.positionShift,r=t.bounds,s=e.offsetX-t.gridColumn.left+(t.gridColumn.left-r.x),a=e.offsetY-r.y;this.gridCol?.grid?.canvas&&(this.gridCol.grid.canvas.style.cursor="default");let c=null;const h=this._cellBounds.get(t.tableRowIndex);if(h){for(const t of h)if(t.bounds.contains(s,a)){c=t.monomerIdx;break}}else{const e=this.shouldRenderShiftedThreeDots(o)&&(this._leftThreeDotsPadding??0)>0?this._leftThreeDotsPadding:0;c=this.getPosition(t.tableRowIndex,s,r.width,e)}this.logger.debug(`${n}, argsX: ${s}, argsY: ${a}, left: ${c}`);const u=this.seqHelper.getSeqHandler(this.tableCol),d=u.getSplitted(t.tableRowIndex);if(null!==c&&c>=0&&c+o<d.length){const n=u.alphabet??l.YI.UN,r={position:c,biotype:n===l.YI.RNA||n===l.YI.DNA?m.o.NUCLEOTIDE:m.o.AA,symbol:d.getCanonical(c+o)},s=[];let a=this._monomerStructureMap[r.symbol];if(!a){const t=this.getMonomerLib();a=this._monomerStructureMap[r.symbol]=t?t.getTooltip(r.biotype,r.symbol):i.divText("Monomer library is not available")}s.push(a),i.tooltip.show(i.divV(s),e.x+16,e.y+16),(0,f.WN)(t,r)}else-1===c?i.tooltip.show(i.divText(`${Math.min(o,d.length)} hidden monomers`),e.x+16,e.y+16):i.tooltip.hide(),(0,f.WN)(t,null)}}function v(t,e,n,i,o){return t?Math.max(Math.min(t.canvas.width/o-n,i)):Math.max(e.canvas.width/o-n,0)}},3856:(t,e,n)=>{"use strict";n.d(e,{Mn:()=>h,gp:()=>c,oZ:()=>p,yg:()=>u});var i=n(6082),o=n(7278);const r="rgb(100,100,100)",s="#808080",a="rgb(0,0,0)",l=o.zS;var c,h,u;!function(t){t.maxMonomerLength=".mm.cellRenderer.maxMonomerLength"}(c||(c={})),function(t){t.applyToBackground=".m.cellRenderer.applyToBackground"}(h||(h={})),function(t){t.MSA="MSA",t.classic="classic"}(u||(u={}));const d=new class{constructor(){this.color=r,this.pivot=0,this.left=!1,this.transparencyRate=0,this.separator="",this.last=!1,this.drawStyle=u.classic,this.maxWord=[],this.wordIdx=0,this.gridCell=null,this.referenceSequence=null,this.maxLengthOfMonomer=null,this.monomerTextSizeMap={},this.logger=void 0,this.selectedPosition=void 0,this.isMultiLineContext=!1,this.lineNumber=0}};function p(t,e,n,o,c,h,p){var m,f,g;const y={...d,...p};if(y.isMultiLineContext){t.textBaseline="middle",t.textAlign="center";let i=e;null!=y.maxLengthOfMonomer&&(i=l(i,y.maxLengthOfMonomer));const s=Math.max(.1,1-(y.transparencyRate??0));t.globalAlpha=s;const u=t.measureText(i),d=u.fontBoundingBoxAscent+u.fontBoundingBoxDescent,p=o+(h-d)/2+u.fontBoundingBoxAscent;let m=y.color??r;return m&&m!==r||(m=a),t.fillStyle=m,y.selectedPosition===y.wordIdx+1&&(t.save(),t.fillStyle="rgba(60, 177, 115, 0.2)",t.fillRect(n,o,c,h),t.restore(),t.fillStyle=m),t.fillText(i,n+c/2,p),t.globalAlpha=1,t.textBaseline="top",t.textAlign="start",n+c}p.logger?.debug("Bio: printLeftOrCentered(), start"),t.textAlign="start";let b=e.substring(0),v=y.last?"":y.separator;y.drawStyle===u.MSA&&(v="");let w=!0,C=!0,A="difference";if(null!=y.gridCell&&null!=y.gridCell.cell.column&&(w=y.gridCell.cell.column.temp["color-code"]??!0,C=y.gridCell.cell.column.temp["compare-with-current"]??!0,A=y.gridCell.cell.column.temp["highlight-difference"]??"difference"),y.referenceSequence){const t=y.referenceSequence[y.wordIdx];C&&y.referenceSequence.length>0&&"difference"===A&&(y.transparencyRate=b==t?.7:y.transparencyRate),C&&y.referenceSequence.length>0&&"equal"===A&&(y.transparencyRate=b!=t?.7:y.transparencyRate)}null!=y.maxLengthOfMonomer&&(b=l(b,y.maxLengthOfMonomer));const S=b+v;(m=y.monomerTextSizeMap)[S]??(m[S]=t.measureText(S));let x=y.monomerTextSizeMap[S];(f=y.monomerTextSizeMap)[b]??(f[b]=t.measureText(b));let E=y.monomerTextSizeMap[b].width;const T=h/2-(x.fontBoundingBoxAscent+x.fontBoundingBoxDescent)/2+1;(g=y.monomerTextSizeMap)[v]??(g[v]=t.measureText(v));const M=y.monomerTextSizeMap[v].width;function _(e,r){let l=w?y.color:a;y.selectedPosition===y.wordIdx+1&&(t.fillStyle="rgba(60, 177, 115, 0.2)",t.fillRect(n+e-4,o-5,y.monomerTextSizeMap[b].width+8,h+10),l=i.Color.toHtml(i.Color.setAlpha(i.Color.fromHtml(l),255))),t.fillStyle=l,t.globalAlpha=1-y.transparencyRate,y.drawStyle===u.classic&&(t.fillText(b,n+e,o+T),t.fillStyle=s,t.fillText(v,n+r,o+T)),y.drawStyle===u.MSA&&t.fillText(b,n+e,o+T),t.globalAlpha=1}x=x.width,y.drawStyle===u.MSA&&(E=y.maxWord[y.wordIdx],x=y.maxWord[y.wordIdx]);const I=(y.maxWord[y.wordIdx]??0)-(y.maxWord[0]??0);if(y.left||x>c)return _(I,I+E),n+I+E+M;{const t=(c-x)/2;return _(t,t+E),n+I+t+E}}},6307:(t,e,n)=>{"use strict";n.d(e,{F:()=>s});var i=n(7389),o=n(6082),r=n(439);function s(t,e,n){let s=0,a=null;for(const e of Object.values(t))s+=e,a=null===a?e:Math.max(a,e);const l=a/s,c=Object.assign({},...Array.from(Object.entries(t)).sort(((t,e)=>e[1]-t[1])).map((([t,a])=>{const c=a/s;let h;try{const i=n.getMonomerColors(e,t);h=i?.backgroundcolor||"#CCCCCC"}catch(e){console.warn(`Failed to get colors for monomer ${t}:`,e),h="#CCCCCC"}const u=i.div("",{classes:"macromolecule-cell-comp-analysis-bar"});u.style.width=50*c/l+"px",u.style.backgroundColor=h,r._S===t&&(u.style.borderWidth="1px",u.style.borderStyle="solid",u.style.borderColor=o.Color.toHtml(o.Color.lightGray));const d=r._S===t?"-":t,p=i.div(`${(100*c).toFixed(2)}%`),m=i.div([u,p],{classes:"macromolecule-cell-comp-analysis-value"});return{[d]:m}}))),h=i.tableFromMap(c);return Array.from(h.rows).forEach((t=>{const e=t.getElementsByClassName("macromolecule-cell-comp-analysis-bar")[0].style.backgroundColor;t.cells[0].style.color=e})),h}},3151:(t,e,n)=>{"use strict";n.d(e,{EK:()=>l,Ec:()=>r,f6:()=>i,pe:()=>s,q7:()=>a,yw:()=>o});const i=["symbol","molfile","rgroups","name"],o="MonomerName",r={monomerType:null,smiles:null,name:"Name",author:null,molfile:"molecule",naturalAnalog:"MonomerNaturalAnalogCode",rgroups:"MonomerCaps",createDate:null,id:null,polymerType:"MonomerType",symbol:"MonomerName"},s={monomerType:"Backbone",smiles:"",name:"",author:"Datagrok",molfile:"",naturalAnalog:"",rgroups:[],createDate:null,id:0,polymerType:"PEPTIDE",symbol:""},a="p",l=new RegExp(`[rd]\\((\\w)\\)${a}?`,"g")},9192:(t,e,n)=>{"use strict";function i(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?i(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function o(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?o(t.$thrownJsError):void 0}function r(t){return[i(t),o(t)]}n.d(e,{AP:()=>r})},3516:(t,e,n)=>{"use strict";n.d(e,{m:()=>r});var i=n(6082),o=n(439);class r{get descriptionsArray(){return this._descriptionsArray}get sequencesArray(){return this._sequencesArray}parseMacromolecule(t,e){return this._fileContent.slice(t,e).split(/\s/).join("")}parseColumns(){const t=/^>(.*)$/gm;let e,n=0;for(;e=t.exec(this._fileContent);){const i=this._fileContent.substring(e.index+1,t.lastIndex);this._descriptionsArray.push(i),0!==n&&this._sequencesArray.push(this.parseMacromolecule(n,e.index)),n=t.lastIndex+1}this._sequencesArray.push(this.parseMacromolecule(n,-1))}importFasta(){const t=i.Column.fromStrings("description",this.descriptionsArray),e=i.Column.fromStrings("sequence",this.sequencesArray);return e.semType=i.SEMTYPE.MACROMOLECULE,e.meta.units=o.Hi.FASTA,[i.DataFrame.fromColumns([t,e])]}constructor(t){this._descriptionsArray=[],this._sequencesArray=[],this._fileContent=t,this.parseColumns()}}},6873:(t,e,n)=>{"use strict";n.d(e,{Hx:()=>h,dW:()=>c});var i=n(6082),o=n(1991),r=n.n(o),s=n(2003),a=n(7278),l=n(439);function c(t=10**5){const e="meI/hHis/Aca/N//dE/Thr_PO3H2/Aca/D-Tyr_Et/Tyr_ab-dehydroMe".repeat(Math.ceil(t/10)).slice(0,-1),n=i.Column.fromList(i.COLUMN_TYPE.STRING,"MSA",new Array(100).fill(e));n.semType=i.SEMTYPE.MACROMOLECULE,n.meta.units=s.Hi.SEPARATOR,n.setTag(s.gp.separator,"/"),n.setTag(s.gp.alphabet,s.YI.UN),n.setTag(s.gp.alphabetIsMultichar,"true");const o=[];return o.push(n),o.push(i.Column.fromList(i.COLUMN_TYPE.FLOAT,"Activity",new Array(100).fill(7.30751))),o}function h(t,e=s.Hi.SEPARATOR,n=s.YI.PT,o=(e===s.Hi.SEPARATOR?"-":void 0),c=void 0,h="seq",u=100,d=10**6){const p=n===s.YI.UN?c?.getMonomerSymbolsByType("PEPTIDE")??[]:Array.from((0,s.Qf)(n)),m=p.length,f=i.Column.fromType(i.COLUMN_TYPE.STRING,h,u);f.semType=i.SEMTYPE.MACROMOLECULE,f.meta.units=e,f.setTag(s.gp.alphabet,n),e==s.Hi.SEPARATOR&&f.setTag(s.gp.separator,o);const g=t.getSeqHandler(f);for(let t=0;t<u;t++){const n=r().count(0).take(d).map((t=>p[Math.floor(Math.random()*m)])).toArray(),i=g.joiner(new a.Mu(n,l.b9[e]));f.set(t,i)}return f}},439:(t,e,n)=>{"use strict";n.d(e,{B5:()=>l,Hi:()=>i,Vl:()=>c,YI:()=>o,_S:()=>u,b9:()=>d,gp:()=>r,ot:()=>p,q7:()=>h,z1:()=>a});var i,o,r,s=n(2738);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm",t.CUSTOM="custom"}(i||(i={})),function(t){t.DNA="DNA",t.RNA="RNA",t.PT="PT",t.UN="UN"}(o||(o={})),function(t){t.aligned="aligned",t.alphabet="alphabet",t.alphabetSize=".alphabetSize",t.alphabetIsMultichar=".alphabetIsMultichar",t.separator="separator",t.isHelmCompatible=".isHelmCompatible",t.positionNames=".positionNames",t.positionLabels=".positionLabels",t.regions=".regions",t.positionShift=".positionShift",t.selectedPosition=".selectedPosition"}(r||(r={}));const a=", ",l=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,c=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"])}}},h=[new s.a(o.PT,c.fasta.peptide,.5),new s.a(o.DNA,c.fasta.dna,.55),new s.a(o.RNA,c.fasta.rna,.55)],u="",d={[i.FASTA]:"-",[i.SEPARATOR]:"",[i.HELM]:"*"},p=" , "},2003:(t,e,n)=>{"use strict";n.d(e,{Hi:()=>i.Hi,J9:()=>o.J9,Qf:()=>o.Qf,YI:()=>i.YI,dh:()=>o.dh,gp:()=>i.gp,mn:()=>o.mn,q7:()=>i.q7,qp:()=>o.qp,z1:()=>i.z1,zS:()=>o.zS});var i=n(439),o=n(7278)},2738:(t,e,n)=>{"use strict";n.d(e,{X:()=>o,a:()=>i});class i{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}class o extends i{constructor(t,e,n){super(t.name,t.alphabet,t.cutoff),this.freq=e,this.similarity=n}}},7278:(t,e,n)=>{"use strict";n.d(e,{Iv:()=>y,J9:()=>p,Mu:()=>u,Qf:()=>w,dh:()=>f,mn:()=>S,p0:()=>A,pc:()=>C,qp:()=>g,tm:()=>m,zS:()=>v});var i=n(6082),o=n(1991),r=n.n(o),s=n(3527),a=n(3629),l=n(2738),c=n(439),h=(n(8924),n(1093),n(4152),n(8438));class u{get length(){return this.mList.length}isGap(t){return this.getOriginal(t)===this.gapOriginalMonomer}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");const e=this.mList[t];return e!==this.gapOriginalMonomer?e:c._S}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}getCanonicalRegion(t,e){const n=Math.min(Math.max(0,t),this.length),i=Math.max(Math.min(this.length,e),0)-n,o=this.gapOriginalMonomer;return new Array(i).fill(null).map(((t,e)=>{const i=this.mList[e+n];return i===o?c._S:i}))}getOriginalRegion(t,e){const n=Math.min(Math.max(0,t),this.length),i=Math.max(Math.min(this.length,e),0);return new Array(i-n).fill(null).map(((t,e)=>this.mList[e+n]))}get gapOriginal(){return this.gapOriginalMonomer}constructor(t,e){this.mList=t,this.gapOriginalMonomer=e}}class d{get length(){return this.seqS.length}isGap(t){return this.getOriginal(t)===c.b9[c.Hi.FASTA]}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");return this.isGap(t)?c._S:this.seqS[t]}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.seqS[t]}getCanonicalRegion(t,e){const n=Math.max(0,t),i=Math.min(this.length,e)-n,o=c.b9[c.Hi.FASTA];return new Array(i).fill(null).map(((t,e)=>{const i=this.seqS[e+n];return i===o?c._S:i}))}getOriginalRegion(t,e){const n=Math.max(0,t),i=Math.min(this.length,e);return this.seqS.slice(n,i)}get gapOriginal(){return c.b9[c.Hi.FASTA]}constructor(t){this.seqS=t}}const p=t=>{const e=r()(t.toString().matchAll(c.B5)).map((t=>t[2]??t[1])).toArray();return new u(e,c.b9[c.Hi.FASTA])},m=t=>t?new d(t):new u([],c.b9[c.Hi.FASTA]);function f(t,e=void 0){return n=>{if(n){let i;const o=new RegExp(`(?<=^|\\${t})("-"|'-'|[^\\${t}]*)(?=\\${t}|$)`,"g");return void 0!==e?(o.lastIndex=0,i=r()(n.matchAll(o)).take(e).map((t=>t[0])).toArray()):i=n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e),new u(i,c.b9[c.Hi.SEPARATOR])}return new u([],c.b9[c.Hi.SEPARATOR])}}const g=t=>{const e=t.split("$")[0].split("|"),n=r()(e.map((t=>(t.match(/(?<=\{).+(?=})/)?.[0]?.split(".")??[]).map((t=>(0,h.D)(t)))))).flatten().toArray();return new u(n,c.b9[c.Hi.HELM])};function y(t,e,n=void 0){if(t.toLowerCase().startsWith(c.Hi.FASTA))return p;if(t.toLowerCase().startsWith(c.Hi.SEPARATOR))return f(e,n);if(t.toLowerCase().startsWith(c.Hi.HELM))return g;throw new Error(`Unexpected units ${t} .`)}const b=/([^\W_]+)/g;function v(t,e){if(t.length<=e)return t;const n=t.match(b),i=t.length>e||(n?.length??0)>1,o=n?.[0]??" ";return i?o.substring(0,e-1)+"…":o}function w(t){switch(t){case c.YI.DNA:return c.Vl.fasta.dna;case c.YI.RNA:return c.Vl.fasta.rna;case c.YI.PT:return c.Vl.fasta.peptide;default:throw new Error(`Unsupported alphabet '${t}'.`)}}function C(t,e,n="-"){const i=e.map((e=>{const i=function(t,e,n="-"){const i=new Set([...new Set(Object.keys(t)),...e]);i.delete(n);const o=[],r=[];for(const n of i)o.push(n in t?t[n]:0),r.push(e.has(n)?1:0);const l=new s.Mi(o),c=new s.Mi(r);return(0,a.KE)(l,c)/((0,a.wQ)(l)*(0,a.wQ)(c))}(t,e.alphabet,n);return new l.X(e,t,i)}));let o;const r=Math.max(...i.map((t=>t.similarity>t.cutoff?t.similarity:-1)));return o=r>0?i.find((t=>t.similarity===r)).name:c.YI.UN,o}function A(t,e,n="-"){const i=Object.keys(t),o=/\(|\)/;return C(i.filter((t=>3===t.split(o).filter((t=>!!t)).length)).length>.8*i.length?Object.entries(t).reduce(((t,[e,n])=>{const i=e.split(o)[1];return i&&(t[i]=n),t}),{}):t,e,n)}function S(t){const e=t.columns.bySemTypeAll(i.SEMTYPE.MACROMOLECULE);let n=e.find((t=>{const e=t.meta.units;return!!e&&-1!==e.indexOf("MSA")}))??null;return!n&&e.length>0&&(n=e[0]),n}},8312:(t,e,n)=>{"use strict";n.d(e,{Q:()=>o});var i=n(6082);async function o(){const t=i.Func.find({package:"Bio",name:"getSeqHelper"});if(0===t.length)throw new Error("Package 'Bio' must be installed for SeqHelper.");return(await t[0].prepare().call()).getOutputParamValue()}},3077:(t,e,n)=>{"use strict";n.d(e,{R:()=>o});var i=n(6082);function o(t,e){const n=t=>{const e=s.columns.addNewString((t+1).toString());return o.push(e),e},o=[],r=t.length,s=i.DataFrame.create(r),a=e.getSeqHandler(t);for(let t=0;t<r;++t){const e=a.getSplitted(t);for(let i=0;i<e.length;++i){const r=e.getCanonical(i);((o[i]??null)||n(i)).set(t,r,!1)}}return s}},7602:(t,e,n)=>{"use strict";n.d(e,{g:()=>r});var i,o=n(9192);!function(t){t[t.error=0]="error",t[t.warning=1]="warning",t[t.info=2]="info",t[t.debug=3]="debug"}(i||(i={}));class r{constructor(t){this.logger=t,this.promise=Promise.resolve(),this.errors=[],this.syncCounter=0}sync(t,e){const n=++this.syncCounter;this.logger.debug(`${t}, SYNC syncId = ${n}, IN `),this.promise=this.promise.then((async()=>{this.logger.debug(`${t}, SYNC syncId = ${n}, START `),await e(),this.logger.debug(`${t}, SYNC syncId = ${n}, END `)})).catch((e=>{const[i,r]=(0,o.AP)(e);this.logger.error(`${t}, SYNC syncId = ${n}, ERROR:\n${i}`,void 0,r),this.errors.push(e)}))}resetErrors(){const t=this.errors;return this.errors=[],t}}},4326:(t,e,n)=>{"use strict";n.d(e,{Fo:()=>h,Lp:()=>r,P4:()=>s,fH:()=>o,gp:()=>i,lT:()=>l,mH:()=>a});var i,o,r,s,a,l,c=n(6082);!function(t){t.tooltipWebLogo=".tooltipWebLogo"}(i||(i={})),function(t){t.Entropy="Entropy",t.full="100%"}(o||(o={})),function(t){t.TOP="top",t.MIDDLE="middle",t.BOTTOM="bottom"}(r||(r={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(s||(s={})),function(t){t.AUTO="auto",t.ON="on",t.OFF="off"}(a||(a={})),function(t){t.Filtered="Filtered",t.Selected="Selected"}(l||(l={}));const h=new class{constructor(){this.sequenceColumnName=null,this.valueAggrType=c.AGG.TOTAL_COUNT,this.valueColumnName="Activity",this.startPositionName=null,this.endPositionName=null,this.skipEmptySequences=!0,this.skipEmptyPositions=!1,this.shrinkEmptyTail=!0,this.backgroundColor=4294967295,this.positionHeight=o.Entropy,this.positionWidth=20,this.verticalAlignment=r.MIDDLE,this.horizontalAlignment=s.CENTER,this.fixWidth=!1,this.fitArea=!0,this.minHeight=25,this.maxHeight=300,this.maxMonomerLetters=5,this.showPositionLabels=!0,this.positionMarginState=a.AUTO,this.positionMargin=0,this.filterSource=l.Filtered}}},6869:(t,e,n)=>{"use strict";var i;n.d(e,{o:()=>i}),function(t){t.BASE="HELM_BASE",t.SUGAR="HELM_SUGAR",t.LINKER="HELM_LINKER",t.AA="HELM_AA",t.CHEM="HELM_CHEM",t.BLOB="HELM_BLOB",t.NUCLEOTIDE="HELM_NUCLETIDE"}(i||(i={}))},5540:(t,e,n)=>{"use strict";t=n.hmd(t);var i,o=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t={}){var e,n,o=void 0!==t?t:{};o.ready=new Promise((function(t,i){e=t,n=i}));var r,s=Object.assign({},o),a="object"==typeof window,l="function"==typeof importScripts,c=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(a||l)&&(l?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),i&&(c=i),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",l&&(r=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),o.print||console.log.bind(console);var h,u,d=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&o.thisProgram,o.quit&&o.quit,o.wasmBinary&&(h=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&T("no native wasm support detected");var p,m,f,g=!1;function y(){var t=u.buffer;o.HEAP8=p=new Int8Array(t),o.HEAP16=new Int16Array(t),o.HEAP32=new Int32Array(t),o.HEAPU8=m=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAPU32=f=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=new Float64Array(t)}var b,v,w=[],C=[],A=[],S=0,x=null,E=null;function T(t){o.onAbort&&o.onAbort(t),d(t="Aborted("+t+")"),g=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function M(t){return t.startsWith("data:application/octet-stream;base64,")}function _(t){try{if(t==b&&h)return new Uint8Array(h);if(r)return r(t);throw"both async and sync fetching of the wasm failed"}catch(t){T(t)}}function I(t,e,n){return function(t){return h||!a&&!l||"function"!=typeof fetch?Promise.resolve().then((function(){return _(t)})):fetch(t,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()})).catch((function(){return _(t)}))}(t).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(n,(function(t){d("failed to asynchronously prepare wasm: "+t),T(t)}))}function L(t){for(;t.length>0;)t.shift()(o)}function N(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){f[this.ptr+4>>2]=t},this.get_type=function(){return f[this.ptr+4>>2]},this.set_destructor=function(t){f[this.ptr+8>>2]=t},this.get_destructor=function(){return f[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,p[this.ptr+12|0]=t},this.get_caught=function(){return 0!=p[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,p[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=p[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e)},this.set_adjusted_ptr=function(t){f[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return f[this.ptr+16>>2]},this.get_exception_ptr=function(){if(B(this.get_type()))return f[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}function P(t){var e=u.buffer;try{return u.grow(t-e.byteLength+65535>>>16),y(),1}catch(t){}}function $(t){return o["_"+t]}M(b="wasmDbscan.wasm")||(v=b,b=o.locateFile?o.locateFile(v,c):c+v);var R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(t,e,n,i,o){var r={string:t=>{var e=0;return null!=t&&0!==t&&(e=function(t){var e=function(t){for(var e=0,n=0;n<t.length;++n){var i=t.charCodeAt(n);i<=127?e++:i<=2047?e+=2:i>=55296&&i<=57343?(e+=4,++n):e+=3}return e}(t)+1,n=D(e);return function(t,e,n){!function(t,e,n,i){if(!(i>0))return 0;for(var o=n+i-1,r=0;r<t.length;++r){var s=t.charCodeAt(r);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++r)),s<=127){if(n>=o)break;e[n++]=s}else if(s<=2047){if(n+1>=o)break;e[n++]=192|s>>6,e[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;e[n++]=224|s>>12,e[n++]=128|s>>6&63,e[n++]=128|63&s}else{if(n+3>=o)break;e[n++]=240|s>>18,e[n++]=128|s>>12&63,e[n++]=128|s>>6&63,e[n++]=128|63&s}}e[n]=0}(t,m,e,n)}(t,n,e),n}(t)),e},array:t=>{var e,n,i=D(t.length);return e=t,n=i,p.set(e,n),i}},s=$(t),a=[],l=0;if(i)for(var c=0;c<i.length;c++){var h=r[n[c]];h?(0===l&&(l=G()),a[c]=h(i[c])):a[c]=i[c]}var u=s.apply(null,a);return function(t){return 0!==l&&F(l),function(t){return"string"===e?(n=t)?function(t,e,n){for(var i=e+n,o=e;t[o]&&!(o>=i);)++o;if(o-e>16&&t.buffer&&R)return R.decode(t.subarray(e,o));for(var r="";e<o;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var l=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|l:(7&s)<<18|a<<12|l<<6|63&t[e++])<65536)r+=String.fromCharCode(s);else{var c=s-65536;r+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else r+=String.fromCharCode((31&s)<<6|a)}else r+=String.fromCharCode(s)}return r}(m,n,i):"":"boolean"===e?Boolean(t):t;var n,i}(t)}(u)}var O,H={__cxa_throw:function(t,e,n){throw new N(t).init(e,n),t},abort:function(){T("")},emscripten_memcpy_big:function(t,e,n){m.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){var e,n=m.length,i=2147483648;if((t>>>=0)>i)return!1;for(var o=1;o<=4;o*=2){var r=n*(1+.2/o);if(r=Math.min(r,t+100663296),P(Math.min(i,(e=Math.max(t,r))+(65536-e%65536)%65536)))return!0}return!1}},G=(function(){var t,e,i,r,s={env:H,wasi_snapshot_preview1:H};function a(t,e){var n,i=t.exports;return o.asm=i,u=o.asm.memory,y(),o.asm.__indirect_function_table,n=o.asm.__wasm_call_ctors,C.unshift(n),function(){if(S--,o.monitorRunDependencies&&o.monitorRunDependencies(S),0==S&&(null!==x&&(clearInterval(x),x=null),E)){var t=E;E=null,t()}}(),i}if(S++,o.monitorRunDependencies&&o.monitorRunDependencies(S),o.instantiateWasm)try{return o.instantiateWasm(s,a)}catch(t){d("Module.instantiateWasm callback failed with error: "+t),n(t)}(t=h,e=b,i=s,r=function(t){a(t.instance)},t||"function"!=typeof WebAssembly.instantiateStreaming||M(e)||"function"!=typeof fetch?I(e,i,r):fetch(e,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(r,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),I(e,i,r)}))}))).catch(n)}(),o._dbscan=function(){return(o._dbscan=o.asm.dbscan).apply(null,arguments)},o._malloc=function(){return(o._malloc=o.asm.malloc).apply(null,arguments)},o._free=function(){return(o._free=o.asm.free).apply(null,arguments)},function(){return(G=o.asm.stackSave).apply(null,arguments)}),F=function(){return(F=o.asm.stackRestore).apply(null,arguments)},D=function(){return(D=o.asm.stackAlloc).apply(null,arguments)},B=function(){return(B=o.asm.__cxa_is_pointer_type).apply(null,arguments)};function V(){function t(){O||(O=!0,o.calledRun=!0,g||(L(C),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),A.unshift(t);var t;L(A)}()))}S>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),w.unshift(t);var t;L(w)}(),S>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o.ccall=k,o.cwrap=function(t,e,n,i){var o=!n||n.every((t=>"number"===t||"boolean"===t));return"string"!==e&&o&&!i?$(t):function(){return k(t,e,n,arguments)}},E=function t(){O||V(),O||(E=t)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return V(),t.ready});"object"==typeof exports?t.exports=o:"function"==typeof define&&n.amdO?define([],(function(){return o})):"object"==typeof exports&&(exports.exportCppDbscanLib=o)},6295:(t,e,n)=>{"use strict";n.d(e,{$1:()=>s,Hf:()=>h,Hr:()=>E,Ii:()=>g,Qj:()=>m,T6:()=>x,TK:()=>A,be:()=>f,gt:()=>v,ij:()=>w,jL:()=>c,lO:()=>p,lP:()=>b,rR:()=>y,tO:()=>a,v_:()=>l,w_:()=>u,yK:()=>C,zn:()=>d});var i=n(8774),o=n(8498),r=n(6863);function s(t,e){const n=t.trueCount()+e.trueCount();if(0==n)return 1;const i=t.andWithCountBits(e,!0);return i/(n-i)}function a(t,e){return 1-s(t,e)}function l(t,e){return S(s(new i.A(t,32*t.length),new i.A(e,32*e.length)))}function c(t,e){let n=0;for(let i=0;i<t.length;i++)n+=Math.pow(t[i]-e[i],2);return Math.sqrt(n)}function h(t,e){let n=0;for(let i=0;i<t.length;i++)n+=Math.abs(t[i]-e[i]);return n}function u(t,e){let n=0,i=0,o=0;for(let r=0;r<t.length;r++)n+=t[r]*e[r],i+=t[r]*t[r],o+=e[r]*e[r];return(1-n/(Math.sqrt(i)*Math.sqrt(o)))/2}function d(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount();return 0==n?0:2*t.andWithCountBits(e,!0)/n}(t,e)}function p(t,e){return 1-function(t,e){const n=t.trueCount()*e.trueCount();return 0==n?0:t.andWithCountBits(e,!0)/Math.sqrt(n)}(t,e)}function m(t,e){return Math.sqrt(t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0))}function f(t,e){return t.trueCount()+e.trueCount()-2*t.andWithCountBits(e,!0)}function g(t,e){return 1-function(t,e){const n=t.trueCount()+e.trueCount(),i=t.andWithCountBits(e,!0);return i/(2*n-3*i)}(t,e)}function y(t,e){return S(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:t.andWithCountBits(e,!0)*n/(2*i)}(t,e))}function b(t,e){return S(function(t,e){const n=t.trueCount()+e.trueCount(),i=t.trueCount()*e.trueCount();return 0==i?0:(t.andWithCountBits(e,!0)*n-i)/i}(t,e))}function v(t,e){return 1-function(t,e){const n=Math.min(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e)}function w(t,e){return S(function(t,e){const n=Math.max(t.trueCount(),e.trueCount());return 0==n?0:t.andWithCountBits(e,!0)/n}(t,e))}function C(t,e){return S(function(t,e){return 0==t.length?0:t.andWithCountBits(e,!0)/t.length}(t,e))}function A(t,e){return S(function(t,e){const n=t.andWithCountBits(e,!0),i=t.countBits(!0)+e.countBits(!0),o=t.length,r=o-i+n;return n==o||r==o?1:n/i+r/(2*o-i)}(t,e))}function S(t){return t<=0?3402823e32:1/t-1}function x(t){if(t&&null!=t.range&&t.range>0){const e=t.range;return(t,n)=>Math.abs(t-n)/e}return(t,e)=>Math.abs(t-e)}function E(t){const e=function(t){const e=t?.mostCommon??new Set;return(t,n)=>{const i=t.length,o=n.length;let r=0,s=0,a=0;for(;s<i&&a<o;)t[s]===n[a]?(e?.has(t[s])||++r,++s,++a):t[s]<n[a]?++s:++a;return r}}(t);return(t,n)=>0===n.length||0===t.length?1e4:Math.min(t.length,n.length)/(e(t,n)+1e-4)}o.aT.Tanimoto,o.aT.Dice,o.aT.Asymmetric,o.aT.BraunBlanquet,o.aT.Cosine,o.aT.Kulczynski,o.aT.McConnaughey,o.aT.RogotGoldberg,o.aT.Russel,o.aT.Sokal,o.aT.Hamming,o.aT.Euclidean,o.aT.Tanimoto,o.aT.Dice,o.aT.Asymmetric,o.aT.BraunBlanquet,o.aT.Cosine,o.aT.Kulczynski,o.aT.McConnaughey,o.aT.RogotGoldberg,o.aT.Russel,o.aT.Sokal,o.aT.Hamming,o.aT.Euclidean,o.aT.Tanimoto,o.aT.Dice,o.aT.Cosine,o.aT.Tanimoto,o.aT.Asymmetric,o.aT.Cosine,o.aT.Sokal,r.Z.HAMMING,r.Z.LEVENSHTEIN,r.Z.MONOMER_CHEMICAL_DISTANCE,r.Z.NEEDLEMANN_WUNSCH},684:(t,e,n)=>{"use strict";n.d(e,{C0:()=>r,GP:()=>i,Gi:()=>a,YP:()=>c,_X:()=>s,n3:()=>o,vb:()=>l});const i="dim-red-preprocessing-function",o="supportedSemTypes",r="supportedTypes",s="supportedUnits",a="supportedDistanceFunctions",l="bypassLargeDataWarning",c="show-scatterplot-progress"},6863:(t,e,n)=>{"use strict";function i(t={}){const e=function(){if(!t||!t.scoringMatrix||!t.alphabetIndexes)return(t,e)=>t===e?0:1;if(t.scoringMatrix.length!==Object.keys(t.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const e=t.alphabetIndexes,n=t.scoringMatrix,i=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,o=new Float32Array((n.length+i)*(n.length+i));return Object.entries(e).forEach((([t,i])=>{const r=n[i];Object.entries(e).forEach((([e,i])=>{o[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=r[i]}))})),(t,e)=>1-o[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,i)=>{let o=0;const r=t.length,s=i.length,a=Math.ceil(Math.max(r,s)*(1-n));r!==s&&(o=Math.abs(r-s));let l=0;for(let n=0;n<Math.min(r,s);n++)if(t[n]!==i[n]&&(l+=e(t[n],i[n]),l>a))return 1;return l+=o,l/=Math.max(r,s),l}}n.d(e,{Z:()=>s,V:()=>a});var o=n(2787);const r={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var s;!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(s||(s={}));const a={[s.HAMMING]:i,[s.LEVENSHTEIN]:function(){return(t,e)=>(0,o.I)(t,e)/Math.max(t.length,e.length)},[s.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:n,gapExtend:i,scoringMatrix:o,alphabetIndexes:s}={...r,...t};Object.entries(s).forEach((([t,n])=>e[t.charCodeAt(0)]=n));const a=[new Float32Array(1e4),new Float32Array(1e4)];return(t,r)=>{const s=new Array(t.length+1).fill(!1),l=new Array(t.length+1).fill(!1);let c=0,h=1;for(let e=1;e<t.length+1;e++)a[0][e]=-i-(e-1)*i,a[1][e]=0;a[0][0]=0;for(let u=1;u<r.length+1;u++){a[h][0]=-i-(u-1)*i;for(let d=1;d<t.length+1;d++){const p=a[c][d-1]+o[e[t.charCodeAt(d-1)]][e[r.charCodeAt(u-1)]],m=a[c][d]-(s[d]||1===u||u===r.length?i:n),f=a[h][d-1]-(l[d-1]||1===d||d===t.length?i:n);a[h][d]=Math.max(p,f,m),a[h][d]===p?(s[d]=!1,l[d]=!1):a[h][d]===f?(s[d]=!1,l[d]=!0):(s[d]=!0,l[d]=!1)}c=h,h=(h+1)%2}const u=Math.min(t.length,r.length);return(u-a[c][t.length])/u}},[s.MONOMER_CHEMICAL_DISTANCE]:i}},8060:(t,e,n)=>{"use strict";n.d(e,{S:()=>i});const i="dimensionality-reducer-terminate-event"},9039:(t,e,n)=>{"use strict";var i;n.d(e,{c:()=>i}),function(t){t.UMAP="UMAP",t.T_SNE="t-SNE"}(i||(i={}))},8498:(t,e,n)=>{"use strict";var i,o,r,s,a,l,c;n.d(e,{EG:()=>a,Pn:()=>o,RR:()=>l,Wn:()=>c,aT:()=>r,m6:()=>s,xL:()=>i}),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan String",t.Onehot="One-Hot"}(i||(i={})),function(t){t.Euclidean="Euclidean",t.Manhattan="Manhattan",t.Cosine="Vector Cosine"}(o||(o={})),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 BitArray"}(r||(r={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(s||(s={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(a||(a={})),function(t){t.Difference="Difference"}(l||(l={})),function(t){t.CommonItems="Common Items"}(c||(c={}))},2780:(t,e,n)=>{"use strict";n(8498),n(9336)},9336:(t,e,n)=>{"use strict";var i=n(2787),o=n(944),r=n(6295),s=n(6863),a=n(8498);const l={[a.Pn.Euclidean]:r.jL,[a.Pn.Manhattan]:r.Hf,[a.Pn.Cosine]:r.w_},c={[a.xL.Levenshtein]:i.I,[a.xL.JaroWinkler]:o.Vb,[a.xL.Manhattan]:function(t,e){if(t.length!==e.length)return 1;{let n=0;for(let i=1;i<t.length;i++)n+=t[i]==e[i]?0:1;return n/t.length}},[a.xL.Onehot]:function(t,e){return t===e?0:1}},h={[a.aT.Tanimoto]:r.tO,[a.aT.Dice]:r.zn,[a.aT.Asymmetric]:r.gt,[a.aT.BraunBlanquet]:r.ij,[a.aT.Cosine]:r.lO,[a.aT.Kulczynski]:r.rR,[a.aT.McConnaughey]:r.lP,[a.aT.RogotGoldberg]:r.TK,[a.aT.Russel]:r.yK,[a.aT.Sokal]:r.Ii,[a.aT.Hamming]:r.be,[a.aT.Euclidean]:r.Qj},u={[a.m6.TanimotoIntArray]:r.v_},d={[a.RR.Difference]:r.T6},p={[a.Wn.CommonItems]:r.Hr},m={[a.EG.Vector]:{[a.Pn.Euclidean]:l[a.Pn.Euclidean],[a.Pn.Manhattan]:l[a.Pn.Manhattan],[a.Pn.Cosine]:l[a.Pn.Cosine]},[a.EG.String]:{[a.xL.Levenshtein]:c[a.xL.Levenshtein],[a.xL.JaroWinkler]:c[a.xL.JaroWinkler],[a.xL.Manhattan]:c[a.xL.Manhattan],[a.xL.Onehot]:c[a.xL.Onehot]},[a.EG.BitArray]:{[a.aT.Tanimoto]:h[a.aT.Tanimoto],[a.aT.Dice]:h[a.aT.Dice],[a.aT.Asymmetric]:h[a.aT.Asymmetric],[a.aT.BraunBlanquet]:h[a.aT.BraunBlanquet],[a.aT.Cosine]:h[a.aT.Cosine],[a.aT.Kulczynski]:h[a.aT.Kulczynski],[a.aT.McConnaughey]:h[a.aT.McConnaughey],[a.aT.RogotGoldberg]:h[a.aT.RogotGoldberg],[a.aT.Russel]:h[a.aT.Russel],[a.aT.Sokal]:h[a.aT.Sokal]},[a.EG.MacroMolecule]:{[s.Z.HAMMING]:s.V[s.Z.HAMMING],[s.Z.LEVENSHTEIN]:s.V[s.Z.LEVENSHTEIN],[s.Z.NEEDLEMANN_WUNSCH]:s.V[s.Z.NEEDLEMANN_WUNSCH],[s.Z.MONOMER_CHEMICAL_DISTANCE]:s.V[s.Z.MONOMER_CHEMICAL_DISTANCE]},[a.EG.Number]:{[a.RR.Difference]:d[a.RR.Difference]},[a.EG.IntArray]:{[a.m6.TanimotoIntArray]:u[a.m6.TanimotoIntArray]},[a.EG.NumberArray]:{[a.Wn.CommonItems]:p[a.Wn.CommonItems]}};Object.keys(m).reduce(((t,e)=>{for(const n of Object.keys(m[e]))t[n]=e;return t}),{})},8774:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});class i{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,o=i._createBuffer(n);if(e)for(let t=0;t<o.length;t++)o[t]=-1;this._data=o,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 i(t._length);n._length=t._length,n._data=i._createBuffer(n._length),n._version=0;const o=t.lengthInInts;for(let i=0;i<o;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 i(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 i(t);for(let i=0;i<t;++i)n.setBit(i,e(i));return n._version=0,n}static fromString(t){return i.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new i(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new i(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let o=0,r=0;for(;e-r>=4;)n._data[o++]=255&t[r]|(255&t[r+1])<<8|(255&t[r+2])<<16|(255&t[r+3])<<24,r+=4;return e-r==3&&(n._data[o]=(255&t[r+2])<<16),e-r==2&&(n._data[o]|=(255&t[r+1])<<8),e-r==1&&(n._data[o]|=255&t[r]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new i(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,o=!0){if(n&&o&&this.setAll(!e,!1),o)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 i.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 o=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=o;t<=r;t++)this.setTrue(t);else for(let t=o;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!!(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+=i._onBitCount[255&t];let n=this._data[e];const o=31&this._length;for(0!=o&&(n&=~(4294967295<<o));0!=n;n>>>=8)this._selectedCount+=i._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 o=this.lengthInInts;let r=0;for(;r<o-1;r++)for(let e=this._data[r]&t._data[r];0!=e;e>>>=8)n+=i._onBitCount[255&e];let s=this._data[r]&t._data[r];const a=31&this._length;for(0!=a&&(s&=~(4294967295<<a));0!=s;s>>>=8)n+=i._onBitCount[255&s];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 o=this.lengthInInts;for(let r=Math.floor(t/32);r<o;r++){let o=e?this._data[r]:~this._data[r];if(0!=n)o&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==o)continue;for(let e=0;0!=o;e+=8,o>>>=8){const n=i._firstOnBit[255&o];if(n>=0)return(t=n+32*r+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let o=Math.floor(t/32);o>=0;o--){let t=e?this._data[o]:~this._data[o];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=i._lastOnBit[t>>>24];if(n>=0)return n+32*o+e}}return-1}}i._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]),i._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]),i._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])},8070:(t,e,n)=>{"use strict";n.d(e,{cb:()=>a,PE:()=>s}),n(4328);var i=n(6082);n(9982),i.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,,,,,,,,,,,,,,,,,,,,,').columns.add(i.Column.fromList(i.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var o,r=function(t,e,n,i){return new(n||(n=Promise))((function(o,r){function s(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?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))};function s(t,e,n,i=0,o="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,s)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){s(t)}finally{a.unsubscribe(),clearTimeout(l)}})),l=setTimeout((()=>{a.unsubscribe(),s(o)}),i);n()}))}))}function a(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}console.log.bind(console),console.info.bind(console),console.warn.bind(console),console.error.bind(console),function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(o||(o={})),i.DataFrame.fromColumns([i.Column.fromStrings("col",["val1","val2","val3"])])},3527:(t,e,n)=>{"use strict";n.d(e,{Mi:()=>i});class i extends Float32Array{}},3629:(t,e,n)=>{"use strict";n.d(e,{KE:()=>a,S8:()=>l,dC:()=>r,vA:()=>o,wQ:()=>s});var i=n(3527);function o(t=!1,e="Assertion error."){if(!t)throw new Error(e)}function r(t,e,n=1){const r=t.length;o(r==e.length,"Vector lengths do not match.");const s=new i.Mi(r);for(let i=0;i<t.length;++i)s[i]=t[i]+n*e[i];return s}function s(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*t[n];return Math.sqrt(e)}function a(t,e){if(t.length!=e.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let i=0;i<t.length;i++)n+=t[i]*e[i];return n}function l(t){const e=t.length;let n=0,i=0;for(let o=0;o<e;++o)n+=t[o],i+=Math.pow(t[o],2);const o=n/e,r=1/Math.sqrt(i/e-Math.pow(o,2));for(let n=0;n<e;++n)t[n]=(t[n]-o)*r;return t}},1913:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(3282),o=n(9029),r=n(1520),s=n(2586),a=n(8708),l=n(2023),c="errorMessage",h=new i.Name("emUsed"),u={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,p=/\$\{([^}]+)\}/g,m=/^""\s*\+\s*|\s*\+\s*""$/g;const f=(t,e={})=>{if(!t.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(t.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return t.addKeyword(function(t){return{keyword:c,schemaType:["string","object"],post:!0,code(e){const{gen:n,data:f,schema:g,schemaValue:y,it:b}=e;if(!1===b.createErrors)return;const v=g,w=o.strConcat(l.default.instancePath,b.errorPath);function C(t,e){return o.and(i._`${t}.keyword !== ${c}`,i._`!${t}.${h}`,i._`${t}.instancePath === ${w}`,i._`${t}.keyword in ${e}`,i._`${t}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${t}.schemaPath.slice(${b.errSchemaPath.length}))`)}function A(t,e){const i=[];for(const n in t){const t=e[n];d.test(t)&&i.push([n,x(t)])}return n.object(...i)}function S(t){return d.test(t)?new r._Code(r.safeStringify(t).replace(p,((t,e)=>`" + JSON.stringify(${s.getData(e,b)}) + "`)).replace(m,"")):i.stringify(t)}function x(t){return i._`function(){return ${S(t)}}`}n.if(i._`${l.default.errors} > 0`,(()=>{if("object"==typeof v){const[r,s]=function(t){let e,n;for(const i in t){if("properties"===i||"items"===i)continue;const o=t[i];if("object"==typeof o){e||(e={});const t=e[i]={};for(const e in o)t[e]=[]}else n||(n={}),n[i]=[]}return[e,n]}(v);s&&function(o){const r=n.const("emErrors",i.stringify(o)),s=n.const("templates",A(o,g));n.forOf("err",l.default.vErrors,(t=>n.if(C(t,r),(()=>n.code(i._`${r}[${t}.keyword].push(${t})`).assign(i._`${t}.${h}`,!0)))));const{singleError:c}=t;if(c){const t=n.let("message",i._`""`),o=n.let("paramsErrors",i._`[]`);u((e=>{n.if(t,(()=>n.code(i._`${t} += ${"string"==typeof c?c:";"}`))),n.code(i._`${t} += ${d(e)}`),n.assign(o,i._`${o}.concat(${r}[${e}])`)})),a.reportError(e,{message:t,params:i._`{errors: ${o}}`})}else u((t=>a.reportError(e,{message:d(t),params:i._`{errors: ${r}[${t}]}`})));function u(t){n.forIn("key",r,(e=>n.if(i._`${r}[${e}].length`,(()=>t(e)))))}function d(t){return i._`${t} in ${s} ? ${s}[${t}]() : ${y}[${t}]`}}(s),r&&function(t){const o=n.const("emErrors",i.stringify(t)),r=[];for(const e in t)r.push([e,A(t[e],g[e])]);const s=n.const("templates",n.object(...r)),c=n.scopeValue("obj",{ref:u,code:i.stringify(u)}),d=n.let("emPropParams"),p=n.let("emParamsErrors");n.forOf("err",l.default.vErrors,(t=>n.if(C(t,o),(()=>{n.assign(d,i._`${c}[${t}.keyword]`),n.assign(p,i._`${o}[${t}.keyword][${t}.params[${d}]]`),n.if(p,(()=>n.code(i._`${p}.push(${t})`).assign(i._`${t}.${h}`,!0)))})))),n.forIn("key",o,(t=>n.forIn("keyProp",i._`${o}[${t}]`,(r=>{n.assign(p,i._`${o}[${t}][${r}]`),n.if(i._`${p}.length`,(()=>{const o=n.const("tmpl",i._`${s}[${t}] && ${s}[${t}][${r}]`);a.reportError(e,{message:i._`${o} ? ${o}() : ${y}[${t}][${r}]`,params:i._`{errors: ${p}}`})}))}))))}(r),function(t){const{props:r,items:s}=t;if(!r&&!s)return;const u=i._`typeof ${f} == "object"`,d=i._`Array.isArray(${f})`,p=n.let("emErrors");let m,b;const v=n.let("templates");function C(t,e){n.assign(p,i.stringify(t)),n.assign(v,A(t,e))}r&&s?(m=n.let("emChildKwd"),n.if(u),n.if(d,(()=>{C(s,g.items),n.assign(m,i.str`items`)}),(()=>{C(r,g.properties),n.assign(m,i.str`properties`)})),b=i._`[${m}]`):s?(n.if(d),C(s,g.items),b=i._`.items`):r&&(n.if(o.and(u,o.not(d))),C(r,g.properties),b=i._`.properties`),n.forOf("err",l.default.vErrors,(t=>function(t,e,r){n.if(o.and(i._`${t}.keyword !== ${c}`,i._`!${t}.${h}`,i._`${t}.instancePath.indexOf(${w}) === 0`),(()=>{const o=n.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=n.const("emMatches",i._`${o}.exec(${t}.instancePath.slice(${w}.length))`),a=n.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);n.if(i._`${a} !== undefined && ${a} in ${e}`,(()=>r(a)))}))}(t,p,(e=>n.code(i._`${p}[${e}].push(${t})`).assign(i._`${t}.${h}`,!0))))),n.forIn("key",p,(t=>n.if(i._`${p}[${t}].length`,(()=>{a.reportError(e,{message:i._`${t} in ${v} ? ${v}[${t}]() : ${y}${b}[${t}]`,params:i._`{errors: ${p}[${t}]}`}),n.assign(i._`${l.default.vErrors}[${l.default.errors}-1].instancePath`,i._`${w} + "/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),n.endIf()}(function({properties:t,items:e}){const n={};if(t){n.props={};for(const e in t)n.props[e]=[]}if(e){n.items={};for(let t=0;t<e.length;t++)n.items[t]=[]}return n}(v))}const r="string"==typeof v?v:v._;r&&function(t){const r=n.const("emErrs",i._`[]`);n.forOf("err",l.default.vErrors,(t=>n.if(function(t){return o.and(i._`${t}.keyword !== ${c}`,i._`!${t}.${h}`,o.or(i._`${t}.instancePath === ${w}`,o.and(i._`${t}.instancePath.indexOf(${w}) === 0`,i._`${t}.instancePath[${w}.length] === "/"`)),i._`${t}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,i._`${t}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(t),(()=>n.code(i._`${r}.push(${t})`).assign(i._`${t}.${h}`,!0))))),n.if(i._`${r}.length`,(()=>a.reportError(e,{message:S(t),params:i._`{errors: ${r}}`})))}(r),t.keepErrors||function(){const t=n.const("emErrs",i._`[]`);n.forOf("err",l.default.vErrors,(e=>n.if(i._`!${e}.${h}`,(()=>n.code(i._`${t}.push(${e})`))))),n.assign(l.default.vErrors,t).assign(l.default.errors,i._`${t}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(e))};e.default=f,t.exports=f,t.exports.default=f},7433:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;const i=n(4042),o=n(6105),r=n(6653),s=n(9572),a="https://json-schema.org/draft/2020-12/schema";class l extends i.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),o.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:e}=this.opts;e&&(s.default.call(this,t),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv2020=l,t.exports=e=l,t.exports.Ajv2020=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=n(2586);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var h=n(9029);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var u=n(3558);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=n(4551);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},3282:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const i=n(4042),o=n(6144),r=n(6653),s=n(2079),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends i.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((t=>this.addVocabulary(t))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(t,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var h=n(2586);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var u=n(9029);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=n(3558);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=n(4551);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},1520:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends n{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=i;class o extends n{constructor(t){super(),this._items="string"==typeof t?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return""===t||'""'===t}get str(){var t;return null!==(t=this._str)&&void 0!==t?t:this._str=this._items.reduce(((t,e)=>`${t}${e}`),"")}get names(){var t;return null!==(t=this._names)&&void 0!==t?t:this._names=this._items.reduce(((t,e)=>(e instanceof i&&(t[e.str]=(t[e.str]||0)+1),t)),{})}}function r(t,...e){const n=[t[0]];let i=0;for(;i<e.length;)l(n,e[i]),n.push(t[++i]);return new o(n)}e._Code=o,e.nil=new o(""),e._=r;const s=new o("+");function a(t,...e){const n=[h(t[0])];let i=0;for(;i<e.length;)n.push(s),l(n,e[i]),n.push(s,h(t[++i]));return function(t){let e=1;for(;e<t.length-1;){if(t[e]===s){const n=c(t[e-1],t[e+1]);if(void 0!==n){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}(n),new o(n)}function l(t,e){var n;e instanceof o?t.push(...e._items):e instanceof i?t.push(e):t.push("number"==typeof(n=e)||"boolean"==typeof n||null===n?n:h(Array.isArray(n)?n.join(","):n))}function c(t,e){if('""'===e)return t;if('""'===t)return e;if("string"==typeof t){if(e instanceof i||'"'!==t[t.length-1])return;return"string"!=typeof e?`${t.slice(0,-1)}${e}"`:'"'===e[0]?t.slice(0,-1)+e.slice(1):void 0}return"string"!=typeof e||'"'!==e[0]||t instanceof i?void 0:`"${t}${e.slice(1)}`}function h(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=a,e.addCodeArg=l,e.strConcat=function(t,e){return e.emptyStr()?t:t.emptyStr()?e:a`${t}${e}`},e.stringify=function(t){return new o(h(t))},e.safeStringify=h,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new o(`.${t}`):r`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new o(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(t){return new o(t.toString())}},9029:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const i=n(1520),o=n(7845);var r=n(1520);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var s=n(7845);Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class a{optimizeNodes(){return this}optimizeNames(t,e){return this}}class l extends a{constructor(t,e,n){super(),this.varKind=t,this.name=e,this.rhs=n}render({es5:t,_n:e}){const n=t?o.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+e}optimizeNames(t,e){if(t[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,t,e)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(t,e,n){super(),this.lhs=t,this.rhs=e,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,e){if(!(this.lhs instanceof i.Name)||t[this.lhs.str]||this.sideEffects)return this.rhs=N(this.rhs,t,e),this}get names(){return L(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class h extends c{constructor(t,e,n,i){super(t,n,i),this.op=e}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class u extends a{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}}class d extends a{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}}class p extends a{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}}class m extends a{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,e){return this.code=N(this.code,t,e),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class f extends a{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce(((e,n)=>e+n.render(t)),"")}optimizeNodes(){const{nodes:t}=this;let e=t.length;for(;e--;){const n=t[e].optimizeNodes();Array.isArray(n)?t.splice(e,1,...n):n?t[e]=n:t.splice(e,1)}return t.length>0?this:void 0}optimizeNames(t,e){const{nodes:n}=this;let i=n.length;for(;i--;){const o=n[i];o.optimizeNames(t,e)||(P(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((t,e)=>I(t,e.names)),{})}}class g extends f{render(t){return"{"+t._n+super.render(t)+"}"+t._n}}class y extends f{}class b extends g{}b.kind="else";class v extends g{constructor(t,e){super(e),this.condition=t}render(t){let e=`if(${this.condition})`+super.render(t);return this.else&&(e+="else "+this.else.render(t)),e}optimizeNodes(){super.optimizeNodes();const t=this.condition;if(!0===t)return this.nodes;let e=this.else;if(e){const t=e.optimizeNodes();e=this.else=Array.isArray(t)?new b(t):t}return e?!1===t?e instanceof v?e:e.nodes:this.nodes.length?this:new v($(t),e instanceof v?[e]:e.nodes):!1!==t&&this.nodes.length?this:void 0}optimizeNames(t,e){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(t,e),super.optimizeNames(t,e)||this.else)return this.condition=N(this.condition,t,e),this}get names(){const t=super.names;return L(t,this.condition),this.else&&I(t,this.else.names),t}}v.kind="if";class w extends g{}w.kind="for";class C extends w{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iteration=N(this.iteration,t,e),this}get names(){return I(super.names,this.iteration.names)}}class A extends w{constructor(t,e,n,i){super(),this.varKind=t,this.name=e,this.from=n,this.to=i}render(t){const e=t.es5?o.varKinds.var:this.varKind,{name:n,from:i,to:r}=this;return`for(${e} ${n}=${i}; ${n}<${r}; ${n}++)`+super.render(t)}get names(){const t=L(super.names,this.from);return L(t,this.to)}}class S extends w{constructor(t,e,n,i){super(),this.loop=t,this.varKind=e,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,e){if(super.optimizeNames(t,e))return this.iterable=N(this.iterable,t,e),this}get names(){return I(super.names,this.iterable.names)}}class x extends g{constructor(t,e,n){super(),this.name=t,this.args=e,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}x.kind="func";class E extends f{render(t){return"return "+super.render(t)}}E.kind="return";class T extends g{render(t){let e="try"+super.render(t);return this.catch&&(e+=this.catch.render(t)),this.finally&&(e+=this.finally.render(t)),e}optimizeNodes(){var t,e;return super.optimizeNodes(),null===(t=this.catch)||void 0===t||t.optimizeNodes(),null===(e=this.finally)||void 0===e||e.optimizeNodes(),this}optimizeNames(t,e){var n,i;return super.optimizeNames(t,e),null===(n=this.catch)||void 0===n||n.optimizeNames(t,e),null===(i=this.finally)||void 0===i||i.optimizeNames(t,e),this}get names(){const t=super.names;return this.catch&&I(t,this.catch.names),this.finally&&I(t,this.finally.names),t}}class M extends g{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}M.kind="catch";class _ extends g{render(t){return"finally"+super.render(t)}}function I(t,e){for(const n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function L(t,e){return e instanceof i._CodeOrName?I(t,e.names):t}function N(t,e,n){return t instanceof i.Name?r(t):(o=t)instanceof i._Code&&o._items.some((t=>t instanceof i.Name&&1===e[t.str]&&void 0!==n[t.str]))?new i._Code(t._items.reduce(((t,e)=>(e instanceof i.Name&&(e=r(e)),e instanceof i._Code?t.push(...e._items):t.push(e),t)),[])):t;var o;function r(t){const i=n[t.str];return void 0===i||1!==e[t.str]?t:(delete e[t.str],i)}}function P(t,e){for(const n in e)t[n]=(t[n]||0)-(e[n]||0)}function $(t){return"boolean"==typeof t||"number"==typeof t||null===t?!t:i._`!${H(t)}`}_.kind="finally",e.CodeGen=class{constructor(t,e={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...e,_n:e.lines?"\n":""},this._extScope=t,this._scope=new o.Scope({parent:t}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,e){const n=this._extScope.value(t,e);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,e){return this._extScope.getValue(t,e)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,e,n,i){const o=this._scope.toName(e);return void 0!==n&&i&&(this._constants[o.str]=n),this._leafNode(new l(t,o,n)),o}const(t,e,n){return this._def(o.varKinds.const,t,e,n)}let(t,e,n){return this._def(o.varKinds.let,t,e,n)}var(t,e,n){return this._def(o.varKinds.var,t,e,n)}assign(t,e,n){return this._leafNode(new c(t,e,n))}add(t,n){return this._leafNode(new h(t,e.operators.ADD,n))}code(t){return"function"==typeof t?t():t!==i.nil&&this._leafNode(new m(t)),this}object(...t){const e=["{"];for(const[n,o]of t)e.length>1&&e.push(","),e.push(n),(n!==o||this.opts.es5)&&(e.push(":"),(0,i.addCodeArg)(e,o));return e.push("}"),new i._Code(e)}if(t,e,n){if(this._blockNode(new v(t)),e&&n)this.code(e).else().code(n).endIf();else if(e)this.code(e).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new v(t))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(t,e){return this._blockNode(t),e&&this.code(e).endFor(),this}for(t,e){return this._for(new C(t),e)}forRange(t,e,n,i,r=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(t);return this._for(new A(r,s,e,n),(()=>i(s)))}forOf(t,e,n,r=o.varKinds.const){const s=this._scope.toName(t);if(this.opts.es5){const t=e instanceof i.Name?e:this.var("_arr",e);return this.forRange("_i",0,i._`${t}.length`,(e=>{this.var(s,i._`${t}[${e}]`),n(s)}))}return this._for(new S("of",r,s,e),(()=>n(s)))}forIn(t,e,n,r=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(t,i._`Object.keys(${e})`,n);const s=this._scope.toName(t);return this._for(new S("in",r,s,e),(()=>n(s)))}endFor(){return this._endBlockNode(w)}label(t){return this._leafNode(new u(t))}break(t){return this._leafNode(new d(t))}return(t){const e=new E;if(this._blockNode(e),this.code(t),1!==e.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(t,e,n){if(!e&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new T;if(this._blockNode(i),this.code(t),e){const t=this.name("e");this._currNode=i.catch=new M(t),e(t)}return n&&(this._currNode=i.finally=new _,this.code(n)),this._endBlockNode(M,_)}throw(t){return this._leafNode(new p(t))}block(t,e){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(e),this}endBlock(t){const e=this._blockStarts.pop();if(void 0===e)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-e;if(n<0||void 0!==t&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=e,this}func(t,e=i.nil,n,o){return this._blockNode(new x(t,e,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,e){const n=this._currNode;if(n instanceof t||e&&n instanceof e)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${e?`${t.kind}/${e.kind}`:t.kind}"`)}_elseNode(t){const e=this._currNode;if(!(e instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=e.else=t,this}get _root(){return this._nodes[0]}get _currNode(){const t=this._nodes;return t[t.length-1]}set _currNode(t){const e=this._nodes;e[e.length-1]=t}},e.not=$;const R=O(e.operators.AND);e.and=function(...t){return t.reduce(R)};const k=O(e.operators.OR);function O(t){return(e,n)=>e===i.nil?n:n===i.nil?e:i._`${H(e)} ${t} ${H(n)}`}function H(t){return t instanceof i.Name?t:i._`(${t})`}e.or=function(...t){return t.reduce(k)}},7845:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const i=n(1520);class o extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}}var r;!function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"}(r||(e.UsedValueState=r={})),e.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class s{constructor({prefixes:t,parent:e}={}){this._names={},this._prefixes=t,this._parent=e}toName(t){return t instanceof i.Name?t:this.name(t)}name(t){return new i.Name(this._newName(t))}_newName(t){return`${t}${(this._names[t]||this._nameGroup(t)).index++}`}_nameGroup(t){var e,n;if((null===(n=null===(e=this._parent)||void 0===e?void 0:e._prefixes)||void 0===n?void 0:n.has(t))||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}}e.Scope=s;class a extends i.Name{constructor(t,e){super(e),this.prefix=t}setValue(t,{property:e,itemIndex:n}){this.value=t,this.scopePath=i._`.${new i.Name(e)}[${n}]`}}e.ValueScopeName=a;const l=i._`\n`;e.ValueScope=class extends s{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?l:i.nil}}get(){return this._scope}name(t){return new a(t,this._newName(t))}value(t,e){var n;if(void 0===e.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(t),{prefix:o}=i,r=null!==(n=e.key)&&void 0!==n?n:e.ref;let s=this._values[o];if(s){const t=s.get(r);if(t)return t}else s=this._values[o]=new Map;s.set(r,i);const a=this._scope[o]||(this._scope[o]=[]),l=a.length;return a[l]=e.ref,i.setValue(e,{property:o,itemIndex:l}),i}getValue(t,e){const n=this._values[t];if(n)return n.get(e)}scopeRefs(t,e=this._values){return this._reduceValues(e,(e=>{if(void 0===e.scopePath)throw new Error(`CodeGen: name "${e}" has no value`);return i._`${t}${e.scopePath}`}))}scopeCode(t=this._values,e,n){return this._reduceValues(t,(t=>{if(void 0===t.value)throw new Error(`CodeGen: name "${t}" has no value`);return t.value.code}),e,n)}_reduceValues(t,n,s={},a){let l=i.nil;for(const c in t){const h=t[c];if(!h)continue;const u=s[c]=s[c]||new Map;h.forEach((t=>{if(u.has(t))return;u.set(t,r.Started);let s=n(t);if(s){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;l=i._`${l}${n} ${t} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(t)))throw new o(t);l=i._`${l}${s}${this.opts._n}`}u.set(t,r.Completed)}))}return l}}},8708:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const i=n(9029),o=n(4227),r=n(2023);function s(t,e){const n=t.const("err",e);t.if(i._`${r.default.vErrors} === null`,(()=>t.assign(r.default.vErrors,i._`[${n}]`)),i._`${r.default.vErrors}.push(${n})`),t.code(i._`${r.default.errors}++`)}function a(t,e){const{gen:n,validateName:o,schemaEnv:r}=t;r.$async?n.throw(i._`new ${t.ValidationError}(${e})`):(n.assign(i._`${o}.errors`,e),n.return(!1))}e.keywordError={message:({keyword:t})=>i.str`must pass "${t}" keyword validation`},e.keyword$DataError={message:({keyword:t,schemaType:e})=>e?i.str`"${t}" keyword must be ${e} ($data)`:i.str`"${t}" keyword is invalid ($data)`},e.reportError=function(t,n=e.keywordError,o,r){const{it:l}=t,{gen:h,compositeRule:u,allErrors:d}=l,p=c(t,n,o);(null!=r?r:u||d)?s(h,p):a(l,i._`[${p}]`)},e.reportExtraError=function(t,n=e.keywordError,i){const{it:o}=t,{gen:l,compositeRule:h,allErrors:u}=o;s(l,c(t,n,i)),h||u||a(o,r.default.vErrors)},e.resetErrorsCount=function(t,e){t.assign(r.default.errors,e),t.if(i._`${r.default.vErrors} !== null`,(()=>t.if(e,(()=>t.assign(i._`${r.default.vErrors}.length`,e)),(()=>t.assign(r.default.vErrors,null)))))},e.extendErrors=function({gen:t,keyword:e,schemaValue:n,data:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const l=t.name("err");t.forRange("i",s,r.default.errors,(s=>{t.const(l,i._`${r.default.vErrors}[${s}]`),t.if(i._`${l}.instancePath === undefined`,(()=>t.assign(i._`${l}.instancePath`,(0,i.strConcat)(r.default.instancePath,a.errorPath)))),t.assign(i._`${l}.schemaPath`,i.str`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign(i._`${l}.schema`,n),t.assign(i._`${l}.data`,o))}))};const l={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function c(t,e,n){const{createErrors:o}=t.it;return!1===o?i._`{}`:function(t,e,n={}){const{gen:o,it:s}=t,a=[h(s,n),u(t,n)];return function(t,{params:e,message:n},o){const{keyword:s,data:a,schemaValue:c,it:h}=t,{opts:u,propertyName:d,topSchemaRef:p,schemaPath:m}=h;o.push([l.keyword,s],[l.params,"function"==typeof e?e(t):e||i._`{}`]),u.messages&&o.push([l.message,"function"==typeof n?n(t):n]),u.verbose&&o.push([l.schema,c],[l.parentSchema,i._`${p}${m}`],[r.default.data,a]),d&&o.push([l.propertyName,d])}(t,e,a),o.object(...a)}(t,e,n)}function h({errorPath:t},{instancePath:e}){const n=e?i.str`${t}${(0,o.getErrorPath)(e,o.Type.Str)}`:t;return[r.default.instancePath,(0,i.strConcat)(r.default.instancePath,n)]}function u({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let s=r?e:i.str`${e}/${t}`;return n&&(s=i.str`${s}${(0,o.getErrorPath)(n,o.Type.Str)}`),[l.schemaPath,s]}},3835:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;const i=n(9029),o=n(3558),r=n(2023),s=n(6939),a=n(4227),l=n(2586);class c{constructor(t){var e;let n;this.refs={},this.dynamicAnchors={},"object"==typeof t.schema&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=null!==(e=t.baseId)&&void 0!==e?e:(0,s.normalizeId)(null==n?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function h(t){const e=d.call(this,t);if(e)return e;const n=(0,s.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:h}=this.opts,u=new i.CodeGen(this.scope,{es5:a,lines:c,ownProperties:h});let p;t.$async&&(p=u.scopeValue("Error",{ref:o.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const m=u.scopeName("validate");t.validateName=m;const f={gen:u,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,i.stringify)(t.schema)}:{ref:t.schema}),validateName:m,ValidationError:p,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:i.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(t),(0,l.validateFunctionCode)(f),u.optimize(this.opts.code.optimize);const e=u.toString();g=`${u.scopeRefs(r.default.scope)}return ${e}`,this.opts.code.process&&(g=this.opts.code.process(g,t));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:n}),n.errors=null,n.schema=t.schema,n.schemaEnv=t,t.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:m,validateCode:e,scopeValues:u._values}),this.opts.unevaluated){const{props:t,items:e}=f;n.evaluated={props:t instanceof i.Name?void 0:t,items:e instanceof i.Name?void 0:e,dynamicProps:t instanceof i.Name,dynamicItems:e instanceof i.Name},n.source&&(n.source.evaluated=(0,i.stringify)(n.evaluated))}return t.validate=n,t}catch(e){throw delete t.validate,delete t.validateName,g&&this.logger.error("Error compiling schema, function code:",g),e}finally{this._compilations.delete(t)}}function u(t){return(0,s.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:h.call(this,t)}function d(t){for(const i of this._compilations)if(n=t,(e=i).schema===n.schema&&e.root===n.root&&e.baseId===n.baseId)return i;var e,n}function p(t,e){let n;for(;"string"==typeof(n=this.refs[e]);)e=n;return n||this.schemas[e]||m.call(this,t,e)}function m(t,e){const n=this.opts.uriResolver.parse(e),i=(0,s._getFullPath)(this.opts.uriResolver,n);let o=(0,s.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===o)return g.call(this,n,t);const r=(0,s.normalizeId)(i),a=this.refs[r]||this.schemas[r];if("string"==typeof a){const e=m.call(this,t,a);if("object"!=typeof(null==e?void 0:e.schema))return;return g.call(this,n,e)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||h.call(this,a),r===(0,s.normalizeId)(e)){const{schema:e}=a,{schemaId:n}=this.opts,i=e[n];return i&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,i)),new c({schema:e,schemaId:n,root:t,baseId:o})}return g.call(this,n,a)}}e.SchemaEnv=c,e.compileSchema=h,e.resolveRef=function(t,e,n){var i;n=(0,s.resolveUrl)(this.opts.uriResolver,e,n);const o=t.refs[n];if(o)return o;let r=p.call(this,t,n);if(void 0===r){const o=null===(i=t.localRefs)||void 0===i?void 0:i[n],{schemaId:s}=this.opts;o&&(r=new c({schema:o,schemaId:s,root:t,baseId:e}))}return void 0!==r?t.refs[n]=u.call(this,r):void 0},e.getCompilingSchema=d,e.resolveSchema=m;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(t,{baseId:e,schema:n,root:i}){var o;if("/"!==(null===(o=t.fragment)||void 0===o?void 0:o[0]))return;for(const i of t.fragment.slice(1).split("/")){if("boolean"==typeof n)return;const t=n[(0,a.unescapeFragment)(i)];if(void 0===t)return;const o="object"==typeof(n=t)&&n[this.opts.schemaId];!f.has(i)&&o&&(e=(0,s.resolveUrl)(this.opts.uriResolver,e,o))}let r;if("boolean"!=typeof n&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){const t=(0,s.resolveUrl)(this.opts.uriResolver,e,n.$ref);r=m.call(this,i,t)}const{schemaId:l}=this.opts;return r=r||new c({schema:n,schemaId:l,root:i,baseId:e}),r.schema!==r.root.schema?r:void 0}},2023:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(9029),o={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};e.default=o},4551:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(6939);class o extends Error{constructor(t,e,n,o){super(o||`can't resolve reference ${n} from id ${e}`),this.missingRef=(0,i.resolveUrl)(t,e,n),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(t,this.missingRef))}}e.default=o},6939:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const i=n(4227),o=n(2017),r=n(7106),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);e.inlineRef=function(t,e=!0){return"boolean"==typeof t||(!0===e?!l(t):!!e&&c(t)<=e)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(t){for(const e in t){if(a.has(e))return!0;const n=t[e];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(t){let e=0;for(const n in t){if("$ref"===n)return 1/0;if(e++,!s.has(n)&&("object"==typeof t[n]&&(0,i.eachItem)(t[n],(t=>e+=c(t))),e===1/0))return 1/0}return e}function h(t,e="",n){!1!==n&&(e=p(e));const i=t.parse(e);return u(t,i)}function u(t,e){return t.serialize(e).split("#")[0]+"#"}e.getFullPath=h,e._getFullPath=u;const d=/#\/?$/;function p(t){return t?t.replace(d,""):""}e.normalizeId=p,e.resolveUrl=function(t,e,n){return n=p(n),t.resolve(e,n)};const m=/^[a-z_][-a-z0-9._]*$/i;e.getSchemaRefs=function(t,e){if("boolean"==typeof t)return{};const{schemaId:n,uriResolver:i}=this.opts,s=p(t[n]||e),a={"":s},l=h(i,s,!1),c={},u=new Set;return r(t,{allKeys:!0},((t,e,i,o)=>{if(void 0===o)return;const r=l+e;let s=a[o];function h(e){const n=this.opts.uriResolver.resolve;if(e=p(s?n(s,e):e),u.has(e))throw f(e);u.add(e);let i=this.refs[e];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?d(t,i.schema,e):e!==p(r)&&("#"===e[0]?(d(t,c[e],e),c[e]=t):this.refs[e]=r),e}function g(t){if("string"==typeof t){if(!m.test(t))throw new Error(`invalid anchor "${t}"`);h.call(this,`#${t}`)}}"string"==typeof t[n]&&(s=h.call(this,t[n])),g.call(this,t.$anchor),g.call(this,t.$dynamicAnchor),a[e]=s})),c;function d(t,e,n){if(void 0!==e&&!o(t,e))throw f(n)}function f(t){return new Error(`reference "${t}" resolves to more than one schema`)}}},396:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);e.isJSONType=function(t){return"string"==typeof t&&n.has(t)},e.getRules=function(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}},4227:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const i=n(9029),o=n(1520);function r(t,e=t.schema){const{opts:n,self:i}=t;if(!n.strictSchema)return;if("boolean"==typeof e)return;const o=i.RULES.keywords;for(const n in e)o[n]||m(t,`unknown keyword: "${n}"`)}function s(t,e){if("boolean"==typeof t)return!t;for(const n in t)if(e[n])return!0;return!1}function a(t){return"number"==typeof t?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}function l(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:o}){return(r,s,a,l)=>{const c=void 0===a?s:a instanceof i.Name?(s instanceof i.Name?t(r,s,a):e(r,s,a),a):s instanceof i.Name?(e(r,a,s),s):n(s,a);return l!==i.Name||c instanceof i.Name?c:o(r,c)}}function h(t,e){if(!0===e)return t.var("props",!0);const n=t.var("props",i._`{}`);return void 0!==e&&u(t,n,e),n}function u(t,e,n){Object.keys(n).forEach((n=>t.assign(i._`${e}${(0,i.getProperty)(n)}`,!0)))}e.toHash=function(t){const e={};for(const n of t)e[n]=!0;return e},e.alwaysValidSchema=function(t,e){return"boolean"==typeof e?e:0===Object.keys(e).length||(r(t,e),!s(e,t.self.RULES.all))},e.checkUnknownRules=r,e.schemaHasRules=s,e.schemaHasRulesButRef=function(t,e){if("boolean"==typeof t)return!t;for(const n in t)if("$ref"!==n&&e.all[n])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:t,schemaPath:e},n,o,r){if(!r){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return i._`${n}`}return i._`${t}${e}${(0,i.getProperty)(o)}`},e.unescapeFragment=function(t){return l(decodeURIComponent(t))},e.escapeFragment=function(t){return encodeURIComponent(a(t))},e.escapeJsonPointer=a,e.unescapeJsonPointer=l,e.eachItem=function(t,e){if(Array.isArray(t))for(const n of t)e(n);else e(t)},e.mergeEvaluated={props:c({mergeNames:(t,e,n)=>t.if(i._`${n} !== true && ${e} !== undefined`,(()=>{t.if(i._`${e} === true`,(()=>t.assign(n,!0)),(()=>t.assign(n,i._`${n} || {}`).code(i._`Object.assign(${n}, ${e})`)))})),mergeToName:(t,e,n)=>t.if(i._`${n} !== true`,(()=>{!0===e?t.assign(n,!0):(t.assign(n,i._`${n} || {}`),u(t,n,e))})),mergeValues:(t,e)=>!0===t||{...t,...e},resultToName:h}),items:c({mergeNames:(t,e,n)=>t.if(i._`${n} !== true && ${e} !== undefined`,(()=>t.assign(n,i._`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`))),mergeToName:(t,e,n)=>t.if(i._`${n} !== true`,(()=>t.assign(n,!0===e||i._`${n} > ${e} ? ${n} : ${e}`))),mergeValues:(t,e)=>!0===t||Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})},e.evaluatedPropsToName=h,e.setEvaluated=u;const d={};var p;function m(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,!0===n)throw new Error(e);t.self.logger.warn(e)}}e.useFunc=function(t,e){return t.scopeValue("func",{ref:e,code:d[e.code]||(d[e.code]=new o._Code(e.code))})},function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"}(p||(e.Type=p={})),e.getErrorPath=function(t,e,n){if(t instanceof i.Name){const o=e===p.Num;return n?o?i._`"[" + ${t} + "]"`:i._`"['" + ${t} + "']"`:o?i._`"/" + ${t}`:i._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,i.getProperty)(t).toString():"/"+a(t)},e.checkStrictMode=m},7887:(t,e)=>{"use strict";function n(t,e){return e.rules.some((e=>i(t,e)))}function i(t,e){var n;return void 0!==t[e.keyword]||(null===(n=e.definition.implements)||void 0===n?void 0:n.some((e=>void 0!==t[e])))}Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0,e.schemaHasRulesForType=function({schema:t,self:e},i){const o=e.RULES.types[i];return o&&!0!==o&&n(t,o)},e.shouldUseGroup=n,e.shouldUseRule=i},8727:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const i=n(8708),o=n(9029),r=n(2023),s={message:"boolean schema is false"};function a(t,e){const{gen:n,data:o}=t,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,i.reportError)(r,s,void 0,e)}e.topBoolOrEmptySchema=function(t){const{gen:e,schema:n,validateName:i}=t;!1===n?a(t,!1):"object"==typeof n&&!0===n.$async?e.return(r.default.data):(e.assign(o._`${i}.errors`,null),e.return(!0))},e.boolOrEmptySchema=function(t,e){const{gen:n,schema:i}=t;!1===i?(n.var(e,!1),a(t)):n.var(e,!0)}},208:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const i=n(396),o=n(7887),r=n(8708),s=n(9029),a=n(4227);var l;function c(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(i.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}!function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"}(l||(e.DataType=l={})),e.getSchemaTypes=function(t){const e=c(t.type);if(e.includes("null")){if(!1===t.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&void 0!==t.nullable)throw new Error('"nullable" cannot be used without "type"');!0===t.nullable&&e.push("null")}return e},e.getJSONTypes=c,e.coerceAndCheckDataType=function(t,e){const{gen:n,data:i,opts:r}=t,a=function(t,e){return e?t.filter((t=>h.has(t)||"array"===e&&"array"===t)):[]}(e,r.coerceTypes),c=e.length>0&&!(0===a.length&&1===e.length&&(0,o.schemaHasRulesForType)(t,e[0]));if(c){const o=d(e,i,r.strictNumbers,l.Wrong);n.if(o,(()=>{a.length?function(t,e,n){const{gen:i,data:o,opts:r}=t,a=i.let("dataType",s._`typeof ${o}`),l=i.let("coerced",s._`undefined`);"array"===r.coerceTypes&&i.if(s._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>i.assign(o,s._`${o}[0]`).assign(a,s._`typeof ${o}`).if(d(e,o,r.strictNumbers),(()=>i.assign(l,o))))),i.if(s._`${l} !== undefined`);for(const t of n)(h.has(t)||"array"===t&&"array"===r.coerceTypes)&&c(t);function c(t){switch(t){case"string":return void i.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(l,s._`"" + ${o}`).elseIf(s._`${o} === null`).assign(l,s._`""`);case"number":return void i.elseIf(s._`${a} == "boolean" || ${o} === null
|
|
2
2
|
|| (${a} == "string" && ${o} && ${o} == +${o})`).assign(l,s._`+${o}`);case"integer":return void i.elseIf(s._`${a} === "boolean" || ${o} === null
|
|
3
3
|
|| (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,s._`+${o}`);case"boolean":return void i.elseIf(s._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(s._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return i.elseIf(s._`${o} === "" || ${o} === 0 || ${o} === false`),void i.assign(l,null);case"array":i.elseIf(s._`${a} === "string" || ${a} === "number"
|
|
4
4
|
|| ${a} === "boolean" || ${o} === null`).assign(l,s._`[${o}]`)}}i.else(),m(t),i.endIf(),i.if(s._`${l} !== undefined`,(()=>{i.assign(o,l),function({gen:t,parentData:e,parentDataProperty:n},i){t.if(s._`${e} !== undefined`,(()=>t.assign(s._`${e}[${n}]`,i)))}(t,l)}))}(t,e,a):m(t)}))}return c};const h=new Set(["string","number","integer","boolean","null"]);function u(t,e,n,i=l.Correct){const o=i===l.Correct?s.operators.EQ:s.operators.NEQ;let r;switch(t){case"null":return s._`${e} ${o} null`;case"array":r=s._`Array.isArray(${e})`;break;case"object":r=s._`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":r=a(s._`!(${e} % 1) && !isNaN(${e})`);break;case"number":r=a();break;default:return s._`typeof ${e} ${o} ${t}`}return i===l.Correct?r:(0,s.not)(r);function a(t=s.nil){return(0,s.and)(s._`typeof ${e} == "number"`,t,n?s._`isFinite(${e})`:s.nil)}}function d(t,e,n,i){if(1===t.length)return u(t[0],e,n,i);let o;const r=(0,a.toHash)(t);if(r.array&&r.object){const t=s._`typeof ${e} != "object"`;o=r.null?t:s._`!${e} || ${t}`,delete r.null,delete r.array,delete r.object}else o=s.nil;r.number&&delete r.integer;for(const t in r)o=(0,s.and)(o,u(t,e,n,i));return o}e.checkDataType=u,e.checkDataTypes=d;const p={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>"string"==typeof t?s._`{type: ${t}}`:s._`{type: ${e}}`};function m(t){const e=function(t){const{gen:e,data:n,schema:i}=t,o=(0,a.schemaRefOrVal)(t,i,"type");return{gen:e,keyword:"type",data:n,schema:i.type,schemaCode:o,schemaValue:o,parentSchema:i,params:{},it:t}}(t);(0,r.reportError)(e,p)}e.reportTypeError=m},7870:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;const i=n(9029),o=n(4227);function r(t,e,n){const{gen:r,compositeRule:s,data:a,opts:l}=t;if(void 0===n)return;const c=i._`${a}${(0,i.getProperty)(e)}`;if(s)return void(0,o.checkStrictMode)(t,`default is ignored for: ${c}`);let h=i._`${c} === undefined`;"empty"===l.useDefaults&&(h=i._`${h} || ${c} === null || ${c} === ""`),r.if(h,i._`${c} = ${(0,i.stringify)(n)}`)}e.assignDefaults=function(t,e){const{properties:n,items:i}=t.schema;if("object"===e&&n)for(const e in n)r(t,e,n[e].default);else"array"===e&&Array.isArray(i)&&i.forEach(((e,n)=>r(t,n,e.default)))}},2586:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;const i=n(8727),o=n(208),r=n(7887),s=n(208),a=n(7870),l=n(3673),c=n(4495),h=n(9029),u=n(2023),d=n(6939),p=n(4227),m=n(8708);function f({gen:t,validateName:e,schema:n,schemaEnv:i,opts:o},r){o.code.es5?t.func(e,h._`${u.default.data}, ${u.default.valCxt}`,i.$async,(()=>{t.code(h._`"use strict"; ${g(n,o)}`),function(t,e){t.if(u.default.valCxt,(()=>{t.var(u.default.instancePath,h._`${u.default.valCxt}.${u.default.instancePath}`),t.var(u.default.parentData,h._`${u.default.valCxt}.${u.default.parentData}`),t.var(u.default.parentDataProperty,h._`${u.default.valCxt}.${u.default.parentDataProperty}`),t.var(u.default.rootData,h._`${u.default.valCxt}.${u.default.rootData}`),e.dynamicRef&&t.var(u.default.dynamicAnchors,h._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{t.var(u.default.instancePath,h._`""`),t.var(u.default.parentData,h._`undefined`),t.var(u.default.parentDataProperty,h._`undefined`),t.var(u.default.rootData,u.default.data),e.dynamicRef&&t.var(u.default.dynamicAnchors,h._`{}`)}))}(t,o),t.code(r)})):t.func(e,h._`${u.default.data}, ${function(t){return h._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${t.dynamicRef?h._`, ${u.default.dynamicAnchors}={}`:h.nil}}={}`}(o)}`,i.$async,(()=>t.code(g(n,o)).code(r)))}function g(t,e){const n="object"==typeof t&&t[e.schemaId];return n&&(e.code.source||e.code.process)?h._`/*# sourceURL=${n} */`:h.nil}function y({schema:t,self:e}){if("boolean"==typeof t)return!t;for(const n in t)if(e.RULES.all[n])return!0;return!1}function b(t){return"boolean"!=typeof t.schema}function v(t){(0,p.checkUnknownRules)(t),function(t){const{schema:e,errSchemaPath:n,opts:i,self:o}=t;e.$ref&&i.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(t)}function w(t,e){if(t.opts.jtd)return A(t,[],!1,e);const n=(0,o.getSchemaTypes)(t.schema);A(t,n,!(0,o.coerceAndCheckDataType)(t,n),e)}function C({gen:t,schemaEnv:e,schema:n,errSchemaPath:i,opts:o}){const r=n.$comment;if(!0===o.$comment)t.code(h._`${u.default.self}.logger.log(${r})`);else if("function"==typeof o.$comment){const n=h.str`${i}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code(h._`${u.default.self}.opts.$comment(${r}, ${n}, ${o}.schema)`)}}function A(t,e,n,i){const{gen:o,schema:a,data:l,allErrors:c,opts:d,self:m}=t,{RULES:f}=m;function g(p){(0,r.shouldUseGroup)(a,p)&&(p.type?(o.if((0,s.checkDataType)(p.type,l,d.strictNumbers)),S(t,p),1===e.length&&e[0]===p.type&&n&&(o.else(),(0,s.reportTypeError)(t)),o.endIf()):S(t,p),c||o.if(h._`${u.default.errors} === ${i||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(a,f)?(d.jtd||function(t,e){!t.schemaEnv.meta&&t.opts.strictTypes&&(function(t,e){e.length&&(t.dataTypes.length?(e.forEach((e=>{x(t.dataTypes,e)||E(t,`type "${e}" not allowed by context "${t.dataTypes.join(",")}"`)})),function(t,e){const n=[];for(const i of t.dataTypes)x(e,i)?n.push(i):e.includes("integer")&&"number"===i&&n.push("integer");t.dataTypes=n}(t,e)):t.dataTypes=e)}(t,e),t.opts.allowUnionTypes||function(t,e){e.length>1&&(2!==e.length||!e.includes("null"))&&E(t,"use allowUnionTypes to allow union type keyword")}(t,e),function(t,e){const n=t.self.RULES.all;for(const i in n){const o=n[i];if("object"==typeof o&&(0,r.shouldUseRule)(t.schema,o)){const{type:n}=o.definition;n.length&&!n.some((t=>{return i=t,(n=e).includes(i)||"number"===i&&n.includes("integer");var n,i}))&&E(t,`missing type "${n.join(",")}" for keyword "${i}"`)}}}(t,t.dataTypes))}(t,e),o.block((()=>{for(const t of f.rules)g(t);g(f.post)}))):o.block((()=>M(t,"$ref",f.all.$ref.definition)))}function S(t,e){const{gen:n,schema:i,opts:{useDefaults:o}}=t;o&&(0,a.assignDefaults)(t,e.type),n.block((()=>{for(const n of e.rules)(0,r.shouldUseRule)(i,n)&&M(t,n.keyword,n.definition,e.type)}))}function x(t,e){return t.includes(e)||"integer"===e&&t.includes("number")}function E(t,e){e+=` at "${t.schemaEnv.baseId+t.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(t,e,t.opts.strictTypes)}e.validateFunctionCode=function(t){b(t)&&(v(t),y(t))?function(t){const{schema:e,opts:n,gen:i}=t;f(t,(()=>{n.$comment&&e.$comment&&C(t),function(t){const{schema:e,opts:n}=t;void 0!==e.default&&n.useDefaults&&n.strictSchema&&(0,p.checkStrictMode)(t,"default is ignored in the schema root")}(t),i.let(u.default.vErrors,null),i.let(u.default.errors,0),n.unevaluated&&function(t){const{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",h._`${n}.evaluated`),e.if(h._`${t.evaluated}.dynamicProps`,(()=>e.assign(h._`${t.evaluated}.props`,h._`undefined`))),e.if(h._`${t.evaluated}.dynamicItems`,(()=>e.assign(h._`${t.evaluated}.items`,h._`undefined`)))}(t),w(t),function(t){const{gen:e,schemaEnv:n,validateName:i,ValidationError:o,opts:r}=t;n.$async?e.if(h._`${u.default.errors} === 0`,(()=>e.return(u.default.data)),(()=>e.throw(h._`new ${o}(${u.default.vErrors})`))):(e.assign(h._`${i}.errors`,u.default.vErrors),r.unevaluated&&function({gen:t,evaluated:e,props:n,items:i}){n instanceof h.Name&&t.assign(h._`${e}.props`,n),i instanceof h.Name&&t.assign(h._`${e}.items`,i)}(t),e.return(h._`${u.default.errors} === 0`))}(t)}))}(t):f(t,(()=>(0,i.topBoolOrEmptySchema)(t)))};class T{constructor(t,e,n){if((0,l.validateKeywordUsage)(t,e,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=e.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=e.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=e,this.$data)this.schemaCode=t.gen.const("vSchema",L(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,e.schemaType,e.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(e.schemaType)}`);("code"in e?e.trackErrors:!1!==e.errors)&&(this.errsCount=t.gen.const("_errs",u.default.errors))}result(t,e,n){this.failResult((0,h.not)(t),e,n)}failResult(t,e,n){this.gen.if(t),n?n():this.error(),e?(this.gen.else(),e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,e){this.failResult((0,h.not)(t),void 0,e)}fail(t){if(void 0===t)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:e}=this;this.fail(h._`${e} !== undefined && (${(0,h.or)(this.invalid$data(),t)})`)}error(t,e,n){if(e)return this.setParams(e),this._error(t,n),void this.setParams({});this._error(t,n)}_error(t,e){(t?m.reportExtraError:m.reportError)(this,this.def.error,e)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,e){e?Object.assign(this.params,t):this.params=t}block$data(t,e,n=h.nil){this.gen.block((()=>{this.check$data(t,n),e()}))}check$data(t=h.nil,e=h.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:o,def:r}=this;n.if((0,h.or)(h._`${i} === undefined`,e)),t!==h.nil&&n.assign(t,!0),(o.length||r.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==h.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:e,schemaType:n,def:i,it:o}=this;return(0,h.or)(function(){if(n.length){if(!(e instanceof h.Name))throw new Error("ajv implementation error");const t=Array.isArray(n)?n:[n];return h._`${(0,s.checkDataTypes)(t,e,o.opts.strictNumbers,s.DataType.Wrong)}`}return h.nil}(),function(){if(i.validateSchema){const n=t.scopeValue("validate$data",{ref:i.validateSchema});return h._`!${n}(${e})`}return h.nil}())}subschema(t,e){const n=(0,c.getSubschema)(this.it,t);(0,c.extendSubschemaData)(n,this.it,t),(0,c.extendSubschemaMode)(n,t);const o={...this.it,...n,items:void 0,props:void 0};return function(t,e){b(t)&&(v(t),y(t))?function(t,e){const{schema:n,gen:i,opts:o}=t;o.$comment&&n.$comment&&C(t),function(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,d.resolveUrl)(t.opts.uriResolver,t.baseId,e))}(t),function(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}(t);const r=i.const("_errs",u.default.errors);w(t,r),i.var(e,h._`${r} === ${u.default.errors}`)}(t,e):(0,i.boolOrEmptySchema)(t,e)}(o,e),o}mergeEvaluated(t,e){const{it:n,gen:i}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==t.props&&(n.props=p.mergeEvaluated.props(i,t.props,n.props,e)),!0!==n.items&&void 0!==t.items&&(n.items=p.mergeEvaluated.items(i,t.items,n.items,e)))}mergeValidEvaluated(t,e){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return i.if(e,(()=>this.mergeEvaluated(t,h.Name))),!0}}function M(t,e,n,i){const o=new T(t,n,e);"code"in n?n.code(o,i):o.$data&&n.validate?(0,l.funcKeywordCode)(o,n):"macro"in n?(0,l.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,l.funcKeywordCode)(o,n)}e.KeywordCxt=T;const _=/^\/(?:[^~]|~0|~1)*$/,I=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function L(t,{dataLevel:e,dataNames:n,dataPathArr:i}){let o,r;if(""===t)return u.default.rootData;if("/"===t[0]){if(!_.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,r=u.default.rootData}else{const s=I.exec(t);if(!s)throw new Error(`Invalid JSON-pointer: ${t}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=e)throw new Error(l("property/index",a));return i[e-a]}if(a>e)throw new Error(l("data",a));if(r=n[e-a],!o)return r}let s=r;const a=o.split("/");for(const t of a)t&&(r=h._`${r}${(0,h.getProperty)((0,p.unescapeJsonPointer)(t))}`,s=h._`${s} && ${r}`);return s;function l(t,n){return`Cannot access ${t} ${n} levels up, current level is ${e}`}}e.getData=L},3673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;const i=n(9029),o=n(2023),r=n(5765),s=n(8708);function a(t){const{gen:e,data:n,it:o}=t;e.if(o.parentData,(()=>e.assign(n,i._`${o.parentData}[${o.parentDataProperty}]`)))}function l(t,e,n){if(void 0===n)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,i.stringify)(n)})}e.macroKeywordCode=function(t,e){const{gen:n,keyword:o,schema:r,parentSchema:s,it:a}=t,c=e.macro.call(a.self,r,s,a),h=l(n,o,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const u=n.name("valid");t.subschema({schema:c,schemaPath:i.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:h,compositeRule:!0},u),t.pass(u,(()=>t.error(!0)))},e.funcKeywordCode=function(t,e){var n;const{gen:c,keyword:h,schema:u,parentSchema:d,$data:p,it:m}=t;!function({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}(m,e);const f=!p&&e.compile?e.compile.call(m.self,u,d,m):e.validate,g=l(c,h,f),y=c.let("valid");function b(n=(e.async?i._`await `:i.nil)){const s=m.opts.passContext?o.default.this:o.default.self,a=!("compile"in e&&!p||!1===e.schema);c.assign(y,i._`${n}${(0,r.callValidateCode)(t,g,s,a)}`,e.modifying)}function v(t){var n;c.if((0,i.not)(null!==(n=e.valid)&&void 0!==n?n:y),t)}t.block$data(y,(function(){if(!1===e.errors)b(),e.modifying&&a(t),v((()=>t.error()));else{const n=e.async?function(){const t=c.let("ruleErrs",null);return c.try((()=>b(i._`await `)),(e=>c.assign(y,!1).if(i._`${e} instanceof ${m.ValidationError}`,(()=>c.assign(t,i._`${e}.errors`)),(()=>c.throw(e))))),t}():function(){const t=i._`${g}.errors`;return c.assign(t,null),b(i.nil),t}();e.modifying&&a(t),v((()=>function(t,e){const{gen:n}=t;n.if(i._`Array.isArray(${e})`,(()=>{n.assign(o.default.vErrors,i._`${o.default.vErrors} === null ? ${e} : ${o.default.vErrors}.concat(${e})`).assign(o.default.errors,i._`${o.default.vErrors}.length`),(0,s.extendErrors)(t)}),(()=>t.error()))}(t,n)))}})),t.ok(null!==(n=e.valid)&&void 0!==n?n:y)},e.validSchemaType=function(t,e,n=!1){return!e.length||e.some((e=>"array"===e?Array.isArray(t):"object"===e?t&&"object"==typeof t&&!Array.isArray(t):typeof t==e||n&&void 0===t))},e.validateKeywordUsage=function({schema:t,opts:e,self:n,errSchemaPath:i},o,r){if(Array.isArray(o.keyword)?!o.keyword.includes(r):o.keyword!==r)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((e=>!Object.prototype.hasOwnProperty.call(t,e))))throw new Error(`parent schema must have dependencies of ${r}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[r])){const t=`keyword "${r}" value is invalid at path "${i}": `+n.errorsText(o.validateSchema.errors);if("log"!==e.validateSchema)throw new Error(t);n.logger.error(t)}}},4495:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;const i=n(9029),o=n(4227);e.getSubschema=function(t,{keyword:e,schemaProp:n,schema:r,schemaPath:s,errSchemaPath:a,topSchemaRef:l}){if(void 0!==e&&void 0!==r)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==e){const r=t.schema[e];return void 0===n?{schema:r,schemaPath:i._`${t.schemaPath}${(0,i.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:r[n],schemaPath:i._`${t.schemaPath}${(0,i.getProperty)(e)}${(0,i.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,o.escapeFragment)(n)}`}}if(void 0!==r){if(void 0===s||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:s,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},e.extendSubschemaData=function(t,e,{dataProp:n,dataPropType:r,data:s,dataTypes:a,propertyName:l}){if(void 0!==s&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=e;if(void 0!==n){const{errorPath:s,dataPathArr:a,opts:l}=e;h(c.let("data",i._`${e.data}${(0,i.getProperty)(n)}`,!0)),t.errorPath=i.str`${s}${(0,o.getErrorPath)(n,r,l.jsPropertySyntax)}`,t.parentDataProperty=i._`${n}`,t.dataPathArr=[...a,t.parentDataProperty]}function h(n){t.data=n,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,n]}void 0!==s&&(h(s instanceof i.Name?s:c.let("data",s,!0)),void 0!==l&&(t.propertyName=l)),a&&(t.dataTypes=a)},e.extendSubschemaMode=function(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:i,createErrors:o,allErrors:r}){void 0!==i&&(t.compositeRule=i),void 0!==o&&(t.createErrors=o),void 0!==r&&(t.allErrors=r),t.jtdDiscriminator=e,t.jtdMetadata=n}},4042:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var i=n(2586);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var o=n(9029);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const r=n(3558),s=n(4551),a=n(396),l=n(3835),c=n(9029),h=n(6939),u=n(208),d=n(4227),p=n(3837),m=n(5944),f=(t,e)=>new RegExp(t,e);f.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(t){var e,n,i,o,r,s,a,l,c,h,u,d,p,g,y,b,v,w,C,A,S,x,E,T,M;const _=t.strict,I=null===(e=t.code)||void 0===e?void 0:e.optimize,L=!0===I||void 0===I?1:I||0,N=null!==(i=null===(n=t.code)||void 0===n?void 0:n.regExp)&&void 0!==i?i:f,P=null!==(o=t.uriResolver)&&void 0!==o?o:m.default;return{strictSchema:null===(s=null!==(r=t.strictSchema)&&void 0!==r?r:_)||void 0===s||s,strictNumbers:null===(l=null!==(a=t.strictNumbers)&&void 0!==a?a:_)||void 0===l||l,strictTypes:null!==(h=null!==(c=t.strictTypes)&&void 0!==c?c:_)&&void 0!==h?h:"log",strictTuples:null!==(d=null!==(u=t.strictTuples)&&void 0!==u?u:_)&&void 0!==d?d:"log",strictRequired:null!==(g=null!==(p=t.strictRequired)&&void 0!==p?p:_)&&void 0!==g&&g,code:t.code?{...t.code,optimize:L,regExp:N}:{optimize:L,regExp:N},loopRequired:null!==(y=t.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(b=t.loopEnum)&&void 0!==b?b:200,meta:null===(v=t.meta)||void 0===v||v,messages:null===(w=t.messages)||void 0===w||w,inlineRefs:null===(C=t.inlineRefs)||void 0===C||C,schemaId:null!==(A=t.schemaId)&&void 0!==A?A:"$id",addUsedSchema:null===(S=t.addUsedSchema)||void 0===S||S,validateSchema:null===(x=t.validateSchema)||void 0===x||x,validateFormats:null===(E=t.validateFormats)||void 0===E||E,unicodeRegExp:null===(T=t.unicodeRegExp)||void 0===T||T,int32range:null===(M=t.int32range)||void 0===M||M,uriResolver:P}}class C{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...w(t)};const{es5:e,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:e,lines:n}),this.logger=function(t){if(!1===t)return _;if(void 0===t)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}(t.logger);const i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,a.getRules)(),A.call(this,b,t,"NOT SUPPORTED"),A.call(this,v,t,"DEPRECATED","warn"),this._metaOpts=M.call(this),t.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&T.call(this,t.keywords),"object"==typeof t.meta&&this.addMetaSchema(t.meta),x.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:e,schemaId:n}=this.opts;let i=p;"id"===n&&(i={...p},i.id=i.$id,delete i.$id),e&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){const{meta:t,schemaId:e}=this.opts;return this.opts.defaultMeta="object"==typeof t?t[e]||t:void 0}validate(t,e){let n;if("string"==typeof t){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);const i=n(e);return"$async"in n||(this.errors=n.errors),i}compile(t,e){const n=this._addSchema(t,e);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,e){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return i.call(this,t,e);async function i(t,e){await o.call(this,t.$schema);const n=this._addSchema(t,e);return n.validate||r.call(this,n)}async function o(t){t&&!this.getSchema(t)&&await i.call(this,{$ref:t},!0)}async function r(t){try{return this._compileSchemaEnv(t)}catch(e){if(!(e instanceof s.default))throw e;return a.call(this,e),await l.call(this,e.missingSchema),r.call(this,t)}}function a({missingSchema:t,missingRef:e}){if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${e} cannot be resolved`)}async function l(t){const n=await c.call(this,t);this.refs[t]||await o.call(this,n.$schema),this.refs[t]||this.addSchema(n,t,e)}async function c(t){const e=this._loading[t];if(e)return e;try{return await(this._loading[t]=n(t))}finally{delete this._loading[t]}}}addSchema(t,e,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(const e of t)this.addSchema(e,void 0,n,i);return this}let o;if("object"==typeof t){const{schemaId:e}=this.opts;if(o=t[e],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${e} must be string`)}return e=(0,h.normalizeId)(e||o),this._checkUnique(e),this.schemas[e]=this._addSchema(t,n,e,i,!0),this}addMetaSchema(t,e,n=this.opts.validateSchema){return this.addSchema(t,e,!0,n),this}validateSchema(t,e){if("boolean"==typeof t)return!0;let n;if(n=t.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(n,t);if(!i&&e){const t="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(t);this.logger.error(t)}return i}getSchema(t){let e;for(;"string"==typeof(e=S.call(this,t));)t=e;if(void 0===e){const{schemaId:n}=this.opts,i=new l.SchemaEnv({schema:{},schemaId:n});if(e=l.resolveSchema.call(this,i,t),!e)return;this.refs[t]=e}return e.validate||this._compileSchemaEnv(e)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const e=S.call(this,t);return"object"==typeof e&&this._cache.delete(e.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{const e=t;this._cache.delete(e);let n=t[this.opts.schemaId];return n&&(n=(0,h.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const e of t)this.addKeyword(e);return this}addKeyword(t,e){let n;if("string"==typeof t)n=t,"object"==typeof e&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),e.keyword=n);else{if("object"!=typeof t||void 0!==e)throw new Error("invalid addKeywords parameters");if(n=(e=t).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(L.call(this,n,e),!e)return(0,d.eachItem)(n,(t=>N.call(this,t))),this;$.call(this,e);const i={...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)};return(0,d.eachItem)(n,0===i.type.length?t=>N.call(this,t,i):t=>i.type.forEach((e=>N.call(this,t,i,e)))),this}getKeyword(t){const e=this.RULES.all[t];return"object"==typeof e?e.definition:!!e}removeKeyword(t){const{RULES:e}=this;delete e.keywords[t],delete e.all[t];for(const n of e.rules){const e=n.rules.findIndex((e=>e.keyword===t));e>=0&&n.rules.splice(e,1)}return this}addFormat(t,e){return"string"==typeof e&&(e=new RegExp(e)),this.formats[t]=e,this}errorsText(t=this.errors,{separator:e=", ",dataVar:n="data"}={}){return t&&0!==t.length?t.map((t=>`${n}${t.instancePath} ${t.message}`)).reduce(((t,n)=>t+e+n)):"No errors"}$dataMetaSchema(t,e){const n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const i of e){const e=i.split("/").slice(1);let o=t;for(const t of e)o=o[t];for(const t in n){const e=n[t];if("object"!=typeof e)continue;const{$data:i}=e.definition,r=o[t];i&&r&&(o[t]=k(r))}}return t}_removeAllSchemas(t,e){for(const n in t){const i=t[n];e&&!e.test(n)||("string"==typeof i?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,e,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let r;const{schemaId:s}=this.opts;if("object"==typeof t)r=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof t)throw new Error("schema must be object or boolean")}let a=this._cache.get(t);if(void 0!==a)return a;n=(0,h.normalizeId)(r||n);const c=h.getSchemaRefs.call(this,t,n);return a=new l.SchemaEnv({schema:t,schemaId:s,meta:e,baseId:n,localRefs:c}),this._cache.set(a.schema,a),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=a),i&&this.validateSchema(t,!0),a}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):l.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const e=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,t)}finally{this.opts=e}}}function A(t,e,n,i="error"){for(const o in t){const r=o;r in e&&this.logger[i](`${n}: option ${o}. ${t[r]}`)}}function S(t){return t=(0,h.normalizeId)(t),this.schemas[t]||this.refs[t]}function x(){const t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(const e in t)this.addSchema(t[e],e)}function E(){for(const t in this.opts.formats){const e=this.opts.formats[t];e&&this.addFormat(t,e)}}function T(t){if(Array.isArray(t))this.addVocabulary(t);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const e in t){const n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}}function M(){const t={...this.opts};for(const e of g)delete t[e];return t}C.ValidationError=r.default,C.MissingRefError=s.default,e.default=C;const _={log(){},warn(){},error(){}},I=/^[a-z_$][a-z0-9_$:-]*$/i;function L(t,e){const{RULES:n}=this;if((0,d.eachItem)(t,(t=>{if(n.keywords[t])throw new Error(`Keyword ${t} is already defined`);if(!I.test(t))throw new Error(`Keyword ${t} has invalid name`)})),e&&e.$data&&!("code"in e)&&!("validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function N(t,e,n){var i;const o=null==e?void 0:e.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:r}=this;let s=o?r.post:r.rules.find((({type:t})=>t===n));if(s||(s={type:n,rules:[]},r.rules.push(s)),r.keywords[t]=!0,!e)return;const a={keyword:t,definition:{...e,type:(0,u.getJSONTypes)(e.type),schemaType:(0,u.getJSONTypes)(e.schemaType)}};e.before?P.call(this,s,a,e.before):s.rules.push(a),r.all[t]=a,null===(i=e.implements)||void 0===i||i.forEach((t=>this.addKeyword(t)))}function P(t,e,n){const i=t.rules.findIndex((t=>t.keyword===n));i>=0?t.rules.splice(i,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function $(t){let{metaSchema:e}=t;void 0!==e&&(t.$data&&this.opts.$data&&(e=k(e)),t.validateSchema=this.compile(e,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function k(t){return{anyOf:[t,R]}}},9572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(1678),o=n(7216),r=n(9547),s=n(8226),a=n(518),l=n(4588),c=n(5707),h=n(7082),u=["/properties"];e.default=function(t){return[i,o,r,s,a,e(this,l),c,e(this,h)].forEach((t=>this.addMetaSchema(t,void 0,!1))),this;function e(e,n){return t?e.$dataMetaSchema(n,u):n}}},6250:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(2017);i.code='require("ajv/dist/runtime/equal").default',e.default=i},3853:(t,e)=>{"use strict";function n(t){const e=t.length;let n,i=0,o=0;for(;o<e;)i++,n=t.charCodeAt(o++),n>=55296&&n<=56319&&o<e&&(n=t.charCodeAt(o),56320==(64512&n)&&o++);return i}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n,n.code='require("ajv/dist/runtime/ucs2length").default'},5944:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(8343);i.code='require("ajv/dist/runtime/uri").default',e.default=i},3558:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});class n extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}e.default=n},5457:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;const i=n(9029),o=n(4227),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>i.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>i._`{limit: ${t}}`},code(t){const{parentSchema:e,it:n}=t,{items:i}=e;Array.isArray(i)?s(t,i):(0,o.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(t,e){const{gen:n,schema:r,data:s,keyword:a,it:l}=t;l.items=!0;const c=n.const("len",i._`${s}.length`);if(!1===r)t.setParams({len:e.length}),t.pass(i._`${c} <= ${e.length}`);else if("object"==typeof r&&!(0,o.alwaysValidSchema)(l,r)){const r=n.var("valid",i._`${c} <= ${e.length}`);n.if((0,i.not)(r),(()=>function(r){n.forRange("i",e.length,c,(e=>{t.subschema({keyword:a,dataProp:e,dataPropType:o.Type.Num},r),l.allErrors||n.if((0,i.not)(r),(()=>n.break()))}))}(r))),t.ok(r)}}e.validateAdditionalItems=s,e.default=r},8660:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(5765),o=n(9029),r=n(2023),s=n(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>o._`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:n,parentSchema:a,data:l,errsCount:c,it:h}=t;if(!c)throw new Error("ajv implementation error");const{allErrors:u,opts:d}=h;if(h.props=!0,"all"!==d.removeAdditional&&(0,s.alwaysValidSchema)(h,n))return;const p=(0,i.allSchemaProperties)(a.properties),m=(0,i.allSchemaProperties)(a.patternProperties);function f(t){e.code(o._`delete ${l}[${t}]`)}function g(i){if("all"===d.removeAdditional||d.removeAdditional&&!1===n)f(i);else{if(!1===n)return t.setParams({additionalProperty:i}),t.error(),void(u||e.break());if("object"==typeof n&&!(0,s.alwaysValidSchema)(h,n)){const n=e.name("valid");"failing"===d.removeAdditional?(y(i,n,!1),e.if((0,o.not)(n),(()=>{t.reset(),f(i)}))):(y(i,n),u||e.if((0,o.not)(n),(()=>e.break())))}}}function y(e,n,i){const o={keyword:"additionalProperties",dataProp:e,dataPropType:s.Type.Str};!1===i&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(o,n)}e.forIn("key",l,(n=>{p.length||m.length?e.if(function(n){let r;if(p.length>8){const t=(0,s.schemaRefOrVal)(h,a.properties,"properties");r=(0,i.isOwnProperty)(e,t,n)}else r=p.length?(0,o.or)(...p.map((t=>o._`${n} === ${t}`))):o.nil;return m.length&&(r=(0,o.or)(r,...m.map((e=>o._`${(0,i.usePattern)(t,e)}.test(${n})`)))),(0,o.not)(r)}(n),(()=>g(n))):g(n)})),t.ok(o._`${c} === ${r.default.errors}`)}};e.default=a},5844:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(4227),o={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const r=e.name("valid");n.forEach(((e,n)=>{if((0,i.alwaysValidSchema)(o,e))return;const s=t.subschema({keyword:"allOf",schemaProp:n},r);t.ok(r),t.mergeEvaluated(s)}))}};e.default=o},6505:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(5765).validateUnion,error:{message:"must match a schema in anyOf"}};e.default=i},2661:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(9029),o=n(4227),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>void 0===e?i.str`must contain at least ${t} valid item(s)`:i.str`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>void 0===e?i._`{minContains: ${t}}`:i._`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:n,parentSchema:r,data:s,it:a}=t;let l,c;const{minContains:h,maxContains:u}=r;a.opts.next?(l=void 0===h?1:h,c=u):l=1;const d=e.const("len",i._`${s}.length`);if(t.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,o.alwaysValidSchema)(a,n)){let e=i._`${d} >= ${l}`;return void 0!==c&&(e=i._`${e} && ${d} <= ${c}`),void t.pass(e)}a.items=!0;const p=e.name("valid");function m(){const t=e.name("_valid"),n=e.let("count",0);f(t,(()=>e.if(t,(()=>function(t){e.code(i._`${t}++`),void 0===c?e.if(i._`${t} >= ${l}`,(()=>e.assign(p,!0).break())):(e.if(i._`${t} > ${c}`,(()=>e.assign(p,!1).break())),1===l?e.assign(p,!0):e.if(i._`${t} >= ${l}`,(()=>e.assign(p,!0))))}(n)))))}function f(n,i){e.forRange("i",0,d,(e=>{t.subschema({keyword:"contains",dataProp:e,dataPropType:o.Type.Num,compositeRule:!0},n),i()}))}void 0===c&&1===l?f(p,(()=>e.if(p,(()=>e.break())))):0===l?(e.let(p,!0),void 0!==c&&e.if(i._`${s}.length > 0`,m)):(e.let(p,!1),m()),t.result(p,(()=>t.reset()))}};e.default=r},3025:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const i=n(9029),o=n(4227),r=n(5765);e.error={message:({params:{property:t,depsCount:e,deps:n}})=>{const o=1===e?"property":"properties";return i.str`must have ${o} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:o}})=>i._`{property: ${t},
|