@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.
- package/Kermit-kermit-core.mjs +45 -40
- package/Kermit-kermit.mjs +6 -6
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1577 -1577
- package/api/HealthcarePartyApi.d.mts +2 -0
- package/api/HealthcarePartyApiInGroup.d.mts +5 -0
- package/api/HealthcarePartyApiInGroup.mjs +1 -0
- package/api/RecoveryApi.d.mts +5 -1
- package/api.d.mts +1 -0
- package/api.mjs +1 -0
- package/bitops-library-bits.mjs +197 -0
- package/bitops-library-endian.mjs +117 -0
- package/cardinal-sdk-ts.d.mts +2 -2
- package/cardinal-sdk-ts.mjs +57007 -56794
- package/cardinal-sdk.mjs +120895 -120501
- package/core-library-digest.mjs +186 -0
- package/crypto/CryptoService.d.mts +17 -7
- package/error-library-error.mjs +42 -0
- package/hash-library-sha2.mjs +183 -0
- package/internal/BytesEncoding.d.mts +3 -0
- package/internal/BytesEncoding.mjs +99 -0
- package/internal/JsonDecodeUtils.d.mts +20 -0
- package/internal/JsonDecodeUtils.mjs +99 -0
- package/kerberus.mjs +557 -389
- package/kotlin-kotlin-stdlib.mjs +2445 -2713
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2455 -2450
- package/kotlinx-io-kotlinx-io-bytestring.mjs +36 -36
- package/kotlinx-io-kotlinx-io-core.mjs +459 -459
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2029 -2029
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1952 -1952
- package/kryptom-lib.mjs +3263 -1967
- package/ktor-ktor-client-content-negotiation.mjs +184 -184
- package/ktor-ktor-client-core.mjs +2713 -2713
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +481 -481
- package/ktor-ktor-http.mjs +693 -693
- package/ktor-ktor-io.mjs +963 -963
- package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
- package/ktor-ktor-serialization-kotlinx.mjs +238 -238
- package/ktor-ktor-serialization.mjs +109 -109
- package/ktor-ktor-utils.mjs +557 -557
- package/ktor-ktor-websockets.mjs +673 -673
- package/model/AccessLog.d.mts +5 -0
- package/model/AccessLog.mjs +168 -0
- package/model/Agenda.d.mts +2 -0
- package/model/Agenda.mjs +82 -0
- package/model/ApplicationSettings.d.mts +5 -0
- package/model/ApplicationSettings.mjs +140 -0
- package/model/BooleanResponse.d.mts +2 -0
- package/model/BooleanResponse.mjs +20 -0
- package/model/CalendarItem.d.mts +5 -0
- package/model/CalendarItem.mjs +290 -0
- package/model/CalendarItemType.d.mts +7 -0
- package/model/CalendarItemType.mjs +117 -0
- package/model/Classification.d.mts +5 -0
- package/model/Classification.mjs +148 -0
- package/model/Code.d.mts +2 -0
- package/model/Code.mjs +69 -0
- package/model/Contact.d.mts +5 -0
- package/model/Contact.mjs +218 -0
- package/model/CryptoActorStub.d.mts +2 -0
- package/model/CryptoActorStub.mjs +45 -0
- package/model/CryptoActorStubWithType.d.mts +2 -0
- package/model/CryptoActorStubWithType.mjs +25 -0
- package/model/DataOwnerRegistrationSuccess.d.mts +2 -0
- package/model/DataOwnerRegistrationSuccess.mjs +24 -0
- package/model/DataOwnerWithType.d.mts +7 -0
- package/model/DataOwnerWithType.mjs +80 -0
- package/model/DatabaseInitialisation.d.mts +2 -0
- package/model/DatabaseInitialisation.mjs +34 -0
- package/model/Device.d.mts +2 -0
- package/model/Device.mjs +99 -0
- package/model/Document.d.mts +5 -0
- package/model/Document.mjs +246 -0
- package/model/DocumentTemplate.d.mts +2 -0
- package/model/DocumentTemplate.mjs +91 -0
- package/model/EntityReference.d.mts +2 -0
- package/model/EntityReference.mjs +29 -0
- package/model/EntityReferenceInGroup.d.mts +2 -0
- package/model/EntityReferenceInGroup.mjs +23 -0
- package/model/EntityTemplate.d.mts +2 -0
- package/model/EntityTemplate.mjs +46 -0
- package/model/Form.d.mts +5 -0
- package/model/Form.mjs +204 -0
- package/model/FormTemplate.d.mts +2 -0
- package/model/FormTemplate.mjs +82 -0
- package/model/FrontEndMigration.d.mts +2 -0
- package/model/FrontEndMigration.mjs +57 -0
- package/model/Group.d.mts +2 -0
- package/model/Group.mjs +68 -0
- package/model/GroupDeletionReport.d.mts +2 -0
- package/model/GroupDeletionReport.mjs +24 -0
- package/model/HealthElement.d.mts +5 -0
- package/model/HealthElement.mjs +226 -0
- package/model/HealthcareParty.d.mts +2 -0
- package/model/HealthcareParty.mjs +182 -0
- package/model/IdWithRev.d.mts +2 -0
- package/model/IdWithRev.mjs +23 -0
- package/model/IndexingInfo.d.mts +2 -0
- package/model/IndexingInfo.mjs +21 -0
- package/model/Insurance.d.mts +2 -0
- package/model/Insurance.mjs +46 -0
- package/model/Invoice.d.mts +5 -0
- package/model/Invoice.mjs +468 -0
- package/model/Keyword.d.mts +2 -0
- package/model/Keyword.mjs +58 -0
- package/model/ListOfIds.d.mts +2 -0
- package/model/ListOfIds.mjs +20 -0
- package/model/ListOfProperties.d.mts +2 -0
- package/model/ListOfProperties.mjs +22 -0
- package/model/MaintenanceTask.d.mts +5 -0
- package/model/MaintenanceTask.mjs +152 -0
- package/model/MedicalLocation.d.mts +2 -0
- package/model/MedicalLocation.mjs +63 -0
- package/model/Message.d.mts +5 -0
- package/model/Message.mjs +248 -0
- package/model/PaginatedDocumentKeyIdPair.d.mts +2 -0
- package/model/PaginatedDocumentKeyIdPair.mjs +24 -0
- package/model/Patient.d.mts +5 -0
- package/model/Patient.mjs +491 -0
- package/model/Place.d.mts +2 -0
- package/model/Place.mjs +33 -0
- package/model/PropertyStub.d.mts +5 -0
- package/model/PropertyStub.mjs +74 -0
- package/model/PropertyTypeStub.d.mts +2 -0
- package/model/PropertyTypeStub.mjs +26 -0
- package/model/PublicAgendasAndCalendarItemTypes.d.mts +2 -0
- package/model/PublicAgendasAndCalendarItemTypes.mjs +25 -0
- package/model/PublicKey.d.mts +2 -0
- package/model/PublicKey.mjs +24 -0
- package/model/Receipt.d.mts +5 -0
- package/model/Receipt.mjs +159 -0
- package/model/RegistrationInformation.d.mts +2 -0
- package/model/RegistrationInformation.mjs +43 -0
- package/model/RegistrationSuccess.d.mts +2 -0
- package/model/RegistrationSuccess.mjs +24 -0
- package/model/Replication.d.mts +2 -0
- package/model/Replication.mjs +35 -0
- package/model/ReplicationInfo.d.mts +2 -0
- package/model/ReplicationInfo.mjs +28 -0
- package/model/Role.d.mts +2 -0
- package/model/Role.mjs +34 -0
- package/model/StoredDocumentIdentifier.d.mts +2 -0
- package/model/StoredDocumentIdentifier.mjs +22 -0
- package/model/Tarification.d.mts +2 -0
- package/model/Tarification.mjs +92 -0
- package/model/TimeTable.d.mts +2 -0
- package/model/TimeTable.mjs +64 -0
- package/model/Topic.d.mts +5 -0
- package/model/Topic.mjs +163 -0
- package/model/User.d.mts +4 -0
- package/model/User.mjs +118 -0
- package/model/UserGroup.d.mts +2 -0
- package/model/UserGroup.mjs +55 -0
- package/model/base/CodeStub.d.mts +2 -0
- package/model/base/CodeStub.mjs +40 -0
- package/model/base/CryptoActor.d.mts +3 -0
- package/model/base/CryptoActor.mjs +19 -1
- package/model/base/Identifier.d.mts +2 -0
- package/model/base/Identifier.mjs +44 -0
- package/model/couchdb/Basic.d.mts +2 -0
- package/model/couchdb/Basic.mjs +22 -0
- package/model/couchdb/DatabaseInfo.d.mts +2 -0
- package/model/couchdb/DatabaseInfo.mjs +47 -0
- package/model/couchdb/DesignDocument.d.mts +2 -0
- package/model/couchdb/DesignDocument.mjs +40 -0
- package/model/couchdb/DocIdentifier.d.mts +2 -0
- package/model/couchdb/DocIdentifier.mjs +24 -0
- package/model/couchdb/GroupDatabasesInfo.d.mts +2 -0
- package/model/couchdb/GroupDatabasesInfo.mjs +26 -0
- package/model/couchdb/Remote.d.mts +2 -0
- package/model/couchdb/Remote.mjs +25 -0
- package/model/couchdb/RemoteAuthentication.d.mts +2 -0
- package/model/couchdb/RemoteAuthentication.mjs +23 -0
- package/model/couchdb/ReplicationStats.d.mts +2 -0
- package/model/couchdb/ReplicationStats.mjs +45 -0
- package/model/couchdb/ReplicatorDocument.d.mts +2 -0
- package/model/couchdb/ReplicatorDocument.mjs +61 -0
- package/model/couchdb/View.d.mts +2 -0
- package/model/couchdb/View.mjs +23 -0
- package/model/data/LabelledOccurence.d.mts +2 -0
- package/model/data/LabelledOccurence.mjs +22 -0
- package/model/embed/Address.d.mts +5 -0
- package/model/embed/Address.mjs +133 -0
- package/model/embed/AdministrationQuantity.d.mts +2 -0
- package/model/embed/AdministrationQuantity.mjs +29 -0
- package/model/embed/AgendaSlottingAlgorithm.d.mts +3 -0
- package/model/embed/AgendaSlottingAlgorithm.mjs +30 -0
- package/model/embed/AgreementAppendix.d.mts +2 -0
- package/model/embed/AgreementAppendix.mjs +30 -0
- package/model/embed/Annotation.d.mts +2 -0
- package/model/embed/Annotation.mjs +46 -0
- package/model/embed/CalendarItemTag.d.mts +5 -0
- package/model/embed/CalendarItemTag.mjs +72 -0
- package/model/embed/CareTeamMember.d.mts +5 -0
- package/model/embed/CareTeamMember.mjs +71 -0
- package/model/embed/CareTeamMembership.d.mts +5 -0
- package/model/embed/CareTeamMembership.mjs +73 -0
- package/model/embed/Content.d.mts +5 -0
- package/model/embed/Content.mjs +125 -0
- package/model/embed/DataAttachment.d.mts +2 -0
- package/model/embed/DataAttachment.mjs +26 -0
- package/model/embed/DatabaseSynchronization.d.mts +2 -0
- package/model/embed/DatabaseSynchronization.mjs +30 -0
- package/model/embed/Delegation.d.mts +2 -0
- package/model/embed/Delegation.mjs +30 -0
- package/model/embed/DeletedAttachment.d.mts +2 -0
- package/model/embed/DeletedAttachment.mjs +30 -0
- package/model/embed/DocumentGroup.d.mts +2 -0
- package/model/embed/DocumentGroup.mjs +24 -0
- package/model/embed/Duration.d.mts +2 -0
- package/model/embed/Duration.mjs +26 -0
- package/model/embed/EmbeddedTimeTableHour.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableHour.mjs +22 -0
- package/model/embed/EmbeddedTimeTableItem.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableItem.mjs +41 -0
- package/model/embed/Employer.d.mts +2 -0
- package/model/embed/Employer.mjs +26 -0
- package/model/embed/EmploymentInfo.d.mts +5 -0
- package/model/embed/EmploymentInfo.mjs +74 -0
- package/model/embed/Episode.d.mts +5 -0
- package/model/embed/Episode.mjs +75 -0
- package/model/embed/FinancialInstitutionInformation.d.mts +5 -0
- package/model/embed/FinancialInstitutionInformation.mjs +88 -0
- package/model/embed/FlatRateTarification.d.mts +5 -0
- package/model/embed/FlatRateTarification.mjs +72 -0
- package/model/embed/FlowItem.d.mts +2 -0
- package/model/embed/FlowItem.mjs +117 -0
- package/model/embed/HealthcarePartyHistoryStatus.d.mts +2 -0
- package/model/embed/HealthcarePartyHistoryStatus.mjs +28 -0
- package/model/embed/IdentityDocumentReader.d.mts +2 -0
- package/model/embed/IdentityDocumentReader.mjs +33 -0
- package/model/embed/Insurability.d.mts +5 -0
- package/model/embed/Insurability.mjs +100 -0
- package/model/embed/InvoicingCode.d.mts +5 -0
- package/model/embed/InvoicingCode.mjs +377 -0
- package/model/embed/KeywordSubword.d.mts +2 -0
- package/model/embed/KeywordSubword.mjs +25 -0
- package/model/embed/LetterValue.d.mts +2 -0
- package/model/embed/LetterValue.mjs +30 -0
- package/model/embed/Measure.d.mts +2 -0
- package/model/embed/Measure.mjs +57 -0
- package/model/embed/MedicalHouseContract.d.mts +5 -0
- package/model/embed/MedicalHouseContract.mjs +223 -0
- package/model/embed/Medication.d.mts +2 -0
- package/model/embed/Medication.mjs +157 -0
- package/model/embed/Medicinalproduct.d.mts +2 -0
- package/model/embed/Medicinalproduct.mjs +33 -0
- package/model/embed/MessageAttachment.d.mts +2 -0
- package/model/embed/MessageAttachment.mjs +25 -0
- package/model/embed/MessageReadStatus.d.mts +2 -0
- package/model/embed/MessageReadStatus.mjs +23 -0
- package/model/embed/ParagraphAgreement.d.mts +2 -0
- package/model/embed/ParagraphAgreement.mjs +86 -0
- package/model/embed/Partnership.d.mts +2 -0
- package/model/embed/Partnership.mjs +36 -0
- package/model/embed/PatientHealthCareParty.d.mts +9 -0
- package/model/embed/PatientHealthCareParty.mjs +88 -0
- package/model/embed/Payment.d.mts +2 -0
- package/model/embed/Payment.mjs +28 -0
- package/model/embed/Periodicity.d.mts +2 -0
- package/model/embed/Periodicity.mjs +26 -0
- package/model/embed/PersonName.d.mts +2 -0
- package/model/embed/PersonName.mjs +41 -0
- package/model/embed/PlanOfAction.d.mts +8 -3
- package/model/embed/PlanOfAction.mjs +179 -0
- package/model/embed/Range.d.mts +2 -0
- package/model/embed/Range.mjs +24 -0
- package/model/embed/ReferenceRange.d.mts +2 -0
- package/model/embed/ReferenceRange.mjs +40 -0
- package/model/embed/ReferralPeriod.d.mts +2 -0
- package/model/embed/ReferralPeriod.mjs +27 -0
- package/model/embed/RegimenItem.d.mts +2 -0
- package/model/embed/RegimenItem.mjs +40 -0
- package/model/embed/Renewal.d.mts +2 -0
- package/model/embed/Renewal.mjs +26 -0
- package/model/embed/ResourceGroupAllocationSchedule.d.mts +2 -0
- package/model/embed/ResourceGroupAllocationSchedule.mjs +39 -0
- package/model/embed/Right.d.mts +2 -0
- package/model/embed/Right.mjs +27 -0
- package/model/embed/RoleConfiguration.d.mts +2 -0
- package/model/embed/RoleConfiguration.mjs +22 -0
- package/model/embed/SchoolingInfo.d.mts +5 -0
- package/model/embed/SchoolingInfo.mjs +73 -0
- package/model/embed/SecureDelegation.d.mts +2 -0
- package/model/embed/SecureDelegation.mjs +39 -0
- package/model/embed/SecurityMetadata.d.mts +2 -0
- package/model/embed/SecurityMetadata.mjs +22 -0
- package/model/embed/Service.d.mts +5 -0
- package/model/embed/Service.mjs +240 -0
- package/model/embed/ServiceLink.d.mts +2 -0
- package/model/embed/ServiceLink.mjs +21 -0
- package/model/embed/SubContact.d.mts +5 -0
- package/model/embed/SubContact.mjs +146 -0
- package/model/embed/Substanceproduct.d.mts +2 -0
- package/model/embed/Substanceproduct.mjs +33 -0
- package/model/embed/Suspension.d.mts +2 -0
- package/model/embed/Suspension.mjs +30 -0
- package/model/embed/Telecom.d.mts +5 -0
- package/model/embed/Telecom.mjs +67 -0
- package/model/embed/TimeSeries.d.mts +2 -0
- package/model/embed/TimeSeries.mjs +32 -0
- package/model/embed/TimeTableHour.d.mts +2 -0
- package/model/embed/TimeTableHour.mjs +24 -0
- package/model/embed/TimeTableItem.d.mts +2 -0
- package/model/embed/TimeTableItem.mjs +57 -0
- package/model/embed/TypedValue.d.mts +5 -0
- package/model/embed/TypedValue.mjs +85 -0
- package/model/embed/Valorisation.d.mts +5 -0
- package/model/embed/Valorisation.mjs +108 -0
- package/model/embed/ValueWithPrecision.d.mts +2 -0
- package/model/embed/ValueWithPrecision.mjs +22 -0
- package/model/embed/Weekday.d.mts +2 -0
- package/model/embed/Weekday.mjs +26 -0
- package/model/embed/form/template/Action.d.mts +2 -0
- package/model/embed/form/template/Action.mjs +30 -0
- package/model/embed/form/template/CheckBox.d.mts +2 -0
- package/model/embed/form/template/CheckBox.mjs +71 -0
- package/model/embed/form/template/DatePicker.d.mts +2 -0
- package/model/embed/form/template/DatePicker.mjs +71 -0
- package/model/embed/form/template/DateTimePicker.d.mts +2 -0
- package/model/embed/form/template/DateTimePicker.mjs +71 -0
- package/model/embed/form/template/DropdownField.d.mts +2 -0
- package/model/embed/form/template/DropdownField.mjs +71 -0
- package/model/embed/form/template/FieldsGroup.d.mts +2 -0
- package/model/embed/form/template/FieldsGroup.mjs +28 -0
- package/model/embed/form/template/FormTemplateLayout.d.mts +2 -0
- package/model/embed/form/template/FormTemplateLayout.mjs +33 -0
- package/model/embed/form/template/Launcher.d.mts +2 -0
- package/model/embed/form/template/Launcher.mjs +26 -0
- package/model/embed/form/template/MeasureField.d.mts +2 -0
- package/model/embed/form/template/MeasureField.mjs +71 -0
- package/model/embed/form/template/MultipleChoice.d.mts +2 -0
- package/model/embed/form/template/MultipleChoice.mjs +71 -0
- package/model/embed/form/template/NumberField.d.mts +2 -0
- package/model/embed/form/template/NumberField.mjs +71 -0
- package/model/embed/form/template/RadioButton.d.mts +2 -0
- package/model/embed/form/template/RadioButton.mjs +71 -0
- package/model/embed/form/template/Section.d.mts +2 -0
- package/model/embed/form/template/Section.mjs +30 -0
- package/model/embed/form/template/State.d.mts +2 -0
- package/model/embed/form/template/State.mjs +26 -0
- package/model/embed/form/template/StructureElement.d.mts +3 -0
- package/model/embed/form/template/StructureElement.mjs +32 -1
- package/model/embed/form/template/TextField.d.mts +2 -0
- package/model/embed/form/template/TextField.mjs +71 -0
- package/model/embed/form/template/TimePicker.d.mts +2 -0
- package/model/embed/form/template/TimePicker.mjs +71 -0
- package/model/filter/predicate/AlwaysPredicate.d.mts +2 -0
- package/model/filter/predicate/AlwaysPredicate.mjs +20 -0
- package/model/filter/predicate/AndPredicate.d.mts +2 -0
- package/model/filter/predicate/AndPredicate.mjs +25 -0
- package/model/filter/predicate/KeyValuePredicate.d.mts +2 -0
- package/model/filter/predicate/KeyValuePredicate.mjs +32 -0
- package/model/filter/predicate/NotPredicate.d.mts +2 -0
- package/model/filter/predicate/NotPredicate.mjs +25 -0
- package/model/filter/predicate/OrPredicate.d.mts +2 -0
- package/model/filter/predicate/OrPredicate.mjs +25 -0
- package/model/filter/predicate/Predicate.d.mts +3 -0
- package/model/filter/predicate/Predicate.mjs +20 -1
- package/model/security/AlwaysPermissionItem.d.mts +2 -0
- package/model/security/AlwaysPermissionItem.mjs +25 -0
- package/model/security/AuthenticationToken.d.mts +2 -0
- package/model/security/AuthenticationToken.mjs +28 -0
- package/model/security/Enable2faRequest.d.mts +2 -0
- package/model/security/Enable2faRequest.mjs +22 -0
- package/model/security/ExternalJwtConfig.d.mts +18 -0
- package/model/security/ExternalJwtConfig.mjs +199 -0
- package/model/security/LoginIdentifier.d.mts +2 -0
- package/model/security/LoginIdentifier.mjs +22 -0
- package/model/security/OperationToken.d.mts +2 -0
- package/model/security/OperationToken.mjs +31 -0
- package/model/security/Permission.d.mts +2 -0
- package/model/security/Permission.mjs +24 -0
- package/model/security/PermissionItem.d.mts +3 -0
- package/model/security/PermissionItem.mjs +12 -1
- package/model/security/TokenWithGroup.d.mts +2 -0
- package/model/security/TokenWithGroup.mjs +25 -0
- package/options/SdkOptions.d.mts +3 -23
- package/package.json +1 -1
- package/utils/Id.d.mts +5 -0
- package/utils/Id.mjs +19 -10
- package/KotlinBigInteger-bignum.mjs +0 -5902
- /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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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, [
|
|
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.
|
|
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.
|
|
108
|
-
tmp0_serialDesc.
|
|
109
|
-
tmp0_serialDesc.
|
|
110
|
-
this.
|
|
111
|
-
}
|
|
112
|
-
protoOf($serializer).
|
|
113
|
-
var tmp0_desc = this.
|
|
114
|
-
var tmp1_output = encoder.
|
|
115
|
-
var tmp2_cached = Companion_getInstance_0().
|
|
116
|
-
tmp1_output.
|
|
117
|
-
tmp1_output.
|
|
118
|
-
tmp1_output.
|
|
119
|
-
tmp1_output.
|
|
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).
|
|
122
|
-
return this.
|
|
129
|
+
protoOf($serializer).j2t = function (encoder, value) {
|
|
130
|
+
return this.c70(encoder, value instanceof Challenge ? value : THROW_CCE());
|
|
123
131
|
};
|
|
124
|
-
protoOf($serializer).
|
|
125
|
-
var tmp0_desc = this.
|
|
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.
|
|
133
|
-
var tmp8_cached = Companion_getInstance_0().
|
|
134
|
-
if (tmp7_input.
|
|
135
|
-
tmp4_local0 = tmp7_input.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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).
|
|
168
|
-
return this.
|
|
175
|
+
protoOf($serializer).i2t = function () {
|
|
176
|
+
return this.b70_1;
|
|
169
177
|
};
|
|
170
|
-
protoOf($serializer).
|
|
171
|
-
var tmp0_cached = Companion_getInstance_0().
|
|
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().
|
|
193
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance().b70_1);
|
|
186
194
|
}
|
|
187
|
-
$this.
|
|
188
|
-
$this.
|
|
189
|
-
$this.
|
|
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.
|
|
198
|
-
this.
|
|
199
|
-
this.
|
|
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.
|
|
204
|
-
|
|
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).
|
|
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
|
|
292
|
+
var this_1 = config.e70_1;
|
|
209
293
|
// Inline function 'kotlin.collections.mapTo' call
|
|
210
|
-
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(
|
|
211
|
-
var _iterator__ex2g4s =
|
|
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$
|
|
215
|
-
destination.p(tmp$ret$
|
|
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.
|
|
310
|
+
var tmp0 = encodeToByteArray($this.p70_1);
|
|
227
311
|
// Inline function 'kotlin.collections.plus' call
|
|
228
|
-
var elements = encodeToByteArray($this.
|
|
312
|
+
var elements = encodeToByteArray($this.q70_1);
|
|
229
313
|
return primitiveArrayConcat([tmp0, elements]);
|
|
230
314
|
}
|
|
231
315
|
function _get_difficulty__gn5kuo($this) {
|
|
232
|
-
var
|
|
233
|
-
|
|
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
|
|
236
|
-
|
|
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
|
|
239
|
-
|
|
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.
|
|
244
|
-
tmp.
|
|
245
|
-
return tmp.
|
|
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.
|
|
250
|
-
tmp.
|
|
251
|
-
return tmp.
|
|
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.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
371
|
+
this.d71_1 = _this__u8e3s4;
|
|
372
|
+
this.e71_1 = prefixHash;
|
|
373
|
+
this.f71_1 = nonce;
|
|
258
374
|
}
|
|
259
|
-
protoOf($scoreCOROUTINE$).
|
|
260
|
-
var suspendResult = this.
|
|
375
|
+
protoOf($scoreCOROUTINE$).t8 = function () {
|
|
376
|
+
var suspendResult = this.n8_1;
|
|
261
377
|
$sm: do
|
|
262
378
|
try {
|
|
263
|
-
var tmp = this.
|
|
379
|
+
var tmp = this.l8_1;
|
|
264
380
|
switch (tmp) {
|
|
265
381
|
case 0:
|
|
266
|
-
this.
|
|
267
|
-
var nonceBytes = encodeToByteArray(this.
|
|
268
|
-
var this_0 = this.
|
|
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.
|
|
271
|
-
suspendResult =
|
|
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.
|
|
395
|
+
return firstBytesAsBigInteger(this.d71_1, hash);
|
|
280
396
|
case 2:
|
|
281
|
-
throw this.
|
|
397
|
+
throw this.o8_1;
|
|
282
398
|
}
|
|
283
399
|
} catch ($p) {
|
|
284
400
|
var e = $p;
|
|
285
|
-
if (this.
|
|
401
|
+
if (this.m8_1 === 2) {
|
|
286
402
|
throw e;
|
|
287
403
|
} else {
|
|
288
|
-
this.
|
|
289
|
-
this.
|
|
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.
|
|
297
|
-
this.
|
|
412
|
+
this.o71_1 = _this__u8e3s4;
|
|
413
|
+
this.p71_1 = nonce;
|
|
298
414
|
}
|
|
299
|
-
protoOf($calculateCOROUTINE$).
|
|
300
|
-
var suspendResult = this.
|
|
415
|
+
protoOf($calculateCOROUTINE$).t8 = function () {
|
|
416
|
+
var suspendResult = this.n8_1;
|
|
301
417
|
$sm: do
|
|
302
418
|
try {
|
|
303
|
-
var tmp = this.
|
|
419
|
+
var tmp = this.l8_1;
|
|
304
420
|
switch (tmp) {
|
|
305
421
|
case 0:
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
308
|
-
suspendResult =
|
|
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.
|
|
317
|
-
suspendResult = score(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.
|
|
442
|
+
throw this.o8_1;
|
|
327
443
|
}
|
|
328
444
|
} catch ($p) {
|
|
329
445
|
var e = $p;
|
|
330
|
-
if (this.
|
|
446
|
+
if (this.m8_1 === 3) {
|
|
331
447
|
throw e;
|
|
332
448
|
} else {
|
|
333
|
-
this.
|
|
334
|
-
this.
|
|
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.
|
|
342
|
-
this.
|
|
457
|
+
this.a72_1 = _this__u8e3s4;
|
|
458
|
+
this.b72_1 = onProgress;
|
|
343
459
|
}
|
|
344
|
-
protoOf($resolveCOROUTINE$).
|
|
345
|
-
var suspendResult = this.
|
|
460
|
+
protoOf($resolveCOROUTINE$).t8 = function () {
|
|
461
|
+
var suspendResult = this.n8_1;
|
|
346
462
|
$sm: do
|
|
347
463
|
try {
|
|
348
|
-
var tmp = this.
|
|
464
|
+
var tmp = this.l8_1;
|
|
349
465
|
switch (tmp) {
|
|
350
466
|
case 0:
|
|
351
|
-
this.
|
|
352
|
-
this.
|
|
353
|
-
suspendResult =
|
|
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.
|
|
361
|
-
this.
|
|
362
|
-
this.
|
|
363
|
-
this.
|
|
364
|
-
this.
|
|
365
|
-
this.
|
|
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.
|
|
369
|
-
this.
|
|
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.
|
|
375
|
-
tmp_0.
|
|
376
|
-
this.
|
|
377
|
-
suspendResult = score(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.
|
|
385
|
-
this.
|
|
386
|
-
this.
|
|
387
|
-
suspendResult = 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.
|
|
510
|
+
this.l8_1 = 2;
|
|
395
511
|
continue $sm;
|
|
396
512
|
case 5:
|
|
397
|
-
return new ProofOfWork(this.
|
|
513
|
+
return new ProofOfWork(this.c72_1.toString());
|
|
398
514
|
case 6:
|
|
399
|
-
throw this.
|
|
515
|
+
throw this.o8_1;
|
|
400
516
|
}
|
|
401
517
|
} catch ($p) {
|
|
402
518
|
var e = $p;
|
|
403
|
-
if (this.
|
|
519
|
+
if (this.m8_1 === 6) {
|
|
404
520
|
throw e;
|
|
405
521
|
} else {
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
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.
|
|
415
|
-
this.
|
|
530
|
+
this.q72_1 = _this__u8e3s4;
|
|
531
|
+
this.r72_1 = nonce;
|
|
416
532
|
}
|
|
417
|
-
protoOf($validateCOROUTINE$).
|
|
418
|
-
var suspendResult = this.
|
|
533
|
+
protoOf($validateCOROUTINE$).t8 = function () {
|
|
534
|
+
var suspendResult = this.n8_1;
|
|
419
535
|
$sm: do
|
|
420
536
|
try {
|
|
421
|
-
var tmp = this.
|
|
537
|
+
var tmp = this.l8_1;
|
|
422
538
|
switch (tmp) {
|
|
423
539
|
case 0:
|
|
424
|
-
this.
|
|
425
|
-
this.
|
|
426
|
-
suspendResult = calculate(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.
|
|
550
|
+
return calculatedResult.h72(_get_difficulty__gn5kuo(this.q72_1)) >= 0;
|
|
435
551
|
case 2:
|
|
436
|
-
throw this.
|
|
552
|
+
throw this.o8_1;
|
|
437
553
|
}
|
|
438
554
|
} catch ($p) {
|
|
439
555
|
var e = $p;
|
|
440
|
-
if (this.
|
|
556
|
+
if (this.m8_1 === 2) {
|
|
441
557
|
throw e;
|
|
442
558
|
} else {
|
|
443
|
-
this.
|
|
444
|
-
this.
|
|
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,
|
|
565
|
+
function ChallengePieceResolver(salt, serializedInput, difficultyFactor, sha256) {
|
|
450
566
|
Companion_getInstance_1();
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
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).
|
|
576
|
+
protoOf(ChallengePieceResolver).s72 = function (onProgress, $completion) {
|
|
457
577
|
var tmp = new $resolveCOROUTINE$(this, onProgress, $completion);
|
|
458
|
-
tmp.
|
|
459
|
-
tmp.
|
|
460
|
-
return tmp.
|
|
578
|
+
tmp.n8_1 = Unit_instance;
|
|
579
|
+
tmp.o8_1 = null;
|
|
580
|
+
return tmp.t8();
|
|
461
581
|
};
|
|
462
|
-
protoOf(ChallengePieceResolver).
|
|
582
|
+
protoOf(ChallengePieceResolver).t72 = function (nonce, $completion) {
|
|
463
583
|
var tmp = new $validateCOROUTINE$(this, nonce, $completion);
|
|
464
|
-
tmp.
|
|
465
|
-
tmp.
|
|
466
|
-
return tmp.
|
|
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.
|
|
479
|
-
tmp_0.
|
|
480
|
-
return tmp_0.
|
|
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.
|
|
486
|
-
tmp.
|
|
487
|
-
return tmp.
|
|
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.
|
|
494
|
-
this.
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
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).
|
|
500
|
-
var tmp = this.
|
|
501
|
-
tmp.
|
|
502
|
-
tmp.
|
|
503
|
-
return tmp.
|
|
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).
|
|
506
|
-
return this.
|
|
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).
|
|
509
|
-
var suspendResult = this.
|
|
628
|
+
protoOf(resolveChallenge$slambda).t8 = function () {
|
|
629
|
+
var suspendResult = this.n8_1;
|
|
510
630
|
$sm: do
|
|
511
631
|
try {
|
|
512
|
-
var tmp = this.
|
|
632
|
+
var tmp = this.l8_1;
|
|
513
633
|
switch (tmp) {
|
|
514
634
|
case 0:
|
|
515
|
-
this.
|
|
516
|
-
var progress = (this.
|
|
517
|
-
if (progress - this.
|
|
518
|
-
this.
|
|
519
|
-
this.
|
|
520
|
-
this.
|
|
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.
|
|
647
|
+
this.l8_1 = 2;
|
|
528
648
|
continue $sm;
|
|
529
649
|
}
|
|
530
650
|
|
|
531
651
|
case 1:
|
|
532
|
-
this.
|
|
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.
|
|
657
|
+
throw this.o8_1;
|
|
538
658
|
}
|
|
539
659
|
} catch ($p) {
|
|
540
660
|
var e = $p;
|
|
541
|
-
if (this.
|
|
661
|
+
if (this.m8_1 === 3) {
|
|
542
662
|
throw e;
|
|
543
663
|
} else {
|
|
544
|
-
this.
|
|
545
|
-
this.
|
|
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).
|
|
551
|
-
var i = new resolveChallenge$slambda(this.
|
|
552
|
-
i.
|
|
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.
|
|
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.
|
|
566
|
-
this.
|
|
567
|
-
this.
|
|
568
|
-
this.
|
|
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$).
|
|
571
|
-
var suspendResult = this.
|
|
690
|
+
protoOf($resolveChallengeCOROUTINE$).t8 = function () {
|
|
691
|
+
var suspendResult = this.n8_1;
|
|
572
692
|
$sm: do
|
|
573
693
|
try {
|
|
574
|
-
var tmp = this.
|
|
694
|
+
var tmp = this.l8_1;
|
|
575
695
|
switch (tmp) {
|
|
576
696
|
case 0:
|
|
577
|
-
this.
|
|
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.
|
|
581
|
-
tmp_0.
|
|
582
|
-
this.
|
|
583
|
-
this.
|
|
584
|
-
var this_0 = this.
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
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.
|
|
592
|
-
this.
|
|
711
|
+
if (!this.l73_1.t()) {
|
|
712
|
+
this.l8_1 = 3;
|
|
593
713
|
continue $sm;
|
|
594
714
|
}
|
|
595
715
|
|
|
596
|
-
var item = this.
|
|
597
|
-
var _unary__edvuaz = this.
|
|
598
|
-
this.
|
|
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.
|
|
601
|
-
suspendResult = item.
|
|
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.
|
|
610
|
-
this.
|
|
729
|
+
this.h73_1.p(ARGUMENT);
|
|
730
|
+
this.l8_1 = 1;
|
|
611
731
|
continue $sm;
|
|
612
732
|
case 3:
|
|
613
|
-
var this_1 = this.
|
|
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.
|
|
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.
|
|
623
|
-
this.
|
|
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.
|
|
746
|
+
throw this.o8_1;
|
|
627
747
|
}
|
|
628
748
|
} catch ($p) {
|
|
629
749
|
var e = $p;
|
|
630
|
-
if (this.
|
|
750
|
+
if (this.m8_1 === 4) {
|
|
631
751
|
throw e;
|
|
632
752
|
} else {
|
|
633
|
-
this.
|
|
634
|
-
this.
|
|
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.
|
|
642
|
-
this.
|
|
643
|
-
this.
|
|
644
|
-
this.
|
|
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$).
|
|
647
|
-
var suspendResult = this.
|
|
766
|
+
protoOf($validateSolutionCOROUTINE$).t8 = function () {
|
|
767
|
+
var suspendResult = this.n8_1;
|
|
648
768
|
$sm: do
|
|
649
769
|
try {
|
|
650
|
-
var tmp = this.
|
|
770
|
+
var tmp = this.l8_1;
|
|
651
771
|
switch (tmp) {
|
|
652
772
|
case 0:
|
|
653
|
-
this.
|
|
773
|
+
this.m8_1 = 7;
|
|
654
774
|
var tmp_0 = Companion_getInstance_1();
|
|
655
|
-
var tmp0_elvis_lhs = this.
|
|
656
|
-
var challenges = tmp_0.
|
|
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.
|
|
659
|
-
this.
|
|
778
|
+
tmp_1.b74_1 = withIndex(challenges);
|
|
779
|
+
this.l8_1 = 1;
|
|
660
780
|
continue $sm;
|
|
661
781
|
case 1:
|
|
662
|
-
this.
|
|
782
|
+
this.a74_1 = this.b74_1;
|
|
663
783
|
var tmp_2;
|
|
664
|
-
var tmp_3 = this.
|
|
784
|
+
var tmp_3 = this.a74_1;
|
|
665
785
|
if (isInterface(tmp_3, Collection)) {
|
|
666
|
-
tmp_2 = this.
|
|
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.
|
|
673
|
-
this.
|
|
792
|
+
this.y73_1 = true;
|
|
793
|
+
this.l8_1 = 8;
|
|
674
794
|
continue $sm;
|
|
675
795
|
} else {
|
|
676
|
-
this.
|
|
796
|
+
this.l8_1 = 2;
|
|
677
797
|
continue $sm;
|
|
678
798
|
}
|
|
679
799
|
|
|
680
800
|
case 2:
|
|
681
|
-
this.
|
|
682
|
-
this.
|
|
801
|
+
this.z73_1 = this.a74_1.s();
|
|
802
|
+
this.l8_1 = 3;
|
|
683
803
|
continue $sm;
|
|
684
804
|
case 3:
|
|
685
|
-
if (!this.
|
|
686
|
-
this.
|
|
805
|
+
if (!this.z73_1.t()) {
|
|
806
|
+
this.l8_1 = 6;
|
|
687
807
|
continue $sm;
|
|
688
808
|
}
|
|
689
809
|
|
|
690
|
-
var element = this.
|
|
691
|
-
var index = element.
|
|
692
|
-
var challenge = element.
|
|
693
|
-
this.
|
|
694
|
-
suspendResult = challenge.
|
|
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.
|
|
703
|
-
this.
|
|
822
|
+
this.y73_1 = false;
|
|
823
|
+
this.l8_1 = 8;
|
|
704
824
|
continue $sm;
|
|
705
825
|
} else {
|
|
706
|
-
this.
|
|
826
|
+
this.l8_1 = 5;
|
|
707
827
|
continue $sm;
|
|
708
828
|
}
|
|
709
829
|
|
|
710
830
|
case 5:
|
|
711
|
-
this.
|
|
831
|
+
this.l8_1 = 3;
|
|
712
832
|
continue $sm;
|
|
713
833
|
case 6:
|
|
714
|
-
this.
|
|
834
|
+
this.y73_1 = true;
|
|
715
835
|
if (false) {
|
|
716
|
-
this.
|
|
836
|
+
this.l8_1 = 1;
|
|
717
837
|
continue $sm;
|
|
718
838
|
}
|
|
719
839
|
|
|
720
|
-
this.
|
|
840
|
+
this.l8_1 = 8;
|
|
721
841
|
continue $sm;
|
|
722
842
|
case 7:
|
|
723
|
-
throw this.
|
|
843
|
+
throw this.o8_1;
|
|
724
844
|
case 8:
|
|
725
|
-
return this.
|
|
845
|
+
return this.y73_1;
|
|
726
846
|
}
|
|
727
847
|
} catch ($p) {
|
|
728
848
|
var e = $p;
|
|
729
|
-
if (this.
|
|
849
|
+
if (this.m8_1 === 7) {
|
|
730
850
|
throw e;
|
|
731
851
|
} else {
|
|
732
|
-
this.
|
|
733
|
-
this.
|
|
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.
|
|
748
|
-
this.
|
|
749
|
-
}
|
|
750
|
-
protoOf($serializer_0).
|
|
751
|
-
var tmp0_desc = this.
|
|
752
|
-
var tmp1_output = encoder.
|
|
753
|
-
tmp1_output.
|
|
754
|
-
tmp1_output.
|
|
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).
|
|
757
|
-
return this.
|
|
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).
|
|
760
|
-
var tmp0_desc = this.
|
|
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.
|
|
766
|
-
if (tmp5_input.
|
|
767
|
-
tmp4_local0 = tmp5_input.
|
|
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.
|
|
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.
|
|
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.
|
|
916
|
+
tmp5_input.u2w(tmp0_desc);
|
|
785
917
|
return ProofOfWork_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
|
|
786
918
|
};
|
|
787
|
-
protoOf($serializer_0).
|
|
788
|
-
return this.
|
|
919
|
+
protoOf($serializer_0).i2t = function () {
|
|
920
|
+
return this.u74_1;
|
|
789
921
|
};
|
|
790
|
-
protoOf($serializer_0).
|
|
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().
|
|
936
|
+
throwMissingFieldException(seen0, 1, $serializer_getInstance_0().u74_1);
|
|
805
937
|
}
|
|
806
|
-
$this.
|
|
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.
|
|
945
|
+
this.r74_1 = nonce;
|
|
814
946
|
}
|
|
815
947
|
protoOf(ProofOfWork).toString = function () {
|
|
816
|
-
return 'ProofOfWork(nonce=' + this.
|
|
948
|
+
return 'ProofOfWork(nonce=' + this.r74_1 + ')';
|
|
817
949
|
};
|
|
818
950
|
protoOf(ProofOfWork).hashCode = function () {
|
|
819
|
-
return getStringHashCode(this.
|
|
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.
|
|
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.
|
|
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.
|
|
852
|
-
tmp0_serialDesc.
|
|
853
|
-
this.
|
|
854
|
-
}
|
|
855
|
-
protoOf($serializer_1).
|
|
856
|
-
var tmp0_desc = this.
|
|
857
|
-
var tmp1_output = encoder.
|
|
858
|
-
var tmp2_cached = Companion_getInstance_3().
|
|
859
|
-
tmp1_output.
|
|
860
|
-
tmp1_output.
|
|
861
|
-
tmp1_output.
|
|
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).
|
|
864
|
-
return this.
|
|
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).
|
|
867
|
-
var tmp0_desc = this.
|
|
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.
|
|
874
|
-
var tmp7_cached = Companion_getInstance_3().
|
|
875
|
-
if (tmp6_input.
|
|
876
|
-
tmp4_local0 = tmp6_input.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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).
|
|
903
|
-
return this.
|
|
1034
|
+
protoOf($serializer_1).i2t = function () {
|
|
1035
|
+
return this.x74_1;
|
|
904
1036
|
};
|
|
905
|
-
protoOf($serializer_1).
|
|
906
|
-
var tmp0_cached = Companion_getInstance_3().
|
|
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().
|
|
1052
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_1().x74_1);
|
|
921
1053
|
}
|
|
922
|
-
$this.
|
|
923
|
-
$this.
|
|
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.
|
|
932
|
-
this.
|
|
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.
|
|
1084
|
+
var tmp = to('id', _this__u8e3s4.s74_1);
|
|
953
1085
|
// Inline function 'kotlin.collections.toTypedArray' call
|
|
954
|
-
var this_0 = _this__u8e3s4.
|
|
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.
|
|
970
|
-
this.
|
|
971
|
-
this.
|
|
972
|
-
this.
|
|
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).
|
|
976
|
-
var tmp = this.
|
|
977
|
-
tmp.
|
|
978
|
-
tmp.
|
|
979
|
-
return tmp.
|
|
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).
|
|
982
|
-
return this.
|
|
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).
|
|
985
|
-
var suspendResult = this.
|
|
1116
|
+
protoOf(resolveChallengeJs$slambda).t8 = function () {
|
|
1117
|
+
var suspendResult = this.n8_1;
|
|
986
1118
|
$sm: do
|
|
987
1119
|
try {
|
|
988
|
-
var tmp = this.
|
|
1120
|
+
var tmp = this.l8_1;
|
|
989
1121
|
switch (tmp) {
|
|
990
1122
|
case 0:
|
|
991
|
-
this.
|
|
992
|
-
this.
|
|
993
|
-
var tmp_0 = toConfig(this.
|
|
994
|
-
var tmp0_safe_receiver = this.
|
|
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
|
-
|
|
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.
|
|
1144
|
+
throw this.o8_1;
|
|
1014
1145
|
}
|
|
1015
1146
|
} catch ($p) {
|
|
1016
1147
|
var e = $p;
|
|
1017
|
-
if (this.
|
|
1148
|
+
if (this.m8_1 === 2) {
|
|
1018
1149
|
throw e;
|
|
1019
1150
|
} else {
|
|
1020
|
-
this.
|
|
1021
|
-
this.
|
|
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).
|
|
1027
|
-
var i = new resolveChallengeJs$slambda(this.
|
|
1028
|
-
i.
|
|
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.
|
|
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.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
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).
|
|
1047
|
-
var tmp = this.
|
|
1048
|
-
tmp.
|
|
1049
|
-
tmp.
|
|
1050
|
-
return tmp.
|
|
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).
|
|
1053
|
-
return this.
|
|
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).
|
|
1056
|
-
var suspendResult = this.
|
|
1186
|
+
protoOf(validateSolutionJs$slambda).t8 = function () {
|
|
1187
|
+
var suspendResult = this.n8_1;
|
|
1057
1188
|
$sm: do
|
|
1058
1189
|
try {
|
|
1059
|
-
var tmp = this.
|
|
1190
|
+
var tmp = this.l8_1;
|
|
1060
1191
|
switch (tmp) {
|
|
1061
1192
|
case 0:
|
|
1062
|
-
this.
|
|
1063
|
-
this.
|
|
1064
|
-
var tmp_0 = toConfig(this.
|
|
1065
|
-
var tmp_1 = toSolution(this.
|
|
1066
|
-
var tmp0_safe_receiver = this.
|
|
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
|
-
|
|
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.
|
|
1214
|
+
throw this.o8_1;
|
|
1085
1215
|
}
|
|
1086
1216
|
} catch ($p) {
|
|
1087
1217
|
var e = $p;
|
|
1088
|
-
if (this.
|
|
1218
|
+
if (this.m8_1 === 2) {
|
|
1089
1219
|
throw e;
|
|
1090
1220
|
} else {
|
|
1091
|
-
this.
|
|
1092
|
-
this.
|
|
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).
|
|
1098
|
-
var i = new validateSolutionJs$slambda(this.
|
|
1099
|
-
i.
|
|
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.
|
|
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).
|
|
1128
|
-
protoOf($serializer_0).
|
|
1129
|
-
protoOf($serializer_1).
|
|
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();
|