@nfdi4plants/arctrl 1.0.0-alpha10

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 (296) hide show
  1. package/ARC.js +262 -0
  2. package/Contract/Contract.js +95 -0
  3. package/Contracts/Contracts.ARCtrl.js +35 -0
  4. package/Contracts/Contracts.ArcAssay.js +65 -0
  5. package/Contracts/Contracts.ArcInvestigation.js +58 -0
  6. package/Contracts/Contracts.ArcStudy.js +65 -0
  7. package/Contracts/Contracts.Git.js +91 -0
  8. package/FileSystem/Commit.js +18 -0
  9. package/FileSystem/DefaultGitignore.js +3 -0
  10. package/FileSystem/FileSystem.js +53 -0
  11. package/FileSystem/FileSystemTree.js +223 -0
  12. package/FileSystem/Path.js +38 -0
  13. package/FileSystemTree.js +51 -0
  14. package/ISA/ISA/ArcTypes/ArcTable.js +848 -0
  15. package/ISA/ISA/ArcTypes/ArcTableAux.js +1105 -0
  16. package/ISA/ISA/ArcTypes/ArcTables.js +479 -0
  17. package/ISA/ISA/ArcTypes/ArcTypes.js +2281 -0
  18. package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
  19. package/ISA/ISA/ArcTypes/CompositeColumn.js +48 -0
  20. package/ISA/ISA/ArcTypes/CompositeHeader.js +668 -0
  21. package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
  22. package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
  23. package/ISA/ISA/Builder/Types.js +243 -0
  24. package/ISA/ISA/Fable.js +50 -0
  25. package/ISA/ISA/Helper.js +338 -0
  26. package/ISA/ISA/Identifier.js +76 -0
  27. package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
  28. package/ISA/ISA/JsonTypes/Assay.js +620 -0
  29. package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
  30. package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
  31. package/ISA/ISA/JsonTypes/Comment.js +58 -0
  32. package/ISA/ISA/JsonTypes/CommentList.js +139 -0
  33. package/ISA/ISA/JsonTypes/Component.js +158 -0
  34. package/ISA/ISA/JsonTypes/Data.js +55 -0
  35. package/ISA/ISA/JsonTypes/DataFile.js +68 -0
  36. package/ISA/ISA/JsonTypes/Factor.js +128 -0
  37. package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
  38. package/ISA/ISA/JsonTypes/Investigation.js +204 -0
  39. package/ISA/ISA/JsonTypes/Material.js +66 -0
  40. package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
  41. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
  42. package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
  43. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
  44. package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
  45. package/ISA/ISA/JsonTypes/Person.js +137 -0
  46. package/ISA/ISA/JsonTypes/Process.js +401 -0
  47. package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
  48. package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
  49. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
  50. package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
  51. package/ISA/ISA/JsonTypes/Protocol.js +277 -0
  52. package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
  53. package/ISA/ISA/JsonTypes/Publication.js +105 -0
  54. package/ISA/ISA/JsonTypes/Sample.js +71 -0
  55. package/ISA/ISA/JsonTypes/Source.js +54 -0
  56. package/ISA/ISA/JsonTypes/Study.js +942 -0
  57. package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
  58. package/ISA/ISA/JsonTypes/URI.js +19 -0
  59. package/ISA/ISA/JsonTypes/Value.js +210 -0
  60. package/ISA/ISA/Regex.js +588 -0
  61. package/ISA/ISA.Json/Assay.js +123 -0
  62. package/ISA/ISA.Json/Comment.js +84 -0
  63. package/ISA/ISA.Json/ConverterOptions.js +33 -0
  64. package/ISA/ISA.Json/Data.js +271 -0
  65. package/ISA/ISA.Json/Decode.js +46 -0
  66. package/ISA/ISA.Json/Factor.js +194 -0
  67. package/ISA/ISA.Json/GEncode.js +15 -0
  68. package/ISA/ISA.Json/Investigation.js +132 -0
  69. package/ISA/ISA.Json/Material.js +233 -0
  70. package/ISA/ISA.Json/Ontology.js +204 -0
  71. package/ISA/ISA.Json/Person.js +204 -0
  72. package/ISA/ISA.Json/Process.js +291 -0
  73. package/ISA/ISA.Json/Protocol.js +242 -0
  74. package/ISA/ISA.Json/Publication.js +92 -0
  75. package/ISA/ISA.Json/Study.js +230 -0
  76. package/ISA/ISA.Json/Validation/Fable.js +69 -0
  77. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
  78. package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
  79. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
  80. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
  81. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  82. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
  83. package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
  84. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
  85. package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
  86. package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
  87. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
  88. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
  89. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
  90. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
  91. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
  92. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
  93. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
  94. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
  95. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
  96. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
  97. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
  98. package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
  99. package/README.md +277 -0
  100. package/SemVer.js +60 -0
  101. package/Templates/Template.Json.js +85 -0
  102. package/Templates/Template.Spreadsheet.js +315 -0
  103. package/Templates/Template.Web.js +27 -0
  104. package/Templates/Template.js +179 -0
  105. package/Templates/Templates.js +82 -0
  106. package/WebRequest/WebRequest.js +38 -0
  107. package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
  108. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
  109. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
  110. package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
  111. package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
  112. package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
  113. package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
  114. package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
  115. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
  116. package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
  117. package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
  118. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
  119. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
  120. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
  121. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
  122. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
  123. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
  124. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
  125. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
  126. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
  127. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
  128. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
  129. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
  130. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
  131. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
  132. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
  133. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
  134. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
  135. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
  136. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
  137. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
  138. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
  139. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
  140. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
  141. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
  142. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
  143. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
  144. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
  145. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
  146. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
  147. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
  148. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
  149. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
  150. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
  151. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
  152. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
  153. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
  154. package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
  155. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
  156. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
  157. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
  158. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
  159. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
  160. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
  161. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
  162. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
  163. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
  164. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
  165. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
  166. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
  167. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
  168. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
  169. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
  170. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
  171. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
  172. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
  173. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
  174. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
  175. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
  176. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
  177. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  178. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  179. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  180. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  181. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
  182. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
  183. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
  184. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
  185. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
  186. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
  187. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
  188. package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
  189. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
  190. package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
  191. package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
  192. package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
  193. package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
  194. package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
  195. package/fable_modules/fable-library.4.1.4/Async.js +158 -0
  196. package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
  197. package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
  198. package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
  199. package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
  200. package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
  201. package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
  202. package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
  203. package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
  204. package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
  205. package/fable_modules/fable-library.4.1.4/Char.js +169 -0
  206. package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
  207. package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
  208. package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
  209. package/fable_modules/fable-library.4.1.4/Date.js +451 -0
  210. package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
  211. package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
  212. package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
  213. package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
  214. package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
  215. package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
  216. package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
  217. package/fable_modules/fable-library.4.1.4/Double.js +46 -0
  218. package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
  219. package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
  220. package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
  221. package/fable_modules/fable-library.4.1.4/Event.js +93 -0
  222. package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
  223. package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
  224. package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
  225. package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
  226. package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
  227. package/fable_modules/fable-library.4.1.4/Global.js +8 -0
  228. package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
  229. package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
  230. package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
  231. package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
  232. package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
  233. package/fable_modules/fable-library.4.1.4/List.js +1273 -0
  234. package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
  235. package/fable_modules/fable-library.4.1.4/Long.js +46 -0
  236. package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
  237. package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
  238. package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
  239. package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
  240. package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
  241. package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
  242. package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
  243. package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
  244. package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
  245. package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
  246. package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
  247. package/fable_modules/fable-library.4.1.4/Native.js +8 -0
  248. package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
  249. package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
  250. package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
  251. package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
  252. package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
  253. package/fable_modules/fable-library.4.1.4/Option.js +96 -0
  254. package/fable_modules/fable-library.4.1.4/README.md +3 -0
  255. package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
  256. package/fable_modules/fable-library.4.1.4/Random.js +170 -0
  257. package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
  258. package/fable_modules/fable-library.4.1.4/Range.js +45 -0
  259. package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
  260. package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
  261. package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
  262. package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
  263. package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
  264. package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
  265. package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
  266. package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
  267. package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
  268. package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
  269. package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
  270. package/fable_modules/fable-library.4.1.4/String.js +540 -0
  271. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
  272. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
  273. package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
  274. package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
  275. package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
  276. package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
  277. package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
  278. package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
  279. package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
  280. package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
  281. package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
  282. package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
  283. package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
  284. package/fable_modules/fable-library.4.1.4/Types.js +208 -0
  285. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
  286. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
  287. package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
  288. package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
  289. package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
  290. package/fable_modules/fable-library.4.1.4/Util.js +662 -0
  291. package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
  292. package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
  293. package/fable_modules/fable-library.4.1.4/package.json +23 -0
  294. package/fable_modules/project_cracked.json +1 -0
  295. package/index.js +13 -0
  296. package/package.json +24 -0
@@ -0,0 +1,942 @@
1
+ import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
2
+ import { getRecordFields, makeRecord, record_type, list_type, option_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
3
+ import { Publication_$reflection } from "./Publication.js";
4
+ import { Person_$reflection } from "./Person.js";
5
+ import { OntologyAnnotation_$reflection } from "./OntologyAnnotation.js";
6
+ import { Protocol_$reflection } from "./Protocol.js";
7
+ import { StudyMaterials_get_empty, StudyMaterials_make, StudyMaterials_$reflection } from "./StudyMaterials.js";
8
+ import { Process_$reflection } from "./Process.js";
9
+ import { Assay_update_722A269D, Assay_updateProtocols, Assay_getMaterials_722A269D, Assay_getSamples_722A269D, Assay_getSources_722A269D, Assay_getUnitCategories_722A269D, Assay_getFactors_722A269D, Assay_getCharacteristics_722A269D, Assay_getProtocols_722A269D, Assay_$reflection } from "./Assay.js";
10
+ import { Factor_$reflection } from "./Factor.js";
11
+ import { MaterialAttribute_$reflection } from "./MaterialAttribute.js";
12
+ import { Comment$_$reflection } from "./Comment.js";
13
+ import { collect, empty, filter, map, singleton, append, exists } from "../../../fable_modules/fable-library.4.1.4/List.js";
14
+ import { stringHash, safeHash, structuralHash, equals } from "../../../fable_modules/fable-library.4.1.4/Util.js";
15
+ import { map2 as map2_2 } from "../../../fable_modules/fable-library.4.1.4/Array.js";
16
+ import { Dict_tryFind, Dict_ofSeqWithMerge, Update_updateOnlyByExistingAppend, Update_updateOnlyByExisting, Update_updateAppend } from "../Helper.js";
17
+ import { map as map_1, defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
18
+ import { Option_fromValueWithDefault, Update_UpdateOptions, Option_mapDefault } from "../Helper.js";
19
+ import { updateProtocols, getMaterials, getSamples, getSources, getUnits, getFactors, getCharacteristics, getProtocols } from "./ProcessSequence.js";
20
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
21
+ import { Source_$reflection } from "./Source.js";
22
+ import { Sample_$reflection } from "./Sample.js";
23
+ import { AssayMaterials_getMaterials_35E61745 } from "./AssayMaterials.js";
24
+ import { Material_$reflection } from "./Material.js";
25
+ import { toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
26
+
27
+ export class Study extends Record {
28
+ constructor(ID, FileName, Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Publications, Contacts, StudyDesignDescriptors, Protocols, Materials, ProcessSequence, Assays, Factors, CharacteristicCategories, UnitCategories, Comments) {
29
+ super();
30
+ this.ID = ID;
31
+ this.FileName = FileName;
32
+ this.Identifier = Identifier;
33
+ this.Title = Title;
34
+ this.Description = Description;
35
+ this.SubmissionDate = SubmissionDate;
36
+ this.PublicReleaseDate = PublicReleaseDate;
37
+ this.Publications = Publications;
38
+ this.Contacts = Contacts;
39
+ this.StudyDesignDescriptors = StudyDesignDescriptors;
40
+ this.Protocols = Protocols;
41
+ this.Materials = Materials;
42
+ this.ProcessSequence = ProcessSequence;
43
+ this.Assays = Assays;
44
+ this.Factors = Factors;
45
+ this.CharacteristicCategories = CharacteristicCategories;
46
+ this.UnitCategories = UnitCategories;
47
+ this.Comments = Comments;
48
+ }
49
+ }
50
+
51
+ export function Study_$reflection() {
52
+ return record_type("ARCtrl.ISA.Study", [], Study, () => [["ID", option_type(string_type)], ["FileName", option_type(string_type)], ["Identifier", option_type(string_type)], ["Title", option_type(string_type)], ["Description", option_type(string_type)], ["SubmissionDate", option_type(string_type)], ["PublicReleaseDate", option_type(string_type)], ["Publications", option_type(list_type(Publication_$reflection()))], ["Contacts", option_type(list_type(Person_$reflection()))], ["StudyDesignDescriptors", option_type(list_type(OntologyAnnotation_$reflection()))], ["Protocols", option_type(list_type(Protocol_$reflection()))], ["Materials", option_type(StudyMaterials_$reflection())], ["ProcessSequence", option_type(list_type(Process_$reflection()))], ["Assays", option_type(list_type(Assay_$reflection()))], ["Factors", option_type(list_type(Factor_$reflection()))], ["CharacteristicCategories", option_type(list_type(MaterialAttribute_$reflection()))], ["UnitCategories", option_type(list_type(OntologyAnnotation_$reflection()))], ["Comments", option_type(list_type(Comment$_$reflection()))]]);
53
+ }
54
+
55
+ export function Study_make(id, filename, identifier, title, description, submissionDate, publicReleaseDate, publications, contacts, studyDesignDescriptors, protocols, materials, processSequence, assays, factors, characteristicCategories, unitCategories, comments) {
56
+ return new Study(id, filename, identifier, title, description, submissionDate, publicReleaseDate, publications, contacts, studyDesignDescriptors, protocols, materials, processSequence, assays, factors, characteristicCategories, unitCategories, comments);
57
+ }
58
+
59
+ export function Study_create_Z2D28E954(Id, FileName, Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Publications, Contacts, StudyDesignDescriptors, Protocols, Materials, ProcessSequence, Assays, Factors, CharacteristicCategories, UnitCategories, Comments) {
60
+ return Study_make(Id, FileName, Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Publications, Contacts, StudyDesignDescriptors, Protocols, Materials, ProcessSequence, Assays, Factors, CharacteristicCategories, UnitCategories, Comments);
61
+ }
62
+
63
+ export function Study_get_empty() {
64
+ return Study_create_Z2D28E954();
65
+ }
66
+
67
+ /**
68
+ * If an study with the given identfier exists in the list, returns true
69
+ */
70
+ export function Study_existsByIdentifier(identifier, studies) {
71
+ return exists((s) => equals(s.Identifier, identifier), studies);
72
+ }
73
+
74
+ /**
75
+ * Adds the given study to the studies
76
+ */
77
+ export function Study_add(studies, study) {
78
+ return append(studies, singleton(study));
79
+ }
80
+
81
+ /**
82
+ * Updates all studies for which the predicate returns true with the given study values
83
+ */
84
+ export function Study_updateBy(predicate, updateOption, study, studies) {
85
+ if (exists(predicate, studies)) {
86
+ return map((a) => {
87
+ if (predicate(a)) {
88
+ const this$ = updateOption;
89
+ const recordType_1 = a;
90
+ const recordType_2 = study;
91
+ return (this$.tag === 2) ? makeRecord(Study_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2))) : ((this$.tag === 1) ? makeRecord(Study_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2))) : ((this$.tag === 3) ? makeRecord(Study_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2))) : recordType_2));
92
+ }
93
+ else {
94
+ return a;
95
+ }
96
+ }, studies);
97
+ }
98
+ else {
99
+ return studies;
100
+ }
101
+ }
102
+
103
+ /**
104
+ * Updates all studies with the same identifier as the given study with its values
105
+ */
106
+ export function Study_updateByIdentifier(updateOption, study, studies) {
107
+ return Study_updateBy((s) => equals(s.Identifier, study.Identifier), updateOption, study, studies);
108
+ }
109
+
110
+ /**
111
+ * If a study with the given identifier exists in the list, removes it
112
+ */
113
+ export function Study_removeByIdentifier(identifier, studies) {
114
+ return filter((s) => !equals(s.Identifier, identifier), studies);
115
+ }
116
+
117
+ /**
118
+ * Returns assays of a study
119
+ */
120
+ export function Study_getAssays_7312BC8B(study) {
121
+ return defaultArg(study.Assays, empty());
122
+ }
123
+
124
+ /**
125
+ * Applies function f to the assays of a study
126
+ */
127
+ export function Study_mapAssays(f, study) {
128
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, Option_mapDefault(empty(), f, study.Assays), study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
129
+ }
130
+
131
+ /**
132
+ * Replaces study assays with the given assay list
133
+ */
134
+ export function Study_setAssays(study, assays) {
135
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
136
+ }
137
+
138
+ /**
139
+ * Applies function f to the factors of a study
140
+ */
141
+ export function Study_mapFactors(f, study) {
142
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, Option_mapDefault(empty(), f, study.Factors), study.CharacteristicCategories, study.UnitCategories, study.Comments);
143
+ }
144
+
145
+ /**
146
+ * Replaces study factors with the given assay list
147
+ */
148
+ export function Study_setFactors(study, factors) {
149
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
150
+ }
151
+
152
+ /**
153
+ * Applies function f to the protocols of a study
154
+ */
155
+ export function Study_mapProtocols(f, study) {
156
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, Option_mapDefault(empty(), f, study.Protocols), study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
157
+ }
158
+
159
+ /**
160
+ * Replaces study protocols with the given assay list
161
+ */
162
+ export function Study_setProtocols(study, protocols) {
163
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
164
+ }
165
+
166
+ /**
167
+ * Returns all contacts of a study
168
+ */
169
+ export function Study_getContacts_7312BC8B(study) {
170
+ return defaultArg(study.Contacts, empty());
171
+ }
172
+
173
+ /**
174
+ * Applies function f to contacts of a study
175
+ */
176
+ export function Study_mapContacts(f, study) {
177
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, Option_mapDefault(empty(), f, study.Contacts), study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
178
+ }
179
+
180
+ /**
181
+ * Replaces contacts of a study with the given person list
182
+ */
183
+ export function Study_setContacts(study, persons) {
184
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, persons, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
185
+ }
186
+
187
+ /**
188
+ * Returns publications of a study
189
+ */
190
+ export function Study_getPublications_7312BC8B(study) {
191
+ return defaultArg(study.Publications, empty());
192
+ }
193
+
194
+ /**
195
+ * Applies function f to publications of the study
196
+ */
197
+ export function Study_mapPublications(f, study) {
198
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, Option_mapDefault(empty(), f, study.Publications), study.Contacts, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
199
+ }
200
+
201
+ /**
202
+ * Replaces publications of a study with the given publication list
203
+ */
204
+ export function Study_setPublications(study, publications) {
205
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, publications, study.Contacts, study.StudyDesignDescriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
206
+ }
207
+
208
+ /**
209
+ * Returns study design descriptors of a study
210
+ */
211
+ export function Study_getDescriptors_7312BC8B(study) {
212
+ return defaultArg(study.StudyDesignDescriptors, empty());
213
+ }
214
+
215
+ /**
216
+ * Applies function f to to study design descriptors of a study
217
+ */
218
+ export function Study_mapDescriptors(f, study) {
219
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, Option_mapDefault(empty(), f, study.StudyDesignDescriptors), study.Protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
220
+ }
221
+
222
+ /**
223
+ * Replaces study design descriptors with the given ontology annotation list
224
+ */
225
+ export function Study_setDescriptors(study, descriptors) {
226
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, descriptors, study.Protocols, study.Materials, study.ProcessSequence, study.Assays, study.Factors, study.CharacteristicCategories, study.UnitCategories, study.Comments);
227
+ }
228
+
229
+ /**
230
+ * Returns processSequence of study
231
+ */
232
+ export function Study_getProcesses_7312BC8B(study) {
233
+ return defaultArg(study.ProcessSequence, empty());
234
+ }
235
+
236
+ /**
237
+ * Returns protocols of a study
238
+ */
239
+ export function Study_getProtocols_7312BC8B(study) {
240
+ const processSequenceProtocols = getProtocols(Study_getProcesses_7312BC8B(study));
241
+ const assaysProtocols = collect(Assay_getProtocols_722A269D, Study_getAssays_7312BC8B(study));
242
+ const updateOptions_2 = new Update_UpdateOptions(3, []);
243
+ const mapping_6 = (p_1) => p_1.Name;
244
+ const list1_1 = defaultArg(study.Protocols, empty());
245
+ let list2_1;
246
+ const updateOptions = new Update_UpdateOptions(3, []);
247
+ const mapping_1 = (p) => p.Name;
248
+ const list1 = assaysProtocols;
249
+ const list2 = processSequenceProtocols;
250
+ try {
251
+ const map1 = Dict_ofSeqWithMerge((arg_1, arg_1_1) => {
252
+ const this$ = updateOptions;
253
+ const recordType_1 = arg_1;
254
+ const recordType_2 = arg_1_1;
255
+ switch (this$.tag) {
256
+ case 2:
257
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
258
+ case 1:
259
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
260
+ case 3:
261
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
262
+ default:
263
+ return recordType_2;
264
+ }
265
+ }, map((v) => [mapping_1(v), v], list1));
266
+ const map2 = Dict_ofSeqWithMerge((arg_2, arg_3) => {
267
+ const this$_1 = updateOptions;
268
+ const recordType_1_1 = arg_2;
269
+ const recordType_2_1 = arg_3;
270
+ switch (this$_1.tag) {
271
+ case 2:
272
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
273
+ case 1:
274
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
275
+ case 3:
276
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
277
+ default:
278
+ return recordType_2_1;
279
+ }
280
+ }, map((v_1) => [mapping_1(v_1), v_1], list2));
281
+ list2_1 = map((k) => {
282
+ const matchValue = Dict_tryFind(k, map1);
283
+ const matchValue_1 = Dict_tryFind(k, map2);
284
+ if (matchValue == null) {
285
+ if (matchValue_1 == null) {
286
+ throw new Error("If this fails, then I don\'t know how to program");
287
+ }
288
+ else {
289
+ const v2_1 = matchValue_1;
290
+ return v2_1;
291
+ }
292
+ }
293
+ else if (matchValue_1 == null) {
294
+ const v1_1 = matchValue;
295
+ return v1_1;
296
+ }
297
+ else {
298
+ const v1 = matchValue;
299
+ const v2 = matchValue_1;
300
+ const this$_2 = updateOptions;
301
+ const recordType_1_2 = v1;
302
+ const recordType_2_2 = v2;
303
+ switch (this$_2.tag) {
304
+ case 2:
305
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
306
+ case 1:
307
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
308
+ case 3:
309
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
310
+ default:
311
+ return recordType_2_2;
312
+ }
313
+ }
314
+ }, List_distinct(append(map(mapping_1, list1), map(mapping_1, list2)), {
315
+ Equals: equals,
316
+ GetHashCode: structuralHash,
317
+ }));
318
+ }
319
+ catch (err) {
320
+ throw new Error(`Could not mergeUpdate ${"Protocol"} list:
321
+ ${err.message}`);
322
+ }
323
+ try {
324
+ const map1_1 = Dict_ofSeqWithMerge((arg_6, arg_1_2) => {
325
+ const this$_3 = updateOptions_2;
326
+ const recordType_1_3 = arg_6;
327
+ const recordType_2_3 = arg_1_2;
328
+ switch (this$_3.tag) {
329
+ case 2:
330
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
331
+ case 1:
332
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
333
+ case 3:
334
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
335
+ default:
336
+ return recordType_2_3;
337
+ }
338
+ }, map((v_2) => [mapping_6(v_2), v_2], list1_1));
339
+ const map2_1 = Dict_ofSeqWithMerge((arg_2_1, arg_3_1) => {
340
+ const this$_4 = updateOptions_2;
341
+ const recordType_1_4 = arg_2_1;
342
+ const recordType_2_4 = arg_3_1;
343
+ switch (this$_4.tag) {
344
+ case 2:
345
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
346
+ case 1:
347
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
348
+ case 3:
349
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
350
+ default:
351
+ return recordType_2_4;
352
+ }
353
+ }, map((v_1_1) => [mapping_6(v_1_1), v_1_1], list2_1));
354
+ return map((k_1) => {
355
+ const matchValue_3 = Dict_tryFind(k_1, map1_1);
356
+ const matchValue_1_1 = Dict_tryFind(k_1, map2_1);
357
+ if (matchValue_3 == null) {
358
+ if (matchValue_1_1 == null) {
359
+ throw new Error("If this fails, then I don\'t know how to program");
360
+ }
361
+ else {
362
+ const v2_1_1 = matchValue_1_1;
363
+ return v2_1_1;
364
+ }
365
+ }
366
+ else if (matchValue_1_1 == null) {
367
+ const v1_1_1 = matchValue_3;
368
+ return v1_1_1;
369
+ }
370
+ else {
371
+ const v1_2 = matchValue_3;
372
+ const v2_2 = matchValue_1_1;
373
+ const this$_5 = updateOptions_2;
374
+ const recordType_1_5 = v1_2;
375
+ const recordType_2_5 = v2_2;
376
+ switch (this$_5.tag) {
377
+ case 2:
378
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
379
+ case 1:
380
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
381
+ case 3:
382
+ return makeRecord(Protocol_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
383
+ default:
384
+ return recordType_2_5;
385
+ }
386
+ }
387
+ }, List_distinct(append(map(mapping_6, list1_1), map(mapping_6, list2_1)), {
388
+ Equals: equals,
389
+ GetHashCode: structuralHash,
390
+ }));
391
+ }
392
+ catch (err_1) {
393
+ throw new Error(`Could not mergeUpdate ${"Protocol"} list:
394
+ ${err_1.message}`);
395
+ }
396
+ }
397
+
398
+ /**
399
+ * Returns Characteristics of the study
400
+ */
401
+ export function Study_getCharacteristics_7312BC8B(study) {
402
+ return List_distinct(append(getCharacteristics(Study_getProcesses_7312BC8B(study)), append(collect(Assay_getCharacteristics_722A269D, Study_getAssays_7312BC8B(study)), defaultArg(study.CharacteristicCategories, empty()))), {
403
+ Equals: equals,
404
+ GetHashCode: safeHash,
405
+ });
406
+ }
407
+
408
+ /**
409
+ * Returns factors of the study
410
+ */
411
+ export function Study_getFactors_7312BC8B(study) {
412
+ return List_distinct(append(getFactors(Study_getProcesses_7312BC8B(study)), append(collect(Assay_getFactors_722A269D, Study_getAssays_7312BC8B(study)), defaultArg(study.Factors, empty()))), {
413
+ Equals: equals,
414
+ GetHashCode: safeHash,
415
+ });
416
+ }
417
+
418
+ /**
419
+ * Returns unit categories of the study
420
+ */
421
+ export function Study_getUnitCategories_7312BC8B(study) {
422
+ return List_distinct(append(getUnits(Study_getProcesses_7312BC8B(study)), append(collect(Assay_getUnitCategories_722A269D, Study_getAssays_7312BC8B(study)), defaultArg(study.UnitCategories, empty()))), {
423
+ Equals: equals,
424
+ GetHashCode: safeHash,
425
+ });
426
+ }
427
+
428
+ /**
429
+ * Returns sources of the study
430
+ */
431
+ export function Study_getSources_7312BC8B(study) {
432
+ const processSequenceSources = getSources(Study_getProcesses_7312BC8B(study));
433
+ const assaysSources = collect(Assay_getSources_722A269D, Study_getAssays_7312BC8B(study));
434
+ const updateOptions_2 = new Update_UpdateOptions(3, []);
435
+ const mapping_6 = (s_2) => defaultArg(s_2.Name, "");
436
+ let list1_1;
437
+ const matchValue = study.Materials;
438
+ list1_1 = ((matchValue == null) ? empty() : defaultArg(matchValue.Sources, empty()));
439
+ let list2_1;
440
+ const updateOptions = new Update_UpdateOptions(3, []);
441
+ const mapping_1 = (s) => defaultArg(s.Name, "");
442
+ const list1 = assaysSources;
443
+ const list2 = processSequenceSources;
444
+ try {
445
+ const map1 = Dict_ofSeqWithMerge((arg_1, arg_1_1) => {
446
+ const this$ = updateOptions;
447
+ const recordType_1 = arg_1;
448
+ const recordType_2 = arg_1_1;
449
+ switch (this$.tag) {
450
+ case 2:
451
+ return makeRecord(Source_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
452
+ case 1:
453
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
454
+ case 3:
455
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
456
+ default:
457
+ return recordType_2;
458
+ }
459
+ }, map((v) => [mapping_1(v), v], list1));
460
+ const map2 = Dict_ofSeqWithMerge((arg_2, arg_3) => {
461
+ const this$_1 = updateOptions;
462
+ const recordType_1_1 = arg_2;
463
+ const recordType_2_1 = arg_3;
464
+ switch (this$_1.tag) {
465
+ case 2:
466
+ return makeRecord(Source_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
467
+ case 1:
468
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
469
+ case 3:
470
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
471
+ default:
472
+ return recordType_2_1;
473
+ }
474
+ }, map((v_1) => [mapping_1(v_1), v_1], list2));
475
+ list2_1 = map((k) => {
476
+ const matchValue_1 = Dict_tryFind(k, map1);
477
+ const matchValue_1_1 = Dict_tryFind(k, map2);
478
+ if (matchValue_1 == null) {
479
+ if (matchValue_1_1 == null) {
480
+ throw new Error("If this fails, then I don\'t know how to program");
481
+ }
482
+ else {
483
+ const v2_1 = matchValue_1_1;
484
+ return v2_1;
485
+ }
486
+ }
487
+ else if (matchValue_1_1 == null) {
488
+ const v1_1 = matchValue_1;
489
+ return v1_1;
490
+ }
491
+ else {
492
+ const v1 = matchValue_1;
493
+ const v2 = matchValue_1_1;
494
+ const this$_2 = updateOptions;
495
+ const recordType_1_2 = v1;
496
+ const recordType_2_2 = v2;
497
+ switch (this$_2.tag) {
498
+ case 2:
499
+ return makeRecord(Source_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
500
+ case 1:
501
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
502
+ case 3:
503
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
504
+ default:
505
+ return recordType_2_2;
506
+ }
507
+ }
508
+ }, List_distinct(append(map(mapping_1, list1), map(mapping_1, list2)), {
509
+ Equals: (x, y) => (x === y),
510
+ GetHashCode: stringHash,
511
+ }));
512
+ }
513
+ catch (err) {
514
+ throw new Error(`Could not mergeUpdate ${"Source"} list:
515
+ ${err.message}`);
516
+ }
517
+ try {
518
+ const map1_1 = Dict_ofSeqWithMerge((arg_6, arg_1_2) => {
519
+ const this$_3 = updateOptions_2;
520
+ const recordType_1_3 = arg_6;
521
+ const recordType_2_3 = arg_1_2;
522
+ switch (this$_3.tag) {
523
+ case 2:
524
+ return makeRecord(Source_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
525
+ case 1:
526
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
527
+ case 3:
528
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
529
+ default:
530
+ return recordType_2_3;
531
+ }
532
+ }, map((v_2) => [mapping_6(v_2), v_2], list1_1));
533
+ const map2_1 = Dict_ofSeqWithMerge((arg_2_1, arg_3_1) => {
534
+ const this$_4 = updateOptions_2;
535
+ const recordType_1_4 = arg_2_1;
536
+ const recordType_2_4 = arg_3_1;
537
+ switch (this$_4.tag) {
538
+ case 2:
539
+ return makeRecord(Source_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
540
+ case 1:
541
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
542
+ case 3:
543
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
544
+ default:
545
+ return recordType_2_4;
546
+ }
547
+ }, map((v_1_1) => [mapping_6(v_1_1), v_1_1], list2_1));
548
+ return map((k_1) => {
549
+ const matchValue_3 = Dict_tryFind(k_1, map1_1);
550
+ const matchValue_1_2 = Dict_tryFind(k_1, map2_1);
551
+ if (matchValue_3 == null) {
552
+ if (matchValue_1_2 == null) {
553
+ throw new Error("If this fails, then I don\'t know how to program");
554
+ }
555
+ else {
556
+ const v2_1_1 = matchValue_1_2;
557
+ return v2_1_1;
558
+ }
559
+ }
560
+ else if (matchValue_1_2 == null) {
561
+ const v1_1_1 = matchValue_3;
562
+ return v1_1_1;
563
+ }
564
+ else {
565
+ const v1_2 = matchValue_3;
566
+ const v2_2 = matchValue_1_2;
567
+ const this$_5 = updateOptions_2;
568
+ const recordType_1_5 = v1_2;
569
+ const recordType_2_5 = v2_2;
570
+ switch (this$_5.tag) {
571
+ case 2:
572
+ return makeRecord(Source_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
573
+ case 1:
574
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
575
+ case 3:
576
+ return makeRecord(Source_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
577
+ default:
578
+ return recordType_2_5;
579
+ }
580
+ }
581
+ }, List_distinct(append(map(mapping_6, list1_1), map(mapping_6, list2_1)), {
582
+ Equals: (x_1, y_1) => (x_1 === y_1),
583
+ GetHashCode: stringHash,
584
+ }));
585
+ }
586
+ catch (err_1) {
587
+ throw new Error(`Could not mergeUpdate ${"Source"} list:
588
+ ${err_1.message}`);
589
+ }
590
+ }
591
+
592
+ /**
593
+ * Returns sources of the study
594
+ */
595
+ export function Study_getSamples_7312BC8B(study) {
596
+ const processSequenceSamples = getSamples(Study_getProcesses_7312BC8B(study));
597
+ const assaysSamples = collect(Assay_getSamples_722A269D, Study_getAssays_7312BC8B(study));
598
+ const updateOptions_2 = new Update_UpdateOptions(3, []);
599
+ const mapping_6 = (s_2) => defaultArg(s_2.Name, "");
600
+ let list1_1;
601
+ const matchValue = study.Materials;
602
+ list1_1 = ((matchValue == null) ? empty() : defaultArg(matchValue.Samples, empty()));
603
+ let list2_1;
604
+ const updateOptions = new Update_UpdateOptions(3, []);
605
+ const mapping_1 = (s) => defaultArg(s.Name, "");
606
+ const list1 = assaysSamples;
607
+ const list2 = processSequenceSamples;
608
+ try {
609
+ const map1 = Dict_ofSeqWithMerge((arg_1, arg_1_1) => {
610
+ const this$ = updateOptions;
611
+ const recordType_1 = arg_1;
612
+ const recordType_2 = arg_1_1;
613
+ switch (this$.tag) {
614
+ case 2:
615
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
616
+ case 1:
617
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
618
+ case 3:
619
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
620
+ default:
621
+ return recordType_2;
622
+ }
623
+ }, map((v) => [mapping_1(v), v], list1));
624
+ const map2 = Dict_ofSeqWithMerge((arg_2, arg_3) => {
625
+ const this$_1 = updateOptions;
626
+ const recordType_1_1 = arg_2;
627
+ const recordType_2_1 = arg_3;
628
+ switch (this$_1.tag) {
629
+ case 2:
630
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
631
+ case 1:
632
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
633
+ case 3:
634
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
635
+ default:
636
+ return recordType_2_1;
637
+ }
638
+ }, map((v_1) => [mapping_1(v_1), v_1], list2));
639
+ list2_1 = map((k) => {
640
+ const matchValue_1 = Dict_tryFind(k, map1);
641
+ const matchValue_1_1 = Dict_tryFind(k, map2);
642
+ if (matchValue_1 == null) {
643
+ if (matchValue_1_1 == null) {
644
+ throw new Error("If this fails, then I don\'t know how to program");
645
+ }
646
+ else {
647
+ const v2_1 = matchValue_1_1;
648
+ return v2_1;
649
+ }
650
+ }
651
+ else if (matchValue_1_1 == null) {
652
+ const v1_1 = matchValue_1;
653
+ return v1_1;
654
+ }
655
+ else {
656
+ const v1 = matchValue_1;
657
+ const v2 = matchValue_1_1;
658
+ const this$_2 = updateOptions;
659
+ const recordType_1_2 = v1;
660
+ const recordType_2_2 = v2;
661
+ switch (this$_2.tag) {
662
+ case 2:
663
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
664
+ case 1:
665
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
666
+ case 3:
667
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
668
+ default:
669
+ return recordType_2_2;
670
+ }
671
+ }
672
+ }, List_distinct(append(map(mapping_1, list1), map(mapping_1, list2)), {
673
+ Equals: (x, y) => (x === y),
674
+ GetHashCode: stringHash,
675
+ }));
676
+ }
677
+ catch (err) {
678
+ throw new Error(`Could not mergeUpdate ${"Sample"} list:
679
+ ${err.message}`);
680
+ }
681
+ try {
682
+ const map1_1 = Dict_ofSeqWithMerge((arg_6, arg_1_2) => {
683
+ const this$_3 = updateOptions_2;
684
+ const recordType_1_3 = arg_6;
685
+ const recordType_2_3 = arg_1_2;
686
+ switch (this$_3.tag) {
687
+ case 2:
688
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
689
+ case 1:
690
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
691
+ case 3:
692
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
693
+ default:
694
+ return recordType_2_3;
695
+ }
696
+ }, map((v_2) => [mapping_6(v_2), v_2], list1_1));
697
+ const map2_1 = Dict_ofSeqWithMerge((arg_2_1, arg_3_1) => {
698
+ const this$_4 = updateOptions_2;
699
+ const recordType_1_4 = arg_2_1;
700
+ const recordType_2_4 = arg_3_1;
701
+ switch (this$_4.tag) {
702
+ case 2:
703
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
704
+ case 1:
705
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
706
+ case 3:
707
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
708
+ default:
709
+ return recordType_2_4;
710
+ }
711
+ }, map((v_1_1) => [mapping_6(v_1_1), v_1_1], list2_1));
712
+ return map((k_1) => {
713
+ const matchValue_3 = Dict_tryFind(k_1, map1_1);
714
+ const matchValue_1_2 = Dict_tryFind(k_1, map2_1);
715
+ if (matchValue_3 == null) {
716
+ if (matchValue_1_2 == null) {
717
+ throw new Error("If this fails, then I don\'t know how to program");
718
+ }
719
+ else {
720
+ const v2_1_1 = matchValue_1_2;
721
+ return v2_1_1;
722
+ }
723
+ }
724
+ else if (matchValue_1_2 == null) {
725
+ const v1_1_1 = matchValue_3;
726
+ return v1_1_1;
727
+ }
728
+ else {
729
+ const v1_2 = matchValue_3;
730
+ const v2_2 = matchValue_1_2;
731
+ const this$_5 = updateOptions_2;
732
+ const recordType_1_5 = v1_2;
733
+ const recordType_2_5 = v2_2;
734
+ switch (this$_5.tag) {
735
+ case 2:
736
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
737
+ case 1:
738
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
739
+ case 3:
740
+ return makeRecord(Sample_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
741
+ default:
742
+ return recordType_2_5;
743
+ }
744
+ }
745
+ }, List_distinct(append(map(mapping_6, list1_1), map(mapping_6, list2_1)), {
746
+ Equals: (x_1, y_1) => (x_1 === y_1),
747
+ GetHashCode: stringHash,
748
+ }));
749
+ }
750
+ catch (err_1) {
751
+ throw new Error(`Could not mergeUpdate ${"Sample"} list:
752
+ ${err_1.message}`);
753
+ }
754
+ }
755
+
756
+ /**
757
+ * Returns materials of the study
758
+ */
759
+ export function Study_getMaterials_7312BC8B(study) {
760
+ const processSequenceMaterials = getMaterials(Study_getProcesses_7312BC8B(study));
761
+ const assaysMaterials = collect((arg_2) => AssayMaterials_getMaterials_35E61745(Assay_getMaterials_722A269D(arg_2)), Study_getAssays_7312BC8B(study));
762
+ let materials;
763
+ const updateOptions_2 = new Update_UpdateOptions(3, []);
764
+ const mapping_6 = (s_2) => s_2.Name;
765
+ let list1_1;
766
+ const matchValue = study.Materials;
767
+ list1_1 = ((matchValue == null) ? empty() : defaultArg(matchValue.OtherMaterials, empty()));
768
+ let list2_1;
769
+ const updateOptions = new Update_UpdateOptions(3, []);
770
+ const mapping_1 = (s) => s.Name;
771
+ const list1 = assaysMaterials;
772
+ const list2 = processSequenceMaterials;
773
+ try {
774
+ const map1 = Dict_ofSeqWithMerge((arg_3, arg_1_1) => {
775
+ const this$ = updateOptions;
776
+ const recordType_1 = arg_3;
777
+ const recordType_2 = arg_1_1;
778
+ switch (this$.tag) {
779
+ case 2:
780
+ return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
781
+ case 1:
782
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1), getRecordFields(recordType_2)));
783
+ case 3:
784
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1), getRecordFields(recordType_2)));
785
+ default:
786
+ return recordType_2;
787
+ }
788
+ }, map((v) => [mapping_1(v), v], list1));
789
+ const map2 = Dict_ofSeqWithMerge((arg_2_1, arg_3_1) => {
790
+ const this$_1 = updateOptions;
791
+ const recordType_1_1 = arg_2_1;
792
+ const recordType_2_1 = arg_3_1;
793
+ switch (this$_1.tag) {
794
+ case 2:
795
+ return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
796
+ case 1:
797
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
798
+ case 3:
799
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_1), getRecordFields(recordType_2_1)));
800
+ default:
801
+ return recordType_2_1;
802
+ }
803
+ }, map((v_1) => [mapping_1(v_1), v_1], list2));
804
+ list2_1 = map((k) => {
805
+ const matchValue_1 = Dict_tryFind(k, map1);
806
+ const matchValue_1_1 = Dict_tryFind(k, map2);
807
+ if (matchValue_1 == null) {
808
+ if (matchValue_1_1 == null) {
809
+ throw new Error("If this fails, then I don\'t know how to program");
810
+ }
811
+ else {
812
+ const v2_1 = matchValue_1_1;
813
+ return v2_1;
814
+ }
815
+ }
816
+ else if (matchValue_1_1 == null) {
817
+ const v1_1 = matchValue_1;
818
+ return v1_1;
819
+ }
820
+ else {
821
+ const v1 = matchValue_1;
822
+ const v2 = matchValue_1_1;
823
+ const this$_2 = updateOptions;
824
+ const recordType_1_2 = v1;
825
+ const recordType_2_2 = v2;
826
+ switch (this$_2.tag) {
827
+ case 2:
828
+ return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
829
+ case 1:
830
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
831
+ case 3:
832
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_2), getRecordFields(recordType_2_2)));
833
+ default:
834
+ return recordType_2_2;
835
+ }
836
+ }
837
+ }, List_distinct(append(map(mapping_1, list1), map(mapping_1, list2)), {
838
+ Equals: equals,
839
+ GetHashCode: structuralHash,
840
+ }));
841
+ }
842
+ catch (err) {
843
+ throw new Error(`Could not mergeUpdate ${"Material"} list:
844
+ ${err.message}`);
845
+ }
846
+ try {
847
+ const map1_1 = Dict_ofSeqWithMerge((arg_6, arg_1_2) => {
848
+ const this$_3 = updateOptions_2;
849
+ const recordType_1_3 = arg_6;
850
+ const recordType_2_3 = arg_1_2;
851
+ switch (this$_3.tag) {
852
+ case 2:
853
+ return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
854
+ case 1:
855
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
856
+ case 3:
857
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_3), getRecordFields(recordType_2_3)));
858
+ default:
859
+ return recordType_2_3;
860
+ }
861
+ }, map((v_2) => [mapping_6(v_2), v_2], list1_1));
862
+ const map2_1 = Dict_ofSeqWithMerge((arg_2_2, arg_3_2) => {
863
+ const this$_4 = updateOptions_2;
864
+ const recordType_1_4 = arg_2_2;
865
+ const recordType_2_4 = arg_3_2;
866
+ switch (this$_4.tag) {
867
+ case 2:
868
+ return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
869
+ case 1:
870
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
871
+ case 3:
872
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_4), getRecordFields(recordType_2_4)));
873
+ default:
874
+ return recordType_2_4;
875
+ }
876
+ }, map((v_1_1) => [mapping_6(v_1_1), v_1_1], list2_1));
877
+ materials = map((k_1) => {
878
+ const matchValue_3 = Dict_tryFind(k_1, map1_1);
879
+ const matchValue_1_2 = Dict_tryFind(k_1, map2_1);
880
+ if (matchValue_3 == null) {
881
+ if (matchValue_1_2 == null) {
882
+ throw new Error("If this fails, then I don\'t know how to program");
883
+ }
884
+ else {
885
+ const v2_1_1 = matchValue_1_2;
886
+ return v2_1_1;
887
+ }
888
+ }
889
+ else if (matchValue_1_2 == null) {
890
+ const v1_1_1 = matchValue_3;
891
+ return v1_1_1;
892
+ }
893
+ else {
894
+ const v1_2 = matchValue_3;
895
+ const v2_2 = matchValue_1_2;
896
+ const this$_5 = updateOptions_2;
897
+ const recordType_1_5 = v1_2;
898
+ const recordType_2_5 = v2_2;
899
+ switch (this$_5.tag) {
900
+ case 2:
901
+ return makeRecord(Material_$reflection(), map2_2(Update_updateAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
902
+ case 1:
903
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExisting, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
904
+ case 3:
905
+ return makeRecord(Material_$reflection(), map2_2(Update_updateOnlyByExistingAppend, getRecordFields(recordType_1_5), getRecordFields(recordType_2_5)));
906
+ default:
907
+ return recordType_2_5;
908
+ }
909
+ }
910
+ }, List_distinct(append(map(mapping_6, list1_1), map(mapping_6, list2_1)), {
911
+ Equals: equals,
912
+ GetHashCode: structuralHash,
913
+ }));
914
+ }
915
+ catch (err_1) {
916
+ throw new Error(`Could not mergeUpdate ${"Material"} list:
917
+ ${err_1.message}`);
918
+ }
919
+ const sources = Study_getSources_7312BC8B(study);
920
+ const samples = Study_getSamples_7312BC8B(study);
921
+ return StudyMaterials_make(Option_fromValueWithDefault(empty(), sources), Option_fromValueWithDefault(empty(), samples), Option_fromValueWithDefault(empty(), materials));
922
+ }
923
+
924
+ export function Study_update_7312BC8B(study) {
925
+ try {
926
+ const protocols = Study_getProtocols_7312BC8B(study);
927
+ let Materials;
928
+ const v = Study_getMaterials_7312BC8B(study);
929
+ Materials = Option_fromValueWithDefault(StudyMaterials_get_empty(), v);
930
+ const Assays = map_1((list) => map((arg_3) => ((arg_2) => Assay_updateProtocols(protocols, arg_2))(Assay_update_722A269D(arg_3)), list), study.Assays);
931
+ const Protocols = Option_fromValueWithDefault(empty(), protocols);
932
+ const Factors = Option_fromValueWithDefault(empty(), Study_getFactors_7312BC8B(study));
933
+ const CharacteristicCategories = Option_fromValueWithDefault(empty(), Study_getCharacteristics_7312BC8B(study));
934
+ const UnitCategories = Option_fromValueWithDefault(empty(), Study_getUnitCategories_7312BC8B(study));
935
+ return new Study(study.ID, study.FileName, study.Identifier, study.Title, study.Description, study.SubmissionDate, study.PublicReleaseDate, study.Publications, study.Contacts, study.StudyDesignDescriptors, Protocols, Materials, map_1((processSequence) => updateProtocols(protocols, processSequence), study.ProcessSequence), Assays, Factors, CharacteristicCategories, UnitCategories, study.Comments);
936
+ }
937
+ catch (err) {
938
+ return toFail(`Could not update study ${study.Identifier}:
939
+ ${err.message}`);
940
+ }
941
+ }
942
+