@nfdi4plants/arctrl 1.0.6 → 1.1.0

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.
Files changed (83) hide show
  1. package/ARC.js +39 -3
  2. package/Contracts/Contracts.ArcTypes.js +20 -8
  3. package/ISA/ISA/ArcTypes/ArcTable.js +5 -16
  4. package/ISA/ISA/ArcTypes/ArcTableAux.js +111 -68
  5. package/ISA/ISA/ArcTypes/ArcTypes.js +108 -73
  6. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +74 -3
  7. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +82 -3
  8. package/ISA/ISA.Json/ArcTypes/ArcTable.js +125 -4
  9. package/ISA/ISA.Json/ArcTypes/CellTable.js +46 -0
  10. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +26 -0
  11. package/ISA/ISA.Json/ArcTypes/OATable.js +48 -0
  12. package/ISA/ISA.Json/Ontology.js +30 -0
  13. package/ISA/ISA.Json/StringTable.js +43 -0
  14. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +52 -39
  15. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +1 -1
  16. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +3 -3
  17. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +1 -1
  18. package/ISA/ISA.Spreadsheet/ArcAssay.js +96 -84
  19. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +2 -2
  20. package/ISA/ISA.Spreadsheet/ArcStudy.js +32 -20
  21. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +7 -7
  22. package/Templates/Template.Spreadsheet.js +2 -2
  23. package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsAddress.fs +22 -8
  24. package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsAddress.fs.js +20 -10
  25. package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsWorksheet.fs +12 -6
  26. package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsWorksheet.fs.js +12 -8
  27. package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  28. package/fable_modules/project_cracked.json +1 -1
  29. package/package.json +1 -1
  30. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs +0 -0
  31. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs.js +0 -0
  32. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs +0 -0
  33. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs.js +0 -0
  34. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs +0 -0
  35. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs.js +0 -0
  36. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs +0 -0
  37. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs.js +0 -0
  38. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/DSL.fs +0 -0
  39. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/DSL.fs.js +0 -0
  40. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Expression.fs +0 -0
  41. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Expression.fs.js +0 -0
  42. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Operators.fs +0 -0
  43. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Operators.fs.js +0 -0
  44. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs +0 -0
  45. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs.js +0 -0
  46. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs +0 -0
  47. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs.js +0 -0
  48. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs +0 -0
  49. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs.js +0 -0
  50. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Transform.fs +0 -0
  51. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Transform.fs.js +0 -0
  52. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Types.fs +0 -0
  53. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/Types.fs.js +0 -0
  54. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs +0 -0
  55. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs.js +0 -0
  56. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsColumn.fs +0 -0
  57. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsColumn.fs.js +0 -0
  58. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsRow.fs +0 -0
  59. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsRow.fs.js +0 -0
  60. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsSpreadsheet.fableproj +0 -0
  61. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsWorkbook.fs +0 -0
  62. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/FsWorkbook.fs.js +0 -0
  63. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs +0 -0
  64. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs.js +0 -0
  65. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs +0 -0
  66. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs.js +0 -0
  67. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs +0 -0
  68. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs.js +0 -0
  69. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs +0 -0
  70. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs.js +0 -0
  71. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs +0 -0
  72. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs.js +0 -0
  73. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/SheetBuilder.fs +0 -0
  74. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/SheetBuilder.fs.js +0 -0
  75. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs +0 -0
  76. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs.js +0 -0
  77. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs +0 -0
  78. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs.js +0 -0
  79. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs +0 -0
  80. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs.js +0 -0
  81. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  82. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  83. /package/fable_modules/{FsSpreadsheet.5.1.1 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/ARC.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { concat, fold, map, exactlyOne, choose } from "./fable_modules/fable-library.4.5.0/Array.js";
2
- import { ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49, ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ISA_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, ARCtrl_ISA_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, ARCtrl_ISA_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contracts/Contracts.ArcTypes.js";
2
+ import { ARCtrl_ISA_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49, ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ISA_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, ARCtrl_ISA_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, ARCtrl_ISA_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contracts/Contracts.ArcTypes.js";
3
3
  import { collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, toList, toArray } from "./fable_modules/fable-library.4.5.0/Seq.js";
4
4
  import { createRunsFolder, createWorkflowsFolder, createInvestigationFile, createStudyFolder, createStudiesFolder, createAssayFolder, createAssaysFolder } from "./FileSystemTree.js";
5
5
  import { FileSystemTree } from "./FileSystem/FileSystemTree.js";
@@ -10,16 +10,16 @@ import { Contract } from "./Contract/Contract.js";
10
10
  import { ofArray } from "./fable_modules/fable-library.4.5.0/List.js";
11
11
  import { tryISAReadContractFromPath } from "./Contracts/Contracts.ARCtrl.js";
12
12
  import { ArcTables } from "./ISA/ISA/ArcTypes/ArcTables.js";
13
+ import { comparePrimitives, safeHash } from "./fable_modules/fable-library.4.5.0/Util.js";
13
14
  import { addToDict } from "./fable_modules/fable-library.4.5.0/MapUtil.js";
14
15
  import { toFsWorkbook, toLightFsWorkbook } from "./ISA/ISA.Spreadsheet/ArcInvestigation.js";
15
16
  import { ArcInvestigation } from "./ISA/ISA/ArcTypes/ArcTypes.js";
16
17
  import { Assay_fileNameFromIdentifier, Study_fileNameFromIdentifier } from "./ISA/ISA/Identifier.js";
17
18
  import { ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9 } from "./ISA/ISA.Spreadsheet/ArcStudy.js";
18
19
  import { toFsWorkbook as toFsWorkbook_1 } from "./ISA/ISA.Spreadsheet/ArcAssay.js";
19
- import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.5.1.1/Cells/FsCellsCollection.fs.js";
20
+ import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.5.1.3/Cells/FsCellsCollection.fs.js";
20
21
  import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, Init_createInitContract_6DFDD678 } from "./Contracts/Contracts.Git.js";
21
22
  import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library.4.5.0/Set.js";
22
- import { comparePrimitives } from "./fable_modules/fable-library.4.5.0/Util.js";
23
23
  import { ofSeq as ofSeq_1 } from "./fable_modules/fable-library.4.5.0/Map.js";
24
24
  import { class_type } from "./fable_modules/fable-library.4.5.0/Reflection.js";
25
25
 
@@ -172,6 +172,7 @@ export class ARC {
172
172
  const registeredStudy = registeredStudyOpt;
173
173
  registeredStudy.UpdateReferenceByStudyFile(study, true);
174
174
  }
175
+ study.StaticHash = (study.GetLightHashCode() | 0);
175
176
  });
176
177
  assays.forEach((assay) => {
177
178
  const registeredAssayOpt = tryFind((a_1) => (a_1.Identifier === assay.Identifier), investigation.Assays);
@@ -188,6 +189,13 @@ export class ARC {
188
189
  updatedTables = fold((tables, study_1) => ArcTables.updateReferenceTablesBySheets(new ArcTables(study_1.Tables), tables, false), new ArcTables(assay_1.Tables), array_6);
189
190
  assay_1.Tables = updatedTables.Tables;
190
191
  });
192
+ iterate((a_3) => {
193
+ a_3.StaticHash = (safeHash(a_3) | 0);
194
+ }, investigation.Assays);
195
+ iterate((s_2) => {
196
+ s_2.StaticHash = (s_2.GetLightHashCode() | 0);
197
+ }, investigation.Studies);
198
+ investigation.StaticHash = (investigation.GetLightHashCode() | 0);
191
199
  this$.ISA = investigation;
192
200
  }
193
201
  UpdateFileSystem() {
@@ -208,10 +216,13 @@ export class ARC {
208
216
  else {
209
217
  const inv = matchValue;
210
218
  addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", (isLight_1 ? (toLightFsWorkbook) : (toFsWorkbook))(inv)]);
219
+ inv.StaticHash = (inv.GetLightHashCode() | 0);
211
220
  iterate((s) => {
221
+ s.StaticHash = (s.GetLightHashCode() | 0);
212
222
  addToDict(workbooks, Study_fileNameFromIdentifier(s.Identifier), ["ISA_Study", ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9(s)]);
213
223
  }, inv.Studies);
214
224
  iterate((a) => {
225
+ a.StaticHash = (safeHash(a) | 0);
215
226
  addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay", toFsWorkbook_1(a)]);
216
227
  }, inv.Assays);
217
228
  }
@@ -227,6 +238,31 @@ export class ARC {
227
238
  }
228
239
  }, this$._fs.Tree.ToFilePaths(true));
229
240
  }
241
+ GetUpdateContracts(isLight) {
242
+ let inv, inv_1, inv_2;
243
+ const this$ = this;
244
+ const isLight_1 = defaultArg(isLight, true);
245
+ const matchValue = this$.ISA;
246
+ return (matchValue != null) ? (((inv = matchValue, inv.StaticHash === 0)) ? ((inv_1 = matchValue, this$.GetWriteContracts(isLight_1))) : ((inv_2 = matchValue, toArray(delay(() => {
247
+ const hash = inv_2.GetLightHashCode() | 0;
248
+ return append((inv_2.StaticHash !== hash) ? singleton(ARCtrl_ISA_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(inv_2, isLight_1)) : empty(), delay(() => {
249
+ inv_2.StaticHash = (hash | 0);
250
+ return append(collect((s) => {
251
+ const hash_1 = s.GetLightHashCode() | 0;
252
+ return append((s.StaticHash === 0) ? ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(s, true) : ((s.StaticHash !== hash_1) ? singleton(ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract(s)) : empty()), delay(() => {
253
+ s.StaticHash = (hash_1 | 0);
254
+ return empty();
255
+ }));
256
+ }, inv_2.Studies), delay(() => collect((a) => {
257
+ const hash_2 = safeHash(a) | 0;
258
+ return append((a.StaticHash === 0) ? ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(a, true) : ((a.StaticHash !== hash_2) ? singleton(ARCtrl_ISA_ArcAssay__ArcAssay_ToUpdateContract(a)) : empty()), delay(() => {
259
+ a.StaticHash = (hash_2 | 0);
260
+ return empty();
261
+ }));
262
+ }, inv_2.Assays)));
263
+ }));
264
+ }))))) : this$.GetWriteContracts(isLight_1);
265
+ }
230
266
  GetGitInitContracts(branch, repositoryAddress, defaultGitignore) {
231
267
  const defaultGitignore_1 = defaultArg(defaultGitignore, false);
232
268
  return toArray(delay(() => append(singleton(Init_createInitContract_6DFDD678(unwrap(branch))), delay(() => append(defaultGitignore_1 ? singleton(gitignoreContract) : empty(), delay(() => ((repositoryAddress != null) ? singleton(Init_createAddRemoteContract_Z721C83C5(value_2(repositoryAddress))) : empty())))))));
@@ -6,6 +6,8 @@ import { fromFsWorkbook, toFsWorkbook, toLightFsWorkbook } from "../ISA/ISA.Spre
6
6
  import { Contract } from "../Contract/Contract.js";
7
7
  import { Assay_fileNameFromIdentifier, Study_fileNameFromIdentifier } from "../ISA/ISA/Identifier.js";
8
8
  import { ARCtrl_ISA_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D, ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9 } from "../ISA/ISA.Spreadsheet/ArcStudy.js";
9
+ import { empty, singleton, collect, append, delay, toArray } from "../fable_modules/fable-library.4.5.0/Seq.js";
10
+ import { createAssayFolder, createStudyFolder, createStudiesFolder } from "../FileSystemTree.js";
9
11
  import { getAssayFolderPath, getStudyFolderPath } from "../Path.js";
10
12
  import { fromFsWorkbook as fromFsWorkbook_1, toFsWorkbook as toFsWorkbook_1 } from "../ISA/ISA.Spreadsheet/ArcAssay.js";
11
13
 
@@ -136,9 +138,14 @@ export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_tryFromReadContrac
136
138
  }
137
139
  }
138
140
 
139
- export function ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract(this$) {
141
+ export function ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(this$, WithFolder) {
142
+ const withFolder = defaultArg(WithFolder, false);
140
143
  const path = Study_fileNameFromIdentifier(this$.Identifier);
141
- return Contract.createCreate(path, "ISA_Study", ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9(this$));
144
+ const c = Contract.createCreate(path, "ISA_Study", ARCtrl_ISA_ArcStudy__ArcStudy_toFsWorkbook_Static_Z2A9662E9(this$));
145
+ return toArray(delay(() => {
146
+ let folderFS;
147
+ return append(withFolder ? ((folderFS = createStudiesFolder([createStudyFolder(this$.Identifier)]), collect((p) => ((p !== path) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
148
+ }));
142
149
  }
143
150
 
144
151
  export function ARCtrl_ISA_ArcStudy__ArcStudy_ToUpdateContract(this$) {
@@ -155,8 +162,8 @@ export function ARCtrl_ISA_ArcStudy__ArcStudy_toDeleteContract_Static_1B3D5E9B(s
155
162
  return ARCtrl_ISA_ArcStudy__ArcStudy_ToDeleteContract(study);
156
163
  }
157
164
 
158
- export function ARCtrl_ISA_ArcStudy__ArcStudy_toCreateContract_Static_1B3D5E9B(study) {
159
- return ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract(study);
165
+ export function ARCtrl_ISA_ArcStudy__ArcStudy_toCreateContract_Static_Z12D8504E(study, WithFolder) {
166
+ return ARCtrl_ISA_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(study, unwrap(WithFolder));
160
167
  }
161
168
 
162
169
  export function ARCtrl_ISA_ArcStudy__ArcStudy_toUpdateContract_Static_1B3D5E9B(study) {
@@ -195,9 +202,14 @@ export function ARCtrl_ISA_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923
195
202
  }
196
203
  }
197
204
 
198
- export function ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract(this$) {
205
+ export function ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(this$, WithFolder) {
206
+ const withFolder = defaultArg(WithFolder, false);
199
207
  const path = Assay_fileNameFromIdentifier(this$.Identifier);
200
- return Contract.createCreate(path, "ISA_Assay", toFsWorkbook_1(this$));
208
+ const c = Contract.createCreate(path, "ISA_Assay", toFsWorkbook_1(this$));
209
+ return toArray(delay(() => {
210
+ let folderFS;
211
+ return append(withFolder ? ((folderFS = createAssayFolder(this$.Identifier), collect((p) => ((p !== path) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
212
+ }));
201
213
  }
202
214
 
203
215
  export function ARCtrl_ISA_ArcAssay__ArcAssay_ToUpdateContract(this$) {
@@ -214,8 +226,8 @@ export function ARCtrl_ISA_ArcAssay__ArcAssay_toDeleteContract_Static_1C75D08D(a
214
226
  return ARCtrl_ISA_ArcAssay__ArcAssay_ToDeleteContract(assay);
215
227
  }
216
228
 
217
- export function ARCtrl_ISA_ArcAssay__ArcAssay_toCreateContract_Static_1C75D08D(assay) {
218
- return ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract(assay);
229
+ export function ARCtrl_ISA_ArcAssay__ArcAssay_toCreateContract_Static_Z3B1E839C(assay, WithFolder) {
230
+ return ARCtrl_ISA_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(assay, unwrap(WithFolder));
219
231
  }
220
232
 
221
233
  export function ARCtrl_ISA_ArcAssay__ArcAssay_toUpdateContract_Static_1C75D08D(assay) {
@@ -1,7 +1,7 @@
1
1
  import { Dictionary } from "../../../fable_modules/fable-library.4.5.0/MutableMap.js";
2
2
  import { compareArrays, safeHash, disposeSafe, getEnumerator, comparePrimitives, equals, arrayHash, equalArrays } from "../../../fable_modules/fable-library.4.5.0/Util.js";
3
3
  import { value as value_9, map as map_2, defaultArg, unwrap } from "../../../fable_modules/fable-library.4.5.0/Option.js";
4
- import { Unchecked_extendToRowCount, ProcessParsing_processToRows, ProcessParsing_alignByHeaders, ProcessParsing_mergeIdenticalProcesses, ProcessParsing_getProcessGetter, Unchecked_removeRowCells_withIndexChange, Unchecked_addRow, Unchecked_getEmptyCellForHeader, Unchecked_removeColumnCells_withIndexChange, tryFindDuplicateUniqueInArray, Unchecked_removeColumnCells, Unchecked_removeHeader, Unchecked_fillMissingCells, Unchecked_addColumn, tryFindDuplicateUnique, Unchecked_setCellAt, SanityChecks_validateColumn, SanityChecks_validateRowIndex, SanityChecks_validateColumnIndex, Unchecked_tryGetCellAt, getRowCount, getColumnCount } from "./ArcTableAux.js";
4
+ import { boxHashValues, Unchecked_extendToRowCount, ProcessParsing_processToRows, ProcessParsing_alignByHeaders, ProcessParsing_mergeIdenticalProcesses, ProcessParsing_getProcessGetter, Unchecked_removeRowCells_withIndexChange, Unchecked_addRows, Unchecked_addRow, Unchecked_getEmptyCellForHeader, Unchecked_removeColumnCells_withIndexChange, tryFindDuplicateUniqueInArray, Unchecked_removeColumnCells, Unchecked_removeHeader, Unchecked_fillMissingCells, Unchecked_addColumn, tryFindDuplicateUnique, Unchecked_setCellAt, SanityChecks_validateColumn, SanityChecks_validateRowIndex, SanityChecks_validateColumnIndex, Unchecked_tryGetCellAt, getRowCount, getColumnCount } from "./ArcTableAux.js";
5
5
  import { item, append as append_1, indexed as indexed_1, choose, toList, zip, fold, filter, length, tryFindIndex, empty, singleton, collect, removeAt, map, delay, toArray } from "../../../fable_modules/fable-library.4.5.0/Seq.js";
6
6
  import { rangeDouble } from "../../../fable_modules/fable-library.4.5.0/Range.js";
7
7
  import { CompositeColumn } from "./CompositeColumn.js";
@@ -22,7 +22,7 @@ import { Array_groupBy, List_distinct } from "../../../fable_modules/fable-libra
22
22
  import { toProtocol } from "./CompositeRow.js";
23
23
  import { Process_create_Z42860F3E } from "../JsonTypes/Process.js";
24
24
  import { getItemFromDict } from "../../../fable_modules/fable-library.4.5.0/MapUtil.js";
25
- import { HashCodes_boxHashArray } from "../Helper.js";
25
+ import { HashCodes_boxHashSeq, HashCodes_boxHashArray } from "../Helper.js";
26
26
  import { class_type } from "../../../fable_modules/fable-library.4.5.0/Reflection.js";
27
27
 
28
28
  export class ArcTable {
@@ -502,10 +502,7 @@ export class ArcTable {
502
502
  SanityChecks_validateColumn(CompositeColumn.create(h, [row_1[columnIndex]]));
503
503
  }
504
504
  }
505
- rows.forEach((row_2) => {
506
- Unchecked_addRow(index_1, row_2, this$.Headers, this$.Values);
507
- index_1 = ((index_1 + 1) | 0);
508
- });
505
+ Unchecked_addRows(index_1, rows, this$.Headers, this$.Values);
509
506
  }
510
507
  static addRows(rows, index) {
511
508
  return (table) => {
@@ -864,16 +861,8 @@ export class ArcTable {
864
861
  }
865
862
  GetHashCode() {
866
863
  const this$ = this;
867
- const v_2 = map_1((tupledArg) => {
868
- const _arg = tupledArg[0];
869
- return HashCodes_boxHashArray([_arg[0], _arg[1], tupledArg[1]]);
870
- }, sortBy((tuple) => tuple[0], toArray(delay(() => collect((matchValue) => {
871
- const activePatternResult = matchValue;
872
- return singleton([activePatternResult[0], activePatternResult[1]]);
873
- }, this$.Values))), {
874
- Compare: compareArrays,
875
- }));
876
- return HashCodes_boxHashArray([this$.Name, HashCodes_boxHashArray(Array.from(this$.Headers)), HashCodes_boxHashArray(Array.from(v_2))]) | 0;
864
+ const vHash = boxHashValues(this$.ColumnCount, this$.Values);
865
+ return HashCodes_boxHashArray([this$.Name, HashCodes_boxHashSeq(this$.Headers), vHash]) | 0;
877
866
  }
878
867
  }
879
868
 
@@ -1,12 +1,14 @@
1
- import { getItemFromDict, addToDict } from "../../../fable_modules/fable-library.4.5.0/MapUtil.js";
2
- import { map as map_1, defaultArg, unwrap, value as value_9, some } from "../../../fable_modules/fable-library.4.5.0/Option.js";
3
- import { empty as empty_2, singleton as singleton_1, append, delay, map, tryPick, toList, indexed, initialize, filter, tryFindIndex, maxBy } from "../../../fable_modules/fable-library.4.5.0/Seq.js";
4
- import { arrayHash, equalArrays, stringHash, int32ToString, compareArrays, disposeSafe, getEnumerator, compare, equals, comparePrimitives } from "../../../fable_modules/fable-library.4.5.0/Util.js";
5
- import { pick, exists, zip, append as append_1, sortBy, tryPick as tryPick_1, collect, mapIndexed, item, length, map as map_2, ofArray, singleton, choose, ofSeq, empty as empty_1, head, tail as tail_1, isEmpty, cons } from "../../../fable_modules/fable-library.4.5.0/List.js";
1
+ import { addToDict, getItemFromDict } from "../../../fable_modules/fable-library.4.5.0/MapUtil.js";
2
+ import { map as map_2, defaultArg, unwrap, value as value_9, some } from "../../../fable_modules/fable-library.4.5.0/Option.js";
3
+ import { empty as empty_1, singleton as singleton_1, append, delay, map as map_1, tryPick, toList, indexed, head as head_1, toArray, filter, tryFindIndex, maxBy } from "../../../fable_modules/fable-library.4.5.0/Seq.js";
4
+ import { arrayHash, equalArrays, stringHash, int32ToString, numberHash, disposeSafe, getEnumerator, compare, equals, safeHash, comparePrimitives } from "../../../fable_modules/fable-library.4.5.0/Util.js";
5
+ import { pick, exists, zip, append as append_1, sortBy, tryPick as tryPick_1, collect, mapIndexed, item, length, map as map_3, ofArray as ofArray_2, singleton, choose, ofSeq, empty, head, tail as tail_1, isEmpty, cons } from "../../../fable_modules/fable-library.4.5.0/List.js";
6
6
  import { CompositeCell } from "./CompositeCell.js";
7
7
  import { max } from "../../../fable_modules/fable-library.4.5.0/Double.js";
8
- import { iterateIndexed } from "../../../fable_modules/fable-library.4.5.0/Array.js";
9
- import { FSharpSet__get_MinimumElement, FSharpSet__get_IsEmpty, difference, ofSeq as ofSeq_1 } from "../../../fable_modules/fable-library.4.5.0/Set.js";
8
+ import { map, iterateIndexed } from "../../../fable_modules/fable-library.4.5.0/Array.js";
9
+ import { tryFind, ofArray } from "../../../fable_modules/fable-library.4.5.0/Map.js";
10
+ import { List_groupBy, Array_groupBy } from "../../../fable_modules/fable-library.4.5.0/Seq2.js";
11
+ import { FSharpSet__Contains, ofArray as ofArray_1 } from "../../../fable_modules/fable-library.4.5.0/Set.js";
10
12
  import { Value as Value_1 } from "../JsonTypes/Value.js";
11
13
  import { Component_fromOptions } from "../JsonTypes/Component.js";
12
14
  import { ProtocolParameter } from "../JsonTypes/ProtocolParameter.js";
@@ -26,24 +28,9 @@ import { Sample_create_E50ED22 } from "../JsonTypes/Sample.js";
26
28
  import { Process_create_Z42860F3E, Process_decomposeName_Z721C83C5, Process_make, Process_composeName } from "../JsonTypes/Process.js";
27
29
  import { List_tryPickAndRemove, HashCodes_boxHashSeq, Option_fromValueWithDefault } from "../Helper.js";
28
30
  import { Protocol_make } from "../JsonTypes/Protocol.js";
29
- import { List_groupBy } from "../../../fable_modules/fable-library.4.5.0/Seq2.js";
30
31
  import { createMissingIdentifier } from "../Identifier.js";
31
32
  import { Dictionary } from "../../../fable_modules/fable-library.4.5.0/MutableMap.js";
32
33
 
33
- /**
34
- * Returns the dictionary with the binding added to the given dictionary.
35
- * If a binding with the given key already exists in the input dictionary, the existing binding is replaced by the new binding in the result dictionary.
36
- */
37
- export function Dictionary_addOrUpdateInPlace(key, value, table) {
38
- if (table.has(key)) {
39
- table.set(key, value);
40
- }
41
- else {
42
- addToDict(table, key, value);
43
- }
44
- return table;
45
- }
46
-
47
34
  /**
48
35
  * Lookup an element in the dictionary, returning a <c>Some</c> value if the element is in the domain
49
36
  * of the dictionary and <c>None</c> if not.
@@ -72,6 +59,17 @@ export function getRowCount(values) {
72
59
  }
73
60
  }
74
61
 
62
+ export function boxHashValues(colCount, values) {
63
+ let hash = 0;
64
+ const rowCount = getRowCount(values) | 0;
65
+ for (let col = 0; col <= (colCount - 1); col++) {
66
+ for (let row = 0; row <= (rowCount - 1); row++) {
67
+ hash = ((((-1640531527 + safeHash(getItemFromDict(values, [col, row]))) + (hash << 6)) + (hash >> 2)) | 0);
68
+ }
69
+ }
70
+ return hash;
71
+ }
72
+
75
73
  export function $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, input) {
76
74
  switch (input.tag) {
77
75
  case 3:
@@ -141,7 +139,7 @@ export function tryFindDuplicateUniqueInArray(existingHeaders) {
141
139
  break;
142
140
  }
143
141
  };
144
- return loop(0, empty_1(), ofSeq(filter((x) => !x.IsTermColumn, existingHeaders)));
142
+ return loop(0, empty(), ofSeq(filter((x) => !x.IsTermColumn, existingHeaders)));
145
143
  }
146
144
 
147
145
  /**
@@ -186,8 +184,18 @@ export function Unchecked_tryGetCellAt(column, row, cells) {
186
184
  return Dictionary_tryFind([column, row], cells);
187
185
  }
188
186
 
187
+ /**
188
+ * Add or update a cell in the dictionary.
189
+ */
189
190
  export function Unchecked_setCellAt(columnIndex, rowIndex, c, cells) {
190
- Dictionary_addOrUpdateInPlace([columnIndex, rowIndex], c, cells);
191
+ cells.set([columnIndex, rowIndex], c);
192
+ }
193
+
194
+ /**
195
+ * Add a cell to the dictionary. If a cell already exists at the given position, it fails.
196
+ */
197
+ export function Unchecked_addCellAt(columnIndex, rowIndex, c, cells) {
198
+ addToDict(cells, [columnIndex, rowIndex], c);
191
199
  }
192
200
 
193
201
  export function Unchecked_moveCellTo(fromCol, fromRow, toCol, toRow, cells) {
@@ -357,27 +365,37 @@ export function Unchecked_addColumn(newHeader, newCells, index, forceReplace, on
357
365
  }
358
366
 
359
367
  export function Unchecked_fillMissingCells(headers, values) {
368
+ let col;
360
369
  const rowCount = getRowCount(values) | 0;
361
- const lastColumnIndex = (getColumnCount(headers) - 1) | 0;
362
- const keys = values.keys();
363
- for (let columnIndex = 0; columnIndex <= lastColumnIndex; columnIndex++) {
364
- const colKeys = ofSeq_1(filter((tupledArg) => (tupledArg[0] === columnIndex), keys), {
365
- Compare: compareArrays,
366
- });
367
- const missingKeys = difference(ofSeq_1(initialize(rowCount, (i) => [columnIndex, i]), {
368
- Compare: compareArrays,
369
- }), colKeys);
370
- if (!FSharpSet__get_IsEmpty(missingKeys)) {
371
- const empty = Unchecked_getEmptyCellForHeader(headers[columnIndex], FSharpSet__get_IsEmpty(colKeys) ? void 0 : getItemFromDict(values, FSharpSet__get_MinimumElement(colKeys)));
372
- const enumerator = getEnumerator(missingKeys);
373
- try {
374
- while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
375
- const forLoopVar = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
376
- Unchecked_setCellAt(forLoopVar[0], forLoopVar[1], empty, values);
377
- }
370
+ const columnCount = getColumnCount(headers) | 0;
371
+ const columnKeyGroups = ofArray(Array_groupBy((tuple) => tuple[0], toArray(values.keys()), {
372
+ Equals: (x, y) => (x === y),
373
+ GetHashCode: numberHash,
374
+ }), {
375
+ Compare: comparePrimitives,
376
+ });
377
+ for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
378
+ const header = headers[columnIndex];
379
+ const matchValue = tryFind(columnIndex, columnKeyGroups);
380
+ if (matchValue == null) {
381
+ const defaultCell_1 = Unchecked_getEmptyCellForHeader(header, void 0);
382
+ for (let rowIndex_1 = 0; rowIndex_1 <= (rowCount - 1); rowIndex_1++) {
383
+ Unchecked_addCellAt(columnIndex, rowIndex_1, defaultCell_1, values);
378
384
  }
379
- finally {
380
- disposeSafe(enumerator);
385
+ }
386
+ else if ((col = matchValue, col.length === rowCount)) {
387
+ const col_1 = matchValue;
388
+ }
389
+ else {
390
+ const col_2 = matchValue;
391
+ const defaultCell = Unchecked_getEmptyCellForHeader(header, getItemFromDict(values, head_1(col_2)));
392
+ const rowKeys = ofArray_1(map((tuple_1) => tuple_1[1], col_2, Int32Array), {
393
+ Compare: comparePrimitives,
394
+ });
395
+ for (let rowIndex = 0; rowIndex <= (rowCount - 1); rowIndex++) {
396
+ if (!FSharpSet__Contains(rowKeys, rowIndex)) {
397
+ Unchecked_addCellAt(columnIndex, rowIndex, defaultCell, values);
398
+ }
381
399
  }
382
400
  }
383
401
  }
@@ -417,6 +435,31 @@ export function Unchecked_addRow(index, newCells, headers, values) {
417
435
  }, newCells);
418
436
  }
419
437
 
438
+ export function Unchecked_addRows(index, newRows, headers, values) {
439
+ const rowCount = getRowCount(values) | 0;
440
+ const columnCount = getColumnCount(headers) | 0;
441
+ const numNewRows = newRows.length | 0;
442
+ let increaseRowIndices;
443
+ if (index < rowCount) {
444
+ const lastRowIndex = max(rowCount - 1, 0) | 0;
445
+ for (let rowIndex = lastRowIndex; rowIndex >= index; rowIndex--) {
446
+ for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
447
+ Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex, rowIndex + numNewRows, values);
448
+ }
449
+ }
450
+ }
451
+ else {
452
+ increaseRowIndices = void 0;
453
+ }
454
+ let currentRowIndex = index;
455
+ for (let idx = 0; idx <= (newRows.length - 1); idx++) {
456
+ const setNewCells = iterateIndexed((columnIndex_1, cell) => {
457
+ Unchecked_setCellAt(columnIndex_1, currentRowIndex, cell, values);
458
+ }, newRows[idx]);
459
+ currentRowIndex = ((currentRowIndex + 1) | 0);
460
+ }
461
+ }
462
+
420
463
  /**
421
464
  * Convert a CompositeCell to a ISA Value and Unit tuple.
422
465
  */
@@ -830,35 +873,35 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
830
873
  let inputGetter_1;
831
874
  const matchValue = tryPick((tupledArg_9) => ProcessParsing_tryGetInputGetter(tupledArg_9[0], tupledArg_9[1]), headers_1);
832
875
  if (matchValue == null) {
833
- inputGetter_1 = ((matrix_1) => ((i_1) => singleton(new ProcessInput(0, [Source_create_7A281ED9(void 0, `${processNameRoot}_Input_${i_1}`, toList(map((f_1) => f_1(matrix_1)(i_1), charGetters)))]))));
876
+ inputGetter_1 = ((matrix_1) => ((i_1) => singleton(new ProcessInput(0, [Source_create_7A281ED9(void 0, `${processNameRoot}_Input_${i_1}`, toList(map_1((f_1) => f_1(matrix_1)(i_1), charGetters)))]))));
834
877
  }
835
878
  else {
836
879
  const inputGetter = matchValue;
837
880
  inputGetter_1 = ((matrix) => ((i) => {
838
- const chars = toList(map((f) => f(matrix)(i), charGetters));
881
+ const chars = toList(map_1((f) => f(matrix)(i), charGetters));
839
882
  const input = inputGetter(matrix)(i);
840
- return (!(ProcessInput__isSample(input) ? true : ProcessInput__isSource(input)) && !isEmpty(chars)) ? ofArray([input, ProcessInput_createSample_Z6DF16D07(ProcessInput__get_Name(input), chars)]) : singleton(ProcessInput_setCharacteristicValues(chars, input));
883
+ return (!(ProcessInput__isSample(input) ? true : ProcessInput__isSource(input)) && !isEmpty(chars)) ? ofArray_2([input, ProcessInput_createSample_Z6DF16D07(ProcessInput__get_Name(input), chars)]) : singleton(ProcessInput_setCharacteristicValues(chars, input));
841
884
  }));
842
885
  }
843
886
  let outputGetter_1;
844
887
  const matchValue_1 = tryPick((tupledArg_10) => ProcessParsing_tryGetOutputGetter(tupledArg_10[0], tupledArg_10[1]), headers_1);
845
888
  if (matchValue_1 == null) {
846
- outputGetter_1 = ((matrix_3) => ((i_3) => singleton(new ProcessOutput(0, [Sample_create_E50ED22(void 0, `${processNameRoot}_Output_${i_3}`, void 0, toList(map((f_3) => f_3(matrix_3)(i_3), factorValueGetters)))]))));
889
+ outputGetter_1 = ((matrix_3) => ((i_3) => singleton(new ProcessOutput(0, [Sample_create_E50ED22(void 0, `${processNameRoot}_Output_${i_3}`, void 0, toList(map_1((f_3) => f_3(matrix_3)(i_3), factorValueGetters)))]))));
847
890
  }
848
891
  else {
849
892
  const outputGetter = matchValue_1;
850
893
  outputGetter_1 = ((matrix_2) => ((i_2) => {
851
- const factors = toList(map((f_2) => f_2(matrix_2)(i_2), factorValueGetters));
894
+ const factors = toList(map_1((f_2) => f_2(matrix_2)(i_2), factorValueGetters));
852
895
  const output = outputGetter(matrix_2)(i_2);
853
- return (!ProcessOutput__isSample(output) && !isEmpty(factors)) ? ofArray([output, ProcessOutput_createSample_Z6DF16D07(ProcessOutput__get_Name(output), void 0, factors)]) : singleton(ProcessOutput_setFactorValues(factors, output));
896
+ return (!ProcessOutput__isSample(output) && !isEmpty(factors)) ? ofArray_2([output, ProcessOutput_createSample_Z6DF16D07(ProcessOutput__get_Name(output), void 0, factors)]) : singleton(ProcessOutput_setFactorValues(factors, output));
854
897
  }));
855
898
  }
856
899
  return (matrix_4) => ((i_4) => {
857
- const pn = map_1((p) => Process_composeName(p, i_4), Option_fromValueWithDefault("", processNameRoot));
858
- const paramvalues = Option_fromValueWithDefault(empty_1(), map_2((f_4) => f_4(matrix_4)(i_4), parameterValueGetters));
859
- const parameters = map_1((list_5) => map_2((pv) => value_9(pv.Category), list_5), paramvalues);
900
+ const pn = map_2((p) => Process_composeName(p, i_4), Option_fromValueWithDefault("", processNameRoot));
901
+ const paramvalues = Option_fromValueWithDefault(empty(), map_3((f_4) => f_4(matrix_4)(i_4), parameterValueGetters));
902
+ const parameters = map_2((list_5) => map_3((pv) => value_9(pv.Category), list_5), paramvalues);
860
903
  let protocol;
861
- const p_1 = Protocol_make(void 0, map_1((f_5) => f_5(matrix_4)(i_4), protocolREFGetter), map_1((f_6) => f_6(matrix_4)(i_4), protocolTypeGetter), map_1((f_7) => f_7(matrix_4)(i_4), protocolDescriptionGetter), map_1((f_8) => f_8(matrix_4)(i_4), protocolURIGetter), map_1((f_9) => f_9(matrix_4)(i_4), protocolVersionGetter), parameters, Option_fromValueWithDefault(empty_1(), map_2((f_10) => f_10(matrix_4)(i_4), componentGetters)), void 0);
904
+ const p_1 = Protocol_make(void 0, map_2((f_5) => f_5(matrix_4)(i_4), protocolREFGetter), map_2((f_6) => f_6(matrix_4)(i_4), protocolTypeGetter), map_2((f_7) => f_7(matrix_4)(i_4), protocolDescriptionGetter), map_2((f_8) => f_8(matrix_4)(i_4), protocolURIGetter), map_2((f_9) => f_9(matrix_4)(i_4), protocolVersionGetter), parameters, Option_fromValueWithDefault(empty(), map_3((f_10) => f_10(matrix_4)(i_4), componentGetters)), void 0);
862
905
  let matchResult;
863
906
  if (p_1.Name == null) {
864
907
  if (p_1.ProtocolType == null) {
@@ -902,7 +945,7 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
902
945
  let patternInput;
903
946
  const inputs = inputGetter_1(matrix_4)(i_4);
904
947
  const outputs = outputGetter_1(matrix_4)(i_4);
905
- patternInput = (((length(inputs) === 1) && (length(outputs) === 2)) ? [ofArray([item(0, inputs), item(0, inputs)]), outputs] : (((length(inputs) === 2) && (length(outputs) === 1)) ? [inputs, ofArray([item(0, outputs), item(0, outputs)])] : [inputs, outputs]));
948
+ patternInput = (((length(inputs) === 1) && (length(outputs) === 2)) ? [ofArray_2([item(0, inputs), item(0, inputs)]), outputs] : (((length(inputs) === 2) && (length(outputs) === 1)) ? [inputs, ofArray_2([item(0, outputs), item(0, outputs)])] : [inputs, outputs]));
906
949
  return Process_make(void 0, pn, protocol, paramvalues, void 0, void 0, void 0, void 0, patternInput[0], patternInput[1], void 0);
907
950
  });
908
951
  }
@@ -947,13 +990,13 @@ export function ProcessParsing_groupProcesses(ps) {
947
990
  export function ProcessParsing_mergeIdenticalProcesses(processes) {
948
991
  const l = List_groupBy((x) => {
949
992
  if ((x.Name != null) && (Process_decomposeName_Z721C83C5(value_9(x.Name))[1] != null)) {
950
- return [Process_decomposeName_Z721C83C5(value_9(x.Name))[0], x.ExecutesProtocol, map_1(HashCodes_boxHashSeq, x.ParameterValues)];
993
+ return [Process_decomposeName_Z721C83C5(value_9(x.Name))[0], x.ExecutesProtocol, map_2(HashCodes_boxHashSeq, x.ParameterValues)];
951
994
  }
952
995
  else if ((x.ExecutesProtocol != null) && (value_9(x.ExecutesProtocol).Name != null)) {
953
- return [value_9(value_9(x.ExecutesProtocol).Name), x.ExecutesProtocol, map_1(HashCodes_boxHashSeq, x.ParameterValues)];
996
+ return [value_9(value_9(x.ExecutesProtocol).Name), x.ExecutesProtocol, map_2(HashCodes_boxHashSeq, x.ParameterValues)];
954
997
  }
955
998
  else {
956
- return [createMissingIdentifier(), x.ExecutesProtocol, map_1(HashCodes_boxHashSeq, x.ParameterValues)];
999
+ return [createMissingIdentifier(), x.ExecutesProtocol, map_2(HashCodes_boxHashSeq, x.ParameterValues)];
957
1000
  }
958
1001
  }, processes, {
959
1002
  Equals: equalArrays,
@@ -964,28 +1007,28 @@ export function ProcessParsing_mergeIdenticalProcesses(processes) {
964
1007
  const processes_1 = tupledArg[1];
965
1008
  const n = _arg[0];
966
1009
  const pVs = item(0, processes_1).ParameterValues;
967
- const inputs = Option_fromValueWithDefault(empty_1(), collect((p) => defaultArg(p.Inputs, empty_1()), processes_1));
968
- const outputs = Option_fromValueWithDefault(empty_1(), collect((p_1) => defaultArg(p_1.Outputs, empty_1()), processes_1));
1010
+ const inputs = Option_fromValueWithDefault(empty(), collect((p) => defaultArg(p.Inputs, empty()), processes_1));
1011
+ const outputs = Option_fromValueWithDefault(empty(), collect((p_1) => defaultArg(p_1.Outputs, empty()), processes_1));
969
1012
  return Process_create_Z42860F3E(void 0, (length(l) > 1) ? Process_composeName(n, i) : n, _arg[1], pVs, void 0, void 0, void 0, void 0, inputs, outputs);
970
1013
  }, l);
971
1014
  }
972
1015
 
973
1016
  export function ProcessParsing_processToRows(p) {
974
1017
  let list_3;
975
- const pvs = map_2((ppv) => [JsonTypes_decomposeParameterValue(ppv), tryGetParameterColumnIndex(ppv)], defaultArg(p.ParameterValues, empty_1()));
1018
+ const pvs = map_3((ppv) => [JsonTypes_decomposeParameterValue(ppv), tryGetParameterColumnIndex(ppv)], defaultArg(p.ParameterValues, empty()));
976
1019
  let components;
977
1020
  const matchValue = p.ExecutesProtocol;
978
- components = ((matchValue == null) ? empty_1() : map_2((ppv_1) => [JsonTypes_decomposeComponent(ppv_1), tryGetComponentIndex(ppv_1)], defaultArg(matchValue.Components, empty_1())));
1021
+ components = ((matchValue == null) ? empty() : map_3((ppv_1) => [JsonTypes_decomposeComponent(ppv_1), tryGetComponentIndex(ppv_1)], defaultArg(matchValue.Components, empty())));
979
1022
  let protVals;
980
1023
  const matchValue_1 = p.ExecutesProtocol;
981
1024
  if (matchValue_1 == null) {
982
- protVals = empty_1();
1025
+ protVals = empty();
983
1026
  }
984
1027
  else {
985
1028
  const prot_1 = matchValue_1;
986
- protVals = toList(delay(() => append((prot_1.Name != null) ? singleton_1([new CompositeHeader(8, []), new CompositeCell(1, [value_9(prot_1.Name)])]) : empty_2(), delay(() => append((prot_1.ProtocolType != null) ? singleton_1([new CompositeHeader(4, []), new CompositeCell(0, [value_9(prot_1.ProtocolType)])]) : empty_2(), delay(() => append((prot_1.Description != null) ? singleton_1([new CompositeHeader(5, []), new CompositeCell(1, [value_9(prot_1.Description)])]) : empty_2(), delay(() => append((prot_1.Uri != null) ? singleton_1([new CompositeHeader(6, []), new CompositeCell(1, [value_9(prot_1.Uri)])]) : empty_2(), delay(() => ((prot_1.Version != null) ? singleton_1([new CompositeHeader(7, []), new CompositeCell(1, [value_9(prot_1.Version)])]) : empty_2())))))))))));
1029
+ protVals = toList(delay(() => append((prot_1.Name != null) ? singleton_1([new CompositeHeader(8, []), new CompositeCell(1, [value_9(prot_1.Name)])]) : empty_1(), delay(() => append((prot_1.ProtocolType != null) ? singleton_1([new CompositeHeader(4, []), new CompositeCell(0, [value_9(prot_1.ProtocolType)])]) : empty_1(), delay(() => append((prot_1.Description != null) ? singleton_1([new CompositeHeader(5, []), new CompositeCell(1, [value_9(prot_1.Description)])]) : empty_1(), delay(() => append((prot_1.Uri != null) ? singleton_1([new CompositeHeader(6, []), new CompositeCell(1, [value_9(prot_1.Uri)])]) : empty_1(), delay(() => ((prot_1.Version != null) ? singleton_1([new CompositeHeader(7, []), new CompositeCell(1, [value_9(prot_1.Version)])]) : empty_1())))))))))));
987
1030
  }
988
- return map_2((tupledArg_1) => {
1031
+ return map_3((tupledArg_1) => {
989
1032
  const ios = tupledArg_1[1];
990
1033
  const inputForCharas = defaultArg(tryPick_1((tupledArg_2) => {
991
1034
  const i_2 = tupledArg_2[0];
@@ -1005,7 +1048,7 @@ export function ProcessParsing_processToRows(p) {
1005
1048
  return void 0;
1006
1049
  }
1007
1050
  }, ios), head(ios)[0]);
1008
- const chars = map_2((cv) => [JsonTypes_decomposeCharacteristicValue(cv), tryGetCharacteristicColumnIndex(cv)], ProcessInput_getCharacteristicValues_102B6859(inputForCharas));
1051
+ const chars = map_3((cv) => [JsonTypes_decomposeCharacteristicValue(cv), tryGetCharacteristicColumnIndex(cv)], ProcessInput_getCharacteristicValues_102B6859(inputForCharas));
1009
1052
  const outputForFactors = defaultArg(tryPick_1((tupledArg_4) => {
1010
1053
  const o_4 = tupledArg_4[1];
1011
1054
  if (ProcessOutput__isSample(o_4)) {
@@ -1024,11 +1067,11 @@ export function ProcessParsing_processToRows(p) {
1024
1067
  return void 0;
1025
1068
  }
1026
1069
  }, ios), head(ios)[1]);
1027
- const vals = map_2((tuple_5) => tuple_5[0], sortBy((arg) => defaultArg(arg[1], 10000), append_1(chars, append_1(components, append_1(pvs, map_2((fv) => [JsonTypes_decomposeFactorValue(fv), tryGetFactorColumnIndex(fv)], ProcessOutput_getFactorValues_11830B70(outputForFactors))))), {
1070
+ const vals = map_3((tuple_5) => tuple_5[0], sortBy((arg) => defaultArg(arg[1], 10000), append_1(chars, append_1(components, append_1(pvs, map_3((fv) => [JsonTypes_decomposeFactorValue(fv), tryGetFactorColumnIndex(fv)], ProcessOutput_getFactorValues_11830B70(outputForFactors))))), {
1028
1071
  Compare: comparePrimitives,
1029
1072
  }));
1030
1073
  return toList(delay(() => append(singleton_1(JsonTypes_decomposeProcessInput(inputForType)), delay(() => append(protVals, delay(() => append(vals, delay(() => singleton_1(JsonTypes_decomposeProcessOutput(outputForType))))))))));
1031
- }, List_groupBy((tupledArg) => [ProcessInput__get_Name(tupledArg[0]), ProcessOutput__get_Name(tupledArg[1])], (list_3 = defaultArg(p.Outputs, empty_1()), zip(defaultArg(p.Inputs, empty_1()), list_3)), {
1074
+ }, List_groupBy((tupledArg) => [ProcessInput__get_Name(tupledArg[0]), ProcessOutput__get_Name(tupledArg[1])], (list_3 = defaultArg(p.Outputs, empty()), zip(defaultArg(p.Inputs, empty()), list_3)), {
1032
1075
  Equals: equalArrays,
1033
1076
  GetHashCode: arrayHash,
1034
1077
  }));
@@ -1079,7 +1122,7 @@ export function ProcessParsing_alignByHeaders(keepOrder, rows) {
1079
1122
  }
1080
1123
  }
1081
1124
  else {
1082
- return empty_1();
1125
+ return empty();
1083
1126
  }
1084
1127
  }
1085
1128
  else {