@nfdi4plants/arctrl 1.1.0 → 2.0.0-alpha.1

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 (377) hide show
  1. package/ARC.js +53 -35
  2. package/{Contracts/Contracts.ARCtrl.js → Contract/ARC.js} +4 -2
  3. package/Contract/ArcAssay.js +102 -0
  4. package/Contract/ArcInvestigation.js +78 -0
  5. package/Contract/ArcStudy.js +102 -0
  6. package/Contract/Contract.js +3 -3
  7. package/{Contracts/Contracts.Git.js → Contract/Git.js} +5 -5
  8. package/{ISA/ISA/ArcTypes → Core}/ArcTypes.js +307 -295
  9. package/Core/Comment.js +97 -0
  10. package/{ISA/ISA/JsonTypes → Core}/CommentList.js +12 -18
  11. package/Core/Conversion.js +1056 -0
  12. package/Core/Helper/Collections.js +318 -0
  13. package/Core/Helper/HashCodes.js +39 -0
  14. package/{ISA/ISA → Core/Helper}/Identifier.js +67 -2
  15. package/{ISA/ISA → Core/Helper}/Regex.js +3 -3
  16. package/{SemVer.js → Core/Helper/SemVer.js} +8 -8
  17. package/{ISA/ISA/ArcTypes → Core}/IdentifierSetters.js +1 -1
  18. package/Core/OntologyAnnotation.js +186 -0
  19. package/Core/OntologySourceReference.js +92 -0
  20. package/Core/Person.js +194 -0
  21. package/Core/Process/ColumnIndex.js +248 -0
  22. package/Core/Process/Component.js +188 -0
  23. package/{ISA/ISA/JsonTypes → Core/Process}/Data.js +8 -8
  24. package/{ISA/ISA/JsonTypes → Core/Process}/DataFile.js +3 -3
  25. package/Core/Process/Factor.js +109 -0
  26. package/{ISA/ISA/JsonTypes → Core/Process}/FactorValue.js +32 -13
  27. package/{ISA/ISA/JsonTypes → Core/Process}/Material.js +9 -9
  28. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttribute.js +17 -17
  29. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttributeValue.js +35 -16
  30. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialType.js +3 -3
  31. package/{ISA/ISA/JsonTypes → Core/Process}/Process.js +46 -79
  32. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessInput.js +42 -42
  33. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessOutput.js +36 -36
  34. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessParameterValue.js +26 -7
  35. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessSequence.js +21 -25
  36. package/{ISA/ISA/JsonTypes → Core/Process}/Protocol.js +26 -57
  37. package/{ISA/ISA/JsonTypes → Core/Process}/ProtocolParameter.js +10 -10
  38. package/{ISA/ISA/JsonTypes → Core/Process}/Sample.js +12 -12
  39. package/{ISA/ISA/JsonTypes → Core/Process}/Source.js +9 -9
  40. package/{ISA/ISA/JsonTypes → Core/Process}/Value.js +24 -31
  41. package/Core/Publication.js +116 -0
  42. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTable.js +49 -155
  43. package/Core/Table/ArcTableAux.js +532 -0
  44. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTables.js +20 -32
  45. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeCell.js +19 -76
  46. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeColumn.js +9 -8
  47. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeHeader.js +14 -34
  48. package/{Templates → Core}/Template.js +16 -17
  49. package/Core/Templates.js +84 -0
  50. package/FileSystem/Commit.js +2 -2
  51. package/FileSystem/FileSystem.js +4 -4
  52. package/FileSystem/FileSystemTree.js +46 -8
  53. package/FileSystem/Path.js +10 -2
  54. package/Json/ARC.js +25 -0
  55. package/Json/Assay.js +202 -0
  56. package/Json/Comment.js +130 -0
  57. package/Json/ConverterOptions.js +18 -0
  58. package/Json/Decode.js +128 -0
  59. package/Json/Encode.js +45 -0
  60. package/Json/Investigation.js +220 -0
  61. package/Json/OntologyAnnotation.js +169 -0
  62. package/Json/OntologySourceReference.js +122 -0
  63. package/Json/Person.js +250 -0
  64. package/Json/Process/AssayMaterials.js +22 -0
  65. package/Json/Process/Component.js +79 -0
  66. package/Json/Process/Data.js +102 -0
  67. package/Json/Process/DataFile.js +81 -0
  68. package/Json/Process/Factor.js +48 -0
  69. package/Json/Process/FactorValue.js +53 -0
  70. package/Json/Process/Material.js +107 -0
  71. package/Json/Process/MaterialAttribute.js +45 -0
  72. package/Json/Process/MaterialAttributeValue.js +70 -0
  73. package/Json/Process/MaterialType.js +60 -0
  74. package/Json/Process/Process.js +107 -0
  75. package/Json/Process/ProcessInput.js +59 -0
  76. package/Json/Process/ProcessOutput.js +71 -0
  77. package/Json/Process/ProcessParameterValue.js +69 -0
  78. package/Json/Process/ProcessSequence.js +53 -0
  79. package/Json/Process/PropertyValue.js +82 -0
  80. package/Json/Process/Protocol.js +147 -0
  81. package/Json/Process/ProtocolParameter.js +45 -0
  82. package/Json/Process/Sample.js +134 -0
  83. package/Json/Process/Source.js +101 -0
  84. package/Json/Process/StudyMaterials.js +24 -0
  85. package/Json/Process/Value.js +42 -0
  86. package/Json/Publication.js +142 -0
  87. package/Json/StringTable.js +44 -0
  88. package/Json/Study.js +306 -0
  89. package/Json/Table/ArcTable.js +223 -0
  90. package/Json/Table/CellTable.js +40 -0
  91. package/Json/Table/CompositeCell.js +65 -0
  92. package/Json/Table/CompositeHeader.js +57 -0
  93. package/Json/Table/Compression.js +38 -0
  94. package/Json/Table/IOType.js +37 -0
  95. package/Json/Table/OATable.js +40 -0
  96. package/Json/Table/Templates.js +107 -0
  97. package/Json/context/rocrate/isa_assay_context.js +32 -0
  98. package/Json/context/rocrate/isa_comment_context.js +23 -0
  99. package/Json/context/rocrate/isa_component_context.js +24 -0
  100. package/Json/context/rocrate/isa_data_context.js +25 -0
  101. package/Json/context/rocrate/isa_factor_context.js +25 -0
  102. package/Json/context/rocrate/isa_factor_value_context.js +23 -0
  103. package/Json/context/rocrate/isa_investigation_context.js +33 -0
  104. package/Json/context/rocrate/isa_material_attribute_context.js +23 -0
  105. package/Json/context/rocrate/isa_material_attribute_value_context.js +23 -0
  106. package/Json/context/rocrate/isa_material_context.js +26 -0
  107. package/Json/context/rocrate/isa_ontology_annotation_context.js +23 -0
  108. package/Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
  109. package/Json/context/rocrate/isa_organization_context.js +22 -0
  110. package/Json/context/rocrate/isa_person_context.js +33 -0
  111. package/Json/context/rocrate/isa_process_context.js +29 -0
  112. package/Json/context/rocrate/isa_process_parameter_value_context.js +23 -0
  113. package/Json/context/rocrate/isa_protocol_context.js +28 -0
  114. package/Json/context/rocrate/isa_protocol_parameter_context.js +23 -0
  115. package/Json/context/rocrate/isa_publication_context.js +25 -0
  116. package/Json/context/rocrate/isa_sample_context.js +24 -0
  117. package/Json/context/rocrate/isa_source_context.js +25 -0
  118. package/Json/context/rocrate/isa_study_context.js +40 -0
  119. package/Json/context/rocrate/property_value_context.js +4 -0
  120. package/Json/context/rocrate/rocrate_context.js +23 -0
  121. package/Json.js +193 -0
  122. package/README.md +50 -12
  123. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/ArcTable.js +12 -12
  124. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeCell.js +8 -7
  125. package/Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  126. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeHeader.js +10 -10
  127. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcAssay.js +11 -11
  128. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcInvestigation.js +34 -37
  129. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcStudy.js +12 -12
  130. package/{ISA/ISA.Spreadsheet → Spreadsheet}/CollectionAux.js +8 -8
  131. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Assays.js +32 -32
  132. package/Spreadsheet/Metadata/Comment.js +71 -0
  133. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Contacts.js +28 -30
  134. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Conversions.js +22 -16
  135. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/DesignDescriptors.js +1 -1
  136. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Factors.js +23 -22
  137. package/Spreadsheet/Metadata/OntologyAnnotation.js +64 -0
  138. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/OntologySourceReference.js +22 -24
  139. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Protocols.js +17 -17
  140. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Publication.js +29 -31
  141. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/SparseTable.js +34 -28
  142. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Study.js +38 -40
  143. package/{Templates/Template.Spreadsheet.js → Spreadsheet/Template.js} +31 -31
  144. package/Template.Web.js +27 -0
  145. package/WebRequest/WebRequest.Node.js +15 -0
  146. package/WebRequest/WebRequest.js +10 -29
  147. package/Xlsx.js +85 -0
  148. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
  149. package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
  150. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
  151. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
  152. package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCell.fs.js +14 -14
  153. package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCellsCollection.fs.js +6 -6
  154. package/fable_modules/FsSpreadsheet.5.1.3/DSL/CellBuilder.fs.js +4 -4
  155. package/fable_modules/FsSpreadsheet.5.1.3/DSL/ColumnBuilder.fs.js +3 -3
  156. package/fable_modules/FsSpreadsheet.5.1.3/DSL/DSL.fs.js +2 -2
  157. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Expression.fs.js +1 -1
  158. package/fable_modules/FsSpreadsheet.5.1.3/DSL/RowBuilder.fs.js +3 -3
  159. package/fable_modules/FsSpreadsheet.5.1.3/DSL/SheetBuilder.fs.js +3 -3
  160. package/fable_modules/FsSpreadsheet.5.1.3/DSL/TableBuilder.fs.js +3 -3
  161. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Transform.fs.js +6 -6
  162. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Types.fs.js +4 -4
  163. package/fable_modules/FsSpreadsheet.5.1.3/DSL/WorkbookBuilder.fs.js +3 -3
  164. package/fable_modules/FsSpreadsheet.5.1.3/FsAddress.fs.js +8 -8
  165. package/fable_modules/FsSpreadsheet.5.1.3/FsColumn.fs.js +3 -3
  166. package/fable_modules/FsSpreadsheet.5.1.3/FsRow.fs.js +3 -3
  167. package/fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js +6 -6
  168. package/fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js +9 -9
  169. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRange.fs.js +3 -3
  170. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeAddress.fs.js +4 -3
  171. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeBase.fs.js +3 -3
  172. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeColumn.fs.js +3 -3
  173. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeRow.fs.js +1 -1
  174. package/fable_modules/FsSpreadsheet.5.1.3/SheetBuilder.fs.js +8 -8
  175. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTable.fs.js +7 -7
  176. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableField.fs.js +4 -4
  177. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableRow.fs.js +1 -1
  178. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs +1390 -0
  179. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +1230 -0
  180. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs +233 -0
  181. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +113 -0
  182. package/fable_modules/Thoth.Json.Core.0.2.1/Thoth.Json.Core.fableproj +28 -0
  183. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs +76 -0
  184. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +33 -0
  185. package/fable_modules/Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  186. package/fable_modules/{Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs → Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/Thoth.Json.Core.AssemblyInfo.fs} +8 -7
  187. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs +79 -0
  188. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +85 -0
  189. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs +32 -0
  190. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +45 -0
  191. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Thoth.Json.JavaScript.fableproj +21 -0
  192. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  193. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +18 -0
  194. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  195. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +19 -0
  196. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Array.d.ts +4 -1
  197. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Array.js +124 -86
  198. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Boolean.js +2 -2
  199. package/fable_modules/fable-library-js.4.16.0/CHANGELOG.md +47 -0
  200. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Choice.d.ts +0 -17
  201. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Choice.js +0 -43
  202. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.d.ts +9 -0
  203. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.js +21 -0
  204. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Date.js +340 -42
  205. package/fable_modules/fable-library-js.4.16.0/FSharp.Core.CompilerServices.d.ts +12 -0
  206. package/fable_modules/fable-library-js.4.16.0/FSharp.Core.CompilerServices.js +27 -0
  207. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/List.js +3 -3
  208. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Map.js +3 -3
  209. package/fable_modules/fable-library-js.4.16.0/MapUtil.d.ts +12 -0
  210. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MapUtil.js +15 -0
  211. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableMap.js +2 -1
  212. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableSet.js +2 -1
  213. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Random.js +7 -7
  214. package/fable_modules/fable-library-js.4.16.0/Result.d.ts +37 -0
  215. package/fable_modules/fable-library-js.4.16.0/Result.js +165 -0
  216. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Set.js +2 -2
  217. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/String.d.ts +1 -0
  218. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/String.js +8 -5
  219. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Collections.Generic.d.ts +15 -7
  220. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Collections.Generic.js +46 -36
  221. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Text.d.ts +9 -1
  222. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Text.js +60 -8
  223. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Util.d.ts +6 -3
  224. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Util.js +2 -13
  225. package/fable_modules/fable-library-js.4.16.0/big.d.ts +338 -0
  226. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/package.json +4 -3
  227. package/fable_modules/project_cracked.json +1 -1
  228. package/index.js +14 -12
  229. package/package.json +1 -1
  230. package/Contracts/Contracts.ArcTypes.js +0 -268
  231. package/FileSystemTree.js +0 -51
  232. package/ISA/ISA/ArcTypes/ArcTableAux.js +0 -1155
  233. package/ISA/ISA/ArcTypes/CompositeRow.js +0 -111
  234. package/ISA/ISA/Builder/Types.js +0 -243
  235. package/ISA/ISA/Fable.js +0 -123
  236. package/ISA/ISA/Helper.js +0 -503
  237. package/ISA/ISA/JsonTypes/Assay.js +0 -620
  238. package/ISA/ISA/JsonTypes/AssayMaterials.js +0 -39
  239. package/ISA/ISA/JsonTypes/ColumnIndex.js +0 -246
  240. package/ISA/ISA/JsonTypes/Comment.js +0 -58
  241. package/ISA/ISA/JsonTypes/Component.js +0 -165
  242. package/ISA/ISA/JsonTypes/Factor.js +0 -128
  243. package/ISA/ISA/JsonTypes/Investigation.js +0 -204
  244. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +0 -196
  245. package/ISA/ISA/JsonTypes/OntologySourceReference.js +0 -85
  246. package/ISA/ISA/JsonTypes/Person.js +0 -137
  247. package/ISA/ISA/JsonTypes/Publication.js +0 -105
  248. package/ISA/ISA/JsonTypes/Study.js +0 -942
  249. package/ISA/ISA/JsonTypes/StudyMaterials.js +0 -45
  250. package/ISA/ISA/UIHelper.js +0 -19
  251. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +0 -282
  252. package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +0 -93
  253. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +0 -170
  254. package/ISA/ISA.Json/ArcTypes/ArcTable.js +0 -178
  255. package/ISA/ISA.Json/ArcTypes/CellTable.js +0 -46
  256. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +0 -77
  257. package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +0 -82
  258. package/ISA/ISA.Json/ArcTypes/IOType.js +0 -35
  259. package/ISA/ISA.Json/ArcTypes/OATable.js +0 -48
  260. package/ISA/ISA.Json/Assay.js +0 -105
  261. package/ISA/ISA.Json/Comment.js +0 -84
  262. package/ISA/ISA.Json/ConverterOptions.js +0 -33
  263. package/ISA/ISA.Json/Data.js +0 -271
  264. package/ISA/ISA.Json/Decode.js +0 -46
  265. package/ISA/ISA.Json/Factor.js +0 -194
  266. package/ISA/ISA.Json/GEncode.js +0 -15
  267. package/ISA/ISA.Json/Investigation.js +0 -114
  268. package/ISA/ISA.Json/Material.js +0 -233
  269. package/ISA/ISA.Json/Ontology.js +0 -223
  270. package/ISA/ISA.Json/Person.js +0 -204
  271. package/ISA/ISA.Json/Process.js +0 -291
  272. package/ISA/ISA.Json/Protocol.js +0 -242
  273. package/ISA/ISA.Json/Publication.js +0 -92
  274. package/ISA/ISA.Json/StringTable.js +0 -43
  275. package/ISA/ISA.Json/Study.js +0 -212
  276. package/ISA/ISA.Json/Validation/Fable.js +0 -69
  277. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +0 -88
  278. package/ISA/ISA.Json/Validation/ValidationResult.js +0 -45
  279. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +0 -59
  280. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +0 -60
  281. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +0 -65
  282. package/Path.js +0 -10
  283. package/Templates/Template.Json.js +0 -83
  284. package/Templates/Template.Web.js +0 -27
  285. package/Templates/Templates.js +0 -82
  286. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +0 -1366
  287. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +0 -1798
  288. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +0 -621
  289. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +0 -472
  290. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +0 -31
  291. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +0 -8
  292. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +0 -30
  293. package/fable_modules/Thoth.Json.10.1.0/Types.fs +0 -59
  294. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +0 -98
  295. package/fable_modules/Thoth.Json.10.1.0/package.json +0 -5
  296. package/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
  297. package/fable_modules/fable-library.4.5.0/MapUtil.d.ts +0 -10
  298. /package/{ISA/ISA/JsonTypes → Core}/URI.js +0 -0
  299. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Async.d.ts +0 -0
  300. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Async.js +0 -0
  301. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/AsyncBuilder.d.ts +0 -0
  302. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/AsyncBuilder.js +0 -0
  303. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BigInt.d.ts +0 -0
  304. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BigInt.js +0 -0
  305. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BitConverter.d.ts +0 -0
  306. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BitConverter.js +0 -0
  307. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Boolean.d.ts +0 -0
  308. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Char.d.ts +0 -0
  309. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Char.js +0 -0
  310. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Date.d.ts +0 -0
  311. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOffset.d.ts +0 -0
  312. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOffset.js +0 -0
  313. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOnly.d.ts +0 -0
  314. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOnly.js +0 -0
  315. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Decimal.d.ts +0 -0
  316. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Decimal.js +0 -0
  317. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Double.d.ts +0 -0
  318. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Double.js +0 -0
  319. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Encoding.d.ts +0 -0
  320. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Encoding.js +0 -0
  321. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Event.d.ts +0 -0
  322. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Event.js +0 -0
  323. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Collections.d.ts +0 -0
  324. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Collections.js +0 -0
  325. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Core.d.ts +0 -0
  326. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Core.js +0 -0
  327. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Global.d.ts +0 -0
  328. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Global.js +0 -0
  329. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Guid.d.ts +0 -0
  330. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Guid.js +0 -0
  331. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Int32.d.ts +0 -0
  332. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Int32.js +0 -0
  333. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/List.d.ts +0 -0
  334. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Long.d.ts +0 -0
  335. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Long.js +0 -0
  336. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MailboxProcessor.d.ts +0 -0
  337. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MailboxProcessor.js +0 -0
  338. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Map.d.ts +0 -0
  339. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableMap.d.ts +0 -0
  340. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableSet.d.ts +0 -0
  341. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Native.d.ts +0 -0
  342. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Native.js +0 -0
  343. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Numeric.d.ts +0 -0
  344. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Numeric.js +0 -0
  345. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Observable.d.ts +0 -0
  346. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Observable.js +0 -0
  347. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Option.d.ts +0 -0
  348. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Option.js +0 -0
  349. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/README.md +0 -0
  350. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Random.d.ts +0 -0
  351. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Range.d.ts +0 -0
  352. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Range.js +0 -0
  353. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Reflection.d.ts +0 -0
  354. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Reflection.js +0 -0
  355. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/RegExp.d.ts +0 -0
  356. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/RegExp.js +0 -0
  357. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq.d.ts +0 -0
  358. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq.js +0 -0
  359. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq2.d.ts +0 -0
  360. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq2.js +0 -0
  361. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Set.d.ts +0 -0
  362. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/SystemException.d.ts +0 -0
  363. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/SystemException.js +0 -0
  364. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeOnly.d.ts +0 -0
  365. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeOnly.js +0 -0
  366. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeSpan.d.ts +0 -0
  367. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeSpan.js +0 -0
  368. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Timer.d.ts +0 -0
  369. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Timer.js +0 -0
  370. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Types.d.ts +0 -0
  371. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Types.js +0 -0
  372. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Unicode.13.0.0.d.ts +0 -0
  373. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Unicode.13.0.0.js +0 -0
  374. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Uri.d.ts +0 -0
  375. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Uri.js +0 -0
  376. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/lib/big.d.ts +0 -0
  377. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/lib/big.js +0 -0
@@ -1,1155 +0,0 @@
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
- import { CompositeCell } from "./CompositeCell.js";
7
- import { max } from "../../../fable_modules/fable-library.4.5.0/Double.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";
12
- import { Value as Value_1 } from "../JsonTypes/Value.js";
13
- import { Component_fromOptions } from "../JsonTypes/Component.js";
14
- import { ProtocolParameter } from "../JsonTypes/ProtocolParameter.js";
15
- import { ProcessParameterValue } from "../JsonTypes/ProcessParameterValue.js";
16
- import { FactorValue_create_18335379 } from "../JsonTypes/FactorValue.js";
17
- import { Factor } from "../JsonTypes/Factor.js";
18
- import { toString } from "../../../fable_modules/fable-library.4.5.0/Types.js";
19
- import { MaterialAttributeValue_create_7F714043 } from "../JsonTypes/MaterialAttributeValue.js";
20
- import { MaterialAttribute_create_Z6C54B221 } from "../JsonTypes/MaterialAttribute.js";
21
- import { ProcessInput_getCharacteristicValues_102B6859, ProcessInput__isMaterial, ProcessInput__isData, ProcessInput_setCharacteristicValues, ProcessInput__get_Name, ProcessInput__isSource, ProcessInput__isSample, ProcessInput, ProcessInput_createDerivedData_Z721C83C5, ProcessInput_createRawData_Z721C83C5, ProcessInput_createImageFile_Z721C83C5, ProcessInput_createMaterial_2363974C, ProcessInput_createSample_Z6DF16D07, ProcessInput_createSource_7888CE42 } from "../JsonTypes/ProcessInput.js";
22
- import { remove, printf, toFail } from "../../../fable_modules/fable-library.4.5.0/String.js";
23
- import { ProcessOutput_getFactorValues_11830B70, ProcessOutput__isMaterial, ProcessOutput__isData, ProcessOutput_setFactorValues, ProcessOutput__get_Name, ProcessOutput__isSample, ProcessOutput, ProcessOutput_createDerivedData_Z721C83C5, ProcessOutput_createRawData_Z721C83C5, ProcessOutput_createImageFile_Z721C83C5, ProcessOutput_createMaterial_2363974C, ProcessOutput_createSample_Z6DF16D07 } from "../JsonTypes/ProcessOutput.js";
24
- import { IOType, CompositeHeader } from "./CompositeHeader.js";
25
- import { tryGetFactorColumnIndex, tryGetCharacteristicColumnIndex, tryGetComponentIndex, tryGetParameterColumnIndex, ARCtrl_ISA_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4 } from "../JsonTypes/ColumnIndex.js";
26
- import { Source_create_7A281ED9 } from "../JsonTypes/Source.js";
27
- import { Sample_create_E50ED22 } from "../JsonTypes/Sample.js";
28
- import { Process_create_Z42860F3E, Process_decomposeName_Z721C83C5, Process_make, Process_composeName } from "../JsonTypes/Process.js";
29
- import { List_tryPickAndRemove, HashCodes_boxHashSeq, Option_fromValueWithDefault } from "../Helper.js";
30
- import { Protocol_make } from "../JsonTypes/Protocol.js";
31
- import { createMissingIdentifier } from "../Identifier.js";
32
- import { Dictionary } from "../../../fable_modules/fable-library.4.5.0/MutableMap.js";
33
-
34
- /**
35
- * Lookup an element in the dictionary, returning a <c>Some</c> value if the element is in the domain
36
- * of the dictionary and <c>None</c> if not.
37
- */
38
- export function Dictionary_tryFind(key, table) {
39
- if (table.has(key)) {
40
- return some(getItemFromDict(table, key));
41
- }
42
- else {
43
- return void 0;
44
- }
45
- }
46
-
47
- export function getColumnCount(headers) {
48
- return headers.length;
49
- }
50
-
51
- export function getRowCount(values) {
52
- if (values.size === 0) {
53
- return 0;
54
- }
55
- else {
56
- return (1 + maxBy((tuple) => tuple[1], values.keys(), {
57
- Compare: comparePrimitives,
58
- })[1]) | 0;
59
- }
60
- }
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
-
73
- export function $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, input) {
74
- switch (input.tag) {
75
- case 3:
76
- case 2:
77
- case 1:
78
- case 0:
79
- case 13:
80
- return void 0;
81
- case 12:
82
- return tryFindIndex((h) => (h.tag === 12), existingHeaders);
83
- case 11:
84
- return tryFindIndex((h_1) => (h_1.tag === 11), existingHeaders);
85
- default:
86
- return tryFindIndex((h_2) => equals(h_2, input), existingHeaders);
87
- }
88
- }
89
-
90
- /**
91
- * Returns the column index of the duplicate unique column in `existingHeaders`.
92
- */
93
- export function tryFindDuplicateUnique(newHeader, existingHeaders) {
94
- const activePatternResult = $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, newHeader);
95
- if (activePatternResult != null) {
96
- const index = activePatternResult | 0;
97
- return index;
98
- }
99
- else {
100
- return void 0;
101
- }
102
- }
103
-
104
- /**
105
- * Returns the column index of the duplicate unique column in `existingHeaders`.
106
- */
107
- export function tryFindDuplicateUniqueInArray(existingHeaders) {
108
- const loop = (i_mut, duplicateList_mut, headerList_mut) => {
109
- loop:
110
- while (true) {
111
- const i = i_mut, duplicateList = duplicateList_mut, headerList = headerList_mut;
112
- let matchResult, header, tail;
113
- if (isEmpty(headerList)) {
114
- matchResult = 0;
115
- }
116
- else if (isEmpty(tail_1(headerList))) {
117
- matchResult = 0;
118
- }
119
- else {
120
- matchResult = 1;
121
- header = head(headerList);
122
- tail = tail_1(headerList);
123
- }
124
- switch (matchResult) {
125
- case 0:
126
- return duplicateList;
127
- default: {
128
- const hasDuplicate = tryFindDuplicateUnique(header, tail);
129
- i_mut = (i + 1);
130
- duplicateList_mut = ((hasDuplicate != null) ? cons({
131
- HeaderType: header,
132
- Index1: i,
133
- Index2: value_9(hasDuplicate),
134
- }, duplicateList) : duplicateList);
135
- headerList_mut = tail;
136
- continue loop;
137
- }
138
- }
139
- break;
140
- }
141
- };
142
- return loop(0, empty(), ofSeq(filter((x) => !x.IsTermColumn, existingHeaders)));
143
- }
144
-
145
- /**
146
- * Checks if given column index is valid for given number of columns.
147
- *
148
- * if `allowAppend` = true => `0 < index <= columnCount`
149
- *
150
- * if `allowAppend` = false => `0 < index < columnCount`
151
- */
152
- export function SanityChecks_validateColumnIndex(index, columnCount, allowAppend) {
153
- let x, y;
154
- if (index < 0) {
155
- throw new Error("Cannot insert CompositeColumn at index < 0.");
156
- }
157
- if ((x = (index | 0), (y = (columnCount | 0), allowAppend ? (compare(x, y) > 0) : (compare(x, y) >= 0)))) {
158
- throw new Error(`Specified index is out of table range! Table contains only ${columnCount} columns.`);
159
- }
160
- }
161
-
162
- /**
163
- * Checks if given index is valid for given number of rows.
164
- *
165
- * if `allowAppend` = true => `0 < index <= rowCount`
166
- *
167
- * if `allowAppend` = false => `0 < index < rowCount`
168
- */
169
- export function SanityChecks_validateRowIndex(index, rowCount, allowAppend) {
170
- let x, y;
171
- if (index < 0) {
172
- throw new Error("Cannot insert CompositeColumn at index < 0.");
173
- }
174
- if ((x = (index | 0), (y = (rowCount | 0), allowAppend ? (compare(x, y) > 0) : (compare(x, y) >= 0)))) {
175
- throw new Error(`Specified index is out of table range! Table contains only ${rowCount} rows.`);
176
- }
177
- }
178
-
179
- export function SanityChecks_validateColumn(column) {
180
- column.Validate(true);
181
- }
182
-
183
- export function Unchecked_tryGetCellAt(column, row, cells) {
184
- return Dictionary_tryFind([column, row], cells);
185
- }
186
-
187
- /**
188
- * Add or update a cell in the dictionary.
189
- */
190
- export function Unchecked_setCellAt(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);
199
- }
200
-
201
- export function Unchecked_moveCellTo(fromCol, fromRow, toCol, toRow, cells) {
202
- const matchValue = Dictionary_tryFind([fromCol, fromRow], cells);
203
- if (matchValue == null) {
204
- }
205
- else {
206
- const c = matchValue;
207
- cells.delete([fromCol, fromRow]);
208
- const value_1 = Unchecked_setCellAt(toCol, toRow, c, cells);
209
- }
210
- }
211
-
212
- export function Unchecked_removeHeader(index, headers) {
213
- headers.splice(index, 1);
214
- }
215
-
216
- /**
217
- * Remove cells of one Column, change index of cells with higher index to index - 1
218
- */
219
- export function Unchecked_removeColumnCells(index, cells) {
220
- let enumerator = getEnumerator(cells);
221
- try {
222
- while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
223
- const activePatternResult = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
224
- const c = activePatternResult[0][0] | 0;
225
- if (c === index) {
226
- cells.delete([c, activePatternResult[0][1]]);
227
- }
228
- }
229
- }
230
- finally {
231
- disposeSafe(enumerator);
232
- }
233
- }
234
-
235
- /**
236
- * Remove cells of one Column, change index of cells with higher index to index - 1
237
- */
238
- export function Unchecked_removeColumnCells_withIndexChange(index, columnCount, rowCount, cells) {
239
- for (let col = index; col <= (columnCount - 1); col++) {
240
- for (let row = 0; row <= (rowCount - 1); row++) {
241
- if (col === index) {
242
- cells.delete([col, row]);
243
- }
244
- else if (col > index) {
245
- Unchecked_moveCellTo(col, row, col - 1, row, cells);
246
- }
247
- }
248
- }
249
- }
250
-
251
- export function Unchecked_removeRowCells(rowIndex, cells) {
252
- let enumerator = getEnumerator(cells);
253
- try {
254
- while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
255
- const activePatternResult = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
256
- const r = activePatternResult[0][1] | 0;
257
- if (r === rowIndex) {
258
- cells.delete([activePatternResult[0][0], r]);
259
- }
260
- }
261
- }
262
- finally {
263
- disposeSafe(enumerator);
264
- }
265
- }
266
-
267
- /**
268
- * Remove cells of one Row, change index of cells with higher index to index - 1
269
- */
270
- export function Unchecked_removeRowCells_withIndexChange(rowIndex, columnCount, rowCount, cells) {
271
- for (let row = rowIndex; row <= (rowCount - 1); row++) {
272
- for (let col = 0; col <= (columnCount - 1); col++) {
273
- if (row === rowIndex) {
274
- cells.delete([col, row]);
275
- }
276
- else if (row > rowIndex) {
277
- Unchecked_moveCellTo(col, row, col, row - 1, cells);
278
- }
279
- }
280
- }
281
- }
282
-
283
- /**
284
- * Get an empty cell fitting for related column header.
285
- *
286
- * `columCellOption` is used to decide between `CompositeCell.Term` or `CompositeCell.Unitized`. `columCellOption` can be any other cell in the same column, preferably the first one.
287
- */
288
- export function Unchecked_getEmptyCellForHeader(header, columCellOption) {
289
- const matchValue = header.IsTermColumn;
290
- if (matchValue) {
291
- let matchResult;
292
- if (columCellOption == null) {
293
- matchResult = 0;
294
- }
295
- else {
296
- switch (columCellOption.tag) {
297
- case 0: {
298
- matchResult = 0;
299
- break;
300
- }
301
- case 2: {
302
- matchResult = 1;
303
- break;
304
- }
305
- default:
306
- matchResult = 2;
307
- }
308
- }
309
- switch (matchResult) {
310
- case 0:
311
- return CompositeCell.emptyTerm;
312
- case 1:
313
- return CompositeCell.emptyUnitized;
314
- default:
315
- throw new Error("[extendBodyCells] This should never happen, IsTermColumn header must be paired with either term or unitized cell.");
316
- }
317
- }
318
- else {
319
- return CompositeCell.emptyFreeText;
320
- }
321
- }
322
-
323
- /**
324
- *
325
- */
326
- export function Unchecked_addColumn(newHeader, newCells, index, forceReplace, onlyHeaders, headers, values) {
327
- let numberOfNewColumns = 1;
328
- let index_1 = index;
329
- const hasDuplicateUnique = tryFindDuplicateUnique(newHeader, headers);
330
- if (!forceReplace && (hasDuplicateUnique != null)) {
331
- throw new Error(`Invalid new column \`${newHeader}\`. Table already contains header of the same type on index \`${value_9(hasDuplicateUnique)}\``);
332
- }
333
- if (hasDuplicateUnique != null) {
334
- numberOfNewColumns = 0;
335
- index_1 = (value_9(hasDuplicateUnique) | 0);
336
- }
337
- const matchValue = getColumnCount(headers) | 0;
338
- const matchValue_1 = getRowCount(values) | 0;
339
- const startColCount = matchValue | 0;
340
- if (hasDuplicateUnique != null) {
341
- Unchecked_removeHeader(index_1, headers);
342
- }
343
- headers.splice(index_1, 0, newHeader);
344
- if ((index_1 < startColCount) && (hasDuplicateUnique == null)) {
345
- const lastColumnIndex = max(startColCount - 1, 0) | 0;
346
- for (let columnIndex = lastColumnIndex; columnIndex >= index_1; columnIndex--) {
347
- for (let rowIndex = 0; rowIndex <= matchValue_1; rowIndex++) {
348
- Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex + numberOfNewColumns, rowIndex, values);
349
- }
350
- }
351
- }
352
- if (!onlyHeaders) {
353
- if (hasDuplicateUnique != null) {
354
- Unchecked_removeColumnCells(index_1, values);
355
- }
356
- const f = (index_1 >= startColCount) ? ((tupledArg) => ((values_1) => {
357
- const value = addToDict(values_1, [tupledArg[0], tupledArg[1]], tupledArg[2]);
358
- })) : ((tupledArg_1) => ((cells) => {
359
- Unchecked_setCellAt(tupledArg_1[0], tupledArg_1[1], tupledArg_1[2], cells);
360
- }));
361
- iterateIndexed((rowIndex_3, cell_1) => {
362
- f([index_1, rowIndex_3, cell_1])(values);
363
- }, newCells);
364
- }
365
- }
366
-
367
- export function Unchecked_fillMissingCells(headers, values) {
368
- let col;
369
- const rowCount = getRowCount(values) | 0;
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);
384
- }
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
- }
399
- }
400
- }
401
- }
402
- }
403
-
404
- /**
405
- * Increases the table size to the given new row count and fills the new rows with the last value of the column
406
- */
407
- export function Unchecked_extendToRowCount(rowCount, headers, values) {
408
- const columnCount = getColumnCount(headers) | 0;
409
- const previousRowCount = getRowCount(values) | 0;
410
- for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
411
- const lastValue = getItemFromDict(values, [columnIndex, previousRowCount - 1]);
412
- for (let rowIndex = previousRowCount - 1; rowIndex <= (rowCount - 1); rowIndex++) {
413
- Unchecked_setCellAt(columnIndex, rowIndex, lastValue, values);
414
- }
415
- }
416
- }
417
-
418
- export function Unchecked_addRow(index, newCells, headers, values) {
419
- const rowCount = getRowCount(values) | 0;
420
- const columnCount = getColumnCount(headers) | 0;
421
- let increaseRowIndices;
422
- if (index < rowCount) {
423
- const lastRowIndex = max(rowCount - 1, 0) | 0;
424
- for (let rowIndex = lastRowIndex; rowIndex >= index; rowIndex--) {
425
- for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
426
- Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex, rowIndex + 1, values);
427
- }
428
- }
429
- }
430
- else {
431
- increaseRowIndices = void 0;
432
- }
433
- const setNewCells = iterateIndexed((columnIndex_1, cell) => {
434
- Unchecked_setCellAt(columnIndex_1, index, cell, values);
435
- }, newCells);
436
- }
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
-
463
- /**
464
- * Convert a CompositeCell to a ISA Value and Unit tuple.
465
- */
466
- export function JsonTypes_valueOfCell(value) {
467
- switch (value.tag) {
468
- case 0:
469
- return [new Value_1(0, [value.fields[0]]), void 0];
470
- case 2:
471
- return [Value_1.fromString(value.fields[0]), value.fields[1]];
472
- default:
473
- return [Value_1.fromString(value.fields[0]), void 0];
474
- }
475
- }
476
-
477
- /**
478
- * Convert a CompositeHeader and Cell tuple to a ISA Component
479
- */
480
- export function JsonTypes_composeComponent(header, value) {
481
- const patternInput = JsonTypes_valueOfCell(value);
482
- return Component_fromOptions(patternInput[0], patternInput[1], header.ToTerm());
483
- }
484
-
485
- /**
486
- * Convert a CompositeHeader and Cell tuple to a ISA ProcessParameterValue
487
- */
488
- export function JsonTypes_composeParameterValue(header, value) {
489
- const patternInput = JsonTypes_valueOfCell(value);
490
- const p = ProtocolParameter.create(void 0, header.ToTerm());
491
- return ProcessParameterValue.create(p, patternInput[0], unwrap(patternInput[1]));
492
- }
493
-
494
- /**
495
- * Convert a CompositeHeader and Cell tuple to a ISA FactorValue
496
- */
497
- export function JsonTypes_composeFactorValue(header, value) {
498
- const patternInput = JsonTypes_valueOfCell(value);
499
- return FactorValue_create_18335379(void 0, Factor.create(void 0, toString(header), header.ToTerm()), patternInput[0], unwrap(patternInput[1]));
500
- }
501
-
502
- /**
503
- * Convert a CompositeHeader and Cell tuple to a ISA MaterialAttributeValue
504
- */
505
- export function JsonTypes_composeCharacteristicValue(header, value) {
506
- const patternInput = JsonTypes_valueOfCell(value);
507
- return MaterialAttributeValue_create_7F714043(void 0, MaterialAttribute_create_Z6C54B221(void 0, header.ToTerm()), patternInput[0], unwrap(patternInput[1]));
508
- }
509
-
510
- /**
511
- * Convert a CompositeHeader and Cell tuple to a ISA ProcessInput
512
- */
513
- export function JsonTypes_composeProcessInput(header, value) {
514
- let matchResult;
515
- if (header.tag === 11) {
516
- switch (header.fields[0].tag) {
517
- case 0: {
518
- matchResult = 0;
519
- break;
520
- }
521
- case 1: {
522
- matchResult = 1;
523
- break;
524
- }
525
- case 5: {
526
- matchResult = 2;
527
- break;
528
- }
529
- case 4: {
530
- matchResult = 3;
531
- break;
532
- }
533
- case 2: {
534
- matchResult = 4;
535
- break;
536
- }
537
- case 3: {
538
- matchResult = 5;
539
- break;
540
- }
541
- default:
542
- matchResult = 6;
543
- }
544
- }
545
- else {
546
- matchResult = 6;
547
- }
548
- switch (matchResult) {
549
- case 0:
550
- return ProcessInput_createSource_7888CE42(toString(value));
551
- case 1:
552
- return ProcessInput_createSample_Z6DF16D07(toString(value));
553
- case 2:
554
- return ProcessInput_createMaterial_2363974C(toString(value));
555
- case 3:
556
- return ProcessInput_createImageFile_Z721C83C5(toString(value));
557
- case 4:
558
- return ProcessInput_createRawData_Z721C83C5(toString(value));
559
- case 5:
560
- return ProcessInput_createDerivedData_Z721C83C5(toString(value));
561
- default:
562
- return toFail(printf("Could not parse input header %O"))(header);
563
- }
564
- }
565
-
566
- /**
567
- * Convert a CompositeHeader and Cell tuple to a ISA ProcessOutput
568
- */
569
- export function JsonTypes_composeProcessOutput(header, value) {
570
- let matchResult;
571
- if (header.tag === 12) {
572
- switch (header.fields[0].tag) {
573
- case 1: {
574
- matchResult = 0;
575
- break;
576
- }
577
- case 5: {
578
- matchResult = 1;
579
- break;
580
- }
581
- case 4: {
582
- matchResult = 2;
583
- break;
584
- }
585
- case 2: {
586
- matchResult = 3;
587
- break;
588
- }
589
- case 3: {
590
- matchResult = 4;
591
- break;
592
- }
593
- default:
594
- matchResult = 5;
595
- }
596
- }
597
- else {
598
- matchResult = 5;
599
- }
600
- switch (matchResult) {
601
- case 0:
602
- return ProcessOutput_createSample_Z6DF16D07(toString(value));
603
- case 1:
604
- return ProcessOutput_createMaterial_2363974C(toString(value));
605
- case 2:
606
- return ProcessOutput_createImageFile_Z721C83C5(toString(value));
607
- case 3:
608
- return ProcessOutput_createRawData_Z721C83C5(toString(value));
609
- case 4:
610
- return ProcessOutput_createDerivedData_Z721C83C5(toString(value));
611
- default:
612
- return toFail(printf("Could not parse output header %O"))(header);
613
- }
614
- }
615
-
616
- /**
617
- * Convert an ISA Value and Unit tuple to a CompositeCell
618
- */
619
- export function JsonTypes_cellOfValue(value, unit) {
620
- const value_2 = defaultArg(value, new Value_1(3, [""]));
621
- switch (value_2.tag) {
622
- case 3:
623
- if (unit != null) {
624
- const u = unit;
625
- return new CompositeCell(2, [value_2.fields[0], u]);
626
- }
627
- else {
628
- return new CompositeCell(1, [value_2.fields[0]]);
629
- }
630
- case 2:
631
- if (unit == null) {
632
- return new CompositeCell(1, [value_2.fields[0].toString()]);
633
- }
634
- else {
635
- const u_1 = unit;
636
- return new CompositeCell(2, [value_2.fields[0].toString(), u_1]);
637
- }
638
- case 1:
639
- if (unit == null) {
640
- return new CompositeCell(1, [int32ToString(value_2.fields[0])]);
641
- }
642
- else {
643
- const u_2 = unit;
644
- return new CompositeCell(2, [int32ToString(value_2.fields[0]), u_2]);
645
- }
646
- default:
647
- if (unit == null) {
648
- return new CompositeCell(0, [value_2.fields[0]]);
649
- }
650
- else {
651
- return toFail(printf("Could not parse value %O with unit %O"))(value_2)(unit);
652
- }
653
- }
654
- }
655
-
656
- /**
657
- * Convert an ISA Component to a CompositeHeader and Cell tuple
658
- */
659
- export function JsonTypes_decomposeComponent(c) {
660
- return [new CompositeHeader(0, [value_9(c.ComponentType)]), JsonTypes_cellOfValue(c.ComponentValue, c.ComponentUnit)];
661
- }
662
-
663
- /**
664
- * Convert an ISA ProcessParameterValue to a CompositeHeader and Cell tuple
665
- */
666
- export function JsonTypes_decomposeParameterValue(ppv) {
667
- return [new CompositeHeader(3, [value_9(value_9(ppv.Category).ParameterName)]), JsonTypes_cellOfValue(ppv.Value, ppv.Unit)];
668
- }
669
-
670
- /**
671
- * Convert an ISA FactorValue to a CompositeHeader and Cell tuple
672
- */
673
- export function JsonTypes_decomposeFactorValue(fv) {
674
- return [new CompositeHeader(2, [value_9(value_9(fv.Category).FactorType)]), JsonTypes_cellOfValue(fv.Value, fv.Unit)];
675
- }
676
-
677
- /**
678
- * Convert an ISA MaterialAttributeValue to a CompositeHeader and Cell tuple
679
- */
680
- export function JsonTypes_decomposeCharacteristicValue(cv) {
681
- return [new CompositeHeader(1, [value_9(value_9(cv.Category).CharacteristicType)]), JsonTypes_cellOfValue(cv.Value, cv.Unit)];
682
- }
683
-
684
- /**
685
- * Convert an ISA ProcessOutput to a CompositeHeader and Cell tuple
686
- */
687
- export function JsonTypes_decomposeProcessInput(pi) {
688
- switch (pi.tag) {
689
- case 1:
690
- return [new CompositeHeader(11, [new IOType(1, [])]), new CompositeCell(1, [defaultArg(pi.fields[0].Name, "")])];
691
- case 3:
692
- return [new CompositeHeader(11, [new IOType(5, [])]), new CompositeCell(1, [defaultArg(pi.fields[0].Name, "")])];
693
- case 2: {
694
- const d = pi.fields[0];
695
- const dataType = value_9(d.DataType);
696
- switch (dataType.tag) {
697
- case 0:
698
- return [new CompositeHeader(11, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
699
- case 1:
700
- return [new CompositeHeader(11, [new IOType(3, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
701
- default:
702
- return [new CompositeHeader(11, [new IOType(4, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
703
- }
704
- }
705
- default:
706
- return [new CompositeHeader(11, [new IOType(0, [])]), new CompositeCell(1, [defaultArg(pi.fields[0].Name, "")])];
707
- }
708
- }
709
-
710
- /**
711
- * Convert an ISA ProcessOutput to a CompositeHeader and Cell tuple
712
- */
713
- export function JsonTypes_decomposeProcessOutput(po) {
714
- switch (po.tag) {
715
- case 2:
716
- return [new CompositeHeader(12, [new IOType(5, [])]), new CompositeCell(1, [defaultArg(po.fields[0].Name, "")])];
717
- case 1: {
718
- const d = po.fields[0];
719
- const dataType = value_9(d.DataType);
720
- switch (dataType.tag) {
721
- case 0:
722
- return [new CompositeHeader(12, [new IOType(2, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
723
- case 1:
724
- return [new CompositeHeader(12, [new IOType(3, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
725
- default:
726
- return [new CompositeHeader(12, [new IOType(4, [])]), new CompositeCell(1, [defaultArg(d.Name, "")])];
727
- }
728
- }
729
- default:
730
- return [new CompositeHeader(12, [new IOType(1, [])]), new CompositeCell(1, [defaultArg(po.fields[0].Name, "")])];
731
- }
732
- }
733
-
734
- /**
735
- * If the headers of a node depict a component, returns a function for parsing the values of the matrix to the values of this component
736
- */
737
- export function ProcessParsing_tryComponentGetter(generalI, valueI, valueHeader) {
738
- if (valueHeader.tag === 0) {
739
- const cat = new CompositeHeader(0, [ARCtrl_ISA_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(valueHeader.fields[0], valueI)]);
740
- return (matrix) => ((i) => JsonTypes_composeComponent(cat, getItemFromDict(matrix, [generalI, i])));
741
- }
742
- else {
743
- return void 0;
744
- }
745
- }
746
-
747
- /**
748
- * If the headers of a node depict a protocolType, returns a function for parsing the values of the matrix to the values of this type
749
- */
750
- export function ProcessParsing_tryParameterGetter(generalI, valueI, valueHeader) {
751
- if (valueHeader.tag === 3) {
752
- const cat = new CompositeHeader(3, [ARCtrl_ISA_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(valueHeader.fields[0], valueI)]);
753
- return (matrix) => ((i) => JsonTypes_composeParameterValue(cat, getItemFromDict(matrix, [generalI, i])));
754
- }
755
- else {
756
- return void 0;
757
- }
758
- }
759
-
760
- export function ProcessParsing_tryFactorGetter(generalI, valueI, valueHeader) {
761
- if (valueHeader.tag === 2) {
762
- const cat = new CompositeHeader(2, [ARCtrl_ISA_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(valueHeader.fields[0], valueI)]);
763
- return (matrix) => ((i) => JsonTypes_composeFactorValue(cat, getItemFromDict(matrix, [generalI, i])));
764
- }
765
- else {
766
- return void 0;
767
- }
768
- }
769
-
770
- export function ProcessParsing_tryCharacteristicGetter(generalI, valueI, valueHeader) {
771
- if (valueHeader.tag === 1) {
772
- const cat = new CompositeHeader(1, [ARCtrl_ISA_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(valueHeader.fields[0], valueI)]);
773
- return (matrix) => ((i) => JsonTypes_composeCharacteristicValue(cat, getItemFromDict(matrix, [generalI, i])));
774
- }
775
- else {
776
- return void 0;
777
- }
778
- }
779
-
780
- /**
781
- * If the headers of a node depict a protocolType, returns a function for parsing the values of the matrix to the values of this type
782
- */
783
- export function ProcessParsing_tryGetProtocolTypeGetter(generalI, header) {
784
- if (header.tag === 4) {
785
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsTerm);
786
- }
787
- else {
788
- return void 0;
789
- }
790
- }
791
-
792
- export function ProcessParsing_tryGetProtocolREFGetter(generalI, header) {
793
- if (header.tag === 8) {
794
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
795
- }
796
- else {
797
- return void 0;
798
- }
799
- }
800
-
801
- export function ProcessParsing_tryGetProtocolDescriptionGetter(generalI, header) {
802
- if (header.tag === 5) {
803
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
804
- }
805
- else {
806
- return void 0;
807
- }
808
- }
809
-
810
- export function ProcessParsing_tryGetProtocolURIGetter(generalI, header) {
811
- if (header.tag === 6) {
812
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
813
- }
814
- else {
815
- return void 0;
816
- }
817
- }
818
-
819
- export function ProcessParsing_tryGetProtocolVersionGetter(generalI, header) {
820
- if (header.tag === 7) {
821
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
822
- }
823
- else {
824
- return void 0;
825
- }
826
- }
827
-
828
- export function ProcessParsing_tryGetInputGetter(generalI, header) {
829
- if (header.tag === 11) {
830
- return (matrix) => ((i) => JsonTypes_composeProcessInput(header, getItemFromDict(matrix, [generalI, i])));
831
- }
832
- else {
833
- return void 0;
834
- }
835
- }
836
-
837
- export function ProcessParsing_tryGetOutputGetter(generalI, header) {
838
- if (header.tag === 12) {
839
- return (matrix) => ((i) => JsonTypes_composeProcessOutput(header, getItemFromDict(matrix, [generalI, i])));
840
- }
841
- else {
842
- return void 0;
843
- }
844
- }
845
-
846
- /**
847
- * Given the header sequence of an ArcTable, returns a function for parsing each row of the table to a process
848
- */
849
- export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
850
- const headers_1 = indexed(headers);
851
- const valueHeaders = toList(indexed(filter((arg) => arg[1].IsCvParamColumn, headers_1)));
852
- const charGetters = choose((tupledArg) => {
853
- const _arg = tupledArg[1];
854
- return ProcessParsing_tryCharacteristicGetter(_arg[0], tupledArg[0], _arg[1]);
855
- }, valueHeaders);
856
- const factorValueGetters = choose((tupledArg_1) => {
857
- const _arg_1 = tupledArg_1[1];
858
- return ProcessParsing_tryFactorGetter(_arg_1[0], tupledArg_1[0], _arg_1[1]);
859
- }, valueHeaders);
860
- const parameterValueGetters = choose((tupledArg_2) => {
861
- const _arg_2 = tupledArg_2[1];
862
- return ProcessParsing_tryParameterGetter(_arg_2[0], tupledArg_2[0], _arg_2[1]);
863
- }, valueHeaders);
864
- const componentGetters = choose((tupledArg_3) => {
865
- const _arg_3 = tupledArg_3[1];
866
- return ProcessParsing_tryComponentGetter(_arg_3[0], tupledArg_3[0], _arg_3[1]);
867
- }, valueHeaders);
868
- const protocolTypeGetter = tryPick((tupledArg_4) => ProcessParsing_tryGetProtocolTypeGetter(tupledArg_4[0], tupledArg_4[1]), headers_1);
869
- const protocolREFGetter = tryPick((tupledArg_5) => ProcessParsing_tryGetProtocolREFGetter(tupledArg_5[0], tupledArg_5[1]), headers_1);
870
- const protocolDescriptionGetter = tryPick((tupledArg_6) => ProcessParsing_tryGetProtocolDescriptionGetter(tupledArg_6[0], tupledArg_6[1]), headers_1);
871
- const protocolURIGetter = tryPick((tupledArg_7) => ProcessParsing_tryGetProtocolURIGetter(tupledArg_7[0], tupledArg_7[1]), headers_1);
872
- const protocolVersionGetter = tryPick((tupledArg_8) => ProcessParsing_tryGetProtocolVersionGetter(tupledArg_8[0], tupledArg_8[1]), headers_1);
873
- let inputGetter_1;
874
- const matchValue = tryPick((tupledArg_9) => ProcessParsing_tryGetInputGetter(tupledArg_9[0], tupledArg_9[1]), headers_1);
875
- if (matchValue == null) {
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)))]))));
877
- }
878
- else {
879
- const inputGetter = matchValue;
880
- inputGetter_1 = ((matrix) => ((i) => {
881
- const chars = toList(map_1((f) => f(matrix)(i), charGetters));
882
- const input = inputGetter(matrix)(i);
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));
884
- }));
885
- }
886
- let outputGetter_1;
887
- const matchValue_1 = tryPick((tupledArg_10) => ProcessParsing_tryGetOutputGetter(tupledArg_10[0], tupledArg_10[1]), headers_1);
888
- if (matchValue_1 == null) {
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)))]))));
890
- }
891
- else {
892
- const outputGetter = matchValue_1;
893
- outputGetter_1 = ((matrix_2) => ((i_2) => {
894
- const factors = toList(map_1((f_2) => f_2(matrix_2)(i_2), factorValueGetters));
895
- const output = outputGetter(matrix_2)(i_2);
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));
897
- }));
898
- }
899
- return (matrix_4) => ((i_4) => {
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);
903
- let protocol;
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);
905
- let matchResult;
906
- if (p_1.Name == null) {
907
- if (p_1.ProtocolType == null) {
908
- if (p_1.Description == null) {
909
- if (p_1.Uri == null) {
910
- if (p_1.Version == null) {
911
- if (p_1.Components == null) {
912
- matchResult = 0;
913
- }
914
- else {
915
- matchResult = 1;
916
- }
917
- }
918
- else {
919
- matchResult = 1;
920
- }
921
- }
922
- else {
923
- matchResult = 1;
924
- }
925
- }
926
- else {
927
- matchResult = 1;
928
- }
929
- }
930
- else {
931
- matchResult = 1;
932
- }
933
- }
934
- else {
935
- matchResult = 1;
936
- }
937
- switch (matchResult) {
938
- case 0: {
939
- protocol = void 0;
940
- break;
941
- }
942
- default:
943
- protocol = p_1;
944
- }
945
- let patternInput;
946
- const inputs = inputGetter_1(matrix_4)(i_4);
947
- const outputs = outputGetter_1(matrix_4)(i_4);
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]));
949
- return Process_make(void 0, pn, protocol, paramvalues, void 0, void 0, void 0, void 0, patternInput[0], patternInput[1], void 0);
950
- });
951
- }
952
-
953
- /**
954
- * Groups processes by their name, or by the name of the protocol they execute
955
- *
956
- * Process names are taken from the Worksheet name and numbered: SheetName_1, SheetName_2, etc.
957
- *
958
- * This function decomposes this name into a root name and a number, and groups processes by root name.
959
- */
960
- export function ProcessParsing_groupProcesses(ps) {
961
- return List_groupBy((x) => {
962
- if ((x.Name != null) && (Process_decomposeName_Z721C83C5(value_9(x.Name))[1] != null)) {
963
- return Process_decomposeName_Z721C83C5(value_9(x.Name))[0];
964
- }
965
- else if ((x.ExecutesProtocol != null) && (value_9(x.ExecutesProtocol).Name != null)) {
966
- return value_9(value_9(x.ExecutesProtocol).Name);
967
- }
968
- else if ((x.Name != null) && (value_9(x.Name).indexOf("_") >= 0)) {
969
- const lastUnderScoreIndex = value_9(x.Name).lastIndexOf("_") | 0;
970
- return remove(value_9(x.Name), lastUnderScoreIndex);
971
- }
972
- else if (x.Name != null) {
973
- return value_9(x.Name);
974
- }
975
- else if ((x.ExecutesProtocol != null) && (value_9(x.ExecutesProtocol).ID != null)) {
976
- return value_9(value_9(x.ExecutesProtocol).ID);
977
- }
978
- else {
979
- return createMissingIdentifier();
980
- }
981
- }, ps, {
982
- Equals: (x_1, y) => (x_1 === y),
983
- GetHashCode: stringHash,
984
- });
985
- }
986
-
987
- /**
988
- * Merges processes with the same name, protocol and param values
989
- */
990
- export function ProcessParsing_mergeIdenticalProcesses(processes) {
991
- const l = List_groupBy((x) => {
992
- if ((x.Name != null) && (Process_decomposeName_Z721C83C5(value_9(x.Name))[1] != null)) {
993
- return [Process_decomposeName_Z721C83C5(value_9(x.Name))[0], x.ExecutesProtocol, map_2(HashCodes_boxHashSeq, x.ParameterValues)];
994
- }
995
- else if ((x.ExecutesProtocol != null) && (value_9(x.ExecutesProtocol).Name != null)) {
996
- return [value_9(value_9(x.ExecutesProtocol).Name), x.ExecutesProtocol, map_2(HashCodes_boxHashSeq, x.ParameterValues)];
997
- }
998
- else {
999
- return [createMissingIdentifier(), x.ExecutesProtocol, map_2(HashCodes_boxHashSeq, x.ParameterValues)];
1000
- }
1001
- }, processes, {
1002
- Equals: equalArrays,
1003
- GetHashCode: arrayHash,
1004
- });
1005
- return mapIndexed((i, tupledArg) => {
1006
- const _arg = tupledArg[0];
1007
- const processes_1 = tupledArg[1];
1008
- const n = _arg[0];
1009
- const pVs = item(0, processes_1).ParameterValues;
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));
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);
1013
- }, l);
1014
- }
1015
-
1016
- export function ProcessParsing_processToRows(p) {
1017
- let list_3;
1018
- const pvs = map_3((ppv) => [JsonTypes_decomposeParameterValue(ppv), tryGetParameterColumnIndex(ppv)], defaultArg(p.ParameterValues, empty()));
1019
- let components;
1020
- const matchValue = p.ExecutesProtocol;
1021
- components = ((matchValue == null) ? empty() : map_3((ppv_1) => [JsonTypes_decomposeComponent(ppv_1), tryGetComponentIndex(ppv_1)], defaultArg(matchValue.Components, empty())));
1022
- let protVals;
1023
- const matchValue_1 = p.ExecutesProtocol;
1024
- if (matchValue_1 == null) {
1025
- protVals = empty();
1026
- }
1027
- else {
1028
- const prot_1 = matchValue_1;
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())))))))))));
1030
- }
1031
- return map_3((tupledArg_1) => {
1032
- const ios = tupledArg_1[1];
1033
- const inputForCharas = defaultArg(tryPick_1((tupledArg_2) => {
1034
- const i_2 = tupledArg_2[0];
1035
- if (ProcessInput__isSource(i_2) ? true : ProcessInput__isSample(i_2)) {
1036
- return i_2;
1037
- }
1038
- else {
1039
- return void 0;
1040
- }
1041
- }, ios), head(ios)[0]);
1042
- const inputForType = defaultArg(tryPick_1((tupledArg_3) => {
1043
- const i_3 = tupledArg_3[0];
1044
- if (ProcessInput__isData(i_3) ? true : ProcessInput__isMaterial(i_3)) {
1045
- return i_3;
1046
- }
1047
- else {
1048
- return void 0;
1049
- }
1050
- }, ios), head(ios)[0]);
1051
- const chars = map_3((cv) => [JsonTypes_decomposeCharacteristicValue(cv), tryGetCharacteristicColumnIndex(cv)], ProcessInput_getCharacteristicValues_102B6859(inputForCharas));
1052
- const outputForFactors = defaultArg(tryPick_1((tupledArg_4) => {
1053
- const o_4 = tupledArg_4[1];
1054
- if (ProcessOutput__isSample(o_4)) {
1055
- return o_4;
1056
- }
1057
- else {
1058
- return void 0;
1059
- }
1060
- }, ios), head(ios)[1]);
1061
- const outputForType = defaultArg(tryPick_1((tupledArg_5) => {
1062
- const o_5 = tupledArg_5[1];
1063
- if (ProcessOutput__isData(o_5) ? true : ProcessOutput__isMaterial(o_5)) {
1064
- return o_5;
1065
- }
1066
- else {
1067
- return void 0;
1068
- }
1069
- }, ios), head(ios)[1]);
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))))), {
1071
- Compare: comparePrimitives,
1072
- }));
1073
- return toList(delay(() => append(singleton_1(JsonTypes_decomposeProcessInput(inputForType)), delay(() => append(protVals, delay(() => append(vals, delay(() => singleton_1(JsonTypes_decomposeProcessOutput(outputForType))))))))));
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)), {
1075
- Equals: equalArrays,
1076
- GetHashCode: arrayHash,
1077
- }));
1078
- }
1079
-
1080
- /**
1081
- * Returns true, if two composite headers share the same main header string
1082
- */
1083
- export function ProcessParsing_compositeHeaderEqual(ch1, ch2) {
1084
- return toString(ch1) === toString(ch2);
1085
- }
1086
-
1087
- /**
1088
- * From a list of rows consisting of headers and values, creates a list of combined headers and the values as a sparse matrix
1089
- *
1090
- * The values cant be directly taken as they are, as there is no guarantee that the headers are aligned
1091
- *
1092
- * This function aligns the headers and values by the main header string
1093
- *
1094
- * If keepOrder is true, the order of values per row is kept intact, otherwise the values are allowed to be reordered
1095
- */
1096
- export function ProcessParsing_alignByHeaders(keepOrder, rows) {
1097
- const headers = [];
1098
- const values = new Dictionary([], {
1099
- Equals: equalArrays,
1100
- GetHashCode: arrayHash,
1101
- });
1102
- const loop = (colI_mut, rows_2_mut) => {
1103
- loop:
1104
- while (true) {
1105
- const colI = colI_mut, rows_2 = rows_2_mut;
1106
- if (!exists((arg) => !isEmpty(arg), rows_2)) {
1107
- return [headers, values];
1108
- }
1109
- else {
1110
- const firstElem = pick((l) => (isEmpty(l) ? void 0 : head(l)), rows_2)[0];
1111
- void (headers.push(firstElem));
1112
- colI_mut = (colI + 1);
1113
- rows_2_mut = mapIndexed((rowI, l_1) => {
1114
- if (keepOrder) {
1115
- if (!isEmpty(l_1)) {
1116
- if (ProcessParsing_compositeHeaderEqual(head(l_1)[0], firstElem)) {
1117
- addToDict(values, [colI, rowI], head(l_1)[1]);
1118
- return tail_1(l_1);
1119
- }
1120
- else {
1121
- return l_1;
1122
- }
1123
- }
1124
- else {
1125
- return empty();
1126
- }
1127
- }
1128
- else {
1129
- const patternInput = List_tryPickAndRemove((tupledArg) => {
1130
- if (ProcessParsing_compositeHeaderEqual(tupledArg[0], firstElem)) {
1131
- return tupledArg[1];
1132
- }
1133
- else {
1134
- return void 0;
1135
- }
1136
- }, l_1);
1137
- const newL = patternInput[1];
1138
- const firstMatch = patternInput[0];
1139
- if (firstMatch == null) {
1140
- return newL;
1141
- }
1142
- else {
1143
- addToDict(values, [colI, rowI], firstMatch);
1144
- return newL;
1145
- }
1146
- }
1147
- }, rows_2);
1148
- continue loop;
1149
- }
1150
- break;
1151
- }
1152
- };
1153
- return loop(0, rows);
1154
- }
1155
-