@icure/cardinal-sdk 2.0.0-PREVIEW-18.1 → 2.0.0-PREVIEW-21

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 (384) hide show
  1. package/Kermit-kermit-core.mjs +45 -40
  2. package/Kermit-kermit.mjs +6 -6
  3. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1577 -1577
  4. package/api/HealthcarePartyApi.d.mts +2 -0
  5. package/api/HealthcarePartyApiInGroup.d.mts +5 -0
  6. package/api/HealthcarePartyApiInGroup.mjs +1 -0
  7. package/api/RecoveryApi.d.mts +5 -1
  8. package/api.d.mts +1 -0
  9. package/api.mjs +1 -0
  10. package/bitops-library-bits.mjs +197 -0
  11. package/bitops-library-endian.mjs +117 -0
  12. package/cardinal-sdk-ts.d.mts +2 -2
  13. package/cardinal-sdk-ts.mjs +57007 -56794
  14. package/cardinal-sdk.mjs +120895 -120501
  15. package/core-library-digest.mjs +186 -0
  16. package/crypto/CryptoService.d.mts +17 -7
  17. package/error-library-error.mjs +42 -0
  18. package/hash-library-sha2.mjs +183 -0
  19. package/internal/BytesEncoding.d.mts +3 -0
  20. package/internal/BytesEncoding.mjs +99 -0
  21. package/internal/JsonDecodeUtils.d.mts +20 -0
  22. package/internal/JsonDecodeUtils.mjs +99 -0
  23. package/kerberus.mjs +557 -389
  24. package/kotlin-kotlin-stdlib.mjs +2445 -2713
  25. package/kotlinx-atomicfu.mjs +13 -13
  26. package/kotlinx-coroutines-core.mjs +2455 -2450
  27. package/kotlinx-io-kotlinx-io-bytestring.mjs +36 -36
  28. package/kotlinx-io-kotlinx-io-core.mjs +459 -459
  29. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2029 -2029
  30. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1952 -1952
  31. package/kryptom-lib.mjs +3263 -1967
  32. package/ktor-ktor-client-content-negotiation.mjs +184 -184
  33. package/ktor-ktor-client-core.mjs +2713 -2713
  34. package/ktor-ktor-events.mjs +6 -6
  35. package/ktor-ktor-http-cio.mjs +481 -481
  36. package/ktor-ktor-http.mjs +693 -693
  37. package/ktor-ktor-io.mjs +963 -963
  38. package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
  39. package/ktor-ktor-serialization-kotlinx.mjs +238 -238
  40. package/ktor-ktor-serialization.mjs +109 -109
  41. package/ktor-ktor-utils.mjs +557 -557
  42. package/ktor-ktor-websockets.mjs +673 -673
  43. package/model/AccessLog.d.mts +5 -0
  44. package/model/AccessLog.mjs +168 -0
  45. package/model/Agenda.d.mts +2 -0
  46. package/model/Agenda.mjs +82 -0
  47. package/model/ApplicationSettings.d.mts +5 -0
  48. package/model/ApplicationSettings.mjs +140 -0
  49. package/model/BooleanResponse.d.mts +2 -0
  50. package/model/BooleanResponse.mjs +20 -0
  51. package/model/CalendarItem.d.mts +5 -0
  52. package/model/CalendarItem.mjs +290 -0
  53. package/model/CalendarItemType.d.mts +7 -0
  54. package/model/CalendarItemType.mjs +117 -0
  55. package/model/Classification.d.mts +5 -0
  56. package/model/Classification.mjs +148 -0
  57. package/model/Code.d.mts +2 -0
  58. package/model/Code.mjs +69 -0
  59. package/model/Contact.d.mts +5 -0
  60. package/model/Contact.mjs +218 -0
  61. package/model/CryptoActorStub.d.mts +2 -0
  62. package/model/CryptoActorStub.mjs +45 -0
  63. package/model/CryptoActorStubWithType.d.mts +2 -0
  64. package/model/CryptoActorStubWithType.mjs +25 -0
  65. package/model/DataOwnerRegistrationSuccess.d.mts +2 -0
  66. package/model/DataOwnerRegistrationSuccess.mjs +24 -0
  67. package/model/DataOwnerWithType.d.mts +7 -0
  68. package/model/DataOwnerWithType.mjs +80 -0
  69. package/model/DatabaseInitialisation.d.mts +2 -0
  70. package/model/DatabaseInitialisation.mjs +34 -0
  71. package/model/Device.d.mts +2 -0
  72. package/model/Device.mjs +99 -0
  73. package/model/Document.d.mts +5 -0
  74. package/model/Document.mjs +246 -0
  75. package/model/DocumentTemplate.d.mts +2 -0
  76. package/model/DocumentTemplate.mjs +91 -0
  77. package/model/EntityReference.d.mts +2 -0
  78. package/model/EntityReference.mjs +29 -0
  79. package/model/EntityReferenceInGroup.d.mts +2 -0
  80. package/model/EntityReferenceInGroup.mjs +23 -0
  81. package/model/EntityTemplate.d.mts +2 -0
  82. package/model/EntityTemplate.mjs +46 -0
  83. package/model/Form.d.mts +5 -0
  84. package/model/Form.mjs +204 -0
  85. package/model/FormTemplate.d.mts +2 -0
  86. package/model/FormTemplate.mjs +82 -0
  87. package/model/FrontEndMigration.d.mts +2 -0
  88. package/model/FrontEndMigration.mjs +57 -0
  89. package/model/Group.d.mts +2 -0
  90. package/model/Group.mjs +68 -0
  91. package/model/GroupDeletionReport.d.mts +2 -0
  92. package/model/GroupDeletionReport.mjs +24 -0
  93. package/model/HealthElement.d.mts +5 -0
  94. package/model/HealthElement.mjs +226 -0
  95. package/model/HealthcareParty.d.mts +2 -0
  96. package/model/HealthcareParty.mjs +182 -0
  97. package/model/IdWithRev.d.mts +2 -0
  98. package/model/IdWithRev.mjs +23 -0
  99. package/model/IndexingInfo.d.mts +2 -0
  100. package/model/IndexingInfo.mjs +21 -0
  101. package/model/Insurance.d.mts +2 -0
  102. package/model/Insurance.mjs +46 -0
  103. package/model/Invoice.d.mts +5 -0
  104. package/model/Invoice.mjs +468 -0
  105. package/model/Keyword.d.mts +2 -0
  106. package/model/Keyword.mjs +58 -0
  107. package/model/ListOfIds.d.mts +2 -0
  108. package/model/ListOfIds.mjs +20 -0
  109. package/model/ListOfProperties.d.mts +2 -0
  110. package/model/ListOfProperties.mjs +22 -0
  111. package/model/MaintenanceTask.d.mts +5 -0
  112. package/model/MaintenanceTask.mjs +152 -0
  113. package/model/MedicalLocation.d.mts +2 -0
  114. package/model/MedicalLocation.mjs +63 -0
  115. package/model/Message.d.mts +5 -0
  116. package/model/Message.mjs +248 -0
  117. package/model/PaginatedDocumentKeyIdPair.d.mts +2 -0
  118. package/model/PaginatedDocumentKeyIdPair.mjs +24 -0
  119. package/model/Patient.d.mts +5 -0
  120. package/model/Patient.mjs +491 -0
  121. package/model/Place.d.mts +2 -0
  122. package/model/Place.mjs +33 -0
  123. package/model/PropertyStub.d.mts +5 -0
  124. package/model/PropertyStub.mjs +74 -0
  125. package/model/PropertyTypeStub.d.mts +2 -0
  126. package/model/PropertyTypeStub.mjs +26 -0
  127. package/model/PublicAgendasAndCalendarItemTypes.d.mts +2 -0
  128. package/model/PublicAgendasAndCalendarItemTypes.mjs +25 -0
  129. package/model/PublicKey.d.mts +2 -0
  130. package/model/PublicKey.mjs +24 -0
  131. package/model/Receipt.d.mts +5 -0
  132. package/model/Receipt.mjs +159 -0
  133. package/model/RegistrationInformation.d.mts +2 -0
  134. package/model/RegistrationInformation.mjs +43 -0
  135. package/model/RegistrationSuccess.d.mts +2 -0
  136. package/model/RegistrationSuccess.mjs +24 -0
  137. package/model/Replication.d.mts +2 -0
  138. package/model/Replication.mjs +35 -0
  139. package/model/ReplicationInfo.d.mts +2 -0
  140. package/model/ReplicationInfo.mjs +28 -0
  141. package/model/Role.d.mts +2 -0
  142. package/model/Role.mjs +34 -0
  143. package/model/StoredDocumentIdentifier.d.mts +2 -0
  144. package/model/StoredDocumentIdentifier.mjs +22 -0
  145. package/model/Tarification.d.mts +2 -0
  146. package/model/Tarification.mjs +92 -0
  147. package/model/TimeTable.d.mts +2 -0
  148. package/model/TimeTable.mjs +64 -0
  149. package/model/Topic.d.mts +5 -0
  150. package/model/Topic.mjs +163 -0
  151. package/model/User.d.mts +4 -0
  152. package/model/User.mjs +118 -0
  153. package/model/UserGroup.d.mts +2 -0
  154. package/model/UserGroup.mjs +55 -0
  155. package/model/base/CodeStub.d.mts +2 -0
  156. package/model/base/CodeStub.mjs +40 -0
  157. package/model/base/CryptoActor.d.mts +3 -0
  158. package/model/base/CryptoActor.mjs +19 -1
  159. package/model/base/Identifier.d.mts +2 -0
  160. package/model/base/Identifier.mjs +44 -0
  161. package/model/couchdb/Basic.d.mts +2 -0
  162. package/model/couchdb/Basic.mjs +22 -0
  163. package/model/couchdb/DatabaseInfo.d.mts +2 -0
  164. package/model/couchdb/DatabaseInfo.mjs +47 -0
  165. package/model/couchdb/DesignDocument.d.mts +2 -0
  166. package/model/couchdb/DesignDocument.mjs +40 -0
  167. package/model/couchdb/DocIdentifier.d.mts +2 -0
  168. package/model/couchdb/DocIdentifier.mjs +24 -0
  169. package/model/couchdb/GroupDatabasesInfo.d.mts +2 -0
  170. package/model/couchdb/GroupDatabasesInfo.mjs +26 -0
  171. package/model/couchdb/Remote.d.mts +2 -0
  172. package/model/couchdb/Remote.mjs +25 -0
  173. package/model/couchdb/RemoteAuthentication.d.mts +2 -0
  174. package/model/couchdb/RemoteAuthentication.mjs +23 -0
  175. package/model/couchdb/ReplicationStats.d.mts +2 -0
  176. package/model/couchdb/ReplicationStats.mjs +45 -0
  177. package/model/couchdb/ReplicatorDocument.d.mts +2 -0
  178. package/model/couchdb/ReplicatorDocument.mjs +61 -0
  179. package/model/couchdb/View.d.mts +2 -0
  180. package/model/couchdb/View.mjs +23 -0
  181. package/model/data/LabelledOccurence.d.mts +2 -0
  182. package/model/data/LabelledOccurence.mjs +22 -0
  183. package/model/embed/Address.d.mts +5 -0
  184. package/model/embed/Address.mjs +133 -0
  185. package/model/embed/AdministrationQuantity.d.mts +2 -0
  186. package/model/embed/AdministrationQuantity.mjs +29 -0
  187. package/model/embed/AgendaSlottingAlgorithm.d.mts +3 -0
  188. package/model/embed/AgendaSlottingAlgorithm.mjs +30 -0
  189. package/model/embed/AgreementAppendix.d.mts +2 -0
  190. package/model/embed/AgreementAppendix.mjs +30 -0
  191. package/model/embed/Annotation.d.mts +2 -0
  192. package/model/embed/Annotation.mjs +46 -0
  193. package/model/embed/CalendarItemTag.d.mts +5 -0
  194. package/model/embed/CalendarItemTag.mjs +72 -0
  195. package/model/embed/CareTeamMember.d.mts +5 -0
  196. package/model/embed/CareTeamMember.mjs +71 -0
  197. package/model/embed/CareTeamMembership.d.mts +5 -0
  198. package/model/embed/CareTeamMembership.mjs +73 -0
  199. package/model/embed/Content.d.mts +5 -0
  200. package/model/embed/Content.mjs +125 -0
  201. package/model/embed/DataAttachment.d.mts +2 -0
  202. package/model/embed/DataAttachment.mjs +26 -0
  203. package/model/embed/DatabaseSynchronization.d.mts +2 -0
  204. package/model/embed/DatabaseSynchronization.mjs +30 -0
  205. package/model/embed/Delegation.d.mts +2 -0
  206. package/model/embed/Delegation.mjs +30 -0
  207. package/model/embed/DeletedAttachment.d.mts +2 -0
  208. package/model/embed/DeletedAttachment.mjs +30 -0
  209. package/model/embed/DocumentGroup.d.mts +2 -0
  210. package/model/embed/DocumentGroup.mjs +24 -0
  211. package/model/embed/Duration.d.mts +2 -0
  212. package/model/embed/Duration.mjs +26 -0
  213. package/model/embed/EmbeddedTimeTableHour.d.mts +2 -0
  214. package/model/embed/EmbeddedTimeTableHour.mjs +22 -0
  215. package/model/embed/EmbeddedTimeTableItem.d.mts +2 -0
  216. package/model/embed/EmbeddedTimeTableItem.mjs +41 -0
  217. package/model/embed/Employer.d.mts +2 -0
  218. package/model/embed/Employer.mjs +26 -0
  219. package/model/embed/EmploymentInfo.d.mts +5 -0
  220. package/model/embed/EmploymentInfo.mjs +74 -0
  221. package/model/embed/Episode.d.mts +5 -0
  222. package/model/embed/Episode.mjs +75 -0
  223. package/model/embed/FinancialInstitutionInformation.d.mts +5 -0
  224. package/model/embed/FinancialInstitutionInformation.mjs +88 -0
  225. package/model/embed/FlatRateTarification.d.mts +5 -0
  226. package/model/embed/FlatRateTarification.mjs +72 -0
  227. package/model/embed/FlowItem.d.mts +2 -0
  228. package/model/embed/FlowItem.mjs +117 -0
  229. package/model/embed/HealthcarePartyHistoryStatus.d.mts +2 -0
  230. package/model/embed/HealthcarePartyHistoryStatus.mjs +28 -0
  231. package/model/embed/IdentityDocumentReader.d.mts +2 -0
  232. package/model/embed/IdentityDocumentReader.mjs +33 -0
  233. package/model/embed/Insurability.d.mts +5 -0
  234. package/model/embed/Insurability.mjs +100 -0
  235. package/model/embed/InvoicingCode.d.mts +5 -0
  236. package/model/embed/InvoicingCode.mjs +377 -0
  237. package/model/embed/KeywordSubword.d.mts +2 -0
  238. package/model/embed/KeywordSubword.mjs +25 -0
  239. package/model/embed/LetterValue.d.mts +2 -0
  240. package/model/embed/LetterValue.mjs +30 -0
  241. package/model/embed/Measure.d.mts +2 -0
  242. package/model/embed/Measure.mjs +57 -0
  243. package/model/embed/MedicalHouseContract.d.mts +5 -0
  244. package/model/embed/MedicalHouseContract.mjs +223 -0
  245. package/model/embed/Medication.d.mts +2 -0
  246. package/model/embed/Medication.mjs +157 -0
  247. package/model/embed/Medicinalproduct.d.mts +2 -0
  248. package/model/embed/Medicinalproduct.mjs +33 -0
  249. package/model/embed/MessageAttachment.d.mts +2 -0
  250. package/model/embed/MessageAttachment.mjs +25 -0
  251. package/model/embed/MessageReadStatus.d.mts +2 -0
  252. package/model/embed/MessageReadStatus.mjs +23 -0
  253. package/model/embed/ParagraphAgreement.d.mts +2 -0
  254. package/model/embed/ParagraphAgreement.mjs +86 -0
  255. package/model/embed/Partnership.d.mts +2 -0
  256. package/model/embed/Partnership.mjs +36 -0
  257. package/model/embed/PatientHealthCareParty.d.mts +9 -0
  258. package/model/embed/PatientHealthCareParty.mjs +88 -0
  259. package/model/embed/Payment.d.mts +2 -0
  260. package/model/embed/Payment.mjs +28 -0
  261. package/model/embed/Periodicity.d.mts +2 -0
  262. package/model/embed/Periodicity.mjs +26 -0
  263. package/model/embed/PersonName.d.mts +2 -0
  264. package/model/embed/PersonName.mjs +41 -0
  265. package/model/embed/PlanOfAction.d.mts +8 -3
  266. package/model/embed/PlanOfAction.mjs +179 -0
  267. package/model/embed/Range.d.mts +2 -0
  268. package/model/embed/Range.mjs +24 -0
  269. package/model/embed/ReferenceRange.d.mts +2 -0
  270. package/model/embed/ReferenceRange.mjs +40 -0
  271. package/model/embed/ReferralPeriod.d.mts +2 -0
  272. package/model/embed/ReferralPeriod.mjs +27 -0
  273. package/model/embed/RegimenItem.d.mts +2 -0
  274. package/model/embed/RegimenItem.mjs +40 -0
  275. package/model/embed/Renewal.d.mts +2 -0
  276. package/model/embed/Renewal.mjs +26 -0
  277. package/model/embed/ResourceGroupAllocationSchedule.d.mts +2 -0
  278. package/model/embed/ResourceGroupAllocationSchedule.mjs +39 -0
  279. package/model/embed/Right.d.mts +2 -0
  280. package/model/embed/Right.mjs +27 -0
  281. package/model/embed/RoleConfiguration.d.mts +2 -0
  282. package/model/embed/RoleConfiguration.mjs +22 -0
  283. package/model/embed/SchoolingInfo.d.mts +5 -0
  284. package/model/embed/SchoolingInfo.mjs +73 -0
  285. package/model/embed/SecureDelegation.d.mts +2 -0
  286. package/model/embed/SecureDelegation.mjs +39 -0
  287. package/model/embed/SecurityMetadata.d.mts +2 -0
  288. package/model/embed/SecurityMetadata.mjs +22 -0
  289. package/model/embed/Service.d.mts +5 -0
  290. package/model/embed/Service.mjs +240 -0
  291. package/model/embed/ServiceLink.d.mts +2 -0
  292. package/model/embed/ServiceLink.mjs +21 -0
  293. package/model/embed/SubContact.d.mts +5 -0
  294. package/model/embed/SubContact.mjs +146 -0
  295. package/model/embed/Substanceproduct.d.mts +2 -0
  296. package/model/embed/Substanceproduct.mjs +33 -0
  297. package/model/embed/Suspension.d.mts +2 -0
  298. package/model/embed/Suspension.mjs +30 -0
  299. package/model/embed/Telecom.d.mts +5 -0
  300. package/model/embed/Telecom.mjs +67 -0
  301. package/model/embed/TimeSeries.d.mts +2 -0
  302. package/model/embed/TimeSeries.mjs +32 -0
  303. package/model/embed/TimeTableHour.d.mts +2 -0
  304. package/model/embed/TimeTableHour.mjs +24 -0
  305. package/model/embed/TimeTableItem.d.mts +2 -0
  306. package/model/embed/TimeTableItem.mjs +57 -0
  307. package/model/embed/TypedValue.d.mts +5 -0
  308. package/model/embed/TypedValue.mjs +85 -0
  309. package/model/embed/Valorisation.d.mts +5 -0
  310. package/model/embed/Valorisation.mjs +108 -0
  311. package/model/embed/ValueWithPrecision.d.mts +2 -0
  312. package/model/embed/ValueWithPrecision.mjs +22 -0
  313. package/model/embed/Weekday.d.mts +2 -0
  314. package/model/embed/Weekday.mjs +26 -0
  315. package/model/embed/form/template/Action.d.mts +2 -0
  316. package/model/embed/form/template/Action.mjs +30 -0
  317. package/model/embed/form/template/CheckBox.d.mts +2 -0
  318. package/model/embed/form/template/CheckBox.mjs +71 -0
  319. package/model/embed/form/template/DatePicker.d.mts +2 -0
  320. package/model/embed/form/template/DatePicker.mjs +71 -0
  321. package/model/embed/form/template/DateTimePicker.d.mts +2 -0
  322. package/model/embed/form/template/DateTimePicker.mjs +71 -0
  323. package/model/embed/form/template/DropdownField.d.mts +2 -0
  324. package/model/embed/form/template/DropdownField.mjs +71 -0
  325. package/model/embed/form/template/FieldsGroup.d.mts +2 -0
  326. package/model/embed/form/template/FieldsGroup.mjs +28 -0
  327. package/model/embed/form/template/FormTemplateLayout.d.mts +2 -0
  328. package/model/embed/form/template/FormTemplateLayout.mjs +33 -0
  329. package/model/embed/form/template/Launcher.d.mts +2 -0
  330. package/model/embed/form/template/Launcher.mjs +26 -0
  331. package/model/embed/form/template/MeasureField.d.mts +2 -0
  332. package/model/embed/form/template/MeasureField.mjs +71 -0
  333. package/model/embed/form/template/MultipleChoice.d.mts +2 -0
  334. package/model/embed/form/template/MultipleChoice.mjs +71 -0
  335. package/model/embed/form/template/NumberField.d.mts +2 -0
  336. package/model/embed/form/template/NumberField.mjs +71 -0
  337. package/model/embed/form/template/RadioButton.d.mts +2 -0
  338. package/model/embed/form/template/RadioButton.mjs +71 -0
  339. package/model/embed/form/template/Section.d.mts +2 -0
  340. package/model/embed/form/template/Section.mjs +30 -0
  341. package/model/embed/form/template/State.d.mts +2 -0
  342. package/model/embed/form/template/State.mjs +26 -0
  343. package/model/embed/form/template/StructureElement.d.mts +3 -0
  344. package/model/embed/form/template/StructureElement.mjs +32 -1
  345. package/model/embed/form/template/TextField.d.mts +2 -0
  346. package/model/embed/form/template/TextField.mjs +71 -0
  347. package/model/embed/form/template/TimePicker.d.mts +2 -0
  348. package/model/embed/form/template/TimePicker.mjs +71 -0
  349. package/model/filter/predicate/AlwaysPredicate.d.mts +2 -0
  350. package/model/filter/predicate/AlwaysPredicate.mjs +20 -0
  351. package/model/filter/predicate/AndPredicate.d.mts +2 -0
  352. package/model/filter/predicate/AndPredicate.mjs +25 -0
  353. package/model/filter/predicate/KeyValuePredicate.d.mts +2 -0
  354. package/model/filter/predicate/KeyValuePredicate.mjs +32 -0
  355. package/model/filter/predicate/NotPredicate.d.mts +2 -0
  356. package/model/filter/predicate/NotPredicate.mjs +25 -0
  357. package/model/filter/predicate/OrPredicate.d.mts +2 -0
  358. package/model/filter/predicate/OrPredicate.mjs +25 -0
  359. package/model/filter/predicate/Predicate.d.mts +3 -0
  360. package/model/filter/predicate/Predicate.mjs +20 -1
  361. package/model/security/AlwaysPermissionItem.d.mts +2 -0
  362. package/model/security/AlwaysPermissionItem.mjs +25 -0
  363. package/model/security/AuthenticationToken.d.mts +2 -0
  364. package/model/security/AuthenticationToken.mjs +28 -0
  365. package/model/security/Enable2faRequest.d.mts +2 -0
  366. package/model/security/Enable2faRequest.mjs +22 -0
  367. package/model/security/ExternalJwtConfig.d.mts +18 -0
  368. package/model/security/ExternalJwtConfig.mjs +199 -0
  369. package/model/security/LoginIdentifier.d.mts +2 -0
  370. package/model/security/LoginIdentifier.mjs +22 -0
  371. package/model/security/OperationToken.d.mts +2 -0
  372. package/model/security/OperationToken.mjs +31 -0
  373. package/model/security/Permission.d.mts +2 -0
  374. package/model/security/Permission.mjs +24 -0
  375. package/model/security/PermissionItem.d.mts +3 -0
  376. package/model/security/PermissionItem.mjs +12 -1
  377. package/model/security/TokenWithGroup.d.mts +2 -0
  378. package/model/security/TokenWithGroup.mjs +25 -0
  379. package/options/SdkOptions.d.mts +3 -23
  380. package/package.json +1 -1
  381. package/utils/Id.d.mts +5 -0
  382. package/utils/Id.mjs +19 -10
  383. package/KotlinBigInteger-bignum.mjs +0 -5902
  384. /package/{KotlinBigInteger-bignum-serialization-kotlinx.mjs → core-library-core.mjs} +0 -0
package/kerberus.mjs CHANGED
@@ -19,18 +19,23 @@ import {
19
19
  Unit_instance1fbcbse1fwigr as Unit_instance,
20
20
  objectCreate1ve4bgxiu4x98 as objectCreate,
21
21
  initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
22
+ isByteArray4nnzfn1x4o3w as isByteArray,
23
+ initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference,
22
24
  collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
23
25
  ArrayList_init_$Create$3bxttkj3v1mea as ArrayList_init_$Create$,
24
26
  encodeToByteArray1onwao0uakjfh as encodeToByteArray,
25
27
  primitiveArrayConcatwxgknw08pmlb as primitiveArrayConcat,
26
- fromInt1lka3ktyu79a4 as fromInt,
28
+ KProperty1ca4yb4wlo496 as KProperty1,
29
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
27
30
  until1jbpn0z3f8lbg as until,
28
31
  sliceArray2hu2ljigibgmi as sliceArray,
29
32
  CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
30
33
  get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
31
34
  initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
32
35
  Long2qws0ah9gnpki as Long,
36
+ fromInt1lka3ktyu79a4 as fromInt,
33
37
  add85si75olwt6n as add,
38
+ lazy2hsh8ze7j6ikd as lazy_0,
34
39
  initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
35
40
  checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
36
41
  toList3jhuyej2anx2q as toList,
@@ -43,16 +48,16 @@ import {
43
48
  copyToArray2j022khrow2yi as copyToArray,
44
49
  json3n35pf5np6si4 as json,
45
50
  toList383f556t1dixk as toList_0,
51
+ toHexString5bhtjxqec7ow as toHexString,
46
52
  } from './kotlin-kotlin-stdlib.mjs';
47
- import {
48
- BigInteger_init_$Create$27qjyyan5p5rb as BigInteger_init_$Create$,
49
- Companion_getInstance2w7hx6d9ls97h as Companion_getInstance,
50
- Sign_POSITIVE_getInstance1znoktsikj284 as Sign_POSITIVE_getInstance,
51
- } from './KotlinBigInteger-bignum.mjs';
53
+ import { SHA256_init_$Create$1g9q29rq575z3 as SHA256_init_$Create$ } from './hash-library-sha2.mjs';
54
+ import { Severity_Warn_getInstance3jtjy1majw2ot as Severity_Warn_getInstance } from './Kermit-kermit-core.mjs';
52
55
  import {
53
56
  get_defaultCryptoService3se6h24t6bp5v as get_defaultCryptoService,
54
- adaptExternalCryptoService1ul8uw60bqm2i as adaptExternalCryptoService,
57
+ get_defaultCryptoServiceAvailable3rkkxohv1kjxk as get_defaultCryptoServiceAvailable,
58
+ adaptExternalCryptoService1etnie53izqn0 as adaptExternalCryptoService,
55
59
  } from './kryptom-lib.mjs';
60
+ import { Companion_getInstance2tq9586fmqdq3 as Companion_getInstance } from './Kermit-kermit.mjs';
56
61
  import {
57
62
  GlobalScope_instance1sfulufhd2ijt as GlobalScope_instance,
58
63
  promise1ky6tawqaxbt4 as promise,
@@ -65,12 +70,14 @@ import {
65
70
  initMetadataForCompanion(Companion);
66
71
  initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
67
72
  initMetadataForClass(Challenge, 'Challenge', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
68
- initMetadataForCompanion(Companion_0);
73
+ initMetadataForFunctionReference(DigestService$sha256$ref, VOID, VOID, [1]);
74
+ initMetadataForFunctionReference(ChallengePieceResolver$Companion$pureKotlinSha256$ref, VOID, VOID, [1]);
75
+ initMetadataForCompanion(Companion_0, VOID, VOID, [1]);
69
76
  initMetadataForCoroutine($scoreCOROUTINE$, CoroutineImpl);
70
77
  initMetadataForCoroutine($calculateCOROUTINE$, CoroutineImpl);
71
78
  initMetadataForCoroutine($resolveCOROUTINE$, CoroutineImpl);
72
79
  initMetadataForCoroutine($validateCOROUTINE$, CoroutineImpl);
73
- initMetadataForClass(ChallengePieceResolver, 'ChallengePieceResolver', VOID, VOID, VOID, [1, 2]);
80
+ initMetadataForClass(ChallengePieceResolver, 'ChallengePieceResolver', VOID, VOID, VOID, [2, 1]);
74
81
  initMetadataForLambda(resolveChallenge$slambda, CoroutineImpl, VOID, [1]);
75
82
  initMetadataForCoroutine($resolveChallengeCOROUTINE$, CoroutineImpl);
76
83
  initMetadataForCoroutine($validateSolutionCOROUTINE$, CoroutineImpl);
@@ -82,6 +89,7 @@ initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerial
82
89
  initMetadataForClass(Solution, 'Solution', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
83
90
  initMetadataForLambda(resolveChallengeJs$slambda, CoroutineImpl, VOID, [1]);
84
91
  initMetadataForLambda(validateSolutionJs$slambda, CoroutineImpl, VOID, [1]);
92
+ initMetadataForClass(PlatformBigInt, 'PlatformBigInt');
85
93
  //endregion
86
94
  function Challenge$Companion$$childSerializers$_anonymous__8v2613() {
87
95
  return new ArrayListSerializer(StringSerializer_getInstance());
@@ -93,7 +101,7 @@ function Companion() {
93
101
  // Inline function 'kotlin.arrayOf' call
94
102
  // Inline function 'kotlin.js.unsafeCast' call
95
103
  // Inline function 'kotlin.js.asDynamic' call
96
- tmp.z71_1 = [null, lazy(tmp_0, Challenge$Companion$$childSerializers$_anonymous__8v2613), null];
104
+ tmp.a70_1 = [null, lazy(tmp_0, Challenge$Companion$$childSerializers$_anonymous__8v2613), null];
97
105
  }
98
106
  var Companion_instance;
99
107
  function Companion_getInstance_0() {
@@ -104,71 +112,71 @@ function Companion_getInstance_0() {
104
112
  function $serializer() {
105
113
  $serializer_instance = this;
106
114
  var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.icure.kerberus.Challenge', this, 3);
107
- tmp0_serialDesc.r2x('id', false);
108
- tmp0_serialDesc.r2x('salts', false);
109
- tmp0_serialDesc.r2x('difficultyFactor', false);
110
- this.a72_1 = tmp0_serialDesc;
111
- }
112
- protoOf($serializer).b72 = function (encoder, value) {
113
- var tmp0_desc = this.a72_1;
114
- var tmp1_output = encoder.c2q(tmp0_desc);
115
- var tmp2_cached = Companion_getInstance_0().z71_1;
116
- tmp1_output.s2r(tmp0_desc, 0, value.c72_1);
117
- tmp1_output.u2r(tmp0_desc, 1, tmp2_cached[1].e1(), value.d72_1);
118
- tmp1_output.n2r(tmp0_desc, 2, value.e72_1);
119
- tmp1_output.d2q(tmp0_desc);
115
+ tmp0_serialDesc.i34('id', false);
116
+ tmp0_serialDesc.i34('salts', false);
117
+ tmp0_serialDesc.i34('difficultyFactor', false);
118
+ this.b70_1 = tmp0_serialDesc;
119
+ }
120
+ protoOf($serializer).c70 = function (encoder, value) {
121
+ var tmp0_desc = this.b70_1;
122
+ var tmp1_output = encoder.t2w(tmp0_desc);
123
+ var tmp2_cached = Companion_getInstance_0().a70_1;
124
+ tmp1_output.j2y(tmp0_desc, 0, value.d70_1);
125
+ tmp1_output.l2y(tmp0_desc, 1, tmp2_cached[1].e1(), value.e70_1);
126
+ tmp1_output.e2y(tmp0_desc, 2, value.f70_1);
127
+ tmp1_output.u2w(tmp0_desc);
120
128
  };
121
- protoOf($serializer).s2m = function (encoder, value) {
122
- return this.b72(encoder, value instanceof Challenge ? value : THROW_CCE());
129
+ protoOf($serializer).j2t = function (encoder, value) {
130
+ return this.c70(encoder, value instanceof Challenge ? value : THROW_CCE());
123
131
  };
124
- protoOf($serializer).t2m = function (decoder) {
125
- var tmp0_desc = this.a72_1;
132
+ protoOf($serializer).k2t = function (decoder) {
133
+ var tmp0_desc = this.b70_1;
126
134
  var tmp1_flag = true;
127
135
  var tmp2_index = 0;
128
136
  var tmp3_bitMask0 = 0;
129
137
  var tmp4_local0 = null;
130
138
  var tmp5_local1 = null;
131
139
  var tmp6_local2 = 0;
132
- var tmp7_input = decoder.c2q(tmp0_desc);
133
- var tmp8_cached = Companion_getInstance_0().z71_1;
134
- if (tmp7_input.t2q()) {
135
- tmp4_local0 = tmp7_input.m2q(tmp0_desc, 0);
140
+ var tmp7_input = decoder.t2w(tmp0_desc);
141
+ var tmp8_cached = Companion_getInstance_0().a70_1;
142
+ if (tmp7_input.k2x()) {
143
+ tmp4_local0 = tmp7_input.d2x(tmp0_desc, 0);
136
144
  tmp3_bitMask0 = tmp3_bitMask0 | 1;
137
- tmp5_local1 = tmp7_input.o2q(tmp0_desc, 1, tmp8_cached[1].e1(), tmp5_local1);
145
+ tmp5_local1 = tmp7_input.f2x(tmp0_desc, 1, tmp8_cached[1].e1(), tmp5_local1);
138
146
  tmp3_bitMask0 = tmp3_bitMask0 | 2;
139
- tmp6_local2 = tmp7_input.h2q(tmp0_desc, 2);
147
+ tmp6_local2 = tmp7_input.y2w(tmp0_desc, 2);
140
148
  tmp3_bitMask0 = tmp3_bitMask0 | 4;
141
149
  } else
142
150
  while (tmp1_flag) {
143
- tmp2_index = tmp7_input.u2q(tmp0_desc);
151
+ tmp2_index = tmp7_input.l2x(tmp0_desc);
144
152
  switch (tmp2_index) {
145
153
  case -1:
146
154
  tmp1_flag = false;
147
155
  break;
148
156
  case 0:
149
- tmp4_local0 = tmp7_input.m2q(tmp0_desc, 0);
157
+ tmp4_local0 = tmp7_input.d2x(tmp0_desc, 0);
150
158
  tmp3_bitMask0 = tmp3_bitMask0 | 1;
151
159
  break;
152
160
  case 1:
153
- tmp5_local1 = tmp7_input.o2q(tmp0_desc, 1, tmp8_cached[1].e1(), tmp5_local1);
161
+ tmp5_local1 = tmp7_input.f2x(tmp0_desc, 1, tmp8_cached[1].e1(), tmp5_local1);
154
162
  tmp3_bitMask0 = tmp3_bitMask0 | 2;
155
163
  break;
156
164
  case 2:
157
- tmp6_local2 = tmp7_input.h2q(tmp0_desc, 2);
165
+ tmp6_local2 = tmp7_input.y2w(tmp0_desc, 2);
158
166
  tmp3_bitMask0 = tmp3_bitMask0 | 4;
159
167
  break;
160
168
  default:
161
169
  throw UnknownFieldException_init_$Create$(tmp2_index);
162
170
  }
163
171
  }
164
- tmp7_input.d2q(tmp0_desc);
172
+ tmp7_input.u2w(tmp0_desc);
165
173
  return Challenge_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
166
174
  };
167
- protoOf($serializer).r2m = function () {
168
- return this.a72_1;
175
+ protoOf($serializer).i2t = function () {
176
+ return this.b70_1;
169
177
  };
170
- protoOf($serializer).k2y = function () {
171
- var tmp0_cached = Companion_getInstance_0().z71_1;
178
+ protoOf($serializer).b35 = function () {
179
+ var tmp0_cached = Companion_getInstance_0().a70_1;
172
180
  // Inline function 'kotlin.arrayOf' call
173
181
  // Inline function 'kotlin.js.unsafeCast' call
174
182
  // Inline function 'kotlin.js.asDynamic' call
@@ -182,11 +190,11 @@ function $serializer_getInstance() {
182
190
  }
183
191
  function Challenge_init_$Init$(seen0, id, salts, difficultyFactor, serializationConstructorMarker, $this) {
184
192
  if (!(7 === (7 & seen0))) {
185
- throwMissingFieldException(seen0, 7, $serializer_getInstance().a72_1);
193
+ throwMissingFieldException(seen0, 7, $serializer_getInstance().b70_1);
186
194
  }
187
- $this.c72_1 = id;
188
- $this.d72_1 = salts;
189
- $this.e72_1 = difficultyFactor;
195
+ $this.d70_1 = id;
196
+ $this.e70_1 = salts;
197
+ $this.f70_1 = difficultyFactor;
190
198
  return $this;
191
199
  }
192
200
  function Challenge_init_$Create$(seen0, id, salts, difficultyFactor, serializationConstructorMarker) {
@@ -194,25 +202,101 @@ function Challenge_init_$Create$(seen0, id, salts, difficultyFactor, serializati
194
202
  }
195
203
  function Challenge(id, salts, difficultyFactor) {
196
204
  Companion_getInstance_0();
197
- this.c72_1 = id;
198
- this.d72_1 = salts;
199
- this.e72_1 = difficultyFactor;
205
+ this.d70_1 = id;
206
+ this.e70_1 = salts;
207
+ this.f70_1 = difficultyFactor;
208
+ }
209
+ function pureKotlinSha256($this, data, $completion) {
210
+ var digest = SHA256_init_$Create$();
211
+ digest.k6y(data);
212
+ return digest.m6y();
213
+ }
214
+ function DigestService$sha256$ref(p0) {
215
+ this.g70_1 = p0;
216
+ }
217
+ protoOf(DigestService$sha256$ref).h70 = function (_this__u8e3s4, $completion) {
218
+ return this.g70_1.u1v(_this__u8e3s4, $completion);
219
+ };
220
+ protoOf(DigestService$sha256$ref).f9 = function (p1, $completion) {
221
+ return this.h70((!(p1 == null) ? isByteArray(p1) : false) ? p1 : THROW_CCE(), $completion);
222
+ };
223
+ function DigestService$sha256$ref_0(p0) {
224
+ var i = new DigestService$sha256$ref(p0);
225
+ var l = function (_this__u8e3s4, $completion) {
226
+ return i.h70(_this__u8e3s4, $completion);
227
+ };
228
+ l.callableName = 'sha256';
229
+ l.$arity = 1;
230
+ return l;
231
+ }
232
+ function ChallengePieceResolver$Companion$pureKotlinSha256$ref(p0) {
233
+ this.i70_1 = p0;
234
+ }
235
+ protoOf(ChallengePieceResolver$Companion$pureKotlinSha256$ref).h70 = function (_this__u8e3s4, $completion) {
236
+ var tmp0 = this.i70_1;
237
+ return pureKotlinSha256(tmp0, _this__u8e3s4, $completion);
238
+ };
239
+ protoOf(ChallengePieceResolver$Companion$pureKotlinSha256$ref).f9 = function (p1, $completion) {
240
+ return this.h70((!(p1 == null) ? isByteArray(p1) : false) ? p1 : THROW_CCE(), $completion);
241
+ };
242
+ function ChallengePieceResolver$Companion$pureKotlinSha256$ref_0(p0) {
243
+ var i = new ChallengePieceResolver$Companion$pureKotlinSha256$ref(p0);
244
+ var l = function (_this__u8e3s4, $completion) {
245
+ return i.h70(_this__u8e3s4, $completion);
246
+ };
247
+ l.callableName = 'pureKotlinSha256';
248
+ l.$arity = 1;
249
+ return l;
200
250
  }
201
251
  function Companion_0() {
202
252
  Companion_instance_0 = this;
203
- this.f72_1 = BigInteger_init_$Create$(2).y6x(128).n6x(Companion_getInstance().q6s_1);
204
- this.g72_1 = this.f72_1.c6y(false);
253
+ this.j70_1 = PlatformBigInt_init_$Create$(0);
254
+ var tmp = this;
255
+ var tmp_0 = 0;
256
+ var tmp_1 = new Int8Array(17);
257
+ while (tmp_0 < 17) {
258
+ var tmp_2 = tmp_0;
259
+ tmp_1[tmp_2] = tmp_2 === 0 ? 0 : -1;
260
+ tmp_0 = tmp_0 + 1 | 0;
261
+ }
262
+ tmp.k70_1 = PlatformBigInt_init_$Create$_0(tmp_1);
263
+ this.l70_1 = this.k70_1.n70();
205
264
  }
206
- protoOf(Companion_0).h72 = function (config, serializedInput, cryptoService) {
265
+ protoOf(Companion_0).o70 = function (config, serializedInput, cryptoService) {
266
+ var tmp;
267
+ if (cryptoService == null) {
268
+ tmp = null;
269
+ } else {
270
+ // Inline function 'kotlin.run' call
271
+ tmp = DigestService$sha256$ref_0(cryptoService.y1n());
272
+ }
273
+ var tmp1_elvis_lhs = tmp;
274
+ var tmp_0;
275
+ if (tmp1_elvis_lhs == null) {
276
+ // Inline function 'kotlin.run' call
277
+ // Inline function 'co.touchlab.kermit.Logger.w' call
278
+ var this_0 = get_Logger();
279
+ var tag = this_0.aq();
280
+ // Inline function 'co.touchlab.kermit.BaseLogger.logBlock' call
281
+ var severity = Severity_Warn_getInstance();
282
+ if (this_0.gp().xp().r2(severity) <= 0) {
283
+ var tmp$ret$2 = 'Kerberus is computing captchas using a non-native hashing method.\nFor better performances provide a crypto service matching your environment (e.g. on ReactNative use @icure/nitro-kryptom)';
284
+ this_0.hp(severity, tag, null, tmp$ret$2);
285
+ }
286
+ tmp_0 = ChallengePieceResolver$Companion$pureKotlinSha256$ref_0(Companion_getInstance_1());
287
+ } else {
288
+ tmp_0 = tmp1_elvis_lhs;
289
+ }
290
+ var doSha = tmp_0;
207
291
  // Inline function 'kotlin.collections.map' call
208
- var this_0 = config.d72_1;
292
+ var this_1 = config.e70_1;
209
293
  // Inline function 'kotlin.collections.mapTo' call
210
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
211
- var _iterator__ex2g4s = this_0.s();
294
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
295
+ var _iterator__ex2g4s = this_1.s();
212
296
  while (_iterator__ex2g4s.t()) {
213
297
  var item = _iterator__ex2g4s.u();
214
- var tmp$ret$0 = new ChallengePieceResolver(item, serializedInput, config.e72_1, cryptoService.c1o());
215
- destination.p(tmp$ret$0);
298
+ var tmp$ret$7 = new ChallengePieceResolver(item, serializedInput, config.f70_1, doSha);
299
+ destination.p(tmp$ret$7);
216
300
  }
217
301
  return destination;
218
302
  };
@@ -223,52 +307,84 @@ function Companion_getInstance_1() {
223
307
  return Companion_instance_0;
224
308
  }
225
309
  function _get_prefix__wiwq7t($this) {
226
- var tmp0 = encodeToByteArray($this.i72_1);
310
+ var tmp0 = encodeToByteArray($this.p70_1);
227
311
  // Inline function 'kotlin.collections.plus' call
228
- var elements = encodeToByteArray($this.j72_1);
312
+ var elements = encodeToByteArray($this.q70_1);
229
313
  return primitiveArrayConcat([tmp0, elements]);
230
314
  }
231
315
  function _get_difficulty__gn5kuo($this) {
232
- var maxValue = Companion_getInstance_1().f72_1;
233
- return maxValue.n6x(maxValue.t6x(Companion_getInstance().g6u(fromInt($this.k72_1))));
316
+ var tmp0 = $this.t70_1;
317
+ var tmp = KProperty1;
318
+ // Inline function 'kotlin.getValue' call
319
+ getPropertyCallableRef('difficulty', 1, tmp, ChallengePieceResolver$_get_difficulty_$ref_2z313m(), null);
320
+ return tmp0.e1();
234
321
  }
235
- function firstBytesAsBigInteger($this, bytes) {
236
- return Companion_getInstance().n6w(sliceArray(bytes, until(0, 16)), Sign_POSITIVE_getInstance());
322
+ function _get_difficultyDouble__v1f8rl($this) {
323
+ var tmp0 = $this.u70_1;
324
+ var tmp = KProperty1;
325
+ // Inline function 'kotlin.getValue' call
326
+ getPropertyCallableRef('difficultyDouble', 1, tmp, ChallengePieceResolver$_get_difficultyDouble_$ref_3iatd(), null);
327
+ return tmp0.e1();
237
328
  }
238
- function sha256($this, input, $completion) {
239
- return $this.l72_1.y1v(input, $completion);
329
+ function firstBytesAsBigInteger($this, bytes) {
330
+ // Inline function 'kotlin.byteArrayOf' call
331
+ var tmp0 = new Int8Array([0]);
332
+ // Inline function 'kotlin.collections.plus' call
333
+ var elements = sliceArray(bytes, until(0, 16));
334
+ var tmp$ret$1 = primitiveArrayConcat([tmp0, elements]);
335
+ return PlatformBigInt_init_$Create$_0(tmp$ret$1);
240
336
  }
241
337
  function score($this, prefixHash, nonce, $completion) {
242
338
  var tmp = new $scoreCOROUTINE$($this, prefixHash, nonce, $completion);
243
- tmp.u8_1 = Unit_instance;
244
- tmp.v8_1 = null;
245
- return tmp.a9();
339
+ tmp.n8_1 = Unit_instance;
340
+ tmp.o8_1 = null;
341
+ return tmp.t8();
246
342
  }
247
343
  function calculate($this, nonce, $completion) {
248
344
  var tmp = new $calculateCOROUTINE$($this, nonce, $completion);
249
- tmp.u8_1 = Unit_instance;
250
- tmp.v8_1 = null;
251
- return tmp.a9();
345
+ tmp.n8_1 = Unit_instance;
346
+ tmp.o8_1 = null;
347
+ return tmp.t8();
348
+ }
349
+ function ChallengePieceResolver$difficulty$delegate$lambda(this$0) {
350
+ return function () {
351
+ return Companion_getInstance_1().k70_1.r71(Companion_getInstance_1().k70_1.q71(PlatformBigInt_init_$Create$(this$0.r70_1)));
352
+ };
353
+ }
354
+ function ChallengePieceResolver$_get_difficulty_$ref_2z313m() {
355
+ return function (p0) {
356
+ return _get_difficulty__gn5kuo(p0);
357
+ };
358
+ }
359
+ function ChallengePieceResolver$difficultyDouble$delegate$lambda(this$0) {
360
+ return function () {
361
+ return _get_difficulty__gn5kuo(this$0).n70();
362
+ };
363
+ }
364
+ function ChallengePieceResolver$_get_difficultyDouble_$ref_3iatd() {
365
+ return function (p0) {
366
+ return _get_difficultyDouble__v1f8rl(p0);
367
+ };
252
368
  }
253
369
  function $scoreCOROUTINE$(_this__u8e3s4, prefixHash, nonce, resultContinuation) {
254
370
  CoroutineImpl.call(this, resultContinuation);
255
- this.u72_1 = _this__u8e3s4;
256
- this.v72_1 = prefixHash;
257
- this.w72_1 = nonce;
371
+ this.d71_1 = _this__u8e3s4;
372
+ this.e71_1 = prefixHash;
373
+ this.f71_1 = nonce;
258
374
  }
259
- protoOf($scoreCOROUTINE$).a9 = function () {
260
- var suspendResult = this.u8_1;
375
+ protoOf($scoreCOROUTINE$).t8 = function () {
376
+ var suspendResult = this.n8_1;
261
377
  $sm: do
262
378
  try {
263
- var tmp = this.s8_1;
379
+ var tmp = this.l8_1;
264
380
  switch (tmp) {
265
381
  case 0:
266
- this.t8_1 = 2;
267
- var nonceBytes = encodeToByteArray(this.w72_1.toString());
268
- var this_0 = this.v72_1;
382
+ this.m8_1 = 2;
383
+ var nonceBytes = encodeToByteArray(this.f71_1.toString());
384
+ var this_0 = this.e71_1;
269
385
  var hashInput = primitiveArrayConcat([this_0, nonceBytes]);
270
- this.s8_1 = 1;
271
- suspendResult = sha256(this.u72_1, hashInput, this);
386
+ this.l8_1 = 1;
387
+ suspendResult = this.d71_1.s70_1(hashInput, this);
272
388
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
273
389
  return suspendResult;
274
390
  }
@@ -276,36 +392,36 @@ protoOf($scoreCOROUTINE$).a9 = function () {
276
392
  continue $sm;
277
393
  case 1:
278
394
  var hash = suspendResult;
279
- return firstBytesAsBigInteger(this.u72_1, hash);
395
+ return firstBytesAsBigInteger(this.d71_1, hash);
280
396
  case 2:
281
- throw this.v8_1;
397
+ throw this.o8_1;
282
398
  }
283
399
  } catch ($p) {
284
400
  var e = $p;
285
- if (this.t8_1 === 2) {
401
+ if (this.m8_1 === 2) {
286
402
  throw e;
287
403
  } else {
288
- this.s8_1 = this.t8_1;
289
- this.v8_1 = e;
404
+ this.l8_1 = this.m8_1;
405
+ this.o8_1 = e;
290
406
  }
291
407
  }
292
408
  while (true);
293
409
  };
294
410
  function $calculateCOROUTINE$(_this__u8e3s4, nonce, resultContinuation) {
295
411
  CoroutineImpl.call(this, resultContinuation);
296
- this.f73_1 = _this__u8e3s4;
297
- this.g73_1 = nonce;
412
+ this.o71_1 = _this__u8e3s4;
413
+ this.p71_1 = nonce;
298
414
  }
299
- protoOf($calculateCOROUTINE$).a9 = function () {
300
- var suspendResult = this.u8_1;
415
+ protoOf($calculateCOROUTINE$).t8 = function () {
416
+ var suspendResult = this.n8_1;
301
417
  $sm: do
302
418
  try {
303
- var tmp = this.s8_1;
419
+ var tmp = this.l8_1;
304
420
  switch (tmp) {
305
421
  case 0:
306
- this.t8_1 = 3;
307
- this.s8_1 = 1;
308
- suspendResult = sha256(this.f73_1, _get_prefix__wiwq7t(this.f73_1), this);
422
+ this.m8_1 = 3;
423
+ this.l8_1 = 1;
424
+ suspendResult = this.o71_1.s70_1(_get_prefix__wiwq7t(this.o71_1), this);
309
425
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
310
426
  return suspendResult;
311
427
  }
@@ -313,8 +429,8 @@ protoOf($calculateCOROUTINE$).a9 = function () {
313
429
  continue $sm;
314
430
  case 1:
315
431
  var prefixHash = suspendResult;
316
- this.s8_1 = 2;
317
- suspendResult = score(this.f73_1, prefixHash, this.g73_1, this);
432
+ this.l8_1 = 2;
433
+ suspendResult = score(this.o71_1, prefixHash, this.p71_1, this);
318
434
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
319
435
  return suspendResult;
320
436
  }
@@ -323,107 +439,107 @@ protoOf($calculateCOROUTINE$).a9 = function () {
323
439
  case 2:
324
440
  return suspendResult;
325
441
  case 3:
326
- throw this.v8_1;
442
+ throw this.o8_1;
327
443
  }
328
444
  } catch ($p) {
329
445
  var e = $p;
330
- if (this.t8_1 === 3) {
446
+ if (this.m8_1 === 3) {
331
447
  throw e;
332
448
  } else {
333
- this.s8_1 = this.t8_1;
334
- this.v8_1 = e;
449
+ this.l8_1 = this.m8_1;
450
+ this.o8_1 = e;
335
451
  }
336
452
  }
337
453
  while (true);
338
454
  };
339
455
  function $resolveCOROUTINE$(_this__u8e3s4, onProgress, resultContinuation) {
340
456
  CoroutineImpl.call(this, resultContinuation);
341
- this.p73_1 = _this__u8e3s4;
342
- this.q73_1 = onProgress;
457
+ this.a72_1 = _this__u8e3s4;
458
+ this.b72_1 = onProgress;
343
459
  }
344
- protoOf($resolveCOROUTINE$).a9 = function () {
345
- var suspendResult = this.u8_1;
460
+ protoOf($resolveCOROUTINE$).t8 = function () {
461
+ var suspendResult = this.n8_1;
346
462
  $sm: do
347
463
  try {
348
- var tmp = this.s8_1;
464
+ var tmp = this.l8_1;
349
465
  switch (tmp) {
350
466
  case 0:
351
- this.t8_1 = 6;
352
- this.s8_1 = 1;
353
- suspendResult = sha256(this.p73_1, _get_prefix__wiwq7t(this.p73_1), this);
467
+ this.m8_1 = 6;
468
+ this.l8_1 = 1;
469
+ suspendResult = this.a72_1.s70_1(_get_prefix__wiwq7t(this.a72_1), this);
354
470
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
355
471
  return suspendResult;
356
472
  }
357
473
 
358
474
  continue $sm;
359
475
  case 1:
360
- this.v73_1 = suspendResult;
361
- this.t73_1 = _get_difficulty__gn5kuo(this.p73_1).c6y(false) / Companion_getInstance_1().g72_1;
362
- this.s73_1 = 1.0;
363
- this.r73_1 = new Long(0, 0);
364
- this.u73_1 = Companion_getInstance().p6s_1;
365
- this.s8_1 = 2;
476
+ this.g72_1 = suspendResult;
477
+ this.e72_1 = _get_difficultyDouble__v1f8rl(this.a72_1) / Companion_getInstance_1().l70_1;
478
+ this.d72_1 = 1.0;
479
+ this.c72_1 = new Long(0, 0);
480
+ this.f72_1 = Companion_getInstance_1().j70_1;
481
+ this.l8_1 = 2;
366
482
  continue $sm;
367
483
  case 2:
368
- if (!(this.u73_1.h6v(_get_difficulty__gn5kuo(this.p73_1)) < 0)) {
369
- this.s8_1 = 5;
484
+ if (!(this.f72_1.h72(_get_difficulty__gn5kuo(this.a72_1)) < 0)) {
485
+ this.l8_1 = 5;
370
486
  continue $sm;
371
487
  }
372
488
 
373
489
  var tmp_0 = this;
374
- var this_0 = this.r73_1;
375
- tmp_0.r73_1 = add(this_0, fromInt(1));
376
- this.s8_1 = 3;
377
- suspendResult = score(this.p73_1, this.v73_1, this.r73_1, this);
490
+ var this_0 = this.c72_1;
491
+ tmp_0.c72_1 = add(this_0, fromInt(1));
492
+ this.l8_1 = 3;
493
+ suspendResult = score(this.a72_1, this.g72_1, this.c72_1, this);
378
494
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
379
495
  return suspendResult;
380
496
  }
381
497
 
382
498
  continue $sm;
383
499
  case 3:
384
- this.u73_1 = suspendResult;
385
- this.s73_1 = this.s73_1 * this.t73_1;
386
- this.s8_1 = 4;
387
- suspendResult = this.q73_1(1 - this.s73_1, this);
500
+ this.f72_1 = suspendResult;
501
+ this.d72_1 = this.d72_1 * this.e72_1;
502
+ this.l8_1 = 4;
503
+ suspendResult = this.b72_1(1 - this.d72_1, this);
388
504
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
389
505
  return suspendResult;
390
506
  }
391
507
 
392
508
  continue $sm;
393
509
  case 4:
394
- this.s8_1 = 2;
510
+ this.l8_1 = 2;
395
511
  continue $sm;
396
512
  case 5:
397
- return new ProofOfWork(this.r73_1.toString());
513
+ return new ProofOfWork(this.c72_1.toString());
398
514
  case 6:
399
- throw this.v8_1;
515
+ throw this.o8_1;
400
516
  }
401
517
  } catch ($p) {
402
518
  var e = $p;
403
- if (this.t8_1 === 6) {
519
+ if (this.m8_1 === 6) {
404
520
  throw e;
405
521
  } else {
406
- this.s8_1 = this.t8_1;
407
- this.v8_1 = e;
522
+ this.l8_1 = this.m8_1;
523
+ this.o8_1 = e;
408
524
  }
409
525
  }
410
526
  while (true);
411
527
  };
412
528
  function $validateCOROUTINE$(_this__u8e3s4, nonce, resultContinuation) {
413
529
  CoroutineImpl.call(this, resultContinuation);
414
- this.e74_1 = _this__u8e3s4;
415
- this.f74_1 = nonce;
530
+ this.q72_1 = _this__u8e3s4;
531
+ this.r72_1 = nonce;
416
532
  }
417
- protoOf($validateCOROUTINE$).a9 = function () {
418
- var suspendResult = this.u8_1;
533
+ protoOf($validateCOROUTINE$).t8 = function () {
534
+ var suspendResult = this.n8_1;
419
535
  $sm: do
420
536
  try {
421
- var tmp = this.s8_1;
537
+ var tmp = this.l8_1;
422
538
  switch (tmp) {
423
539
  case 0:
424
- this.t8_1 = 2;
425
- this.s8_1 = 1;
426
- suspendResult = calculate(this.e74_1, this.f74_1, this);
540
+ this.m8_1 = 2;
541
+ this.l8_1 = 1;
542
+ suspendResult = calculate(this.q72_1, this.r72_1, this);
427
543
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
428
544
  return suspendResult;
429
545
  }
@@ -431,39 +547,43 @@ protoOf($validateCOROUTINE$).a9 = function () {
431
547
  continue $sm;
432
548
  case 1:
433
549
  var calculatedResult = suspendResult;
434
- return calculatedResult.h6v(_get_difficulty__gn5kuo(this.e74_1)) >= 0;
550
+ return calculatedResult.h72(_get_difficulty__gn5kuo(this.q72_1)) >= 0;
435
551
  case 2:
436
- throw this.v8_1;
552
+ throw this.o8_1;
437
553
  }
438
554
  } catch ($p) {
439
555
  var e = $p;
440
- if (this.t8_1 === 2) {
556
+ if (this.m8_1 === 2) {
441
557
  throw e;
442
558
  } else {
443
- this.s8_1 = this.t8_1;
444
- this.v8_1 = e;
559
+ this.l8_1 = this.m8_1;
560
+ this.o8_1 = e;
445
561
  }
446
562
  }
447
563
  while (true);
448
564
  };
449
- function ChallengePieceResolver(salt, serializedInput, difficultyFactor, digestService) {
565
+ function ChallengePieceResolver(salt, serializedInput, difficultyFactor, sha256) {
450
566
  Companion_getInstance_1();
451
- this.i72_1 = salt;
452
- this.j72_1 = serializedInput;
453
- this.k72_1 = difficultyFactor;
454
- this.l72_1 = digestService;
567
+ this.p70_1 = salt;
568
+ this.q70_1 = serializedInput;
569
+ this.r70_1 = difficultyFactor;
570
+ this.s70_1 = sha256;
571
+ var tmp = this;
572
+ tmp.t70_1 = lazy_0(ChallengePieceResolver$difficulty$delegate$lambda(this));
573
+ var tmp_0 = this;
574
+ tmp_0.u70_1 = lazy_0(ChallengePieceResolver$difficultyDouble$delegate$lambda(this));
455
575
  }
456
- protoOf(ChallengePieceResolver).g74 = function (onProgress, $completion) {
576
+ protoOf(ChallengePieceResolver).s72 = function (onProgress, $completion) {
457
577
  var tmp = new $resolveCOROUTINE$(this, onProgress, $completion);
458
- tmp.u8_1 = Unit_instance;
459
- tmp.v8_1 = null;
460
- return tmp.a9();
578
+ tmp.n8_1 = Unit_instance;
579
+ tmp.o8_1 = null;
580
+ return tmp.t8();
461
581
  };
462
- protoOf(ChallengePieceResolver).h74 = function (nonce, $completion) {
582
+ protoOf(ChallengePieceResolver).t72 = function (nonce, $completion) {
463
583
  var tmp = new $validateCOROUTINE$(this, nonce, $completion);
464
- tmp.u8_1 = Unit_instance;
465
- tmp.v8_1 = null;
466
- return tmp.a9();
584
+ tmp.n8_1 = Unit_instance;
585
+ tmp.o8_1 = null;
586
+ return tmp.t8();
467
587
  };
468
588
  function resolveChallenge(config, serializedInput, cryptoService, onProgress, $completion) {
469
589
  cryptoService = cryptoService === VOID ? null : cryptoService;
@@ -475,130 +595,130 @@ function resolveChallenge(config, serializedInput, cryptoService, onProgress, $c
475
595
  }
476
596
  onProgress = tmp;
477
597
  var tmp_0 = new $resolveChallengeCOROUTINE$(config, serializedInput, cryptoService, onProgress, $completion);
478
- tmp_0.u8_1 = Unit_instance;
479
- tmp_0.v8_1 = null;
480
- return tmp_0.a9();
598
+ tmp_0.n8_1 = Unit_instance;
599
+ tmp_0.o8_1 = null;
600
+ return tmp_0.t8();
481
601
  }
482
602
  function validateSolution(config, result, serializedInput, cryptoService, $completion) {
483
603
  cryptoService = cryptoService === VOID ? null : cryptoService;
484
604
  var tmp = new $validateSolutionCOROUTINE$(config, result, serializedInput, cryptoService, $completion);
485
- tmp.u8_1 = Unit_instance;
486
- tmp.v8_1 = null;
487
- return tmp.a9();
605
+ tmp.n8_1 = Unit_instance;
606
+ tmp.o8_1 = null;
607
+ return tmp.t8();
488
608
  }
489
609
  function resolveChallenge$lambda(it) {
490
610
  return Unit_instance;
491
611
  }
492
612
  function resolveChallenge$slambda($index, $challenges, $lastSentProgress, $onProgress, resultContinuation) {
493
- this.y75_1 = $index;
494
- this.z75_1 = $challenges;
495
- this.a76_1 = $lastSentProgress;
496
- this.b76_1 = $onProgress;
613
+ this.k74_1 = $index;
614
+ this.l74_1 = $challenges;
615
+ this.m74_1 = $lastSentProgress;
616
+ this.n74_1 = $onProgress;
497
617
  CoroutineImpl.call(this, resultContinuation);
498
618
  }
499
- protoOf(resolveChallenge$slambda).d76 = function (challengeProgress, $completion) {
500
- var tmp = this.e76(challengeProgress, $completion);
501
- tmp.u8_1 = Unit_instance;
502
- tmp.v8_1 = null;
503
- return tmp.a9();
619
+ protoOf(resolveChallenge$slambda).p74 = function (challengeProgress, $completion) {
620
+ var tmp = this.q74(challengeProgress, $completion);
621
+ tmp.n8_1 = Unit_instance;
622
+ tmp.o8_1 = null;
623
+ return tmp.t8();
504
624
  };
505
- protoOf(resolveChallenge$slambda).m9 = function (p1, $completion) {
506
- return this.d76((!(p1 == null) ? typeof p1 === 'number' : false) ? p1 : THROW_CCE(), $completion);
625
+ protoOf(resolveChallenge$slambda).f9 = function (p1, $completion) {
626
+ return this.p74((!(p1 == null) ? typeof p1 === 'number' : false) ? p1 : THROW_CCE(), $completion);
507
627
  };
508
- protoOf(resolveChallenge$slambda).a9 = function () {
509
- var suspendResult = this.u8_1;
628
+ protoOf(resolveChallenge$slambda).t8 = function () {
629
+ var suspendResult = this.n8_1;
510
630
  $sm: do
511
631
  try {
512
- var tmp = this.s8_1;
632
+ var tmp = this.l8_1;
513
633
  switch (tmp) {
514
634
  case 0:
515
- this.t8_1 = 3;
516
- var progress = (this.y75_1 + this.c76_1) / this.z75_1.v();
517
- if (progress - this.a76_1._v > 0.01) {
518
- this.a76_1._v = progress;
519
- this.b76_1(progress);
520
- this.s8_1 = 1;
635
+ this.m8_1 = 3;
636
+ var progress = (this.k74_1 + this.o74_1) / this.l74_1.v();
637
+ if (progress - this.m74_1._v > 0.01) {
638
+ this.m74_1._v = progress;
639
+ this.n74_1(progress);
640
+ this.l8_1 = 1;
521
641
  suspendResult = doYield(this);
522
642
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
523
643
  return suspendResult;
524
644
  }
525
645
  continue $sm;
526
646
  } else {
527
- this.s8_1 = 2;
647
+ this.l8_1 = 2;
528
648
  continue $sm;
529
649
  }
530
650
 
531
651
  case 1:
532
- this.s8_1 = 2;
652
+ this.l8_1 = 2;
533
653
  continue $sm;
534
654
  case 2:
535
655
  return Unit_instance;
536
656
  case 3:
537
- throw this.v8_1;
657
+ throw this.o8_1;
538
658
  }
539
659
  } catch ($p) {
540
660
  var e = $p;
541
- if (this.t8_1 === 3) {
661
+ if (this.m8_1 === 3) {
542
662
  throw e;
543
663
  } else {
544
- this.s8_1 = this.t8_1;
545
- this.v8_1 = e;
664
+ this.l8_1 = this.m8_1;
665
+ this.o8_1 = e;
546
666
  }
547
667
  }
548
668
  while (true);
549
669
  };
550
- protoOf(resolveChallenge$slambda).e76 = function (challengeProgress, completion) {
551
- var i = new resolveChallenge$slambda(this.y75_1, this.z75_1, this.a76_1, this.b76_1, completion);
552
- i.c76_1 = challengeProgress;
670
+ protoOf(resolveChallenge$slambda).q74 = function (challengeProgress, completion) {
671
+ var i = new resolveChallenge$slambda(this.k74_1, this.l74_1, this.m74_1, this.n74_1, completion);
672
+ i.o74_1 = challengeProgress;
553
673
  return i;
554
674
  };
555
675
  function resolveChallenge$slambda_0($index, $challenges, $lastSentProgress, $onProgress, resultContinuation) {
556
676
  var i = new resolveChallenge$slambda($index, $challenges, $lastSentProgress, $onProgress, resultContinuation);
557
677
  var l = function (challengeProgress, $completion) {
558
- return i.d76(challengeProgress, $completion);
678
+ return i.p74(challengeProgress, $completion);
559
679
  };
560
680
  l.$arity = 1;
561
681
  return l;
562
682
  }
563
683
  function $resolveChallengeCOROUTINE$(config, serializedInput, cryptoService, onProgress, resultContinuation) {
564
684
  CoroutineImpl.call(this, resultContinuation);
565
- this.q74_1 = config;
566
- this.r74_1 = serializedInput;
567
- this.s74_1 = cryptoService;
568
- this.t74_1 = onProgress;
685
+ this.c73_1 = config;
686
+ this.d73_1 = serializedInput;
687
+ this.e73_1 = cryptoService;
688
+ this.f73_1 = onProgress;
569
689
  }
570
- protoOf($resolveChallengeCOROUTINE$).a9 = function () {
571
- var suspendResult = this.u8_1;
690
+ protoOf($resolveChallengeCOROUTINE$).t8 = function () {
691
+ var suspendResult = this.n8_1;
572
692
  $sm: do
573
693
  try {
574
- var tmp = this.s8_1;
694
+ var tmp = this.l8_1;
575
695
  switch (tmp) {
576
696
  case 0:
577
- this.t8_1 = 4;
697
+ this.m8_1 = 4;
578
698
  var tmp_0 = this;
579
699
  var tmp_1 = Companion_getInstance_1();
580
- var tmp0_elvis_lhs = this.s74_1;
581
- tmp_0.x74_1 = tmp_1.h72(this.q74_1, this.r74_1, tmp0_elvis_lhs == null ? get_defaultCryptoService() : tmp0_elvis_lhs);
582
- this.w74_1 = {_v: 0.0};
583
- this.u74_1 = this.q74_1.c72_1;
584
- var this_0 = this.x74_1;
585
- this.v74_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
586
- this.y74_1 = 0;
587
- this.z74_1 = this_0.s();
588
- this.s8_1 = 1;
700
+ var tmp0_elvis_lhs = this.e73_1;
701
+ tmp_0.j73_1 = tmp_1.o70(this.c73_1, this.d73_1, tmp0_elvis_lhs == null ? get_defaultCryptoServiceAvailable() ? get_defaultCryptoService() : null : tmp0_elvis_lhs);
702
+ this.i73_1 = {_v: 0.0};
703
+ this.g73_1 = this.c73_1.d70_1;
704
+ var this_0 = this.j73_1;
705
+ this.h73_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
706
+ this.k73_1 = 0;
707
+ this.l73_1 = this_0.s();
708
+ this.l8_1 = 1;
589
709
  continue $sm;
590
710
  case 1:
591
- if (!this.z74_1.t()) {
592
- this.s8_1 = 3;
711
+ if (!this.l73_1.t()) {
712
+ this.l8_1 = 3;
593
713
  continue $sm;
594
714
  }
595
715
 
596
- var item = this.z74_1.u();
597
- var _unary__edvuaz = this.y74_1;
598
- this.y74_1 = _unary__edvuaz + 1 | 0;
716
+ var item = this.l73_1.u();
717
+ var _unary__edvuaz = this.k73_1;
718
+ this.k73_1 = _unary__edvuaz + 1 | 0;
599
719
  var index = checkIndexOverflow(_unary__edvuaz);
600
- this.s8_1 = 2;
601
- suspendResult = item.g74(resolveChallenge$slambda_0(index, this.x74_1, this.w74_1, this.t74_1, null), this);
720
+ this.l8_1 = 2;
721
+ suspendResult = item.s72(resolveChallenge$slambda_0(index, this.j73_1, this.i73_1, this.f73_1, null), this);
602
722
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
603
723
  return suspendResult;
604
724
  }
@@ -606,92 +726,92 @@ protoOf($resolveChallengeCOROUTINE$).a9 = function () {
606
726
  continue $sm;
607
727
  case 2:
608
728
  var ARGUMENT = suspendResult;
609
- this.v74_1.p(ARGUMENT);
610
- this.s8_1 = 1;
729
+ this.h73_1.p(ARGUMENT);
730
+ this.l8_1 = 1;
611
731
  continue $sm;
612
732
  case 3:
613
- var this_1 = this.v74_1;
733
+ var this_1 = this.h73_1;
614
734
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
615
735
  var _iterator__ex2g4s = this_1.s();
616
736
  while (_iterator__ex2g4s.t()) {
617
737
  var item_0 = _iterator__ex2g4s.u();
618
- destination.p(item_0.f76_1);
738
+ destination.p(item_0.r74_1);
619
739
  }
620
740
 
621
741
  var ARGUMENT_0 = toList(destination);
622
- var this_2 = new Solution(this.u74_1, ARGUMENT_0);
623
- this.t74_1(1.0);
742
+ var this_2 = new Solution(this.g73_1, ARGUMENT_0);
743
+ this.f73_1(1.0);
624
744
  return this_2;
625
745
  case 4:
626
- throw this.v8_1;
746
+ throw this.o8_1;
627
747
  }
628
748
  } catch ($p) {
629
749
  var e = $p;
630
- if (this.t8_1 === 4) {
750
+ if (this.m8_1 === 4) {
631
751
  throw e;
632
752
  } else {
633
- this.s8_1 = this.t8_1;
634
- this.v8_1 = e;
753
+ this.l8_1 = this.m8_1;
754
+ this.o8_1 = e;
635
755
  }
636
756
  }
637
757
  while (true);
638
758
  };
639
759
  function $validateSolutionCOROUTINE$(config, result, serializedInput, cryptoService, resultContinuation) {
640
760
  CoroutineImpl.call(this, resultContinuation);
641
- this.i75_1 = config;
642
- this.j75_1 = result;
643
- this.k75_1 = serializedInput;
644
- this.l75_1 = cryptoService;
761
+ this.u73_1 = config;
762
+ this.v73_1 = result;
763
+ this.w73_1 = serializedInput;
764
+ this.x73_1 = cryptoService;
645
765
  }
646
- protoOf($validateSolutionCOROUTINE$).a9 = function () {
647
- var suspendResult = this.u8_1;
766
+ protoOf($validateSolutionCOROUTINE$).t8 = function () {
767
+ var suspendResult = this.n8_1;
648
768
  $sm: do
649
769
  try {
650
- var tmp = this.s8_1;
770
+ var tmp = this.l8_1;
651
771
  switch (tmp) {
652
772
  case 0:
653
- this.t8_1 = 7;
773
+ this.m8_1 = 7;
654
774
  var tmp_0 = Companion_getInstance_1();
655
- var tmp0_elvis_lhs = this.l75_1;
656
- var challenges = tmp_0.h72(this.i75_1, this.k75_1, tmp0_elvis_lhs == null ? get_defaultCryptoService() : tmp0_elvis_lhs);
775
+ var tmp0_elvis_lhs = this.x73_1;
776
+ var challenges = tmp_0.o70(this.u73_1, this.w73_1, tmp0_elvis_lhs == null ? get_defaultCryptoServiceAvailable() ? get_defaultCryptoService() : null : tmp0_elvis_lhs);
657
777
  var tmp_1 = this;
658
- tmp_1.p75_1 = withIndex(challenges);
659
- this.s8_1 = 1;
778
+ tmp_1.b74_1 = withIndex(challenges);
779
+ this.l8_1 = 1;
660
780
  continue $sm;
661
781
  case 1:
662
- this.o75_1 = this.p75_1;
782
+ this.a74_1 = this.b74_1;
663
783
  var tmp_2;
664
- var tmp_3 = this.o75_1;
784
+ var tmp_3 = this.a74_1;
665
785
  if (isInterface(tmp_3, Collection)) {
666
- tmp_2 = this.o75_1.j();
786
+ tmp_2 = this.a74_1.j();
667
787
  } else {
668
788
  tmp_2 = false;
669
789
  }
670
790
 
671
791
  if (tmp_2) {
672
- this.m75_1 = true;
673
- this.s8_1 = 8;
792
+ this.y73_1 = true;
793
+ this.l8_1 = 8;
674
794
  continue $sm;
675
795
  } else {
676
- this.s8_1 = 2;
796
+ this.l8_1 = 2;
677
797
  continue $sm;
678
798
  }
679
799
 
680
800
  case 2:
681
- this.n75_1 = this.o75_1.s();
682
- this.s8_1 = 3;
801
+ this.z73_1 = this.a74_1.s();
802
+ this.l8_1 = 3;
683
803
  continue $sm;
684
804
  case 3:
685
- if (!this.n75_1.t()) {
686
- this.s8_1 = 6;
805
+ if (!this.z73_1.t()) {
806
+ this.l8_1 = 6;
687
807
  continue $sm;
688
808
  }
689
809
 
690
- var element = this.n75_1.u();
691
- var index = element.ua();
692
- var challenge = element.va();
693
- this.s8_1 = 4;
694
- suspendResult = challenge.h74(toLong(this.j75_1.h76_1.x(index)), this);
810
+ var element = this.z73_1.u();
811
+ var index = element.na();
812
+ var challenge = element.oa();
813
+ this.l8_1 = 4;
814
+ suspendResult = challenge.t72(toLong(this.v73_1.t74_1.x(index)), this);
695
815
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
696
816
  return suspendResult;
697
817
  }
@@ -699,42 +819,54 @@ protoOf($validateSolutionCOROUTINE$).a9 = function () {
699
819
  continue $sm;
700
820
  case 4:
701
821
  if (!suspendResult) {
702
- this.m75_1 = false;
703
- this.s8_1 = 8;
822
+ this.y73_1 = false;
823
+ this.l8_1 = 8;
704
824
  continue $sm;
705
825
  } else {
706
- this.s8_1 = 5;
826
+ this.l8_1 = 5;
707
827
  continue $sm;
708
828
  }
709
829
 
710
830
  case 5:
711
- this.s8_1 = 3;
831
+ this.l8_1 = 3;
712
832
  continue $sm;
713
833
  case 6:
714
- this.m75_1 = true;
834
+ this.y73_1 = true;
715
835
  if (false) {
716
- this.s8_1 = 1;
836
+ this.l8_1 = 1;
717
837
  continue $sm;
718
838
  }
719
839
 
720
- this.s8_1 = 8;
840
+ this.l8_1 = 8;
721
841
  continue $sm;
722
842
  case 7:
723
- throw this.v8_1;
843
+ throw this.o8_1;
724
844
  case 8:
725
- return this.m75_1;
845
+ return this.y73_1;
726
846
  }
727
847
  } catch ($p) {
728
848
  var e = $p;
729
- if (this.t8_1 === 7) {
849
+ if (this.m8_1 === 7) {
730
850
  throw e;
731
851
  } else {
732
- this.s8_1 = this.t8_1;
733
- this.v8_1 = e;
852
+ this.l8_1 = this.m8_1;
853
+ this.o8_1 = e;
734
854
  }
735
855
  }
736
856
  while (true);
737
857
  };
858
+ function get_Logger() {
859
+ _init_properties_Logger_kt__mpqsw();
860
+ return Logger;
861
+ }
862
+ var Logger;
863
+ var properties_initialized_Logger_kt_6n8a9a;
864
+ function _init_properties_Logger_kt__mpqsw() {
865
+ if (!properties_initialized_Logger_kt_6n8a9a) {
866
+ properties_initialized_Logger_kt_6n8a9a = true;
867
+ Logger = Companion_getInstance().dq('Kerberus-Captcha');
868
+ }
869
+ }
738
870
  function Companion_1() {
739
871
  }
740
872
  var Companion_instance_1;
@@ -744,50 +876,50 @@ function Companion_getInstance_2() {
744
876
  function $serializer_0() {
745
877
  $serializer_instance_0 = this;
746
878
  var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.icure.kerberus.ProofOfWork', this, 1);
747
- tmp0_serialDesc.r2x('nonce', false);
748
- this.i76_1 = tmp0_serialDesc;
749
- }
750
- protoOf($serializer_0).j76 = function (encoder, value) {
751
- var tmp0_desc = this.i76_1;
752
- var tmp1_output = encoder.c2q(tmp0_desc);
753
- tmp1_output.s2r(tmp0_desc, 0, value.f76_1);
754
- tmp1_output.d2q(tmp0_desc);
879
+ tmp0_serialDesc.i34('nonce', false);
880
+ this.u74_1 = tmp0_serialDesc;
881
+ }
882
+ protoOf($serializer_0).v74 = function (encoder, value) {
883
+ var tmp0_desc = this.u74_1;
884
+ var tmp1_output = encoder.t2w(tmp0_desc);
885
+ tmp1_output.j2y(tmp0_desc, 0, value.r74_1);
886
+ tmp1_output.u2w(tmp0_desc);
755
887
  };
756
- protoOf($serializer_0).s2m = function (encoder, value) {
757
- return this.j76(encoder, value instanceof ProofOfWork ? value : THROW_CCE());
888
+ protoOf($serializer_0).j2t = function (encoder, value) {
889
+ return this.v74(encoder, value instanceof ProofOfWork ? value : THROW_CCE());
758
890
  };
759
- protoOf($serializer_0).t2m = function (decoder) {
760
- var tmp0_desc = this.i76_1;
891
+ protoOf($serializer_0).k2t = function (decoder) {
892
+ var tmp0_desc = this.u74_1;
761
893
  var tmp1_flag = true;
762
894
  var tmp2_index = 0;
763
895
  var tmp3_bitMask0 = 0;
764
896
  var tmp4_local0 = null;
765
- var tmp5_input = decoder.c2q(tmp0_desc);
766
- if (tmp5_input.t2q()) {
767
- tmp4_local0 = tmp5_input.m2q(tmp0_desc, 0);
897
+ var tmp5_input = decoder.t2w(tmp0_desc);
898
+ if (tmp5_input.k2x()) {
899
+ tmp4_local0 = tmp5_input.d2x(tmp0_desc, 0);
768
900
  tmp3_bitMask0 = tmp3_bitMask0 | 1;
769
901
  } else
770
902
  while (tmp1_flag) {
771
- tmp2_index = tmp5_input.u2q(tmp0_desc);
903
+ tmp2_index = tmp5_input.l2x(tmp0_desc);
772
904
  switch (tmp2_index) {
773
905
  case -1:
774
906
  tmp1_flag = false;
775
907
  break;
776
908
  case 0:
777
- tmp4_local0 = tmp5_input.m2q(tmp0_desc, 0);
909
+ tmp4_local0 = tmp5_input.d2x(tmp0_desc, 0);
778
910
  tmp3_bitMask0 = tmp3_bitMask0 | 1;
779
911
  break;
780
912
  default:
781
913
  throw UnknownFieldException_init_$Create$(tmp2_index);
782
914
  }
783
915
  }
784
- tmp5_input.d2q(tmp0_desc);
916
+ tmp5_input.u2w(tmp0_desc);
785
917
  return ProofOfWork_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
786
918
  };
787
- protoOf($serializer_0).r2m = function () {
788
- return this.i76_1;
919
+ protoOf($serializer_0).i2t = function () {
920
+ return this.u74_1;
789
921
  };
790
- protoOf($serializer_0).k2y = function () {
922
+ protoOf($serializer_0).b35 = function () {
791
923
  // Inline function 'kotlin.arrayOf' call
792
924
  // Inline function 'kotlin.js.unsafeCast' call
793
925
  // Inline function 'kotlin.js.asDynamic' call
@@ -801,29 +933,29 @@ function $serializer_getInstance_0() {
801
933
  }
802
934
  function ProofOfWork_init_$Init$(seen0, nonce, serializationConstructorMarker, $this) {
803
935
  if (!(1 === (1 & seen0))) {
804
- throwMissingFieldException(seen0, 1, $serializer_getInstance_0().i76_1);
936
+ throwMissingFieldException(seen0, 1, $serializer_getInstance_0().u74_1);
805
937
  }
806
- $this.f76_1 = nonce;
938
+ $this.r74_1 = nonce;
807
939
  return $this;
808
940
  }
809
941
  function ProofOfWork_init_$Create$(seen0, nonce, serializationConstructorMarker) {
810
942
  return ProofOfWork_init_$Init$(seen0, nonce, serializationConstructorMarker, objectCreate(protoOf(ProofOfWork)));
811
943
  }
812
944
  function ProofOfWork(nonce) {
813
- this.f76_1 = nonce;
945
+ this.r74_1 = nonce;
814
946
  }
815
947
  protoOf(ProofOfWork).toString = function () {
816
- return 'ProofOfWork(nonce=' + this.f76_1 + ')';
948
+ return 'ProofOfWork(nonce=' + this.r74_1 + ')';
817
949
  };
818
950
  protoOf(ProofOfWork).hashCode = function () {
819
- return getStringHashCode(this.f76_1);
951
+ return getStringHashCode(this.r74_1);
820
952
  };
821
953
  protoOf(ProofOfWork).equals = function (other) {
822
954
  if (this === other)
823
955
  return true;
824
956
  if (!(other instanceof ProofOfWork))
825
957
  return false;
826
- if (!(this.f76_1 === other.f76_1))
958
+ if (!(this.r74_1 === other.r74_1))
827
959
  return false;
828
960
  return true;
829
961
  };
@@ -837,7 +969,7 @@ function Companion_2() {
837
969
  // Inline function 'kotlin.arrayOf' call
838
970
  // Inline function 'kotlin.js.unsafeCast' call
839
971
  // Inline function 'kotlin.js.asDynamic' call
840
- tmp.k76_1 = [null, lazy(tmp_0, Solution$Companion$$childSerializers$_anonymous__gojozz)];
972
+ tmp.w74_1 = [null, lazy(tmp_0, Solution$Companion$$childSerializers$_anonymous__gojozz)];
841
973
  }
842
974
  var Companion_instance_2;
843
975
  function Companion_getInstance_3() {
@@ -848,62 +980,62 @@ function Companion_getInstance_3() {
848
980
  function $serializer_1() {
849
981
  $serializer_instance_1 = this;
850
982
  var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.icure.kerberus.Solution', this, 2);
851
- tmp0_serialDesc.r2x('id', false);
852
- tmp0_serialDesc.r2x('nonces', false);
853
- this.l76_1 = tmp0_serialDesc;
854
- }
855
- protoOf($serializer_1).m76 = function (encoder, value) {
856
- var tmp0_desc = this.l76_1;
857
- var tmp1_output = encoder.c2q(tmp0_desc);
858
- var tmp2_cached = Companion_getInstance_3().k76_1;
859
- tmp1_output.s2r(tmp0_desc, 0, value.g76_1);
860
- tmp1_output.u2r(tmp0_desc, 1, tmp2_cached[1].e1(), value.h76_1);
861
- tmp1_output.d2q(tmp0_desc);
983
+ tmp0_serialDesc.i34('id', false);
984
+ tmp0_serialDesc.i34('nonces', false);
985
+ this.x74_1 = tmp0_serialDesc;
986
+ }
987
+ protoOf($serializer_1).y74 = function (encoder, value) {
988
+ var tmp0_desc = this.x74_1;
989
+ var tmp1_output = encoder.t2w(tmp0_desc);
990
+ var tmp2_cached = Companion_getInstance_3().w74_1;
991
+ tmp1_output.j2y(tmp0_desc, 0, value.s74_1);
992
+ tmp1_output.l2y(tmp0_desc, 1, tmp2_cached[1].e1(), value.t74_1);
993
+ tmp1_output.u2w(tmp0_desc);
862
994
  };
863
- protoOf($serializer_1).s2m = function (encoder, value) {
864
- return this.m76(encoder, value instanceof Solution ? value : THROW_CCE());
995
+ protoOf($serializer_1).j2t = function (encoder, value) {
996
+ return this.y74(encoder, value instanceof Solution ? value : THROW_CCE());
865
997
  };
866
- protoOf($serializer_1).t2m = function (decoder) {
867
- var tmp0_desc = this.l76_1;
998
+ protoOf($serializer_1).k2t = function (decoder) {
999
+ var tmp0_desc = this.x74_1;
868
1000
  var tmp1_flag = true;
869
1001
  var tmp2_index = 0;
870
1002
  var tmp3_bitMask0 = 0;
871
1003
  var tmp4_local0 = null;
872
1004
  var tmp5_local1 = null;
873
- var tmp6_input = decoder.c2q(tmp0_desc);
874
- var tmp7_cached = Companion_getInstance_3().k76_1;
875
- if (tmp6_input.t2q()) {
876
- tmp4_local0 = tmp6_input.m2q(tmp0_desc, 0);
1005
+ var tmp6_input = decoder.t2w(tmp0_desc);
1006
+ var tmp7_cached = Companion_getInstance_3().w74_1;
1007
+ if (tmp6_input.k2x()) {
1008
+ tmp4_local0 = tmp6_input.d2x(tmp0_desc, 0);
877
1009
  tmp3_bitMask0 = tmp3_bitMask0 | 1;
878
- tmp5_local1 = tmp6_input.o2q(tmp0_desc, 1, tmp7_cached[1].e1(), tmp5_local1);
1010
+ tmp5_local1 = tmp6_input.f2x(tmp0_desc, 1, tmp7_cached[1].e1(), tmp5_local1);
879
1011
  tmp3_bitMask0 = tmp3_bitMask0 | 2;
880
1012
  } else
881
1013
  while (tmp1_flag) {
882
- tmp2_index = tmp6_input.u2q(tmp0_desc);
1014
+ tmp2_index = tmp6_input.l2x(tmp0_desc);
883
1015
  switch (tmp2_index) {
884
1016
  case -1:
885
1017
  tmp1_flag = false;
886
1018
  break;
887
1019
  case 0:
888
- tmp4_local0 = tmp6_input.m2q(tmp0_desc, 0);
1020
+ tmp4_local0 = tmp6_input.d2x(tmp0_desc, 0);
889
1021
  tmp3_bitMask0 = tmp3_bitMask0 | 1;
890
1022
  break;
891
1023
  case 1:
892
- tmp5_local1 = tmp6_input.o2q(tmp0_desc, 1, tmp7_cached[1].e1(), tmp5_local1);
1024
+ tmp5_local1 = tmp6_input.f2x(tmp0_desc, 1, tmp7_cached[1].e1(), tmp5_local1);
893
1025
  tmp3_bitMask0 = tmp3_bitMask0 | 2;
894
1026
  break;
895
1027
  default:
896
1028
  throw UnknownFieldException_init_$Create$(tmp2_index);
897
1029
  }
898
1030
  }
899
- tmp6_input.d2q(tmp0_desc);
1031
+ tmp6_input.u2w(tmp0_desc);
900
1032
  return Solution_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
901
1033
  };
902
- protoOf($serializer_1).r2m = function () {
903
- return this.l76_1;
1034
+ protoOf($serializer_1).i2t = function () {
1035
+ return this.x74_1;
904
1036
  };
905
- protoOf($serializer_1).k2y = function () {
906
- var tmp0_cached = Companion_getInstance_3().k76_1;
1037
+ protoOf($serializer_1).b35 = function () {
1038
+ var tmp0_cached = Companion_getInstance_3().w74_1;
907
1039
  // Inline function 'kotlin.arrayOf' call
908
1040
  // Inline function 'kotlin.js.unsafeCast' call
909
1041
  // Inline function 'kotlin.js.asDynamic' call
@@ -917,10 +1049,10 @@ function $serializer_getInstance_1() {
917
1049
  }
918
1050
  function Solution_init_$Init$(seen0, id, nonces, serializationConstructorMarker, $this) {
919
1051
  if (!(3 === (3 & seen0))) {
920
- throwMissingFieldException(seen0, 3, $serializer_getInstance_1().l76_1);
1052
+ throwMissingFieldException(seen0, 3, $serializer_getInstance_1().x74_1);
921
1053
  }
922
- $this.g76_1 = id;
923
- $this.h76_1 = nonces;
1054
+ $this.s74_1 = id;
1055
+ $this.t74_1 = nonces;
924
1056
  return $this;
925
1057
  }
926
1058
  function Solution_init_$Create$(seen0, id, nonces, serializationConstructorMarker) {
@@ -928,8 +1060,8 @@ function Solution_init_$Create$(seen0, id, nonces, serializationConstructorMarke
928
1060
  }
929
1061
  function Solution(id, nonces) {
930
1062
  Companion_getInstance_3();
931
- this.g76_1 = id;
932
- this.h76_1 = nonces;
1063
+ this.s74_1 = id;
1064
+ this.t74_1 = nonces;
933
1065
  }
934
1066
  function resolveChallenge_0(config, serializedInput, cryptoService, onProgress) {
935
1067
  cryptoService = cryptoService === VOID ? null : cryptoService;
@@ -949,9 +1081,9 @@ function validateSolution_0(config, result, serializedInput, cryptoService) {
949
1081
  return promise(tmp, VOID, VOID, validateSolutionJs$slambda_0(config, result, serializedInput, cryptoService, null));
950
1082
  }
951
1083
  function toSolutionJs(_this__u8e3s4) {
952
- var tmp = to('id', _this__u8e3s4.g76_1);
1084
+ var tmp = to('id', _this__u8e3s4.s74_1);
953
1085
  // Inline function 'kotlin.collections.toTypedArray' call
954
- var this_0 = _this__u8e3s4.h76_1;
1086
+ var this_0 = _this__u8e3s4.t74_1;
955
1087
  var tmp$ret$0 = copyToArray(this_0);
956
1088
  var tmp_0 = json([tmp, to('nonces', tmp$ret$0)]);
957
1089
  return !(tmp_0 == null) ? tmp_0 : THROW_CCE();
@@ -966,32 +1098,32 @@ function resolveChallengeJs$lambda(it) {
966
1098
  return Unit_instance;
967
1099
  }
968
1100
  function resolveChallengeJs$slambda($config, $serializedInput, $cryptoService, $onProgress, resultContinuation) {
969
- this.v76_1 = $config;
970
- this.w76_1 = $serializedInput;
971
- this.x76_1 = $cryptoService;
972
- this.y76_1 = $onProgress;
1101
+ this.h75_1 = $config;
1102
+ this.i75_1 = $serializedInput;
1103
+ this.j75_1 = $cryptoService;
1104
+ this.k75_1 = $onProgress;
973
1105
  CoroutineImpl.call(this, resultContinuation);
974
1106
  }
975
- protoOf(resolveChallengeJs$slambda).a77 = function ($this$promise, $completion) {
976
- var tmp = this.t24($this$promise, $completion);
977
- tmp.u8_1 = Unit_instance;
978
- tmp.v8_1 = null;
979
- return tmp.a9();
1107
+ protoOf(resolveChallengeJs$slambda).m75 = function ($this$promise, $completion) {
1108
+ var tmp = this.p24($this$promise, $completion);
1109
+ tmp.n8_1 = Unit_instance;
1110
+ tmp.o8_1 = null;
1111
+ return tmp.t8();
980
1112
  };
981
- protoOf(resolveChallengeJs$slambda).m9 = function (p1, $completion) {
982
- return this.a77((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1113
+ protoOf(resolveChallengeJs$slambda).f9 = function (p1, $completion) {
1114
+ return this.m75((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
983
1115
  };
984
- protoOf(resolveChallengeJs$slambda).a9 = function () {
985
- var suspendResult = this.u8_1;
1116
+ protoOf(resolveChallengeJs$slambda).t8 = function () {
1117
+ var suspendResult = this.n8_1;
986
1118
  $sm: do
987
1119
  try {
988
- var tmp = this.s8_1;
1120
+ var tmp = this.l8_1;
989
1121
  switch (tmp) {
990
1122
  case 0:
991
- this.t8_1 = 2;
992
- this.s8_1 = 1;
993
- var tmp_0 = toConfig(this.v76_1);
994
- var tmp0_safe_receiver = this.x76_1;
1123
+ this.m8_1 = 2;
1124
+ this.l8_1 = 1;
1125
+ var tmp_0 = toConfig(this.h75_1);
1126
+ var tmp0_safe_receiver = this.j75_1;
995
1127
  var tmp_1;
996
1128
  if (tmp0_safe_receiver == null) {
997
1129
  tmp_1 = null;
@@ -999,8 +1131,7 @@ protoOf(resolveChallengeJs$slambda).a9 = function () {
999
1131
  tmp_1 = adaptExternalCryptoService(tmp0_safe_receiver);
1000
1132
  }
1001
1133
 
1002
- var tmp1_elvis_lhs = tmp_1;
1003
- suspendResult = resolveChallenge(tmp_0, this.w76_1, tmp1_elvis_lhs == null ? get_defaultCryptoService() : tmp1_elvis_lhs, this.y76_1, this);
1134
+ suspendResult = resolveChallenge(tmp_0, this.i75_1, tmp_1, this.k75_1, this);
1004
1135
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1005
1136
  return suspendResult;
1006
1137
  }
@@ -1010,60 +1141,60 @@ protoOf(resolveChallengeJs$slambda).a9 = function () {
1010
1141
  var ARGUMENT = suspendResult;
1011
1142
  return toSolutionJs(ARGUMENT);
1012
1143
  case 2:
1013
- throw this.v8_1;
1144
+ throw this.o8_1;
1014
1145
  }
1015
1146
  } catch ($p) {
1016
1147
  var e = $p;
1017
- if (this.t8_1 === 2) {
1148
+ if (this.m8_1 === 2) {
1018
1149
  throw e;
1019
1150
  } else {
1020
- this.s8_1 = this.t8_1;
1021
- this.v8_1 = e;
1151
+ this.l8_1 = this.m8_1;
1152
+ this.o8_1 = e;
1022
1153
  }
1023
1154
  }
1024
1155
  while (true);
1025
1156
  };
1026
- protoOf(resolveChallengeJs$slambda).t24 = function ($this$promise, completion) {
1027
- var i = new resolveChallengeJs$slambda(this.v76_1, this.w76_1, this.x76_1, this.y76_1, completion);
1028
- i.z76_1 = $this$promise;
1157
+ protoOf(resolveChallengeJs$slambda).p24 = function ($this$promise, completion) {
1158
+ var i = new resolveChallengeJs$slambda(this.h75_1, this.i75_1, this.j75_1, this.k75_1, completion);
1159
+ i.l75_1 = $this$promise;
1029
1160
  return i;
1030
1161
  };
1031
1162
  function resolveChallengeJs$slambda_0($config, $serializedInput, $cryptoService, $onProgress, resultContinuation) {
1032
1163
  var i = new resolveChallengeJs$slambda($config, $serializedInput, $cryptoService, $onProgress, resultContinuation);
1033
1164
  var l = function ($this$promise, $completion) {
1034
- return i.a77($this$promise, $completion);
1165
+ return i.m75($this$promise, $completion);
1035
1166
  };
1036
1167
  l.$arity = 1;
1037
1168
  return l;
1038
1169
  }
1039
1170
  function validateSolutionJs$slambda($config, $result, $serializedInput, $cryptoService, resultContinuation) {
1040
- this.j77_1 = $config;
1041
- this.k77_1 = $result;
1042
- this.l77_1 = $serializedInput;
1043
- this.m77_1 = $cryptoService;
1171
+ this.v75_1 = $config;
1172
+ this.w75_1 = $result;
1173
+ this.x75_1 = $serializedInput;
1174
+ this.y75_1 = $cryptoService;
1044
1175
  CoroutineImpl.call(this, resultContinuation);
1045
1176
  }
1046
- protoOf(validateSolutionJs$slambda).p2c = function ($this$promise, $completion) {
1047
- var tmp = this.t24($this$promise, $completion);
1048
- tmp.u8_1 = Unit_instance;
1049
- tmp.v8_1 = null;
1050
- return tmp.a9();
1177
+ protoOf(validateSolutionJs$slambda).l2c = function ($this$promise, $completion) {
1178
+ var tmp = this.p24($this$promise, $completion);
1179
+ tmp.n8_1 = Unit_instance;
1180
+ tmp.o8_1 = null;
1181
+ return tmp.t8();
1051
1182
  };
1052
- protoOf(validateSolutionJs$slambda).m9 = function (p1, $completion) {
1053
- return this.p2c((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1183
+ protoOf(validateSolutionJs$slambda).f9 = function (p1, $completion) {
1184
+ return this.l2c((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1054
1185
  };
1055
- protoOf(validateSolutionJs$slambda).a9 = function () {
1056
- var suspendResult = this.u8_1;
1186
+ protoOf(validateSolutionJs$slambda).t8 = function () {
1187
+ var suspendResult = this.n8_1;
1057
1188
  $sm: do
1058
1189
  try {
1059
- var tmp = this.s8_1;
1190
+ var tmp = this.l8_1;
1060
1191
  switch (tmp) {
1061
1192
  case 0:
1062
- this.t8_1 = 2;
1063
- this.s8_1 = 1;
1064
- var tmp_0 = toConfig(this.j77_1);
1065
- var tmp_1 = toSolution(this.k77_1);
1066
- var tmp0_safe_receiver = this.m77_1;
1193
+ this.m8_1 = 2;
1194
+ this.l8_1 = 1;
1195
+ var tmp_0 = toConfig(this.v75_1);
1196
+ var tmp_1 = toSolution(this.w75_1);
1197
+ var tmp0_safe_receiver = this.y75_1;
1067
1198
  var tmp_2;
1068
1199
  if (tmp0_safe_receiver == null) {
1069
1200
  tmp_2 = null;
@@ -1071,8 +1202,7 @@ protoOf(validateSolutionJs$slambda).a9 = function () {
1071
1202
  tmp_2 = adaptExternalCryptoService(tmp0_safe_receiver);
1072
1203
  }
1073
1204
 
1074
- var tmp1_elvis_lhs = tmp_2;
1075
- suspendResult = validateSolution(tmp_0, tmp_1, this.l77_1, tmp1_elvis_lhs == null ? get_defaultCryptoService() : tmp1_elvis_lhs, this);
1205
+ suspendResult = validateSolution(tmp_0, tmp_1, this.x75_1, tmp_2, this);
1076
1206
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1077
1207
  return suspendResult;
1078
1208
  }
@@ -1081,32 +1211,70 @@ protoOf(validateSolutionJs$slambda).a9 = function () {
1081
1211
  case 1:
1082
1212
  return suspendResult;
1083
1213
  case 2:
1084
- throw this.v8_1;
1214
+ throw this.o8_1;
1085
1215
  }
1086
1216
  } catch ($p) {
1087
1217
  var e = $p;
1088
- if (this.t8_1 === 2) {
1218
+ if (this.m8_1 === 2) {
1089
1219
  throw e;
1090
1220
  } else {
1091
- this.s8_1 = this.t8_1;
1092
- this.v8_1 = e;
1221
+ this.l8_1 = this.m8_1;
1222
+ this.o8_1 = e;
1093
1223
  }
1094
1224
  }
1095
1225
  while (true);
1096
1226
  };
1097
- protoOf(validateSolutionJs$slambda).t24 = function ($this$promise, completion) {
1098
- var i = new validateSolutionJs$slambda(this.j77_1, this.k77_1, this.l77_1, this.m77_1, completion);
1099
- i.n77_1 = $this$promise;
1227
+ protoOf(validateSolutionJs$slambda).p24 = function ($this$promise, completion) {
1228
+ var i = new validateSolutionJs$slambda(this.v75_1, this.w75_1, this.x75_1, this.y75_1, completion);
1229
+ i.z75_1 = $this$promise;
1100
1230
  return i;
1101
1231
  };
1102
1232
  function validateSolutionJs$slambda_0($config, $result, $serializedInput, $cryptoService, resultContinuation) {
1103
1233
  var i = new validateSolutionJs$slambda($config, $result, $serializedInput, $cryptoService, resultContinuation);
1104
1234
  var l = function ($this$promise, $completion) {
1105
- return i.p2c($this$promise, $completion);
1235
+ return i.l2c($this$promise, $completion);
1106
1236
  };
1107
1237
  l.$arity = 1;
1108
1238
  return l;
1109
1239
  }
1240
+ function PlatformBigInt_init_$Init$(intValue, $this) {
1241
+ PlatformBigInt.call($this, BigInt(intValue));
1242
+ return $this;
1243
+ }
1244
+ function PlatformBigInt_init_$Create$(intValue) {
1245
+ return PlatformBigInt_init_$Init$(intValue, objectCreate(protoOf(PlatformBigInt)));
1246
+ }
1247
+ function PlatformBigInt_init_$Init$_0(bytes, $this) {
1248
+ PlatformBigInt.call($this, BigInt('0x' + toHexString(bytes)));
1249
+ return $this;
1250
+ }
1251
+ function PlatformBigInt_init_$Create$_0(bytes) {
1252
+ return PlatformBigInt_init_$Init$_0(bytes, objectCreate(protoOf(PlatformBigInt)));
1253
+ }
1254
+ function PlatformBigInt(jsBigInt) {
1255
+ this.m70_1 = jsBigInt;
1256
+ }
1257
+ protoOf(PlatformBigInt).q71 = function (other) {
1258
+ var a = this.m70_1;
1259
+ var b = other.m70_1;
1260
+ var tmp = a / b;
1261
+ return new PlatformBigInt((!(tmp == null) ? !(tmp == null) : false) ? tmp : THROW_CCE());
1262
+ };
1263
+ protoOf(PlatformBigInt).n70 = function () {
1264
+ var a = this.m70_1;
1265
+ return Number(a);
1266
+ };
1267
+ protoOf(PlatformBigInt).r71 = function (other) {
1268
+ var a = this.m70_1;
1269
+ var b = other.m70_1;
1270
+ var tmp = a - b;
1271
+ return new PlatformBigInt((!(tmp == null) ? !(tmp == null) : false) ? tmp : THROW_CCE());
1272
+ };
1273
+ protoOf(PlatformBigInt).h72 = function (other) {
1274
+ var a = this.m70_1;
1275
+ var b = other.m70_1;
1276
+ return a === b ? 0 : a < b ? -1 : 1;
1277
+ };
1110
1278
  function doYield($completion) {
1111
1279
  return await_0(yieldingPromise(), $completion);
1112
1280
  }
@@ -1124,9 +1292,9 @@ function yieldingPromise$lambda$lambda($resolve) {
1124
1292
  };
1125
1293
  }
1126
1294
  //region block: post-declaration
1127
- protoOf($serializer).l2y = typeParametersSerializers;
1128
- protoOf($serializer_0).l2y = typeParametersSerializers;
1129
- protoOf($serializer_1).l2y = typeParametersSerializers;
1295
+ protoOf($serializer).c35 = typeParametersSerializers;
1296
+ protoOf($serializer_0).c35 = typeParametersSerializers;
1297
+ protoOf($serializer_1).c35 = typeParametersSerializers;
1130
1298
  //endregion
1131
1299
  //region block: init
1132
1300
  Companion_instance_1 = new Companion_1();