@zakodium/nmrium-core 0.4.7 → 0.4.8
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/nmrium-core.d.ts +21 -17
- package/dist/nmrium-core.js +5 -5
- package/package.json +4 -4
package/dist/nmrium-core.d.ts
CHANGED
|
@@ -140,9 +140,7 @@ export declare interface BaseNucleusPreferences<T> {
|
|
|
140
140
|
|
|
141
141
|
declare interface BaseSpectrum {
|
|
142
142
|
id: string;
|
|
143
|
-
|
|
144
|
-
sourceSelector?: NmrLoaderSelectors;
|
|
145
|
-
fileCollectionId?: string;
|
|
143
|
+
selector?: NmrLoaderSelectors;
|
|
146
144
|
meta: Metadata;
|
|
147
145
|
customInfo: any;
|
|
148
146
|
}
|
|
@@ -214,7 +212,7 @@ declare interface ContourOptions_2 {
|
|
|
214
212
|
|
|
215
213
|
export declare type ContoursLevels = Record<string, Level>;
|
|
216
214
|
|
|
217
|
-
export declare const CURRENT_EXPORT_VERSION =
|
|
215
|
+
export declare const CURRENT_EXPORT_VERSION = 12;
|
|
218
216
|
|
|
219
217
|
export declare type CustomWorkspaces = Record<string, InnerWorkspace>;
|
|
220
218
|
|
|
@@ -499,14 +497,14 @@ export declare interface MultipleSpectraAnalysisPreferences {
|
|
|
499
497
|
|
|
500
498
|
export declare class NMRiumCore {
|
|
501
499
|
#private;
|
|
502
|
-
readonly version =
|
|
500
|
+
readonly version = 12;
|
|
503
501
|
registerPlugin(plugin: NMRiumPlugin): void;
|
|
504
502
|
registerPlugins(plugins: NMRiumPlugin[]): void;
|
|
505
503
|
private migrate;
|
|
506
504
|
read(input: FileCollection | FileItem, options?: Partial<ParsingOptions>): ReturnType<typeof read>;
|
|
507
505
|
readNMRiumArchive(input: ZipFileContent, options?: Partial<ParsingOptions>): ReturnType<typeof readNMRiumArchive>;
|
|
508
506
|
readNMRiumObject(nmriumObjectInput: object, options?: ParsingOptions): ReturnType<typeof readNMRiumObject>;
|
|
509
|
-
readFromWebSource(source: Source, options?: ParsingOptions): Promise<[state: Partial<NmriumState>, fileCollection: FileCollection]>;
|
|
507
|
+
readFromWebSource(source: Source, options?: ParsingOptions): Promise<[state: Partial<NmriumState>, fileCollection: FileCollection, selectorRoot: string]>;
|
|
510
508
|
/**
|
|
511
509
|
* Serialize a state to nmrium object.
|
|
512
510
|
* It can be serialized to json then,
|
|
@@ -720,7 +718,7 @@ export declare interface NMRiumPluginOnReadProcess {
|
|
|
720
718
|
* Usefully to parse files like nmredata, jcamp, bruker, etc.
|
|
721
719
|
*
|
|
722
720
|
* Plugins implementing this hook must return a nmrium data object.
|
|
723
|
-
* Spectra contained must include a
|
|
721
|
+
* Spectra contained must include a selector with subset files used to extract the spectra.
|
|
724
722
|
*
|
|
725
723
|
* @param files
|
|
726
724
|
* @param options
|
|
@@ -737,9 +735,9 @@ export declare interface NMRiumPluginOnReadProcess {
|
|
|
737
735
|
* use `supportedExtensions` to filter files to be processed by the plugin.
|
|
738
736
|
*
|
|
739
737
|
* Plugins implementing this hook must return a nmrium data object.
|
|
740
|
-
* Each spectrum contained must include a
|
|
738
|
+
* Each spectrum contained must include a selector with the file used to extract spectra.
|
|
741
739
|
* If the file contains multiple spectra,
|
|
742
|
-
*
|
|
740
|
+
* selector must have extra metadata to link to this specific spectrum.
|
|
743
741
|
*
|
|
744
742
|
* @param file
|
|
745
743
|
* @param options
|
|
@@ -812,8 +810,13 @@ export declare interface NMRiumToolBarPreferences {
|
|
|
812
810
|
|
|
813
811
|
/**
|
|
814
812
|
* Plugins should use Declaration Merging on this interface
|
|
813
|
+
* `NmrLoaderSelectors` is a selector used by nmrium loaders to filter the data to load
|
|
815
814
|
*/
|
|
816
815
|
export declare interface NmrLoaderSelectors {
|
|
816
|
+
/**
|
|
817
|
+
* Read methods take a file-collection input, the root is used to call `fileCollection.subroot(selector.root)`.
|
|
818
|
+
*/
|
|
819
|
+
root?: string;
|
|
817
820
|
general?: GeneralLoadersSelector;
|
|
818
821
|
files?: string[];
|
|
819
822
|
}
|
|
@@ -859,10 +862,11 @@ export declare interface PanelsPreferences {
|
|
|
859
862
|
export declare interface ParsingOptions {
|
|
860
863
|
name?: string;
|
|
861
864
|
converter?: Partial<ParsingOptionsConverter>;
|
|
862
|
-
|
|
865
|
+
selector?: Partial<NmrLoaderSelectors>;
|
|
863
866
|
onLoadProcessing?: OnLoadProcessing;
|
|
864
867
|
experimentalFeatures?: boolean;
|
|
865
868
|
logger?: Logger;
|
|
869
|
+
selectorRoot?: string;
|
|
866
870
|
}
|
|
867
871
|
|
|
868
872
|
/**
|
|
@@ -1061,7 +1065,7 @@ export declare interface RangesViewState {
|
|
|
1061
1065
|
|
|
1062
1066
|
declare function read(_options: ReadOptions): Promise<ReadReturn>;
|
|
1063
1067
|
|
|
1064
|
-
declare function readNMRiumArchive(_options: ReadNMRiumArchiveOptions): Promise<readonly [NmriumState,
|
|
1068
|
+
declare function readNMRiumArchive(_options: ReadNMRiumArchiveOptions): Promise<readonly [NmriumState, FileCollection]>;
|
|
1065
1069
|
|
|
1066
1070
|
declare interface ReadNMRiumArchiveOptions {
|
|
1067
1071
|
input: ZipFileContent;
|
|
@@ -1085,9 +1089,10 @@ declare type ReadNMRiumObjectReturn = [
|
|
|
1085
1089
|
*/
|
|
1086
1090
|
state: Partial<NmriumState>,
|
|
1087
1091
|
/**
|
|
1088
|
-
* A
|
|
1092
|
+
* A file collection where each subfolder is
|
|
1093
|
+
* an uuid of a file collection from sources.
|
|
1089
1094
|
*/
|
|
1090
|
-
|
|
1095
|
+
aggregator: FileCollection
|
|
1091
1096
|
];
|
|
1092
1097
|
|
|
1093
1098
|
declare interface ReadOptions {
|
|
@@ -1101,6 +1106,7 @@ declare interface ReadReturn {
|
|
|
1101
1106
|
nmriumState: Partial<NmriumState>;
|
|
1102
1107
|
containsNmrium: boolean;
|
|
1103
1108
|
fileCollection: FileCollection;
|
|
1109
|
+
selectorRoot: string;
|
|
1104
1110
|
}
|
|
1105
1111
|
|
|
1106
1112
|
export declare type SerializedNmriumState = Omit<Partial<NmriumState>, 'data'> & {
|
|
@@ -1127,7 +1133,7 @@ export declare interface SerializeNmriumArchiveOptions {
|
|
|
1127
1133
|
* Key can be orphan (no related source).
|
|
1128
1134
|
* It generally means that data was imported from a local file.
|
|
1129
1135
|
* */
|
|
1130
|
-
|
|
1136
|
+
aggregator: FileCollection;
|
|
1131
1137
|
/**
|
|
1132
1138
|
* If true, it will include all the data in to the archive even if they are referenced sources as external files.
|
|
1133
1139
|
* If false, it will include only the data not referenced by sources as external files (index.json sources).
|
|
@@ -1243,9 +1249,7 @@ export declare interface StateMolecule {
|
|
|
1243
1249
|
id?: string;
|
|
1244
1250
|
molfile: string;
|
|
1245
1251
|
label?: string;
|
|
1246
|
-
|
|
1247
|
-
sourceSelector?: NmrLoaderSelectors;
|
|
1248
|
-
fileCollectionId?: string;
|
|
1252
|
+
selector?: NmrLoaderSelectors;
|
|
1249
1253
|
}
|
|
1250
1254
|
|
|
1251
1255
|
declare interface StructuresPreferences {
|
package/dist/nmrium-core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var Re={NORMAL:"NORMAL",FORMULA:"FORMULA"};var Ie={RELATIVE:"relative",ABSOLUTE:"absolute",MIN:"min",MAX:"max"};var Ce=[{name:"pixels",unit:"px"},{name:"inches",unit:"in"},{name:"feet",unit:"ft"},{name:"yards",unit:"yd"},{name:"centimeters",unit:"cm"},{name:"millimeters",unit:"mm"},{name:"meters",unit:"m"},{name:"points",unit:"pt"},{name:"picas",unit:"pc"}];var P=11;var Oe=[{key:"CT",description:"CT from NMR Solutions"}];import{isAnyArray as ve}from"is-any-array";import{xMultiply as j}from"ml-spectra-processing";var Me=crypto.randomUUID.bind(crypto),N=Me;function h(e){let{id:t=N(),meta:o,peaks:r={},filters:i=[],info:n={},ranges:a={},integrals:s={},selector:c,sourceId:l,dependentVariables:p=[],...m}=e,u={id:t,meta:o,filters:i},{data:d=De(p[0].components)}=e;if(Array.isArray(n.nucleus)&&(n.nucleus=n.nucleus[0]),u.data={x:[],re:[],im:[],...d},"scaleFactor"in n){let{scaleFactor:g}=n,{re:S,im:y}=u.data;j(S,g,{output:S}),y&&j(y,g,{output:y})}c&&(u.selector=c),l&&(u.sourceId=l,u.fileCollectionId=l);let f=ve(d.im);if(u.info={phc0:0,phc1:0,nucleus:"1H",isFid:!1,isComplex:f,dimension:1,name:n?.name||t,...n},n.isFid&&n.reverse&&f){let{im:g}=u.data;j(g,-1,{output:g}),u.info.reverse=!1}return u.display={isVisible:!0,isPeaksMarkersVisible:!0,isRealSpectrumVisible:!0,isVisibleInDomain:!0,...e.display},u.peaks={values:[],options:{},...r},u.ranges={values:[],options:{sum:null,isSumConstant:!0,sumAuto:!0},...a},u.integrals={values:[],options:{},...s},{...m,...u}}function De(e){let t=e[0]?.data?.x||[],o=e[0]?.data?.re||e[0]?.data?.y||[],r=e[0]?.data?.im||e[1]?.data?.y||null;return t.length>0&&t[0]>t[1]&&(t.reverse(),o.reverse(),r&&r.reverse()),{x:t,re:o,im:r}}import{matrixToArray as Fe,xMinMaxValues as Ae,xNoiseSanPlot as we}from"ml-spectra-processing";var V={z:[[]],minX:0,minY:0,maxX:0,maxY:0},Ee={re:V,im:V},Te={rr:V};function C(e){let{id:t=N(),meta:o={},dependentVariables:r=[],info:i={},filters:n=[],zones:a=[],sourceId:s,...c}=e,l={id:t,meta:o,filters:n};s&&(l.sourceId=s,l.fileCollectionId=s),l.info={nucleus:["1H","1H"],isFid:!1,isComplex:!1,name:i?.name||N(),...i},l.originalInfo=structuredClone(l.info),l.display={isPositiveVisible:!0,isNegativeVisible:!0,isVisible:!0,dimension:2,...e.display,...e.display};let{data:p=r[0].components}=e;if(l.data={...l.info.isFid?Ee:Te,...p},l.originalData=structuredClone(l.data),!("spectrumSize"in i)){let m=i.isFid?"re":"rr",u=l.data[m].z.length,d=u>0?l.data[m].z[0].length:0;l.info.spectrumSize=[d,u]}if(!i.isFid){let m=l.data.rr,u=Fe(m.z),{positive:d,negative:f}=we(u),{min:g,max:S}=Ae(u);l.data.rr={...m,minZ:g,maxZ:S},l.info.noise={positive:d,negative:f}}return l.zones={values:[],options:{},...a},{...c,...l}}import{xSequentialFillFromTo as ke}from"ml-spectra-processing";import{isAnyArray as ze}from"is-any-array";function _(e,t=0){if(ze(e)){let o=e.at(t);if(o!==void 0)return o;throw new RangeError("An array with a index out of boundaries")}return e}var Le=new Set(["t1ir","T1"]);function ie(e){let t=[];for(let o of e){let{info:{pulseSequence:r,isFid:i}}=o,{data:n,info:a,meta:{vdlistValues:s=[]}}=o;if(!(r&&Le.has(r))||s.length===0){t.push(o);continue}let l=i?"re":"rr",p={};for(let y in a)p[y]=_(a[y]);let{z:m,maxX:u,minX:d}=n[l],f=ke({from:d,to:u,size:m[0].length}),[g,S]=je(o);for(let y=0;y<s.length;y++){let re={re:f,x:f};for(let oe in n)re[Ue(oe)]=n[oe].z.at(g*(y+S));t.push(h({data:re,info:{...p,name:`${p.name}_${s[y]}`,dimension:1,vd:s[y]}}))}}return t}function Ue(e){return["rr","re"].includes(e)?"re":["im","ri","ir","ii"].includes(e)?"im":"x"}function je(e){let{meta:{PAGE:t}}=e,o=!0;if(t){let r=i=>Number.parseFloat(i.replace(/[F|T]1=/,""));o=r(t[0])>r(t[2])}return o?[-1,1]:[1,0]}var Ve=2,_e=1;function Be(e){let{spectra:t=[],molecules:o}=e,r=[];for(let i of t){let{info:n}=i;switch(n.dimension){case _e:r.push(h(i));break;case Ve:r.push(C(i));break;default:throw new Error("dimension does not supported")}}return{molecules:o,spectra:ie(r)}}function Ke(e){return e}function x(e,t){return JSON.parse(JSON.stringify(e),function(r,i){if(r in t){this[t[r]]=i;return}return i})}function B(e){if(e?.version===1)return e;let t={...e,version:1},o={j:"js",signal:"signals",integral:"integration",peak:"peaks",diaID:"diaIDs"};for(let r of t.spectra){if(r.ranges){let i=x(r.ranges,o);r.ranges=Array.isArray(i)?{values:i}:i}else if(r.zones){let i=x(r.zones,o);r.zones=Array.isArray(i)?{values:i}:i}r.peaks&&(r.peaks=Array.isArray(r.peaks)?{values:r.peaks}:r.peaks),r.integrals&&(r.integrals=Array.isArray(r.integrals)?{values:r.integrals}:r.integrals)}return t}function K(e){if(e?.version===2)return e;let t={...e,version:2},o={peaks:{delta:"x",originDelta:"originalX",intensity:"y"},ranges:{atomIDs:"atoms",intensity:"y"}};for(let r of t.spectra)r.peaks?r.peaks=x(r.peaks,o.peaks):r.ranges?r.ranges=x(r.ranges,o.ranges):r.zones&&(r.zones.values=Xe(r.zones.values));return t}function Xe(e){return e.map(t=>(t.signals&&(t.signals=t.signals.map(o=>{if(o.x&&o.y){let{x:{fromTo:r,...i},y:{fromTo:n,...a}}=o;o={...o,x:{...i,...r},y:{...a,...n}}}else{let{fromTo:r,deltaX:i,resolutionX:n,nucleusX:a,deltaY:s,resolutionY:c,nucleusY:l,shiftX:p,shiftY:m,...u}=o;o={...u,x:{from:r[0].from,to:r[0].to,delta:i,resolution:n,nucleus:a},y:{from:r[1].from,to:r[1].to,delta:s,resolution:c,nucleus:l}}}return o},[])),t),[])}var We={name:"apodization",label:"Apodization",value:{lineBroadening:1,gaussBroadening:0,lineBroadeningCenter:0}};function X(e){if(e?.version===3)return e;let t={...e,version:3};for(let o of t.spectra)if(Array.isArray(o?.filters)&&o?.filters.length>0){let r=o.filters.findIndex(i=>i.name==="lineBroadening");if(r!==-1){let i={...o.filters[r],...We};o.filters[r]=o.filters[r-1],o.filters[r-1]=i}}return t}function W(e){if(e?.version===4)return e;let{version:t,...o}=e,r=[],i={};for(let{source:s,...c}of o.spectra){let l={},{info:p={},display:m={}}=c;if(p?.dimension===2&&!s?.jcampURL)if(p.isFt)l.data={rr:c.data};else continue;if(s?.jcampURL){let{jcampURL:f,jcampSpectrumIndex:g}=s,S=f.match(/(?<baseURL>^\w+:\/{2}\w+\/)(?<relativePath>.*)/);i[f]||(i[f]={baseURL:S?.groups.baseURL||"",relativePath:S?.groups.relativePath||f.replace(/^\.\//,"")}),l.sourceSelector={files:[i[f].relativePath]},g!==void 0&&(l.sourceSelector.jcamp={index:g})}l.filters=Ye(c.filters);let{name:u,...d}=m;u&&(l.info={...p,name:u}),l.display=d,r.push({...c,...l})}let n={data:{...o,spectra:r},version:4},a={entries:Object.values(i)};return a.entries.length>0&&(n.data.source=a),n}function Ye(e=[]){let t=[];for(let o of e){let{name:r,value:i}=o;switch(r){case"zeroFilling":t.push({...o,value:{nbPoints:i}});break;case"shiftX":case"shift2DX":case"shift2DY":t.push({...o,value:{shift:i}});break;default:t.push({...o})}}return t}function Y(e){if(e?.version===5)return e;let t={...e,version:5},o={originFrom:"originalFrom",originTo:"originalTo",originDelta:"originalDelta",originX:"originalX",originY:"originalY",originZ:"originalZ"};for(let r of t?.data?.spectra||[])for(let i of["peaks","ranges","zones"])r?.[i]&&(r[i]=x(r[i],o));return t}function $(e){if(e?.version===6)return e;let t={...e,version:6};for(let o of t?.data?.spectra||[]){let{digitalFilter:r,fft:i,phaseCorrection:n}=$e(o);i?.flag&&r?.flag&&n&&Math.floor(r.value.digitalFilterValue)%2>0&&(n.value.ph0-=180)}return t}function $e(e,t=["phaseCorrection","fft","digitalFilter"]){let{filters:o=[]}=e,r={};for(let i of t)r[i]=o.find(n=>n.name===i);return r}function O(e,t="localStorage"){if(e?.version===7)return e;if(t==="nmrium")return ne(e);let o={...e,version:7};for(let r in e.workspaces)o.workspaces[r]=ne(o.workspaces[r]);return o}function ne(e){let{formatting:{nuclei:t,panels:o}={nuclei:null,panels:null},version:r,...i}=e,n={...i};return t&&(n.nuclei=Ze(t)),o&&(n.panels=o),n}function Ze(e){let t=[],o={name:"nucleus",ppm:"ppmFormat",hz:"hzFormat"};for(let r in e)t.push(x(e[r],o));return t}function Z(e){if(e?.version===7)return e;let t={...e,version:7};return t?.settings&&(t.settings=O(t.settings,"nmrium")),t}function M(e,t="localStorage"){if(e?.version===8)return e;if(t==="nmrium")return se(e);let o={...e,version:8};for(let r in e.workspaces)o.workspaces[r]=se(o.workspaces[r]);return o}function se(e){let{version:t,...o}=e,r={...o};return r.display.panels=Ge(e),r}function Ge(e){let t={},o=e.display.panels;for(let r of Object.keys(o)){let{display:i,open:n}=o[r];t[r]={display:i,visible:i,open:n}}return t}function G(e){if(e?.version===8)return e;let t={...e,version:8};t?.settings&&(t.settings=M(t.settings,"nmrium"));for(let o of t?.data?.spectra||[]){let{filters:r=[]}=o;for(let s=0;s<r.length;s++){let{flag:c,isDeleteAllow:l,label:p,...m}=r[s];r[s]={...m,enabled:c}}let i=r.findIndex(s=>s.name==="apodization");if(i!==-1){let s=r[i],{lineBroadening:c,gaussBroadening:l,lineBroadeningCenter:p}=s.value;s.value={exponential:{apply:!0,options:{lineBroadening:l>0?-c:c}}},l>0&&(s.value.gaussian={apply:!0,options:{lineBroadening:.6*l,lineBroadeningCenter:p}}),r[i]=s}let n=r.findIndex(s=>s.name==="apodizationDimension1"),a=r.findIndex(s=>s.name==="apodizationDimension2");if(n!==-1){let s=r[n],{shapes:c}=s.value.compose;s.value=ae(c)}if(a!==-1){let s=r[a],{shapes:c}=s.value.compose;s.value=ae(c)}}return t}function ae(e){let t={};for(let{shape:o}of e){let{kind:r,options:i}=o;if(r==="sineBell"){let{exponent:n,offset:a}=i,s=n===2?"sineSquare":"sineBell";t[s]={apply:!0,options:{offset:a}}}}return t}function J(e){let{version:t,plugins:o,...r}=e;return t===9?e:{version:9,plugins:{},...r}}function q(e){if(e?.version>=10)return e;let t={...e,version:10};if(e.data){let{source:o,spectra:r,...i}=e.data,n=o?crypto.randomUUID():void 0,a=o?[{...o,id:n}]:[];t.data={...i,sources:a,spectra:o?r.map(s=>({...s,sourceId:n})):r}}return t}function H(e){let{version:t}=e;if(t>=11)return e;let o={...e,version:11};return e?.view?.molecules&&(o.view=Je(e.view)),o}function Je(e){let{molecules:t,...o}=e,r={};for(let[i,n]of Object.entries(t)){let{showAtomNumber:a,...s}=n;r[i]={...s,atomAnnotation:"none",showLabel:!1}}return{molecules:r,...o}}function b(e,t){e.plugins||(e.plugins={});let o=e.plugins;for(let r of t.values()){if(!r.shouldSerialize){delete o[r.id];continue}o[r.id]||(o[r.id]={id:r.id,version:r.version}),o[r.id].id=r.id,o[r.id].version=r.version}}var qe=[B,K,X,W,Y,$,Z,G,J,q,H];function le(e,t,o){let r=structuredClone(e),i=Object.entries(e?.plugins??{});for(let[s,{version:c}]of i){let l=o.get(s);if(!(l&&l.version>=c)){if(l){console.warn(`Plugin "${l.id}" is loaded with a version older (${l.version}) than the one used to save the state (${c}).
|
|
1
|
+
var Oe={NORMAL:"NORMAL",FORMULA:"FORMULA"};var Ie={RELATIVE:"relative",ABSOLUTE:"absolute",MIN:"min",MAX:"max"};var Me=[{name:"pixels",unit:"px"},{name:"inches",unit:"in"},{name:"feet",unit:"ft"},{name:"yards",unit:"yd"},{name:"centimeters",unit:"cm"},{name:"millimeters",unit:"mm"},{name:"meters",unit:"m"},{name:"points",unit:"pt"},{name:"picas",unit:"pc"}];var x=12;var ve=[{key:"CT",description:"CT from NMR Solutions"}];import{isAnyArray as Ce}from"is-any-array";import{xMultiply as V}from"ml-spectra-processing";var De=crypto.randomUUID.bind(crypto),h=De;function b(e){let{id:t=h(),meta:o,peaks:r={},filters:n=[],info:i={},ranges:c={},integrals:s={},selector:l,sourceId:a,dependentVariables:p=[],...m}=e,u={id:t,meta:o,filters:n},{data:f=Ae(p[0].components)}=e;if(Array.isArray(i.nucleus)&&(i.nucleus=i.nucleus[0]),u.data={x:[],re:[],im:[],...f},"scaleFactor"in i){let{scaleFactor:g}=i,{re:y,im:S}=u.data;V(y,g,{output:y}),S&&V(S,g,{output:S})}l&&(u.selector=l),a&&(u.sourceId=a,u.fileCollectionId=a);let d=Ce(f.im);if(u.info={phc0:0,phc1:0,nucleus:"1H",isFid:!1,isComplex:d,dimension:1,name:i?.name||t,...i},i.isFid&&i.reverse&&d){let{im:g}=u.data;V(g,-1,{output:g}),u.info.reverse=!1}return u.display={isVisible:!0,isPeaksMarkersVisible:!0,isRealSpectrumVisible:!0,isVisibleInDomain:!0,...e.display},u.peaks={values:[],options:{},...r},u.ranges={values:[],options:{sum:null,isSumConstant:!0,sumAuto:!0},...c},u.integrals={values:[],options:{},...s},{...m,...u}}function Ae(e){let t=e[0]?.data?.x||[],o=e[0]?.data?.re||e[0]?.data?.y||[],r=e[0]?.data?.im||e[1]?.data?.y||null;return t.length>0&&t[0]>t[1]&&(t.reverse(),o.reverse(),r&&r.reverse()),{x:t,re:o,im:r}}import{matrixToArray as we,xMinMaxValues as Fe,xNoiseSanPlot as Te}from"ml-spectra-processing";var _={z:[[]],minX:0,minY:0,maxX:0,maxY:0},Ee={re:_,im:_},Le={rr:_};function v(e){let{id:t=h(),meta:o={},dependentVariables:r=[],info:n={},filters:i=[],zones:c=[],sourceId:s,...l}=e,a={id:t,meta:o,filters:i};s&&(a.sourceId=s,a.fileCollectionId=s),a.info={nucleus:["1H","1H"],isFid:!1,isComplex:!1,name:n?.name||h(),...n},a.originalInfo=structuredClone(a.info),a.display={isPositiveVisible:!0,isNegativeVisible:!0,isVisible:!0,dimension:2,...e.display,...e.display};let{data:p=r[0].components}=e;if(a.data={...a.info.isFid?Ee:Le,...p},a.originalData=structuredClone(a.data),!("spectrumSize"in n)){let m=n.isFid?"re":"rr",u=a.data[m].z.length,f=u>0?a.data[m].z[0].length:0;a.info.spectrumSize=[f,u]}if(!n.isFid){let m=a.data.rr,u=we(m.z),{positive:f,negative:d}=Te(u),{min:g,max:y}=Fe(u);a.data.rr={...m,minZ:g,maxZ:y},a.info.noise={positive:f,negative:d}}return a.zones={values:[],options:{},...c},{...l,...a}}import{xSequentialFillFromTo as Ue}from"ml-spectra-processing";import{isAnyArray as ke}from"is-any-array";function B(e,t=0){if(ke(e)){let o=e.at(t);if(o!==void 0)return o;throw new RangeError("An array with a index out of boundaries")}return e}var je=new Set(["t1ir","T1"]);function oe(e){let t=[];for(let o of e){let{info:{pulseSequence:r,isFid:n}}=o,{data:i,info:c,meta:{vdlistValues:s=[]}}=o;if(!(r&&je.has(r))||s.length===0){t.push(o);continue}let a=n?"re":"rr",p={};for(let S in c)p[S]=B(c[S]);let{z:m,maxX:u,minX:f}=i[a],d=Ue({from:f,to:u,size:m[0].length}),[g,y]=Ve(o);for(let S=0;S<s.length;S++){let P={re:d,x:d};for(let O in i)P[ze(O)]=i[O].z.at(g*(S+y));t.push(b({data:P,info:{...p,name:`${p.name}_${s[S]}`,dimension:1,vd:s[S]}}))}}return t}function ze(e){return["rr","re"].includes(e)?"re":["im","ri","ir","ii"].includes(e)?"im":"x"}function Ve(e){let{meta:{PAGE:t}}=e,o=!0;if(t){let r=n=>Number.parseFloat(n.replace(/[F|T]1=/,""));o=r(t[0])>r(t[2])}return o?[-1,1]:[1,0]}var _e=2,Be=1;function Ke(e){let{spectra:t=[],molecules:o}=e,r=[];for(let n of t){let{info:i}=n;switch(i.dimension){case Be:r.push(b(n));break;case _e:r.push(v(n));break;default:throw new Error("dimension does not supported")}}return{molecules:o,spectra:oe(r)}}function We(e){return e}function N(e,t){return JSON.parse(JSON.stringify(e),function(r,n){if(r in t){this[t[r]]=n;return}return n})}function K(e){if(e?.version===1)return e;let t={...e,version:1},o={j:"js",signal:"signals",integral:"integration",peak:"peaks",diaID:"diaIDs"};for(let r of t.spectra){if(r.ranges){let n=N(r.ranges,o);r.ranges=Array.isArray(n)?{values:n}:n}else if(r.zones){let n=N(r.zones,o);r.zones=Array.isArray(n)?{values:n}:n}r.peaks&&(r.peaks=Array.isArray(r.peaks)?{values:r.peaks}:r.peaks),r.integrals&&(r.integrals=Array.isArray(r.integrals)?{values:r.integrals}:r.integrals)}return t}function W(e){if(e?.version===2)return e;let t={...e,version:2},o={peaks:{delta:"x",originDelta:"originalX",intensity:"y"},ranges:{atomIDs:"atoms",intensity:"y"}};for(let r of t.spectra)r.peaks?r.peaks=N(r.peaks,o.peaks):r.ranges?r.ranges=N(r.ranges,o.ranges):r.zones&&(r.zones.values=Xe(r.zones.values));return t}function Xe(e){return e.map(t=>(t.signals&&(t.signals=t.signals.map(o=>{if(o.x&&o.y){let{x:{fromTo:r,...n},y:{fromTo:i,...c}}=o;o={...o,x:{...n,...r},y:{...c,...i}}}else{let{fromTo:r,deltaX:n,resolutionX:i,nucleusX:c,deltaY:s,resolutionY:l,nucleusY:a,shiftX:p,shiftY:m,...u}=o;o={...u,x:{from:r[0].from,to:r[0].to,delta:n,resolution:i,nucleus:c},y:{from:r[1].from,to:r[1].to,delta:s,resolution:l,nucleus:a}}}return o},[])),t),[])}var Ye={name:"apodization",label:"Apodization",value:{lineBroadening:1,gaussBroadening:0,lineBroadeningCenter:0}};function X(e){if(e?.version===3)return e;let t={...e,version:3};for(let o of t.spectra)if(Array.isArray(o?.filters)&&o?.filters.length>0){let r=o.filters.findIndex(n=>n.name==="lineBroadening");if(r!==-1){let n={...o.filters[r],...Ye};o.filters[r]=o.filters[r-1],o.filters[r-1]=n}}return t}function Y(e){if(e?.version===4)return e;let{version:t,...o}=e,r=[],n={};for(let{source:s,...l}of o.spectra){let a={},{info:p={},display:m={}}=l;if(p?.dimension===2&&!s?.jcampURL)if(p.isFt)a.data={rr:l.data};else continue;if(s?.jcampURL){let{jcampURL:d,jcampSpectrumIndex:g}=s,y=d.match(/(?<baseURL>^\w+:\/{2}\w+\/)(?<relativePath>.*)/);n[d]||(n[d]={baseURL:y?.groups.baseURL||"",relativePath:y?.groups.relativePath||d.replace(/^\.\//,"")}),a.sourceSelector={files:[n[d].relativePath]},g!==void 0&&(a.sourceSelector.jcamp={index:g})}a.filters=$e(l.filters);let{name:u,...f}=m;u&&(a.info={...p,name:u}),a.display=f,r.push({...l,...a})}let i={data:{...o,spectra:r},version:4},c={entries:Object.values(n)};return c.entries.length>0&&(i.data.source=c),i}function $e(e=[]){let t=[];for(let o of e){let{name:r,value:n}=o;switch(r){case"zeroFilling":t.push({...o,value:{nbPoints:n}});break;case"shiftX":case"shift2DX":case"shift2DY":t.push({...o,value:{shift:n}});break;default:t.push({...o})}}return t}function $(e){if(e?.version===5)return e;let t={...e,version:5},o={originFrom:"originalFrom",originTo:"originalTo",originDelta:"originalDelta",originX:"originalX",originY:"originalY",originZ:"originalZ"};for(let r of t?.data?.spectra||[])for(let n of["peaks","ranges","zones"])r?.[n]&&(r[n]=N(r[n],o));return t}function Z(e){if(e?.version===6)return e;let t={...e,version:6};for(let o of t?.data?.spectra||[]){let{digitalFilter:r,fft:n,phaseCorrection:i}=Ze(o);n?.flag&&r?.flag&&i&&Math.floor(r.value.digitalFilterValue)%2>0&&(i.value.ph0-=180)}return t}function Ze(e,t=["phaseCorrection","fft","digitalFilter"]){let{filters:o=[]}=e,r={};for(let n of t)r[n]=o.find(i=>i.name===n);return r}function D(e,t="localStorage"){if(e?.version===7)return e;if(t==="nmrium")return ne(e);let o={...e,version:7};for(let r in e.workspaces)o.workspaces[r]=ne(o.workspaces[r]);return o}function ne(e){let{formatting:{nuclei:t,panels:o}={nuclei:null,panels:null},version:r,...n}=e,i={...n};return t&&(i.nuclei=Ge(t)),o&&(i.panels=o),i}function Ge(e){let t=[],o={name:"nucleus",ppm:"ppmFormat",hz:"hzFormat"};for(let r in e)t.push(N(e[r],o));return t}function G(e){if(e?.version===7)return e;let t={...e,version:7};return t?.settings&&(t.settings=D(t.settings,"nmrium")),t}function C(e,t="localStorage"){if(e?.version===8)return e;if(t==="nmrium")return ie(e);let o={...e,version:8};for(let r in e.workspaces)o.workspaces[r]=ie(o.workspaces[r]);return o}function ie(e){let{version:t,...o}=e,r={...o};return r.display.panels=qe(e),r}function qe(e){let t={},o=e.display.panels;for(let r of Object.keys(o)){let{display:n,open:i}=o[r];t[r]={display:n,visible:n,open:i}}return t}function q(e){if(e?.version===8)return e;let t={...e,version:8};t?.settings&&(t.settings=C(t.settings,"nmrium"));for(let o of t?.data?.spectra||[]){let{filters:r=[]}=o;for(let s=0;s<r.length;s++){let{flag:l,isDeleteAllow:a,label:p,...m}=r[s];r[s]={...m,enabled:l}}let n=r.findIndex(s=>s.name==="apodization");if(n!==-1){let s=r[n],{lineBroadening:l,gaussBroadening:a,lineBroadeningCenter:p}=s.value;s.value={exponential:{apply:!0,options:{lineBroadening:a>0?-l:l}}},a>0&&(s.value.gaussian={apply:!0,options:{lineBroadening:.6*a,lineBroadeningCenter:p}}),r[n]=s}let i=r.findIndex(s=>s.name==="apodizationDimension1"),c=r.findIndex(s=>s.name==="apodizationDimension2");if(i!==-1){let s=r[i],{shapes:l}=s.value.compose;s.value=se(l)}if(c!==-1){let s=r[c],{shapes:l}=s.value.compose;s.value=se(l)}}return t}function se(e){let t={};for(let{shape:o}of e){let{kind:r,options:n}=o;if(r==="sineBell"){let{exponent:i,offset:c}=n,s=i===2?"sineSquare":"sineBell";t[s]={apply:!0,options:{offset:c}}}}return t}function J(e){let{version:t,plugins:o,...r}=e;return t===9?e:{version:9,plugins:{},...r}}function H(e){if(e?.version>=10)return e;let t={...e,version:10};if(e.data){let{source:o,spectra:r,...n}=e.data,i=o?crypto.randomUUID():void 0,c=o?[{...o,id:i}]:[];t.data={...n,sources:c,spectra:o?r?.map(s=>({...s,sourceId:i})):r}}return t}function Q(e){let{version:t}=e;if(t>=11)return e;let o={...e,version:11};return e?.view?.molecules&&(o.view=Je(e.view)),o}function Je(e){let{molecules:t,...o}=e,r={};for(let[n,i]of Object.entries(t)){let{showAtomNumber:c,...s}=i;r[n]={...s,atomAnnotation:"none",showLabel:!1}}return{molecules:r,...o}}function ee(e){if(e?.version>=12)return e;let t={...e,version:12};if(t.data){let o=e.data.spectra??[],r=e.data.molecules??[];for(let n of o){let{sourceId:i,fileCollectionId:c,sourceSelector:s}=n;delete n.sourceId,delete n.fileCollectionId,delete n.sourceSelector,s&&(n.selector={...s,root:c??i})}for(let n of r){let{sourceId:i,fileCollectionId:c,sourceSelector:s}=n;delete n.sourceId,delete n.fileCollectionId,delete n.sourceSelector,s&&(n.selector={...s,root:c??i})}}return t}function R(e,t){e.plugins||(e.plugins={});let o=e.plugins;for(let r of t.values()){if(!r.shouldSerialize){delete o[r.id];continue}o[r.id]||(o[r.id]={id:r.id,version:r.version}),o[r.id].id=r.id,o[r.id].version=r.version}}var He=[K,W,X,Y,$,Z,G,q,J,H,Q,ee];function ae(e,t,o){let r=structuredClone(e),n=Object.entries(e?.plugins??{});for(let[s,{version:l}]of n){let a=o.get(s);if(!(a&&a.version>=l)){if(a){console.warn(`Plugin "${a.id}" is loaded with a version older (${a.version}) than the one used to save the state (${l}).
|
|
2
2
|
NMRium may fail to load the state.
|
|
3
|
-
Please update the plugin to the latest version.`);continue}console.warn(`Plugin "${s}@${
|
|
4
|
-
Please consider open this file with the plugin installed.`)}}let n=new Set,a=()=>{let s=r.version;for(let c of o.values())for(let l of c.migrations){if(n.has(l)||s<l.minCore||l.maxCore&&s>l.maxCore)continue;if((r.plugins?.[c.id]?.version||0)===c.version)break;r=l.up(r),n.add(l)}};for(let s=e?.version||0;s<t;s++){let c=qe[s];r=c(r),a()}return a(),b(r,o),r}var He=["topbar.right","topbar.about_us.modal"],Qe=[],$r=[...He,...Qe],et={},Q={};{let e=et,t=Q;for(let[o,r]of Object.entries(e))t[r]||(t[r]=[]),t[r]?.push(o)}function*ce(e){let{slot:t,plugins:o,supportedToDeprecatedSlots:r=Q}=e,i=r[t];for(let[n,a]of o.entries()){let s=a.ui;if(!s)continue;let c=s[t];if(c){yield[n,c];continue}if(i)for(let l of i){let p=a.ui?.[l];if(p){yield[n,p],console.warn(`Plugin ${a.id} used deprecated slot "${l}". Please update this plugin to use "${t}" instead.`);break}}}}import{FileCollection as lt}from"file-collection";var ue={SDF:"sdf",MOL:"mol",NMRIUM:"nmrium",NMRIUM_ARCHIVE:"nmrium.zip",JSON:"json",JCAMP:"jcamp",DX:"dx",JDX:"jdx",JDF:"jdf",NMREDATA:"nmredata",SMILES:"smiles",SMI:"smi"};function v(e){return e.includes(".")?e.replace(/^.*\./,"").toLowerCase():""}function F(e,t={},o){let{data:r,...i}=e;if(!r)return e;let{spectra:n=[]}=r,{keep1D:a=!0,keep2D:s=!0,onlyReal:c}=t,l=c?"ft":t.dataSelection||"both",p=[];for(let m of n){if(!m.info){p.push(m);continue}let{isFid:u,dimension:d,name:f}=m.info;if(!D(d===1&&!a,f,o)&&!D(d===2&&!s,f,o)&&!D(u&&l==="ft",f,o)&&!D(!u&&l==="fid",f,o))if(c&&!u)if(m.info.isComplex=!1,tt(m)){let{rr:g}=m.data;p.push({...m,data:{rr:g}})}else{let{re:g,x:S}=m.data;p.push({...m,data:{re:g,x:S}})}else p.push(m)}return{data:{...r,spectra:p},...i}}function D(e,t,o){return e?(o?.warn(`Skipping ${t} because it didn't match the import filters.`),!0):!1}function tt(e){let{info:t}=e;return t?.dimension===2}function A(e){let{nmriumState:t,plugins:o,options:r}=e;for(let i of o.values()){let n=i.onReadProcess?.onProcessing;n&&n(t,r)}}async function w(e,t,o={}){let{sourceSelector:r,converter:i,logger:n}=o,a=[],s=[];for(let u of t.values()){let{onReadProcess:d}=u;d&&(d?.onFiles&&a.push(u),d?.supportedExtensions?.length&&d?.onFile&&s.push(u))}let c=await Promise.allSettled(a.map(u=>u.onReadProcess.onFiles(e,o))),l=[],p=await Promise.allSettled(e.files.flatMap(u=>{let d=v(u.name).toLowerCase();return s.flatMap(f=>{let{supportedExtensions:g,onFile:S}=f.onReadProcess;return g.includes(d)?(l.push({file:u,plugin:f}),S(u,{logger:n,sourceSelector:r,converter:i})):[]})})),m={spectra:[],molecules:[]};for(let u=0;u<c.length;u++){let d=c[u];switch(d.status){case"fulfilled":{let{spectra:f=[],molecules:g=[]}=d.value||{};m.spectra.push(...f),m.molecules.push(...g);break}case"rejected":{let f=d.reason,g=a[u];o.logger?.error(`Load file collection with plugin ${g.id}@${g.version} fails with: ${f}`);break}}}for(let u=0;u<p.length;u++){let d=p[u];switch(d.status){case"fulfilled":{let{spectra:f=[],molecules:g=[]}=d.value||{};m.spectra.push(...f),m.molecules.push(...g);break}case"rejected":{let f=d.reason,{file:g,plugin:S}=l[u];o.logger?.error(`Load file ${g.relativePath} with plugin ${S.id}@${S.version} fails with: ${f}`);break}}}return m}import{FileCollection as nt}from"file-collection";import{FileCollection as it}from"file-collection";import pe from"lodash.merge";import{xIsEquallySpaced as rt}from"ml-spectra-processing";async function E(e){let{input:t,spectraResult:o,unserializedSpectrum:r,options:i,plugins:n,migrator:a}=e,c=(await R({input:t,migrator:a,plugins:n,options:{...i,sourceSelector:r.sourceSelector}}))?.nmriumState?.data?.spectra??[],l=c.pop();if(l){o.push(me(r,l));for(let p of c)o.push(me(r,ot(p)))}}function me(e,t){!e.fileCollectionId&&e.sourceId&&(e.fileCollectionId=e.sourceId),!t.fileCollectionId&&t.sourceId&&(t.fileCollectionId=t.sourceId);let{data:o,...r}=e;if("ranges"in t){let{data:i,...n}=t;return{...pe(n,r),data:i}}else if("zones"in t){let{data:i,...n}=t;return{...pe(n,r),data:i}}else return t}function ot(e){return{...e,id:N()}}function T(e){let{spectrum:t,spectraResult:o,logger:r}=e,{dimension:i}=t.info;if(i===1){if(!rt(t.data)){r?.error('The ".nmrium" file is corrupted; the X-axis values are not equally distant.');return}o.push(h(t))}else i===2&&o.push(C(t))}async function z(e){let{input:t,moleculesResult:o,unserializedMolecule:r,options:i,plugins:n,migrator:a}=e,{sourceSelector:s,sourceId:c}=r,p=(await R({input:t,migrator:a,plugins:n,options:{...i,sourceSelector:s}}))?.nmriumState?.data?.molecules??[];for(let m of p)o.push({...m,sourceId:c,fileCollectionId:c})}function k(e){let{molecule:t,moleculesResult:o}=e;o.push(t)}async function L(e){let{nmriumObjectInput:t,options:o={},migrator:r,plugins:i}=e,n=r(t),{data:a,...s}=n;if(!a)return[{...s},new Map];let c={data:{...a,spectra:[],molecules:[]},...s},l=c.data,{sources:p=[],spectra:m,molecules:u}=l,d=await Promise.all(p.map(async S=>{let y=await it.fromSource(S,{unzip:{zipExtensions:["zip","nmredata"]}});return[S.id,y]})),f=new Map(d),g=[];for(let S of a.spectra){let y=f.get(S.sourceId);if(!y){T({spectrum:S,spectraResult:m,logger:o.logger});continue}g.push(E({input:y,spectraResult:m,unserializedSpectrum:S,migrator:r,plugins:i,options:o}))}for(let S of a.molecules??[]){let y=f.get(S.sourceId);if(!y){k({molecule:S,moleculesResult:u,logger:o.logger});continue}g.push(z({input:y,unserializedMolecule:S,moleculesResult:u,migrator:r,plugins:i,options:o}))}return await Promise.allSettled(g),[c,f]}async function fe(e){let{file:t,options:o={},migrator:r,plugins:i}=e,n=await t.arrayBuffer(),a=await(at(n)?st(n):t.text());return L({nmriumObjectInput:JSON.parse(a),plugins:i,migrator:r,options:o})}async function st(e){let t=await nt.fromZip(e);if(t.files.length===0)throw new Error("compressed nmrium file is corrupted");return t.files[0].text()}function at(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e);return t[0]===80&&t[1]===75&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8)}async function R(e){let{options:t={},input:o,migrator:r,plugins:i}=e,n=pt(await ct(o),t.sourceSelector?.files),a=mt(n);if(a){let[u]=await fe({file:a,migrator:r,plugins:i,options:t});return{nmriumState:u,containsNmrium:!0,fileCollection:n}}let s=await w(n,i,t),c=F({version:11,data:s},t?.sourceSelector?.general,t.logger),{onLoadProcessing:l,experimentalFeatures:p}=t,m={...l,autoProcessing:l?.autoProcessing??!1,experimentalFeatures:p};return A({nmriumState:c,plugins:i,options:m}),{nmriumState:c,containsNmrium:!1,fileCollection:n}}function ct(e){return Array.isArray(e)?Promise.reject(new Error("For a set of fileCollectionItems pass a FileCollection instance")):ut(e)?Promise.resolve(e):new lt().appendExtendedSource({...e,uuid:crypto.randomUUID()})}function ut(e){return typeof e=="object"&&"files"in e}function pt(e,t){if(!t)return e;let o=new Set(t);return e.filter(r=>o.has(r.relativePath))}function mt(e){return e.files.find(t=>v(t.name).toLowerCase()===ue.NMRIUM)}import{FileCollection as ee}from"file-collection";async function de(e){let t={},o=[];for(let r of e.sources)switch(r.relativePath){case".META-NMRIUM/VERSION":o.push(r.text().then(i=>{t.version=Number.parseInt(i,10)}));break;case"state.json":o.push(r.text().then(i=>{t.state=JSON.parse(i)}));break;case".META-NMRIUM/NMRIUM_ARCHIVE.json":o.push(r.text().then(i=>{t.archive=JSON.parse(i)}));break;case".META-NMRIUM/EMBED_ALL_DATA":t.embed=r;break;case".META-NMRIUM/USE_EXTERNAL_SOURCES":t.external=r;break;default:}return await Promise.all(o),t}function ge(e){if(typeof e.version!="number"||Number.isNaN(e.version))throw new Error("Not a valid NMRium archive");if(!e.archive)throw new Error("Not a valid NMRium archive");if(!e.state)throw new Error("NMRium Archive corrupted, state.json is missing");if(!e.embed&&!e.external)throw new Error("NMRium Archive corrupted, no embedded data or external sources")}async function Se(e){let{options:t,plugins:o,migrator:r}=e,i=await ee.fromIum(e.input),n=await de(i);ge(n);let a=r(n.state),s={...a,data:{...a.data,spectra:[],molecules:[]}},c=s.data.spectra,l=s.data.molecules,p=ft(a.data.sources),m=dt(i,n.archive),u=[];for(let f of a.data.spectra)u.push(St({archive:n,externalSources:p,embedFiles:m,unserializedSpectrum:f,spectraResult:c,options:t,plugins:o,migrator:r}));for(let f of a.data.molecules??[])u.push(yt({archive:n,externalSources:p,embedFiles:m,unserializedMolecule:f,moleculesResult:l,options:t,plugins:o,migrator:r}));await Promise.allSettled(u);let d=await gt(m,p);return[s,d]}function ft(e){e??=[];let t=new Map(e.map(r=>[r.id,r])),o=new Map;return{get(r){let i=t.get(r);if(!i)return;let n=o.get(r);return n||(n=ee.fromSource(i,{unzip:{zipExtensions:["zip","nmredata"]}}),o.set(r,n)),n},async all(){let r=new Map;return await Promise.all(U(o.entries(),async([i,n])=>{r.set(i,await n)})),r},[Symbol("debug")]:{sources:e,mapSources:t,fileCollections:o}}}function dt(e,t){let o=new Map,r=new Map(e.sources.map(i=>[i.relativePath,i]));return{get(i){let n=t[i];if(!n)return;let a=r.get(n.filePath);if(!a)return;let s=o.get(i);return s||(s=ee.fromIum(a.stream()),o.set(i,s)),s},async all(){let i=new Map;return await Promise.all(U(o.entries(),async([n,a])=>{i.set(n,await a)})),i},[Symbol("debug")]:{ium:e,record:t,iumSources:r,fileCollections:o}}}async function gt(e,t){let o=new Map;return await Promise.allSettled(U(await e.all(),async([r,i])=>{o.set(r,i)})),await Promise.allSettled(U(await t.all(),async([r,i])=>{o.has(r)||o.set(r,i)})),o}function*U(e,t){for(let o of e)yield t(o)}async function St(e){let{archive:t,externalSources:o,embedFiles:r}=e,{unserializedSpectrum:i,spectraResult:n}=e,{options:a,plugins:s,migrator:c}=e,l=await ye({archive:t,externalSources:o,embedFiles:r,pickableInput:i});if(!l)return T({spectrum:i,spectraResult:n,logger:a?.logger});await E({input:l,unserializedSpectrum:i,spectraResult:n,options:a,plugins:s,migrator:c})}async function yt(e){let{archive:t,externalSources:o,embedFiles:r}=e,{unserializedMolecule:i,moleculesResult:n}=e,{options:a,plugins:s,migrator:c}=e,l=await ye({archive:t,externalSources:o,embedFiles:r,pickableInput:i});if(!l)return k({molecule:i,moleculesResult:n,logger:a?.logger});await z({input:l,unserializedMolecule:i,moleculesResult:n,options:a,plugins:s,migrator:c})}async function ye(e){let{archive:t,externalSources:o,embedFiles:r,pickableInput:i}=e,{fileCollectionId:n,sourceId:a}=i,s;return t.external&&a&&(s=await o.get(a)),!s&&t.external&&a&&n&&(s=await r.get(n)),!s&&t.embed&&n&&(s=await r.get(n)),s}import{FileCollection as Pt}from"file-collection";async function Pe(e){let{source:t,plugins:o,options:r={}}=e,{converter:i,...n}=r,a={spectra:[],molecules:[]},s=await Pt.fromSource(t,{unzip:{zipExtensions:["zip","nmredata"]}}),{spectra:c=[],molecules:l=[]}=await w(s,o,{converter:{...i,bruker:{keepFiles:!0,...Reflect.get(i??{},"bruker")}},...n});a.spectra.push(...c),a.molecules.push(...l);let p=crypto.randomUUID(),m={...t,id:p};for(let g of a.spectra)g.sourceId=p;for(let g of a.molecules)g.sourceId=p;a.sources??=[],a.sources.push(m);let u=F({version:11,data:a},r?.sourceSelector?.general),{onLoadProcessing:d}=n,f={filters:d?.filters,autoProcessing:d?.autoProcessing??!1,experimentalFeatures:r.experimentalFeatures};return A({nmriumState:u,plugins:o,options:f}),[u,s]}function I(e,t){let o={};for(let r in e)t.includes(r)||(o[r]=e[r]);return o}var xt=["data","originalData","info","originalInfo","meta","customInfo"],Nt=["data","originalData","info","originalInfo","meta","customInfo"],ht=["sourceSelector","sourceId","fileCollectionId","originalData","originalInfo"];function xe(e,t,o={}){let{version:r,data:i}=e;if(i.actionType)return e;let n={version:r,plugins:e.plugins},{includeData:a}=o;a!=="noData"&&(n.data=bt({...i},a));let{includeSettings:s,includeView:c}=o;return s&&(n.settings=e.settings),c&&(n.view=e.view),b(n,t),n}function bt(e,t="rawData"){let{spectra:o}=e;switch(t){case"dataSource":return Rt(e);case"selfContained":case"selfContainedExternalDatasource":return It(e);case"rawData":return{...I(e,["sources"]),spectra:o.map(Mt)};default:return e}}function Rt(e){let{spectra:t}=e;if(!e.sources)throw new Error("sources property should exists for dataSource serialization");return{...e,spectra:t.map(Ct)}}function It(e){let{spectra:t}=e;return{...e,spectra:t.map(Ot)}}function Ct(e){return I(e,xt)}function Ot(e){return I(e,Nt)}function Mt(e){let{data:t,info:o,originalData:r,originalInfo:i}=e,n=I(e,ht);return n.data=r||t,n.info=i||o,n}import{FileCollection as vt}from"file-collection";async function he(e){let{spectra:t,molecules:o,fileCollections:r,serializedState:i,includeData:n=!0}=e,a=new vt({filter:{ignoreDotfiles:!1}}),s=new Set,c=[];for(let l of t)Ne({builder:a,fileCollections:r,fileCollectionId:l.fileCollectionId,includeData:n,alreadyAdded:s,asyncTasks:c});for(let l of o)Ne({builder:a,fileCollections:r,fileCollectionId:l.fileCollectionId,includeData:n,alreadyAdded:s,asyncTasks:c});return await Promise.all(c),a.toIum({*getExtraFiles(){yield{relativePath:".META-NMRIUM/VERSION",data:"0"},yield{relativePath:"state.json",data:i},yield{relativePath:".META-NMRIUM/NMRIUM_ARCHIVE.json",data:JSON.stringify(Dt({fileCollections:r,toSerialize:s}),null,2)},n?yield{relativePath:".META-NMRIUM/EMBED_ALL_DATA",data:""}:yield{relativePath:".META-NMRIUM/USE_EXTERNAL_SOURCES",data:""},yield{relativePath:"index.txt",data:Ft({fileCollections:r,toIndex:s})}}})}function Ne(e){let{builder:t,fileCollections:o,fileCollectionId:r,includeData:i,alreadyAdded:n,asyncTasks:a}=e;if(!r||n.has(r))return;let s=o[r];s&&(n.add(r),a.push(s.toIum({includeData:i}).then(c=>{let l=new Blob([c],{type:"application/zip"});return t.appendExtendedSource({uuid:r,name:r,relativePath:`${r}.ium.zip`,size:l.size,text:()=>l.text(),stream:()=>l.stream(),arrayBuffer:()=>l.arrayBuffer()},{unzip:{zipExtensions:[]}})})))}function Dt(e){let{fileCollections:t,toSerialize:o}=e,r={};for(let i of o){let n=t[i];if(!n)continue;let{logger:a,...s}=n.options;r[i]={sourceUUID:i,filePath:`${i}.ium.zip`,options:s}}return r}function Ft(e){let{fileCollections:t,toIndex:o}=e,r=[];for(let i of o){let n=t[i];if(n){r.push(`data/${i}.ium.zip`);for(let a of n.sources)r.push(` data/${a.relativePath}`);r.push(`
|
|
5
|
-
`)}
|
|
6
|
-
`)}var
|
|
3
|
+
Please update the plugin to the latest version.`);continue}console.warn(`Plugin "${s}@${l}" is not registered. NMRium may fail to load the state.
|
|
4
|
+
Please consider open this file with the plugin installed.`)}}let i=new Set,c=()=>{let s=r.version;for(let l of o.values())for(let a of l.migrations){if(i.has(a)||s<a.minCore||a.maxCore&&s>a.maxCore)continue;if((r.plugins?.[l.id]?.version||0)===l.version)break;r=a.up(r),i.add(a)}};for(let s=e?.version||0;s<t;s++){let l=He[s];r=l(r),c()}return c(),R(r,o),r}var Qe=["topbar.right","topbar.about_us.modal"],et=[],Zr=[...Qe,...et],tt={},te={};{let e=tt,t=te;for(let[o,r]of Object.entries(e))t[r]||(t[r]=[]),t[r]?.push(o)}function*le(e){let{slot:t,plugins:o,supportedToDeprecatedSlots:r=te}=e,n=r[t];for(let[i,c]of o.entries()){let s=c.ui;if(!s)continue;let l=s[t];if(l){yield[i,l];continue}if(n)for(let a of n){let p=c.ui?.[a];if(p){yield[i,p],console.warn(`Plugin ${c.id} used deprecated slot "${a}". Please update this plugin to use "${t}" instead.`);break}}}}import{FileCollection as lt}from"file-collection";var ce={SDF:"sdf",MOL:"mol",NMRIUM:"nmrium",NMRIUM_ARCHIVE:"nmrium.zip",JSON:"json",JCAMP:"jcamp",DX:"dx",JDX:"jdx",JDF:"jdf",NMREDATA:"nmredata",SMILES:"smiles",SMI:"smi"};function A(e){return e.includes(".")?e.replace(/^.*\./,"").toLowerCase():""}function F(e,t={},o){let{data:r,...n}=e;if(!r)return e;let{spectra:i=[]}=r,{keep1D:c=!0,keep2D:s=!0,onlyReal:l}=t,a=l?"ft":t.dataSelection||"both",p=[];for(let m of i){if(!m.info){p.push(m);continue}let{isFid:u,dimension:f,name:d}=m.info;if(!w(f===1&&!c,d,o)&&!w(f===2&&!s,d,o)&&!w(u&&a==="ft",d,o)&&!w(!u&&a==="fid",d,o))if(l&&!u)if(m.info.isComplex=!1,rt(m)){let{rr:g}=m.data;p.push({...m,data:{rr:g}})}else{let{re:g,x:y}=m.data;p.push({...m,data:{re:g,x:y}})}else p.push(m)}return{data:{...r,spectra:p},...n}}function w(e,t,o){return e?(o?.warn(`Skipping ${t} because it didn't match the import filters.`),!0):!1}function rt(e){let{info:t}=e;return t?.dimension===2}function T(e){let{nmriumState:t,plugins:o,options:r}=e;for(let n of o.values()){let i=n.onReadProcess?.onProcessing;i&&i(t,r)}}async function E(e,t,o={}){let{selector:r,converter:n,logger:i}=o,c=[],s=[];for(let u of t.values()){let{onReadProcess:f}=u;f&&(f?.onFiles&&c.push(u),f?.supportedExtensions?.length&&f?.onFile&&s.push(u))}let l=await Promise.allSettled(c.map(u=>u.onReadProcess.onFiles(e,o))),a=[],p=await Promise.allSettled(e.files.flatMap(u=>{let f=A(u.name).toLowerCase();return s.flatMap(d=>{let{supportedExtensions:g,onFile:y}=d.onReadProcess;return g.includes(f)?(a.push({file:u,plugin:d}),y(u,{logger:i,selector:r,converter:n})):[]})})),m={spectra:[],molecules:[]};for(let u=0;u<l.length;u++){let f=l[u];switch(f.status){case"fulfilled":{let{spectra:d=[],molecules:g=[]}=f.value||{};m.spectra.push(...d),m.molecules.push(...g);break}case"rejected":{let d=f.reason,g=c[u];o.logger?.error(`Load file collection with plugin ${g.id}@${g.version} fails with: ${d}`);break}}}for(let u=0;u<p.length;u++){let f=p[u];switch(f.status){case"fulfilled":{let{spectra:d=[],molecules:g=[]}=f.value||{};m.spectra.push(...d),m.molecules.push(...g);break}case"rejected":{let d=f.reason,{file:g,plugin:y}=a[u];o.logger?.error(`Load file ${g.relativePath} with plugin ${y.id}@${y.version} fails with: ${d}`);break}}}return m}import{FileCollection as it}from"file-collection";import{FileCollection as me}from"file-collection";import ue from"lodash.merge";import{xIsEquallySpaced as ot}from"ml-spectra-processing";async function L(e){let{input:t,spectraResult:o,unserializedSpectrum:r,options:n,plugins:i,migrator:c}=e,l=(await I({input:t,migrator:c,plugins:i,options:{...n,selector:r.selector}}))?.nmriumState?.data?.spectra??[],a=l.pop();if(a){o.push(pe(r,a));for(let p of l)o.push(pe(r,nt(p)))}}function pe(e,t){let{data:o,...r}=e;if(!t.selector?.root&&e.selector?.root&&(t.selector??=e.selector,t.selector.root=e.selector.root),"ranges"in t){let{data:n,...i}=t;return{...ue(i,r),data:n}}else if("zones"in t){let{data:n,...i}=t;return{...ue(i,r),data:n}}else return t}function nt(e){return{...e,id:h()}}function k(e){let{spectrum:t,spectraResult:o,logger:r}=e,{dimension:n}=t.info;if(n===1){if(!ot(t.data)){r?.error('The ".nmrium" file is corrupted; the X-axis values are not equally distant.');return}o.push(b(t))}else n===2&&o.push(v(t))}async function U(e){let{input:t,moleculesResult:o,unserializedMolecule:r,options:n,plugins:i,migrator:c}=e,{selector:s}=r,a=(await I({input:t,migrator:c,plugins:i,options:{...n,selector:s}}))?.nmriumState?.data?.molecules??[];for(let p of a)!p.selector?.root&&s?.root&&(p.selector??=s,p.selector.root=s.root),o.push({...r,...p})}function j(e){let{molecule:t,moleculesResult:o}=e;o.push(t)}async function z(e){let{nmriumObjectInput:t,options:o={},migrator:r,plugins:n}=e,i=r(t),{data:c,...s}=i,l=new me;if(!c)return[{...s},l];let a={data:{...c,spectra:[],molecules:[]},...s},p=a.data,{sources:m=[],spectra:u,molecules:f}=p,d=await Promise.all(m.map(async S=>{let P=await me.fromSource(S,{unzip:{zipExtensions:["zip","nmredata"]}});return[S.id,P]})),g=new Map(d),y=[];for(let S of c.spectra){let P=S.selector?.root??"",O=g.get(P);if(!O){k({spectrum:S,spectraResult:u,logger:o.logger});continue}y.push(L({input:O,spectraResult:u,unserializedSpectrum:S,migrator:r,plugins:n,options:o}))}for(let S of c.molecules??[]){let P=g.get(S.sourceId);if(!P){j({molecule:S,moleculesResult:f,logger:o.logger});continue}y.push(U({input:P,unserializedMolecule:S,moleculesResult:f,migrator:r,plugins:n,options:o}))}await Promise.allSettled(y);for(let[S,P]of g.entries())l.appendFileCollection(P,S);return[a,l]}async function fe(e){let{file:t,options:o={},migrator:r,plugins:n}=e,i=await t.arrayBuffer(),c=await(at(i)?st(i):t.text());return z({nmriumObjectInput:JSON.parse(c),plugins:n,migrator:r,options:o})}async function st(e){let t=await it.fromZip(e);if(t.files.length===0)throw new Error("compressed nmrium file is corrupted");return t.files[0].text()}function at(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e);return t[0]===80&&t[1]===75&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8)}async function I(e){let{options:t={},input:o,migrator:r,plugins:n}=e,{selectorRoot:i=crypto.randomUUID()}=t,c=pt(await ct(o),t.selector?.files),s=mt(c);if(s){let[f]=await fe({file:s,migrator:r,plugins:n,options:t});return ge(f,i),{nmriumState:f,containsNmrium:!0,fileCollection:c,selectorRoot:i}}let l=await E(c,n,t),a=F({version:12,data:l},t?.selector?.general,t.logger),{onLoadProcessing:p,experimentalFeatures:m}=t,u={...p,autoProcessing:p?.autoProcessing??!1,experimentalFeatures:m};return T({nmriumState:a,plugins:n,options:u}),ge(a,i),{nmriumState:a,containsNmrium:!1,fileCollection:c,selectorRoot:i}}function ct(e){return Array.isArray(e)?Promise.reject(new Error("For a set of fileCollectionItems pass a FileCollection instance")):ut(e)?Promise.resolve(e):new lt().appendExtendedSource({...e,uuid:crypto.randomUUID()})}function ut(e){return typeof e=="object"&&"files"in e}function pt(e,t){if(!t)return e;let o=new Set(t);return e.filter(r=>o.has(r.relativePath))}function mt(e){return e.files.find(t=>A(t.name).toLowerCase()===ce.NMRIUM)}function ge(e,t){for(let o of e.data?.spectra??[])o.selector?.root||(o.selector??={root:t},o.selector.root||=t);for(let o of e.data?.molecules??[])o.selector?.root||(o.selector??={root:t},o.selector.root||=t)}import{FileCollection as gt}from"file-collection";async function de(e){let t={},o=[];for(let r of e.sources)switch(r.relativePath){case".META-NMRIUM/NMRIUM_ARCHIVE":t.archive=r;break;case".META-NMRIUM/VERSION":o.push(r.text().then(n=>{t.version=Number.parseInt(n,10)}));break;case"state.json":o.push(r.text().then(n=>{t.state=JSON.parse(n)}));break;default:}return await Promise.all(o),t}function Se(e){if(!e.archive)throw new Error("Not a valid NMRium archive");if(typeof e.version!="number"||Number.isNaN(e.version))throw new Error("Not a valid NMRium archive, no version specified");if(!e.state)throw new Error("NMRium Archive corrupted, state.json is missing")}function ye(e){return e.filter(t=>!ft(t.relativePath))}function ft(e){return e.startsWith(".META-NMRIUM/")||e==="state.json"||e==="index.txt"}async function Pe(e){let{options:t,plugins:o,migrator:r}=e,n=await gt.fromIum(e.input),i=await de(n);Se(i);let c=ye(n),s=r(i.state),l={...s,data:{...s.data,spectra:[],molecules:[]}},a=l.data.spectra,p=l.data.molecules,m=dt(n),u=[];for(let f of s.data.spectra)u.push(St({subRoots:m,unserializedSpectrum:f,spectraResult:a,options:t,plugins:o,migrator:r}));for(let f of s.data.molecules??[])u.push(yt({subRoots:m,unserializedMolecule:f,moleculesResult:p,options:t,plugins:o,migrator:r}));return await Promise.allSettled(u),[l,c]}function dt(e){let t=new Map;return{get(o){let r=t.get(o);return r||(r=e.subroot(o),t.set(o,r)),r},[Symbol("debug")]:{ium:e,views:t}}}async function St(e){let{subRoots:t}=e,{unserializedSpectrum:o,spectraResult:r}=e,{options:n,plugins:i,migrator:c}=e,{selector:s}=o,l=await xe({subRoots:t,selector:s});if(!l)return k({spectrum:o,spectraResult:r,logger:n?.logger});await L({input:l,unserializedSpectrum:o,spectraResult:r,options:n,plugins:i,migrator:c})}async function yt(e){let{subRoots:t}=e,{unserializedMolecule:o,moleculesResult:r}=e,{options:n,plugins:i,migrator:c}=e,{selector:s}=o,l=await xe({subRoots:t,selector:s});if(!l)return j({molecule:o,moleculesResult:r,logger:n?.logger});await U({input:l,unserializedMolecule:o,moleculesResult:r,options:n,plugins:i,migrator:c})}async function xe(e){let{subRoots:t,selector:o}=e;if(!o)return;let{root:r}=o;if(r)return t.get(r)}import{FileCollection as Pt}from"file-collection";async function Ne(e){let{source:t,plugins:o,options:r={},sourceId:n=crypto.randomUUID()}=e,{converter:i,...c}=r,s={...t,id:n},l={spectra:[],molecules:[]},a=await Pt.fromSource(s,{unzip:{zipExtensions:["zip","nmredata"]}}),{spectra:p=[],molecules:m=[]}=await E(a,o,{converter:{...i,bruker:{keepFiles:!0,...Reflect.get(i??{},"bruker")}},...c});l.spectra.push(...p),l.molecules.push(...m);for(let g of l.spectra)g.selector??={root:n},g.selector.root=n;for(let g of l.molecules)g.selector??={root:n},g.selector.root=n;l.sources??=[],l.sources.push(s);let u=F({version:12,data:l},r?.selector?.general),{onLoadProcessing:f}=c,d={filters:f?.filters,autoProcessing:f?.autoProcessing??!1,experimentalFeatures:r.experimentalFeatures};return T({nmriumState:u,plugins:o,options:d}),[u,a,n]}function M(e,t){let o={};for(let r in e)t.includes(r)||(o[r]=e[r]);return o}var xt=["data","originalData","info","originalInfo","meta","customInfo"],Nt=["data","originalData","info","originalInfo","meta","customInfo"],ht=["selector","originalData","originalInfo"];function he(e,t,o={}){let{version:r,data:n}=e;if(n.actionType)return e;let i={version:r,plugins:e.plugins},{includeData:c}=o;c!=="noData"&&(i.data=bt({...n},c));let{includeSettings:s,includeView:l}=o;return s&&(i.settings=e.settings),l&&(i.view=e.view),R(i,t),i}function bt(e,t="rawData"){let{spectra:o}=e;switch(t){case"dataSource":return Rt(e);case"selfContained":case"selfContainedExternalDatasource":return Ot(e);case"rawData":return{...M(e,["sources"]),spectra:o.map(vt)};default:return e}}function Rt(e){let{spectra:t}=e;if(!e.sources)throw new Error("sources property should exists for dataSource serialization");return{...e,spectra:t.map(It)}}function Ot(e){let{spectra:t,sources:o,...r}=e;return{...r,spectra:t.map(Mt)}}function It(e){return M(e,xt)}function Mt(e){return M(e,Nt)}function vt(e){let{data:t,info:o,originalData:r,originalInfo:n}=e,i=M(e,ht);return i.data=r||t,i.info=n||o,i}import{FileCollection as Dt}from"file-collection";async function be(e){let{spectra:t,molecules:o,aggregator:r,serializedState:n,includeData:i=!0}=e;return Dt.fromCollection(r,{filter:{ignoreDotfiles:!1}}).toIum({includeData:i,*getExtraFiles(s){yield{relativePath:".META-NMRIUM/NMRIUM_ARCHIVE",data:""},yield{relativePath:".META-NMRIUM/VERSION",data:"0"},yield{relativePath:"state.json",data:n},yield{relativePath:"index.txt",data:Ct({aggregator:r,spectra:t,molecules:o,index:s})}}})}function Ct(e){let{aggregator:t,spectra:o,molecules:r,index:n}=e,i=new Map,c=new Map(n.sources.map(l=>[l.uuid,l]));for(let l of o){let a=l.selector?.root;a&&(i.has(a)||i.set(a,t.subroot(a)))}for(let l of r){let a=l.selector?.root;a&&(i.has(a)||i.set(a,t.subroot(a)))}let s=[];for(let[l,a]of i.entries()){s.push(`data/${l}/`);for(let p of a.files){let u=c.get(p.sourceUUID)?.baseURL?.startsWith("ium:/")?"embedded":"linked";s.push(` ${p.relativePath} (${u})`)}s.push(`
|
|
5
|
+
`)}return s.join(`
|
|
6
|
+
`)}var re=class{version=12;#e=new Map;registerPlugin(t){if(this.#e.has(t.id)){console.warn(`Plugin ${t.id} is already registered. skip.`),console.debug("Plugin already registered:",this.#e.get(t.id)),console.debug("Plugin to register:",t);return}this.#e.set(t.id,t)}registerPlugins(t){for(let o of t)this.registerPlugin(o)}migrate(t){return ae(t,this.version,this.#e)}read(t,o={}){return I({input:t,migrator:this.migrate.bind(this),plugins:this.#e,options:o})}readNMRiumArchive(t,o={}){return Pe({input:t,options:o,plugins:this.#e,migrator:this.migrate.bind(this)})}readNMRiumObject(t,o){return z({nmriumObjectInput:t,options:o,plugins:this.#e,migrator:this.migrate.bind(this)})}readFromWebSource(t,o){return Ne({source:t,options:o,plugins:this.#e})}serializeNmriumState(t,o){return he(t,this.#e,o)}serializeNmriumArchive(t){return be(t)}serializePlugins(){let t={plugins:{}};return R(t,this.#e),t.plugins}slot(t){return le({slot:t,plugins:this.#e})}};function At(e,t){if(t>12)return 0;let o=-1;for(let r=0;r<e.length;r++)if(e[r].version>t){o=r;break}return o}var Re=[{version:6,fun:D},{version:7,fun:C}];function wt(e){let{version:t}=e||{},o=At(Re,t);if(o===-1)return{...e,version:12};let r=Re.slice(o);for(let n of r)e=n.fun(e);return e}export{Oe as ANALYSIS_COLUMN_TYPES,Ie as ANALYSIS_COLUMN_VALUES_KEYS,x as CURRENT_EXPORT_VERSION,ve as EXTERNAL_API_KEYS,re as NMRiumCore,We as defineNMRiumPlugin,Ke as formatSpectra,h as generateID,B as getOneIfArray,wt as migrateSettings,Me as units};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zakodium/nmrium-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "The core of NMRium: types, state, state migration and plugin system.",
|
|
5
5
|
"author": "Zakodium Sàrl",
|
|
6
6
|
"license": "CC-BY-NC-SA-4.0",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"jest-matcher-deep-close-to": "^3.0.2",
|
|
32
32
|
"rimraf": "^6.0.1",
|
|
33
33
|
"typescript": "~5.9.3",
|
|
34
|
-
"vitest": "^4.0.
|
|
34
|
+
"vitest": "^4.0.7"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"cheminfo-types": "^1.8.1",
|
|
38
38
|
"fifo-logger": "^2.0.1",
|
|
39
|
-
"file-collection": "^6.
|
|
39
|
+
"file-collection": "^6.2.1",
|
|
40
40
|
"is-any-array": "^2.0.1",
|
|
41
41
|
"lodash.merge": "^4.6.2",
|
|
42
42
|
"ml-spectra-processing": "^14.18.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"volta": {
|
|
46
46
|
"extends": "../../../package.json"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "8a0482bab49d93f192dabb48f8b78903939d3990"
|
|
49
49
|
}
|