var chem;(()=>{"use strict";var e,r,t={8623:(e,r,t)=>{var o=t(6590);function n(e){return"smiles"===e}onmessage=({data:{op:e,data:r,argList:t,notationType:a}})=>{switch(e){case"chem_properties":postMessage(function(e,r,t){const a={},l=[];for(const t of r)a[t]=new Array(e.length).fill(null);return e.forEach(((e,c)=>{try{const l=n(t)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e);r.forEach((e=>{a[e][c]=s[e].valueFunc(l)}))}catch(e){l.push(e instanceof Error?e.message:e)}})),{res:a,errors:l}}(r,t,a));break;case"drug_likeness":postMessage(function(e,r){const t="Drug likeness score",s={[t]:new Array(e.length).fill(0)},a=[],l=new o.DruglikenessPredictor;return e.forEach(((e,c)=>{try{const a=n(r)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e),u=l.assessDruglikeness(a);s[t][c]=u}catch(e){a.push(e instanceof Error?e.message:e)}})),{res:s,errors:a}}(r,a));default:postMessage(function(e,r,t){const s={},a=[];for(const t of r)s[t]=new Array(e.length).fill(0);const l=new o.ToxicityPredictor;return e.forEach(((e,c)=>{try{const a=n(t)?o.Molecule.fromSmiles(e):o.Molecule.fromMolfile(e);r.forEach((e=>{s[e][c]=l.assessRisk(a,e)}))}catch(e){a.push(e instanceof Error?e.message:e)}})),{res:s,errors:a}}(r,t,a))}};const s={MW:{name:"MW",type:"float",valueFunc:e=>e.getMolecularFormula().absoluteWeight},HBA:{name:"HBA",type:"int",valueFunc:e=>new o.MoleculeProperties(e).acceptorCount},HBD:{name:"HBD",type:"int",valueFunc:e=>new o.MoleculeProperties(e).donorCount},LogP:{name:"LogP",type:"float",valueFunc:e=>new o.MoleculeProperties(e).logP},LogS:{name:"LogS",type:"float",valueFunc:e=>new o.MoleculeProperties(e).logS},PSA:{name:"PSA",type:"float",valueFunc:e=>new o.MoleculeProperties(e).polarSurfaceArea},"Rotatable bonds":{name:"Rotatable bonds",type:"int",valueFunc:e=>new o.MoleculeProperties(e).rotatableBondCount},"Stereo centers":{name:"Stereo centers",type:"int",valueFunc:e=>new o.MoleculeProperties(e).stereoCenterCount},"Molecule charge":{name:"Molecule charge",type:"int",valueFunc:e=>function(e){const r=e.getAllAtoms();let t=0;for(let o=0;o<=r;++o)t+=e.getAtomCharge(o);return t}(e)}}}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var s=o[e]={exports:{}};return t[e].call(s.exports,s,s.exports,n),s.exports}n.m=t,n.x=()=>{var e=n.O(void 0,[590],(()=>n(8623)));return n.O(e)},e=[],n.O=(r,t,o,s)=>{if(!t){var a=1/0;for(i=0;i<e.length;i++){for(var[t,o,s]=e[i],l=!0,c=0;c<t.length;c++)(!1&s||a>=s)&&Object.keys(n.O).every((e=>n.O[e](t[c])))?t.splice(c--,1):(l=!1,s<a&&(a=s));if(l){e.splice(i--,1);var u=o();void 0!==u&&(r=u)}}return r}s=s||0;for(var i=e.length;i>0&&e[i-1][2]>s;i--)e[i]=e[i-1];e[i]=[t,o,s]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var r=n.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={623:1};n.f.i=(r,t)=>{e[r]||importScripts(n.p+n.u(r))};var r=self.webpackChunkchem=self.webpackChunkchem||[],t=r.push.bind(r);r.push=r=>{var[o,s,a]=r;for(var l in s)n.o(s,l)&&(n.m[l]=s[l]);for(a&&a(n);o.length;)e[o.pop()]=1;t(r)}})(),r=n.x,n.x=()=>n.e(590).then(r);var s=n.x();chem=s})();
//# sourceMappingURL=623.js.map