@solibo/solibo-sdk 1.57.9 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime/kotlinx/datetime/internal/format/FieldSpec.mjs +4 -4
- package/Kotlin-DateTime-library-kotlinx-datetime/kotlinx/datetime/internal/format/FormatStructure.mjs +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime/kotlinx/datetime/internal/format/Predicate.mjs +2 -2
- package/KotlinBigInteger-bignum/com/ionspin/kotlin/bignum/decimal/BigDecimal.mjs +2 -2
- package/KotlinBigInteger-bignum/com/ionspin/kotlin/bignum/decimal/BigDecimalExtensions.mjs +2 -2
- package/KotlinBigInteger-bignum/com/ionspin/kotlin/bignum/integer/BigInteger.mjs +2 -2
- package/KotlinBigInteger-bignum/com/ionspin/kotlin/bignum/integer/BigIntegerExtensions.mjs +2 -2
- package/client-core.mjs +71 -7
- package/client.d.mts +38 -1
- package/core.d.mts +2 -2
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoAesCbc.mjs +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoAesCtr.mjs +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoAesGcm.mjs +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoEcdh.mjs +3 -3
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoEcdsa.mjs +3 -3
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoEdDsa.mjs +2 -2
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoHmac.mjs +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoRsaOaep.mjs +3 -3
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoRsaPkcs1.mjs +3 -3
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoRsaPss.mjs +3 -3
- package/cryptography-kotlin-cryptography-provider-webcrypto/dev/whyoleg/cryptography/providers/webcrypto/algorithms/WebCryptoXdh.mjs +2 -2
- package/kotlin-kotlin-stdlib/kotlin/UInt.mjs +2 -2
- package/kotlin-kotlin-stdlib/kotlin/ULong.mjs +2 -2
- package/kotlin-kotlin-stdlib/kotlin/UnsignedJs.mjs +2 -2
- package/kotlin-kotlin-stdlib/kotlin/time/Duration.mjs +31 -0
- package/kotlin-kotlin-stdlib/kotlin/time/DurationUnitJs.mjs +6 -1
- package/kotlin-kotlin-stdlib/kotlin/time/MonoTimeSource.mjs +2 -0
- package/kotlin-kotlin-stdlib/kotlin/time/TimeSource.mjs +2 -0
- package/kotlin-kotlin-stdlib/kotlin/uuid/Uuid.mjs +2 -2
- package/kotlin-kotlin-stdlib/kotlin/uuid/UuidJs.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/AbstractCoroutine.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CancellableContinuation.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CancellableContinuationImpl.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CompletableJob.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CoroutineContext.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CoroutineDispatcher.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CoroutineExceptionHandler.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/CoroutineScope.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/Delay.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/DispatchedTask.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/Dispatchers.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/EventLoop.common.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/EventLoop.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/JSDispatcher.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/Job.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/JobSupport.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/MainCoroutineDispatcher.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/Runnable.mjs +1 -1
- package/kotlinx-coroutines-core/kotlinx/coroutines/Timeout.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/Unconfined.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/Window.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/channels/BufferedChannel.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/channels/Channel.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/channels/ChannelCoroutine.mjs +8 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/channels/ConflatedBufferedChannel.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/Channels.mjs +128 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/Collect.mjs +19 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/Context.mjs +50 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/Distinct.mjs +215 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/Emitters.mjs +4 -4
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/Merge.mjs +111 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/SharedFlow.mjs +2 -273
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/StateFlow.mjs +2 -366
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/internal/AbstractSharedFlow.mjs +2 -144
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/internal/ChannelFlow.mjs +648 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/internal/FlowExceptions.mjs +13 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/internal/Merge.mjs +311 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/flow/internal/NopCollector.mjs +39 -0
- package/kotlinx-coroutines-core/kotlinx/coroutines/internal/ConcurrentLinkedList.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/internal/CoroutineExceptionHandlerImpl.common.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/internal/DispatchedContinuation.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/internal/Scopes.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/intrinsics/Undispatched.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/selects/Select.mjs +2 -2
- package/kotlinx-coroutines-core/kotlinx/coroutines/sync/Semaphore.mjs +1 -1
- package/kotlinx-io-kotlinx-io-core/kotlinx/io/Buffer.mjs +2 -2
- package/kotlinx-io-kotlinx-io-core/kotlinx/io/Core.mjs +2 -2
- package/kotlinx-io-kotlinx-io-core/kotlinx/io/RealSource.mjs +2 -2
- package/kotlinx-io-kotlinx-io-core/kotlinx/io/Segment.mjs +2 -2
- package/kotlinx-io-kotlinx-io-core/kotlinx/io/SegmentPool.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/PolymorphicSerializer.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/SealedSerializer.mjs +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/Serializers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/SerializersCache.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/builtins/BuiltinSerializers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/descriptors/SerialDescriptors.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/encoding/AbstractEncoder.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/AbstractPolymorphicSerializer.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/BuiltInSerializers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/CollectionSerializers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/Enums.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/InlineClassDescriptor.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/NoOpEncoder.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/ObjectSerializer.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/Platform.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/PluginGeneratedSerialDescriptor.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/PrimitiveArraysSerializers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/Primitives.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/Tuples.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-core/kotlinx/serialization/internal/ValueClasses.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/Json.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/JsonElement.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/JsonElementSerializers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/JsonExceptions.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/CommentLexers.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/JsonElementMarker.mjs +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/JsonExceptions.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/JsonStreams.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/JsonTreeReader.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/StreamingJsonDecoder.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/StreamingJsonEncoder.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/StringJsonLexer.mjs +2 -2
- package/kotlinx-serialization-kotlinx-serialization-json/kotlinx/serialization/json/internal/TreeJsonDecoder.mjs +2 -2
- package/ktor-ktor-client-auth/io/ktor/client/plugins/auth/Auth.mjs +1 -1
- package/ktor-ktor-client-content-negotiation/io/ktor/client/plugins/contentnegotiation/ContentNegotiation.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/call/HttpClientCall.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/call/SavedCall.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/engine/HttpClientEngine.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/engine/HttpClientEngineBase.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/engine/HttpClientEngineCapability.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/fetch/LibDom.mjs +1 -1
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpCallValidator.mjs +1 -1
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpPlainText.mjs +1 -1
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpRedirect.mjs +1 -1
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpRequestLifecycle.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpRequestRetry.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpSend.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/HttpTimeout.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/SaveBody.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/api/CommonHooks.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCache.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCacheEntry.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCacheLegacy.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCacheValidation.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/storage/DisabledCacheStorage.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/storage/HttpCacheStorage.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cache/storage/UnlimitedCacheStorage.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/plugins/cookies/HttpCookies.mjs +1 -1
- package/ktor-ktor-client-core/io/ktor/client/plugins/observer/ResponseObserver.mjs +1 -1
- package/ktor-ktor-client-core/io/ktor/client/request/DefaultHttpRequest.mjs +2 -2
- package/ktor-ktor-client-core/io/ktor/client/request/HttpRequest.mjs +2 -2
- package/ktor-ktor-client-encoding/io/ktor/client/plugins/compression/ContentEncoding.mjs +1 -1
- package/ktor-ktor-client-logging/io/ktor/client/plugins/logging/Logging.mjs +1 -1
- package/ktor-ktor-http/io/ktor/http/URLBuilder.mjs +2 -2
- package/ktor-ktor-http/io/ktor/http/URLParser.mjs +2 -2
- package/ktor-ktor-http/io/ktor/http/URLUtils.mjs +2 -2
- package/ktor-ktor-http/io/ktor/http/Url.mjs +2 -2
- package/ktor-ktor-http/io/ktor/http/content/CompressedContent.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/ByteChannel.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/ByteChannelScanner.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/ByteReadChannelOperations.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/ByteWriteChannel.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/ByteWriteChannelOperations.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/charsets/Charset.js.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/charsets/Encoding.mjs +2 -2
- package/ktor-ktor-io/io/ktor/utils/io/charsets/ISO88591.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/PlatformUtils.js.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/PlatformUtils.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/date/Date.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/date/DateJs.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/pipeline/DebugPipelineContext.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/pipeline/Pipeline.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/pipeline/PipelineContext.mjs +2 -2
- package/ktor-ktor-utils/io/ktor/util/pipeline/SuspendFunctionGun.mjs +2 -2
- package/ktor-ktor-websockets/io/ktor/websocket/DefaultWebSocketSession.mjs +2 -2
- package/ktor-ktor-websockets/io/ktor/websocket/PingPong.mjs +2 -2
- package/ktor-ktor-websockets/io/ktor/websocket/WebSocketChannelsConfig.mjs +11 -2
- package/package.json +1 -1
- package/solibo-cycles/Kotlin-DateTime-library-kotlinx-datetime-4.mjs +5 -5
- package/solibo-cycles/Kotlin-DateTime-library-kotlinx-datetime-6.mjs +8 -8
- package/solibo-cycles/Kotlin-DateTime-library-kotlinx-datetime-7.mjs +4 -4
- package/solibo-cycles/Kotlin-DateTime-library-kotlinx-datetime-8.mjs +21 -21
- package/solibo-cycles/Kotlin-DateTime-library-kotlinx-datetime-9.mjs +9 -9
- package/solibo-cycles/cryptography-kotlin-cryptography-serialization-asn1-modules-3.mjs +3 -3
- package/solibo-cycles/kotlin-kotlin-stdlib-10.mjs +11 -11
- package/solibo-cycles/kotlin-kotlin-stdlib-13.mjs +297 -245
- package/solibo-cycles/kotlin-kotlin-stdlib-14.mjs +250 -428
- package/solibo-cycles/kotlin-kotlin-stdlib-15.mjs +482 -0
- package/solibo-cycles/kotlinx-coroutines-core-17.mjs +5576 -3023
- package/solibo-cycles/kotlinx-coroutines-core-18.mjs +3500 -365
- package/solibo-cycles/kotlinx-coroutines-core-19.mjs +1316 -0
- package/solibo-cycles/kotlinx-io-kotlinx-io-core-20.mjs +602 -336
- package/solibo-cycles/kotlinx-io-kotlinx-io-core-21.mjs +383 -0
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-core-22.mjs +4075 -145
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-core-23.mjs +188 -196
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-core-24.mjs +186 -360
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-core-25.mjs +392 -0
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-json-26.mjs +227 -3646
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-json-27.mjs +3638 -143
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-json-28.mjs +179 -0
- package/solibo-cycles/ktor-ktor-client-core-29.mjs +3004 -427
- package/solibo-cycles/ktor-ktor-client-core-30.mjs +455 -3061
- package/solibo-cycles/ktor-ktor-client-core-31.mjs +3176 -0
- package/solibo-cycles/{ktor-ktor-http-31.mjs → ktor-ktor-http-32.mjs} +5 -5
- package/solibo-cycles/ktor-ktor-io-33.mjs +2950 -342
- package/solibo-cycles/ktor-ktor-io-34.mjs +412 -0
- package/solibo-cycles/ktor-ktor-utils-35.mjs +557 -312
- package/solibo-cycles/ktor-ktor-utils-36.mjs +329 -218
- package/solibo-cycles/ktor-ktor-utils-37.mjs +245 -0
- package/solibo-cycles/{solibo-sdk-sdk-api-document-39.mjs → solibo-sdk-sdk-api-document-40.mjs} +1 -1
- package/solibo-cycles/solibo-sdk-sdk-api-resident-43.mjs +819 -332
- package/solibo-cycles/solibo-sdk-sdk-api-resident-44.mjs +745 -1431
- package/solibo-cycles/solibo-sdk-sdk-api-resident-45.mjs +1597 -0
- package/solibo-cycles/solibo-sdk-sdk-core-47.mjs +1020 -3585
- package/solibo-cycles/solibo-sdk-sdk-core-48.mjs +3984 -2184
- package/solibo-cycles/solibo-sdk-sdk-core-49.mjs +2634 -580
- package/solibo-cycles/solibo-sdk-sdk-core-50.mjs +597 -1902
- package/solibo-cycles/solibo-sdk-sdk-core-51.mjs +1873 -943
- package/solibo-cycles/solibo-sdk-sdk-core-52.mjs +1147 -9240
- package/solibo-cycles/solibo-sdk-sdk-core-53.mjs +8074 -3853
- package/solibo-cycles/solibo-sdk-sdk-core-54.mjs +5135 -0
- package/solibo-sdk-sdk/no/solibo/oss/sdk/SoliboSDK.mjs +1 -1
- package/solibo-sdk-sdk/no/solibo/oss/sdk/api/IntegratedDocumentMutation.export.d.mts +18 -0
- package/solibo-sdk-sdk/no/solibo/oss/sdk/api/IntegratedDocumentMutation.mjs +3411 -463
- package/solibo-sdk-sdk/no/solibo/oss/sdk/api/MockHomeApi.mjs +874 -707
- package/solibo-sdk-sdk-api-communication/no/solibo/oss/sdk/api/gen/models/NewCommunicationCommentPushPayload.mjs +2 -2
- package/solibo-sdk-sdk-api-communication/no/solibo/oss/sdk/api/gen/models/NewMessageInConversationPushPayload.mjs +2 -2
- package/solibo-sdk-sdk-api-communication/no/solibo/oss/sdk/api/gen/models/NewNeighborhoodPostPushPayload.mjs +2 -2
- package/solibo-sdk-sdk-api-communication/no/solibo/oss/sdk/api/gen/models/NewOppslagPushPayload.mjs +2 -2
- package/solibo-sdk-sdk-api-communication/no/solibo/oss/sdk/api/gen/models/NewPracticalInfoPushPayload.mjs +2 -2
- package/solibo-sdk-sdk-api-communication/no/solibo/oss/sdk/api/gen/models/PushNotificationPayload.mjs +2 -2
- package/solibo-sdk-sdk-api-document/no/solibo/oss/sdk/api/DocumentUploader.mjs +2 -2
- package/solibo-sdk-sdk-api-document/no/solibo/oss/sdk/api/DocumentsApi.mjs +2 -2
- package/solibo-sdk-sdk-api-follow-up/no/solibo/oss/sdk/api/gen/models/ExpenseFollowUp.mjs +2 -2
- package/solibo-sdk-sdk-api-follow-up/no/solibo/oss/sdk/api/gen/models/FollowUp.mjs +2 -2
- package/solibo-sdk-sdk-api-follow-up/no/solibo/oss/sdk/api/gen/models/MeetingProtocolFollowUp.mjs +2 -2
- package/solibo-sdk-sdk-api-follow-up/no/solibo/oss/sdk/api/gen/models/SupplierInvoiceFollowUp.mjs +2 -2
- package/solibo-sdk-sdk-api-invoicing/no/solibo/oss/sdk/api/gen/models/CreateExternalCustomerCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-invoicing/no/solibo/oss/sdk/api/gen/models/CreateExternalOrganizationCustomerCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-invoicing/no/solibo/oss/sdk/api/gen/models/CreateExternalPersonCustomerCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/ResidentOperations.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/ResidentsApi.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/gen/models/CreateOrganizationResidentCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/gen/models/CreatePersonResidentCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/gen/models/CreateResidentCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/gen/models/UpdateOrganizationResidentCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/gen/models/UpdatePersonResidentCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-resident/no/solibo/oss/sdk/api/gen/models/UpdateResidentCommand.mjs +2 -2
- package/solibo-sdk-sdk-api-third-party-information/no/solibo/oss/sdk/api/gen/models/ThirdPartyInformationAltinnError.mjs +2 -2
- package/solibo-sdk-sdk-api-third-party-information/no/solibo/oss/sdk/api/gen/models/ThirdPartyInformationEmailError.mjs +2 -2
- package/solibo-sdk-sdk-api-third-party-information/no/solibo/oss/sdk/api/gen/models/ThirdPartyInformationError.mjs +2 -2
- package/solibo-sdk-sdk-api-third-party-information/no/solibo/oss/sdk/api/gen/models/ThirdPartyInformationPostenError.mjs +2 -2
- package/solibo-sdk-sdk-api-third-party-information/no/solibo/oss/sdk/api/gen/models/ThirdPartyInformationProcessError.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/Platform.js.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/SoliboSDKBase.mjs +1 -1
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/EventBus.export.d.mts +3 -1
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/EventBus.mjs +743 -69
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/EventBusAccess.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/EventBusSubscriptions.mjs +75 -25
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/HomeApiBase.export.d.mts +1 -0
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/HomeApiBase.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/infrastructure/ApiClient.mjs +1 -1
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/infrastructure/HttpResponse.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Ack.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/AckedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Attendance.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/AuthUser.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/BoardParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ClientUser.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ClientUserParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ConversationEventPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ConversationMessagePayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ConversationTypingPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ConversationUpdatedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Customer.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/DomainEventPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/EmployeeParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/EventBusErrorPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/GenericPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/HeartbeatPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/IncomingEventBusMessage.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/InquiryParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/OrganizationCustomer.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/OrganizationParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/OrganizationResident.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Participant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/PersonCustomer.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/PersonParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/PersonResident.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/PersonUser.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Ping.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Pong.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ReplayCompletePayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Resident.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ResidentRelationshipAggregate.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/ResidentRelationshipPeriod.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextAckedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextClose.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextErrorPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextOpen.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextOpenedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextPresence.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextPresencePayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextSyncedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextUpdate.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SharedTextUpdatePayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Subscribe.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SubscribedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SubscriptionEndedPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/SupplierContactParticipant.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Typing.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/Unsubscribe.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/api/gen/models/WebSocketPayload.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/auth/Auth.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/auth/SignInResult.mjs +2 -2
- package/solibo-sdk-sdk-core/no/solibo/oss/sdk/telemetry/SoliboOpenTelemetry.mjs +1 -1
- package/solibo-sdk-sdk.d.mts +22 -1
- package/solibo-cycles/kotlinx-coroutines-core-16.mjs +0 -5952
- package/solibo-cycles/kotlinx-io-kotlinx-io-core-19.mjs +0 -649
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-core-21.mjs +0 -4140
- package/solibo-cycles/kotlinx-serialization-kotlinx-serialization-json-25.mjs +0 -255
- package/solibo-cycles/ktor-ktor-client-core-28.mjs +0 -3147
- package/solibo-cycles/ktor-ktor-io-32.mjs +0 -3020
- package/solibo-cycles/ktor-ktor-utils-34.mjs +0 -601
- package/solibo-cycles/solibo-sdk-sdk-api-resident-42.mjs +0 -1398
- package/solibo-cycles/solibo-sdk-sdk-core-46.mjs +0 -2166
- /package/solibo-cycles/{KotlinBigInteger-bignum-15.mjs → KotlinBigInteger-bignum-16.mjs} +0 -0
- /package/solibo-cycles/{ktor-ktor-websockets-37.mjs → ktor-ktor-websockets-38.mjs} +0 -0
- /package/solibo-cycles/{solibo-sdk-sdk-api-communication-38.mjs → solibo-sdk-sdk-api-communication-39.mjs} +0 -0
- /package/solibo-cycles/{solibo-sdk-sdk-api-follow-up-40.mjs → solibo-sdk-sdk-api-follow-up-41.mjs} +0 -0
- /package/solibo-cycles/{solibo-sdk-sdk-api-invoicing-41.mjs → solibo-sdk-sdk-api-invoicing-42.mjs} +0 -0
- /package/solibo-cycles/{solibo-sdk-sdk-api-third-party-information-45.mjs → solibo-sdk-sdk-api-third-party-information-46.mjs} +0 -0
|
@@ -1,3020 +0,0 @@
|
|
|
1
|
-
// Generated by sdk/scripts/post-process-per-file.js from an import cycle of 5 files; see collapseCycles.
|
|
2
|
-
// build/packages/js/ktor-ktor-io/io/ktor/utils/io/ByteChannelScanner.mjs
|
|
3
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
4
|
-
import { IOException_init_$Create$1kq3iqv4goy5s as IOException_init_$Create$ } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/-PlatformJs.mjs";
|
|
5
|
-
import {
|
|
6
|
-
add2suhfggl4zvkk as add,
|
|
7
|
-
fromInt2ii0rejb1w62w as fromInt
|
|
8
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/internal/longAsBigInt/longAsBigInt.mjs";
|
|
9
|
-
import { decodeToString2ede220pr5xir as decodeToString } from "../kotlinx-io-kotlinx-io-bytestring/kotlinx/io/bytestring/ByteString.mjs";
|
|
10
|
-
import { replace3le3ie7l9k8aq as replace } from "../kotlin-kotlin-stdlib/kotlin/text/stringsCode.mjs";
|
|
11
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
12
|
-
import { VOID3gxj6tk5isa35 as VOID } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
13
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
14
|
-
import {
|
|
15
|
-
protoOf180f3jzyo7rfj as protoOf,
|
|
16
|
-
toString1pkumu07cwy4m as toString
|
|
17
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
18
|
-
import {
|
|
19
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
|
|
20
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass
|
|
21
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
22
|
-
import { indexOf29nspdgx2e3ap as indexOf } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/Sources.mjs";
|
|
23
|
-
import { THROW_CCE2g6jy02ryeudk as THROW_CCE } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
24
|
-
import { Buffergs925ekssbch as Buffer } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/Buffer.mjs";
|
|
25
|
-
import { get_ONEazvfdh9ju3d4 as get_ONE } from "../kotlin-kotlin-stdlib/kotlin/js/internal/boxedLong/boxedLong.mjs";
|
|
26
|
-
import { IllegalArgumentException_init_$Create$1gox8sdqs91jy as IllegalArgumentException_init_$Create$ } from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
27
|
-
function buildPartialMatchTable($this) {
|
|
28
|
-
var table = new Int32Array($this.matchString_1.get_size_woubt6_k$());
|
|
29
|
-
var j = 0;
|
|
30
|
-
var inductionVariable = 1;
|
|
31
|
-
var last = $this.matchString_1.get_size_woubt6_k$();
|
|
32
|
-
if (inductionVariable < last)
|
|
33
|
-
do {
|
|
34
|
-
var i = inductionVariable;
|
|
35
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
36
|
-
while (j > 0 && !($this.matchString_1.get_c1px32_k$(i) === $this.matchString_1.get_c1px32_k$(j))) {
|
|
37
|
-
j = table[j - 1 | 0];
|
|
38
|
-
}
|
|
39
|
-
if ($this.matchString_1.get_c1px32_k$(i) === $this.matchString_1.get_c1px32_k$(j)) {
|
|
40
|
-
j = j + 1 | 0;
|
|
41
|
-
}
|
|
42
|
-
table[i] = j;
|
|
43
|
-
} while (inductionVariable < last);
|
|
44
|
-
return table;
|
|
45
|
-
}
|
|
46
|
-
function advanceToNextPotentialMatch($this, $completion) {
|
|
47
|
-
var tmp = new ($advanceToNextPotentialMatchCOROUTINE$())($this, $completion);
|
|
48
|
-
tmp.result_1 = Unit_instance;
|
|
49
|
-
tmp.exception_1 = null;
|
|
50
|
-
return tmp.doResume_5yljmg_k$();
|
|
51
|
-
}
|
|
52
|
-
function checkFullMatch($this, $completion) {
|
|
53
|
-
var tmp = new ($checkFullMatchCOROUTINE$())($this, $completion);
|
|
54
|
-
tmp.result_1 = Unit_instance;
|
|
55
|
-
tmp.exception_1 = null;
|
|
56
|
-
return tmp.doResume_5yljmg_k$();
|
|
57
|
-
}
|
|
58
|
-
function checkBounds($this, extra) {
|
|
59
|
-
if (add($this.bytesRead_1, extra) > $this.limit_1) {
|
|
60
|
-
throw IOException_init_$Create$("Limit of " + $this.limit_1.toString() + " bytes exceeded " + ('while searching for "' + toSingleLineString($this, $this.matchString_1) + '"'));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function toSingleLineString($this, $receiver) {
|
|
64
|
-
return replace(decodeToString($receiver), "\n", "\\n");
|
|
65
|
-
}
|
|
66
|
-
var $findNextCOROUTINE$Class;
|
|
67
|
-
function $findNextCOROUTINE$() {
|
|
68
|
-
if ($findNextCOROUTINE$Class === VOID) {
|
|
69
|
-
let $ = function(_this__u8e3s4, ignoreMissing, resultContinuation) {
|
|
70
|
-
CoroutineImpl().call(this, resultContinuation);
|
|
71
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
72
|
-
this.ignoreMissing_1 = ignoreMissing;
|
|
73
|
-
};
|
|
74
|
-
initMetadataForCoroutine($, CoroutineImpl());
|
|
75
|
-
protoOf($).doResume_5yljmg_k$ = function() {
|
|
76
|
-
var suspendResult = this.result_1;
|
|
77
|
-
$sm: do
|
|
78
|
-
try {
|
|
79
|
-
var tmp = this.state_1;
|
|
80
|
-
switch (tmp) {
|
|
81
|
-
case 0:
|
|
82
|
-
this.exceptionState_1 = 9;
|
|
83
|
-
this._this__u8e3s4__1.bytesRead_1 = 0n;
|
|
84
|
-
this.state_1 = 1;
|
|
85
|
-
continue $sm;
|
|
86
|
-
case 1:
|
|
87
|
-
if (!this._this__u8e3s4__1.input_1.exhausted_p1jt55_k$()) {
|
|
88
|
-
this.WHEN_RESULT0__1 = true;
|
|
89
|
-
this.state_1 = 3;
|
|
90
|
-
continue $sm;
|
|
91
|
-
} else {
|
|
92
|
-
this.state_1 = 2;
|
|
93
|
-
suspendResult = this._this__u8e3s4__1.channel_1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
94
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
95
|
-
return suspendResult;
|
|
96
|
-
}
|
|
97
|
-
continue $sm;
|
|
98
|
-
}
|
|
99
|
-
case 2:
|
|
100
|
-
this.WHEN_RESULT0__1 = suspendResult;
|
|
101
|
-
this.state_1 = 3;
|
|
102
|
-
continue $sm;
|
|
103
|
-
case 3:
|
|
104
|
-
if (!this.WHEN_RESULT0__1) {
|
|
105
|
-
this.state_1 = 7;
|
|
106
|
-
continue $sm;
|
|
107
|
-
}
|
|
108
|
-
this.state_1 = 4;
|
|
109
|
-
suspendResult = advanceToNextPotentialMatch(this._this__u8e3s4__1, this);
|
|
110
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
111
|
-
return suspendResult;
|
|
112
|
-
}
|
|
113
|
-
continue $sm;
|
|
114
|
-
case 4:
|
|
115
|
-
this.state_1 = 5;
|
|
116
|
-
suspendResult = checkFullMatch(this._this__u8e3s4__1, this);
|
|
117
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
118
|
-
return suspendResult;
|
|
119
|
-
}
|
|
120
|
-
continue $sm;
|
|
121
|
-
case 5:
|
|
122
|
-
if (suspendResult) {
|
|
123
|
-
return this._this__u8e3s4__1.bytesRead_1;
|
|
124
|
-
} else {
|
|
125
|
-
this.state_1 = 6;
|
|
126
|
-
continue $sm;
|
|
127
|
-
}
|
|
128
|
-
case 6:
|
|
129
|
-
this.state_1 = 1;
|
|
130
|
-
continue $sm;
|
|
131
|
-
case 7:
|
|
132
|
-
if (!this.ignoreMissing_1) {
|
|
133
|
-
throw IOException_init_$Create$('Expected "' + toSingleLineString(this._this__u8e3s4__1, this._this__u8e3s4__1.matchString_1) + '" but encountered end of input');
|
|
134
|
-
}
|
|
135
|
-
this._this__u8e3s4__1.bytesRead_1 = add(this._this__u8e3s4__1.bytesRead_1, this._this__u8e3s4__1.partialMatchBuffer_1.transferTo_lu4ka2_k$(this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$()));
|
|
136
|
-
this.state_1 = 8;
|
|
137
|
-
suspendResult = this._this__u8e3s4__1.writeChannel_1.flush_4wsz1p_k$(this);
|
|
138
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
139
|
-
return suspendResult;
|
|
140
|
-
}
|
|
141
|
-
continue $sm;
|
|
142
|
-
case 8:
|
|
143
|
-
return this._this__u8e3s4__1.bytesRead_1;
|
|
144
|
-
case 9:
|
|
145
|
-
throw this.exception_1;
|
|
146
|
-
}
|
|
147
|
-
} catch ($p) {
|
|
148
|
-
var e = $p;
|
|
149
|
-
if (this.exceptionState_1 === 9) {
|
|
150
|
-
throw e;
|
|
151
|
-
} else {
|
|
152
|
-
this.state_1 = this.exceptionState_1;
|
|
153
|
-
this.exception_1 = e;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
while (true);
|
|
157
|
-
};
|
|
158
|
-
$findNextCOROUTINE$Class = $;
|
|
159
|
-
}
|
|
160
|
-
return $findNextCOROUTINE$Class;
|
|
161
|
-
}
|
|
162
|
-
var $advanceToNextPotentialMatchCOROUTINE$Class;
|
|
163
|
-
function $advanceToNextPotentialMatchCOROUTINE$() {
|
|
164
|
-
if ($advanceToNextPotentialMatchCOROUTINE$Class === VOID) {
|
|
165
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
166
|
-
CoroutineImpl().call(this, resultContinuation);
|
|
167
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
168
|
-
};
|
|
169
|
-
initMetadataForCoroutine($, CoroutineImpl());
|
|
170
|
-
protoOf($).doResume_5yljmg_k$ = function() {
|
|
171
|
-
var suspendResult = this.result_1;
|
|
172
|
-
$sm: do
|
|
173
|
-
try {
|
|
174
|
-
var tmp = this.state_1;
|
|
175
|
-
switch (tmp) {
|
|
176
|
-
case 0:
|
|
177
|
-
this.exceptionState_1 = 8;
|
|
178
|
-
this.state_1 = 1;
|
|
179
|
-
continue $sm;
|
|
180
|
-
case 1:
|
|
181
|
-
if (!this._this__u8e3s4__1.input_1.exhausted_p1jt55_k$()) {
|
|
182
|
-
this.WHEN_RESULT0__1 = true;
|
|
183
|
-
this.state_1 = 3;
|
|
184
|
-
continue $sm;
|
|
185
|
-
} else {
|
|
186
|
-
this.state_1 = 2;
|
|
187
|
-
suspendResult = this._this__u8e3s4__1.channel_1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
188
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
189
|
-
return suspendResult;
|
|
190
|
-
}
|
|
191
|
-
continue $sm;
|
|
192
|
-
}
|
|
193
|
-
case 2:
|
|
194
|
-
this.WHEN_RESULT0__1 = suspendResult;
|
|
195
|
-
this.state_1 = 3;
|
|
196
|
-
continue $sm;
|
|
197
|
-
case 3:
|
|
198
|
-
if (!this.WHEN_RESULT0__1) {
|
|
199
|
-
this.state_1 = 7;
|
|
200
|
-
continue $sm;
|
|
201
|
-
}
|
|
202
|
-
var nextMatch = indexOf(this._this__u8e3s4__1.input_1, this._this__u8e3s4__1.matchString_1.get_c1px32_k$(0));
|
|
203
|
-
if (nextMatch === -1n) {
|
|
204
|
-
var tmp_0 = this._this__u8e3s4__1.input_1;
|
|
205
|
-
checkBounds(this._this__u8e3s4__1, (tmp_0 instanceof Buffer() ? tmp_0 : THROW_CCE()).get_size_woubt6_k$());
|
|
206
|
-
this._this__u8e3s4__1.bytesRead_1 = add(this._this__u8e3s4__1.bytesRead_1, this._this__u8e3s4__1.input_1.transferTo_lu4ka2_k$(this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$()));
|
|
207
|
-
this.state_1 = 5;
|
|
208
|
-
suspendResult = flushIfNeeded(this._this__u8e3s4__1.writeChannel_1, this);
|
|
209
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
210
|
-
return suspendResult;
|
|
211
|
-
}
|
|
212
|
-
continue $sm;
|
|
213
|
-
} else {
|
|
214
|
-
checkBounds(this._this__u8e3s4__1, nextMatch);
|
|
215
|
-
var tmp_1 = this._this__u8e3s4__1;
|
|
216
|
-
var tmp_2 = this._this__u8e3s4__1.bytesRead_1;
|
|
217
|
-
var tmp_3 = this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$();
|
|
218
|
-
tmp_1.bytesRead_1 = add(tmp_2, this._this__u8e3s4__1.input_1.readAtMostTo_4oop6l_k$(tmp_3 instanceof Buffer() ? tmp_3 : THROW_CCE(), nextMatch));
|
|
219
|
-
this.state_1 = 4;
|
|
220
|
-
suspendResult = flushIfNeeded(this._this__u8e3s4__1.writeChannel_1, this);
|
|
221
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
222
|
-
return suspendResult;
|
|
223
|
-
}
|
|
224
|
-
continue $sm;
|
|
225
|
-
}
|
|
226
|
-
case 4:
|
|
227
|
-
return Unit_instance;
|
|
228
|
-
case 5:
|
|
229
|
-
this.state_1 = 6;
|
|
230
|
-
continue $sm;
|
|
231
|
-
case 6:
|
|
232
|
-
this.state_1 = 1;
|
|
233
|
-
continue $sm;
|
|
234
|
-
case 7:
|
|
235
|
-
return Unit_instance;
|
|
236
|
-
case 8:
|
|
237
|
-
throw this.exception_1;
|
|
238
|
-
}
|
|
239
|
-
} catch ($p) {
|
|
240
|
-
var e = $p;
|
|
241
|
-
if (this.exceptionState_1 === 8) {
|
|
242
|
-
throw e;
|
|
243
|
-
} else {
|
|
244
|
-
this.state_1 = this.exceptionState_1;
|
|
245
|
-
this.exception_1 = e;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
while (true);
|
|
249
|
-
};
|
|
250
|
-
$advanceToNextPotentialMatchCOROUTINE$Class = $;
|
|
251
|
-
}
|
|
252
|
-
return $advanceToNextPotentialMatchCOROUTINE$Class;
|
|
253
|
-
}
|
|
254
|
-
var $checkFullMatchCOROUTINE$Class;
|
|
255
|
-
function $checkFullMatchCOROUTINE$() {
|
|
256
|
-
if ($checkFullMatchCOROUTINE$Class === VOID) {
|
|
257
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
258
|
-
CoroutineImpl().call(this, resultContinuation);
|
|
259
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
260
|
-
};
|
|
261
|
-
initMetadataForCoroutine($, CoroutineImpl());
|
|
262
|
-
protoOf($).doResume_5yljmg_k$ = function() {
|
|
263
|
-
var suspendResult = this.result_1;
|
|
264
|
-
$sm: do
|
|
265
|
-
try {
|
|
266
|
-
var tmp = this.state_1;
|
|
267
|
-
switch (tmp) {
|
|
268
|
-
case 0:
|
|
269
|
-
this.exceptionState_1 = 8;
|
|
270
|
-
this.state_1 = 1;
|
|
271
|
-
continue $sm;
|
|
272
|
-
case 1:
|
|
273
|
-
if (!this._this__u8e3s4__1.input_1.exhausted_p1jt55_k$()) {
|
|
274
|
-
this.WHEN_RESULT1__1 = true;
|
|
275
|
-
this.state_1 = 3;
|
|
276
|
-
continue $sm;
|
|
277
|
-
} else {
|
|
278
|
-
this.state_1 = 2;
|
|
279
|
-
suspendResult = this._this__u8e3s4__1.channel_1.awaitContent$default_rxihsg_k$(VOID, this);
|
|
280
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
281
|
-
return suspendResult;
|
|
282
|
-
}
|
|
283
|
-
continue $sm;
|
|
284
|
-
}
|
|
285
|
-
case 2:
|
|
286
|
-
this.WHEN_RESULT1__1 = suspendResult;
|
|
287
|
-
this.state_1 = 3;
|
|
288
|
-
continue $sm;
|
|
289
|
-
case 3:
|
|
290
|
-
if (!this.WHEN_RESULT1__1) {
|
|
291
|
-
this.state_1 = 7;
|
|
292
|
-
continue $sm;
|
|
293
|
-
}
|
|
294
|
-
this.byte0__1 = this._this__u8e3s4__1.input_1.readByte_ectjk2_k$();
|
|
295
|
-
if (this._this__u8e3s4__1.matchIndex_1 > 0 && !(this.byte0__1 === this._this__u8e3s4__1.matchString_1.get_c1px32_k$(this._this__u8e3s4__1.matchIndex_1))) {
|
|
296
|
-
var oldMatchIndex = this._this__u8e3s4__1.matchIndex_1;
|
|
297
|
-
while (this._this__u8e3s4__1.matchIndex_1 > 0 && !(this.byte0__1 === this._this__u8e3s4__1.matchString_1.get_c1px32_k$(this._this__u8e3s4__1.matchIndex_1))) {
|
|
298
|
-
this._this__u8e3s4__1.matchIndex_1 = this._this__u8e3s4__1.partialMatchTable_1[this._this__u8e3s4__1.matchIndex_1 - 1 | 0];
|
|
299
|
-
}
|
|
300
|
-
var retained = fromInt(oldMatchIndex - this._this__u8e3s4__1.matchIndex_1 | 0);
|
|
301
|
-
checkBounds(this._this__u8e3s4__1, retained);
|
|
302
|
-
var tmp_0 = this._this__u8e3s4__1;
|
|
303
|
-
var tmp_1 = this._this__u8e3s4__1.bytesRead_1;
|
|
304
|
-
var tmp_2 = this._this__u8e3s4__1.writeChannel_1.get_writeBuffer_t7kuc6_k$();
|
|
305
|
-
tmp_0.bytesRead_1 = add(tmp_1, this._this__u8e3s4__1.partialMatchBuffer_1.readAtMostTo_4oop6l_k$(tmp_2 instanceof Buffer() ? tmp_2 : THROW_CCE(), retained));
|
|
306
|
-
if (this._this__u8e3s4__1.matchIndex_1 === 0 && !(this.byte0__1 === this._this__u8e3s4__1.matchString_1.get_c1px32_k$(this._this__u8e3s4__1.matchIndex_1))) {
|
|
307
|
-
this.state_1 = 6;
|
|
308
|
-
suspendResult = writeByte(this._this__u8e3s4__1.writeChannel_1, this.byte0__1, this);
|
|
309
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
310
|
-
return suspendResult;
|
|
311
|
-
}
|
|
312
|
-
continue $sm;
|
|
313
|
-
} else {
|
|
314
|
-
this.state_1 = 4;
|
|
315
|
-
continue $sm;
|
|
316
|
-
}
|
|
317
|
-
} else {
|
|
318
|
-
this.state_1 = 5;
|
|
319
|
-
continue $sm;
|
|
320
|
-
}
|
|
321
|
-
case 4:
|
|
322
|
-
this.state_1 = 5;
|
|
323
|
-
continue $sm;
|
|
324
|
-
case 5:
|
|
325
|
-
this._this__u8e3s4__1.matchIndex_1 = this._this__u8e3s4__1.matchIndex_1 + 1 | 0;
|
|
326
|
-
if (this._this__u8e3s4__1.matchIndex_1 === this._this__u8e3s4__1.matchString_1.get_size_woubt6_k$()) {
|
|
327
|
-
return true;
|
|
328
|
-
}
|
|
329
|
-
this._this__u8e3s4__1.partialMatchBuffer_1.writeByte_9ih3z3_k$(this.byte0__1);
|
|
330
|
-
this.state_1 = 1;
|
|
331
|
-
continue $sm;
|
|
332
|
-
case 6:
|
|
333
|
-
var _unary__edvuaz = this._this__u8e3s4__1.bytesRead_1;
|
|
334
|
-
this._this__u8e3s4__1.bytesRead_1 = add(_unary__edvuaz, get_ONE());
|
|
335
|
-
return false;
|
|
336
|
-
case 7:
|
|
337
|
-
return false;
|
|
338
|
-
case 8:
|
|
339
|
-
throw this.exception_1;
|
|
340
|
-
}
|
|
341
|
-
} catch ($p) {
|
|
342
|
-
var e = $p;
|
|
343
|
-
if (this.exceptionState_1 === 8) {
|
|
344
|
-
throw e;
|
|
345
|
-
} else {
|
|
346
|
-
this.state_1 = this.exceptionState_1;
|
|
347
|
-
this.exception_1 = e;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
while (true);
|
|
351
|
-
};
|
|
352
|
-
$checkFullMatchCOROUTINE$Class = $;
|
|
353
|
-
}
|
|
354
|
-
return $checkFullMatchCOROUTINE$Class;
|
|
355
|
-
}
|
|
356
|
-
var ByteChannelScannerClass;
|
|
357
|
-
function ByteChannelScanner() {
|
|
358
|
-
if (ByteChannelScannerClass === VOID) {
|
|
359
|
-
let $ = function(channel, matchString, writeChannel, limit) {
|
|
360
|
-
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
361
|
-
this.channel_1 = channel;
|
|
362
|
-
this.matchString_1 = matchString;
|
|
363
|
-
this.writeChannel_1 = writeChannel;
|
|
364
|
-
this.limit_1 = limit;
|
|
365
|
-
if (!(this.matchString_1.get_size_woubt6_k$() > 0)) {
|
|
366
|
-
var message = "Empty match string not permitted for scanning";
|
|
367
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
368
|
-
}
|
|
369
|
-
this.input_1 = this.channel_1.get_readBuffer_yjmj9b_k$();
|
|
370
|
-
this.partialMatchTable_1 = buildPartialMatchTable(this);
|
|
371
|
-
this.partialMatchBuffer_1 = new (Buffer())();
|
|
372
|
-
this.bytesRead_1 = 0n;
|
|
373
|
-
this.matchIndex_1 = 0;
|
|
374
|
-
};
|
|
375
|
-
initMetadataForClass($, "ByteChannelScanner", VOID, VOID, VOID, [1, 0]);
|
|
376
|
-
protoOf($).findNext_k7w4m8_k$ = function(ignoreMissing, $completion) {
|
|
377
|
-
var tmp = new ($findNextCOROUTINE$())(this, ignoreMissing, $completion);
|
|
378
|
-
tmp.result_1 = Unit_instance;
|
|
379
|
-
tmp.exception_1 = null;
|
|
380
|
-
return tmp.doResume_5yljmg_k$();
|
|
381
|
-
};
|
|
382
|
-
ByteChannelScannerClass = $;
|
|
383
|
-
}
|
|
384
|
-
return ByteChannelScannerClass;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// build/packages/js/ktor-ktor-io/io/ktor/utils/io/ByteReadChannelOperations.mjs
|
|
388
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance2 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
389
|
-
import { VOID3gxj6tk5isa35 as VOID2 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
390
|
-
import {
|
|
391
|
-
LineEnding_Default_getInstance1v5asezcrl1hi as LineEnding_Default_getInstance,
|
|
392
|
-
LineEnding_Lenient_getInstance1bc8w98h8if6n as LineEnding_Lenient_getInstance
|
|
393
|
-
} from "../ktor-ktor-io/io/ktor/utils/io/LineEnding.mjs";
|
|
394
|
-
import {
|
|
395
|
-
toString1pkumu07cwy4m as toString2,
|
|
396
|
-
protoOf180f3jzyo7rfj as protoOf2,
|
|
397
|
-
equals2au1ep9vhcato as equals
|
|
398
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
399
|
-
import {
|
|
400
|
-
IllegalArgumentException_init_$Create$1gox8sdqs91jy as IllegalArgumentException_init_$Create$2,
|
|
401
|
-
IllegalStateException_init_$Create$38ax6c90susjc as IllegalStateException_init_$Create$
|
|
402
|
-
} from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
403
|
-
import {
|
|
404
|
-
convertToInty04h231mmjoh as convertToInt,
|
|
405
|
-
add2suhfggl4zvkk as add2,
|
|
406
|
-
fromInt2ii0rejb1w62w as fromInt2,
|
|
407
|
-
subtract2orl8z9upxd9l as subtract,
|
|
408
|
-
numberToLong2pakxeg38estk as numberToLong
|
|
409
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/internal/longAsBigInt/longAsBigInt.mjs";
|
|
410
|
-
import { EOFException_init_$Create$1dnh68zpaekzl as EOFException_init_$Create$ } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/-PlatformJs.mjs";
|
|
411
|
-
import { TooLongLineException2d6ls946t46wx as TooLongLineException } from "../ktor-ktor-io/io/ktor/utils/io/charsets/Encoding.mjs";
|
|
412
|
-
import { Buffergs925ekssbch as Buffer2 } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/Buffer.mjs";
|
|
413
|
-
import {
|
|
414
|
-
readString3v6duspiz33tv as readString,
|
|
415
|
-
readStringo8i62qxt5m4m as readString_0
|
|
416
|
-
} from "../kotlinx-io-kotlinx-io-core/kotlinx/io/Utf8.mjs";
|
|
417
|
-
import {
|
|
418
|
-
get_remaining1lapv95kcmm0y as get_remaining,
|
|
419
|
-
discard3ugntd47xyll6 as discard
|
|
420
|
-
} from "../ktor-ktor-io/io/ktor/utils/io/core/ByteReadPacket.mjs";
|
|
421
|
-
import { indexOf29nspdgx2e3ap as indexOf2 } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/Sources.mjs";
|
|
422
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl2 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
423
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED2 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
424
|
-
import { initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine2 } from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
425
|
-
import { readAvailable27gpepp0hyyts as readAvailable } from "../ktor-ktor-io/io/ktor/utils/io/core/Input.mjs";
|
|
426
|
-
import { readBytesj5m5qe40si0k as readBytes } from "../ktor-ktor-io/io/ktor/utils/io/core/Buffers.mjs";
|
|
427
|
-
import { readByteString2hnsbql6t4ads as readByteString } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/ByteStrings.mjs";
|
|
428
|
-
function readBuffer(_this__u8e3s4, $completion) {
|
|
429
|
-
var tmp = new ($readBufferCOROUTINE$())(_this__u8e3s4, $completion);
|
|
430
|
-
tmp.result_1 = Unit_instance2;
|
|
431
|
-
tmp.exception_1 = null;
|
|
432
|
-
return tmp.doResume_5yljmg_k$();
|
|
433
|
-
}
|
|
434
|
-
function readAvailable_0(_this__u8e3s4, buffer, offset, length, $completion) {
|
|
435
|
-
offset = offset === VOID2 ? 0 : offset;
|
|
436
|
-
length = length === VOID2 ? buffer.length - offset | 0 : length;
|
|
437
|
-
var tmp = new ($readAvailableCOROUTINE$())(_this__u8e3s4, buffer, offset, length, $completion);
|
|
438
|
-
tmp.result_1 = Unit_instance2;
|
|
439
|
-
tmp.exception_1 = null;
|
|
440
|
-
return tmp.doResume_5yljmg_k$();
|
|
441
|
-
}
|
|
442
|
-
function toByteArray(_this__u8e3s4, $completion) {
|
|
443
|
-
var tmp = new ($toByteArrayCOROUTINE$())(_this__u8e3s4, $completion);
|
|
444
|
-
tmp.result_1 = Unit_instance2;
|
|
445
|
-
tmp.exception_1 = null;
|
|
446
|
-
return tmp.doResume_5yljmg_k$();
|
|
447
|
-
}
|
|
448
|
-
function copyTo(_this__u8e3s4, channel, limit, $completion) {
|
|
449
|
-
var tmp = new ($copyToCOROUTINE$())(_this__u8e3s4, channel, limit, $completion);
|
|
450
|
-
tmp.result_1 = Unit_instance2;
|
|
451
|
-
tmp.exception_1 = null;
|
|
452
|
-
return tmp.doResume_5yljmg_k$();
|
|
453
|
-
}
|
|
454
|
-
function rethrowCloseCauseIfNeeded(_this__u8e3s4) {
|
|
455
|
-
var tmp0_safe_receiver = _this__u8e3s4.get_closedCause_o1qcj8_k$();
|
|
456
|
-
if (tmp0_safe_receiver == null)
|
|
457
|
-
null;
|
|
458
|
-
else {
|
|
459
|
-
throw tmp0_safe_receiver;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
function discard_0(_this__u8e3s4, max, $completion) {
|
|
463
|
-
max = max === VOID2 ? 9223372036854775807n : max;
|
|
464
|
-
var tmp = new ($discardCOROUTINE$())(_this__u8e3s4, max, $completion);
|
|
465
|
-
tmp.result_1 = Unit_instance2;
|
|
466
|
-
tmp.exception_1 = null;
|
|
467
|
-
return tmp.doResume_5yljmg_k$();
|
|
468
|
-
}
|
|
469
|
-
function copyTo_0(_this__u8e3s4, channel, $completion) {
|
|
470
|
-
var tmp = new ($copyToCOROUTINE$_0())(_this__u8e3s4, channel, $completion);
|
|
471
|
-
tmp.result_1 = Unit_instance2;
|
|
472
|
-
tmp.exception_1 = null;
|
|
473
|
-
return tmp.doResume_5yljmg_k$();
|
|
474
|
-
}
|
|
475
|
-
function skipIfFound(_this__u8e3s4, byteString, $completion) {
|
|
476
|
-
var tmp = new ($skipIfFoundCOROUTINE$())(_this__u8e3s4, byteString, $completion);
|
|
477
|
-
tmp.result_1 = Unit_instance2;
|
|
478
|
-
tmp.exception_1 = null;
|
|
479
|
-
return tmp.doResume_5yljmg_k$();
|
|
480
|
-
}
|
|
481
|
-
function readPacket(_this__u8e3s4, packet, $completion) {
|
|
482
|
-
var tmp = new ($readPacketCOROUTINE$())(_this__u8e3s4, packet, $completion);
|
|
483
|
-
tmp.result_1 = Unit_instance2;
|
|
484
|
-
tmp.exception_1 = null;
|
|
485
|
-
return tmp.doResume_5yljmg_k$();
|
|
486
|
-
}
|
|
487
|
-
function readUntil(_this__u8e3s4, matchString, writeChannel, limit, ignoreMissing, $completion) {
|
|
488
|
-
limit = limit === VOID2 ? 9223372036854775807n : limit;
|
|
489
|
-
ignoreMissing = ignoreMissing === VOID2 ? false : ignoreMissing;
|
|
490
|
-
return new (ByteChannelScanner())(_this__u8e3s4, matchString, writeChannel, limit).findNext_k7w4m8_k$(ignoreMissing, $completion);
|
|
491
|
-
}
|
|
492
|
-
function readLineStrictTo(_this__u8e3s4, out, limit, lineEnding, $completion) {
|
|
493
|
-
limit = limit === VOID2 ? 9223372036854775807n : limit;
|
|
494
|
-
lineEnding = lineEnding === VOID2 ? LineEnding_Default_getInstance() : lineEnding;
|
|
495
|
-
if (!(limit >= 0n)) {
|
|
496
|
-
var message = "Limit (" + limit.toString() + ") should be non-negative";
|
|
497
|
-
throw IllegalArgumentException_init_$Create$2(toString2(message));
|
|
498
|
-
}
|
|
499
|
-
return internalReadLineTo(_this__u8e3s4, out, limit, lineEnding.equals(LineEnding_Lenient_getInstance()), true, $completion);
|
|
500
|
-
}
|
|
501
|
-
function readBuffer_0(_this__u8e3s4, max, $completion) {
|
|
502
|
-
var tmp = new ($readBufferCOROUTINE$_0())(_this__u8e3s4, max, $completion);
|
|
503
|
-
tmp.result_1 = Unit_instance2;
|
|
504
|
-
tmp.exception_1 = null;
|
|
505
|
-
return tmp.doResume_5yljmg_k$();
|
|
506
|
-
}
|
|
507
|
-
function get_availableForRead(_this__u8e3s4) {
|
|
508
|
-
return convertToInt(_this__u8e3s4.get_readBuffer_yjmj9b_k$().get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
509
|
-
}
|
|
510
|
-
function peek(_this__u8e3s4, count, $completion) {
|
|
511
|
-
var tmp = new ($peekCOROUTINE$())(_this__u8e3s4, count, $completion);
|
|
512
|
-
tmp.result_1 = Unit_instance2;
|
|
513
|
-
tmp.exception_1 = null;
|
|
514
|
-
return tmp.doResume_5yljmg_k$();
|
|
515
|
-
}
|
|
516
|
-
function internalReadLineTo(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion) {
|
|
517
|
-
var tmp = new ($internalReadLineToCOROUTINE$())(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion);
|
|
518
|
-
tmp.result_1 = Unit_instance2;
|
|
519
|
-
tmp.exception_1 = null;
|
|
520
|
-
return tmp.doResume_5yljmg_k$();
|
|
521
|
-
}
|
|
522
|
-
function throwEndOfStreamException(consumed) {
|
|
523
|
-
throw EOFException_init_$Create$("Unexpected end of stream after reading " + consumed.toString() + " bytes");
|
|
524
|
-
}
|
|
525
|
-
function throwTooLongLineException(limit) {
|
|
526
|
-
throw new (TooLongLineException())("Line exceeds limit of " + limit.toString() + " bytes");
|
|
527
|
-
}
|
|
528
|
-
function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
|
|
529
|
-
var tmp0_safe_receiver = _this__u8e3s4.get_closedCause_o1qcj8_k$();
|
|
530
|
-
if (tmp0_safe_receiver == null)
|
|
531
|
-
null;
|
|
532
|
-
else {
|
|
533
|
-
throw tmp0_safe_receiver;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
function internalReadLineTo$bufferBytes(outBuffer, readBuffer2, consumed, count) {
|
|
537
|
-
if (count > 0n) {
|
|
538
|
-
if (outBuffer._v == null) {
|
|
539
|
-
outBuffer._v = new (Buffer2())();
|
|
540
|
-
}
|
|
541
|
-
outBuffer._v.write_9ocf0z_k$(readBuffer2, count);
|
|
542
|
-
consumed._v = add2(consumed._v, count);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
function internalReadLineTo$appendOrBuffer(outBuffer, $out, readBuffer2, consumed, count) {
|
|
546
|
-
if (outBuffer._v == null) {
|
|
547
|
-
if (count > 0n) {
|
|
548
|
-
$out.append_jgojdo_k$(readString(readBuffer2, count));
|
|
549
|
-
consumed._v = add2(consumed._v, count);
|
|
550
|
-
}
|
|
551
|
-
} else {
|
|
552
|
-
internalReadLineTo$bufferBytes(outBuffer, readBuffer2, consumed, count);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
function internalReadLineTo$scanForSoleCr(_this__u8e3s4, $lenientLineEnding, lfIndex, limitLeft) {
|
|
556
|
-
if (!$lenientLineEnding)
|
|
557
|
-
return -1n;
|
|
558
|
-
var tmp;
|
|
559
|
-
if (lfIndex === -1n) {
|
|
560
|
-
var this_0 = get_remaining(_this__u8e3s4);
|
|
561
|
-
var b = subtract(this_0, fromInt2(1));
|
|
562
|
-
tmp = limitLeft <= b ? limitLeft : b;
|
|
563
|
-
} else if (lfIndex === 0n) {
|
|
564
|
-
tmp = 0n;
|
|
565
|
-
} else {
|
|
566
|
-
tmp = subtract(lfIndex, fromInt2(1));
|
|
567
|
-
}
|
|
568
|
-
var endIndex = tmp;
|
|
569
|
-
return indexOf2(_this__u8e3s4, 13, VOID2, endIndex);
|
|
570
|
-
}
|
|
571
|
-
function internalReadLineTo$discardCrlfOrCr(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion) {
|
|
572
|
-
var tmp = new ($internalReadLineTo$discardCrlfOrCrCOROUTINE$())(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion);
|
|
573
|
-
tmp.result_1 = Unit_instance2;
|
|
574
|
-
tmp.exception_1 = null;
|
|
575
|
-
return tmp.doResume_5yljmg_k$();
|
|
576
|
-
}
|
|
577
|
-
var $readBufferCOROUTINE$Class;
|
|
578
|
-
function $readBufferCOROUTINE$() {
|
|
579
|
-
if ($readBufferCOROUTINE$Class === VOID2) {
|
|
580
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
581
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
582
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
583
|
-
};
|
|
584
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
585
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
586
|
-
var suspendResult = this.result_1;
|
|
587
|
-
$sm: do
|
|
588
|
-
try {
|
|
589
|
-
var tmp = this.state_1;
|
|
590
|
-
switch (tmp) {
|
|
591
|
-
case 0:
|
|
592
|
-
this.exceptionState_1 = 5;
|
|
593
|
-
this.result0__1 = new (Buffer2())();
|
|
594
|
-
this.state_1 = 1;
|
|
595
|
-
continue $sm;
|
|
596
|
-
case 1:
|
|
597
|
-
if (!!this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
598
|
-
this.state_1 = 4;
|
|
599
|
-
continue $sm;
|
|
600
|
-
}
|
|
601
|
-
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
602
|
-
this.state_1 = 2;
|
|
603
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
604
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
605
|
-
return suspendResult;
|
|
606
|
-
}
|
|
607
|
-
continue $sm;
|
|
608
|
-
} else {
|
|
609
|
-
this.state_1 = 3;
|
|
610
|
-
continue $sm;
|
|
611
|
-
}
|
|
612
|
-
case 2:
|
|
613
|
-
this.state_1 = 3;
|
|
614
|
-
continue $sm;
|
|
615
|
-
case 3:
|
|
616
|
-
this.result0__1.transferFrom_v29myr_k$(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
617
|
-
this.state_1 = 1;
|
|
618
|
-
continue $sm;
|
|
619
|
-
case 4:
|
|
620
|
-
rethrowCloseCauseIfNeeded(this._this__u8e3s4__1);
|
|
621
|
-
return this.result0__1;
|
|
622
|
-
case 5:
|
|
623
|
-
throw this.exception_1;
|
|
624
|
-
}
|
|
625
|
-
} catch ($p) {
|
|
626
|
-
var e = $p;
|
|
627
|
-
if (this.exceptionState_1 === 5) {
|
|
628
|
-
throw e;
|
|
629
|
-
} else {
|
|
630
|
-
this.state_1 = this.exceptionState_1;
|
|
631
|
-
this.exception_1 = e;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
while (true);
|
|
635
|
-
};
|
|
636
|
-
$readBufferCOROUTINE$Class = $;
|
|
637
|
-
}
|
|
638
|
-
return $readBufferCOROUTINE$Class;
|
|
639
|
-
}
|
|
640
|
-
var $readAvailableCOROUTINE$Class;
|
|
641
|
-
function $readAvailableCOROUTINE$() {
|
|
642
|
-
if ($readAvailableCOROUTINE$Class === VOID2) {
|
|
643
|
-
let $ = function(_this__u8e3s4, buffer, offset, length, resultContinuation) {
|
|
644
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
645
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
646
|
-
this.buffer_1 = buffer;
|
|
647
|
-
this.offset_1 = offset;
|
|
648
|
-
this.length_1 = length;
|
|
649
|
-
};
|
|
650
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
651
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
652
|
-
var suspendResult = this.result_1;
|
|
653
|
-
$sm: do
|
|
654
|
-
try {
|
|
655
|
-
var tmp = this.state_1;
|
|
656
|
-
switch (tmp) {
|
|
657
|
-
case 0:
|
|
658
|
-
this.exceptionState_1 = 3;
|
|
659
|
-
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
660
|
-
return -1;
|
|
661
|
-
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
662
|
-
this.state_1 = 1;
|
|
663
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
664
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
665
|
-
return suspendResult;
|
|
666
|
-
}
|
|
667
|
-
continue $sm;
|
|
668
|
-
} else {
|
|
669
|
-
this.state_1 = 2;
|
|
670
|
-
continue $sm;
|
|
671
|
-
}
|
|
672
|
-
case 1:
|
|
673
|
-
this.state_1 = 2;
|
|
674
|
-
continue $sm;
|
|
675
|
-
case 2:
|
|
676
|
-
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
677
|
-
return -1;
|
|
678
|
-
return readAvailable(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$(), this.buffer_1, this.offset_1, this.length_1);
|
|
679
|
-
case 3:
|
|
680
|
-
throw this.exception_1;
|
|
681
|
-
}
|
|
682
|
-
} catch ($p) {
|
|
683
|
-
var e = $p;
|
|
684
|
-
if (this.exceptionState_1 === 3) {
|
|
685
|
-
throw e;
|
|
686
|
-
} else {
|
|
687
|
-
this.state_1 = this.exceptionState_1;
|
|
688
|
-
this.exception_1 = e;
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
while (true);
|
|
692
|
-
};
|
|
693
|
-
$readAvailableCOROUTINE$Class = $;
|
|
694
|
-
}
|
|
695
|
-
return $readAvailableCOROUTINE$Class;
|
|
696
|
-
}
|
|
697
|
-
var $toByteArrayCOROUTINE$Class;
|
|
698
|
-
function $toByteArrayCOROUTINE$() {
|
|
699
|
-
if ($toByteArrayCOROUTINE$Class === VOID2) {
|
|
700
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
701
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
702
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
703
|
-
};
|
|
704
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
705
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
706
|
-
var suspendResult = this.result_1;
|
|
707
|
-
$sm: do
|
|
708
|
-
try {
|
|
709
|
-
var tmp = this.state_1;
|
|
710
|
-
switch (tmp) {
|
|
711
|
-
case 0:
|
|
712
|
-
this.exceptionState_1 = 2;
|
|
713
|
-
this.state_1 = 1;
|
|
714
|
-
suspendResult = readBuffer(this._this__u8e3s4__1, this);
|
|
715
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
716
|
-
return suspendResult;
|
|
717
|
-
}
|
|
718
|
-
continue $sm;
|
|
719
|
-
case 1:
|
|
720
|
-
var ARGUMENT = suspendResult;
|
|
721
|
-
return readBytes(ARGUMENT);
|
|
722
|
-
case 2:
|
|
723
|
-
throw this.exception_1;
|
|
724
|
-
}
|
|
725
|
-
} catch ($p) {
|
|
726
|
-
var e = $p;
|
|
727
|
-
if (this.exceptionState_1 === 2) {
|
|
728
|
-
throw e;
|
|
729
|
-
} else {
|
|
730
|
-
this.state_1 = this.exceptionState_1;
|
|
731
|
-
this.exception_1 = e;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
while (true);
|
|
735
|
-
};
|
|
736
|
-
$toByteArrayCOROUTINE$Class = $;
|
|
737
|
-
}
|
|
738
|
-
return $toByteArrayCOROUTINE$Class;
|
|
739
|
-
}
|
|
740
|
-
var $copyToCOROUTINE$Class;
|
|
741
|
-
function $copyToCOROUTINE$() {
|
|
742
|
-
if ($copyToCOROUTINE$Class === VOID2) {
|
|
743
|
-
let $ = function(_this__u8e3s4, channel, limit, resultContinuation) {
|
|
744
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
745
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
746
|
-
this.channel_1 = channel;
|
|
747
|
-
this.limit_1 = limit;
|
|
748
|
-
};
|
|
749
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
750
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
751
|
-
var suspendResult = this.result_1;
|
|
752
|
-
$sm: do
|
|
753
|
-
try {
|
|
754
|
-
var tmp = this.state_1;
|
|
755
|
-
switch (tmp) {
|
|
756
|
-
case 0:
|
|
757
|
-
this.exceptionState_1 = 12;
|
|
758
|
-
this.remaining0__1 = this.limit_1;
|
|
759
|
-
this.state_1 = 1;
|
|
760
|
-
continue $sm;
|
|
761
|
-
case 1:
|
|
762
|
-
this.exceptionState_1 = 8;
|
|
763
|
-
this.exceptionState_1 = 7;
|
|
764
|
-
this.state_1 = 2;
|
|
765
|
-
continue $sm;
|
|
766
|
-
case 2:
|
|
767
|
-
if (!(!this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$() && this.remaining0__1 > 0n)) {
|
|
768
|
-
this.state_1 = 6;
|
|
769
|
-
continue $sm;
|
|
770
|
-
}
|
|
771
|
-
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
772
|
-
this.state_1 = 3;
|
|
773
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
774
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
775
|
-
return suspendResult;
|
|
776
|
-
}
|
|
777
|
-
continue $sm;
|
|
778
|
-
} else {
|
|
779
|
-
this.state_1 = 4;
|
|
780
|
-
continue $sm;
|
|
781
|
-
}
|
|
782
|
-
case 3:
|
|
783
|
-
this.state_1 = 4;
|
|
784
|
-
continue $sm;
|
|
785
|
-
case 4:
|
|
786
|
-
var tmp0 = this.remaining0__1;
|
|
787
|
-
var b = get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
788
|
-
var count = tmp0 <= b ? tmp0 : b;
|
|
789
|
-
this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().readTo_3vtbf7_k$(this.channel_1.get_writeBuffer_t7kuc6_k$(), count);
|
|
790
|
-
this.remaining0__1 = subtract(this.remaining0__1, count);
|
|
791
|
-
this.state_1 = 5;
|
|
792
|
-
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
793
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
794
|
-
return suspendResult;
|
|
795
|
-
}
|
|
796
|
-
continue $sm;
|
|
797
|
-
case 5:
|
|
798
|
-
this.state_1 = 2;
|
|
799
|
-
continue $sm;
|
|
800
|
-
case 6:
|
|
801
|
-
this.exceptionState_1 = 12;
|
|
802
|
-
this.state_1 = 10;
|
|
803
|
-
continue $sm;
|
|
804
|
-
case 7:
|
|
805
|
-
this.exceptionState_1 = 8;
|
|
806
|
-
var tmp_0 = this.exception_1;
|
|
807
|
-
if (tmp_0 instanceof Error) {
|
|
808
|
-
var cause = this.exception_1;
|
|
809
|
-
this._this__u8e3s4__1.cancel_9i2dv0_k$(cause);
|
|
810
|
-
close(this.channel_1, cause);
|
|
811
|
-
throw cause;
|
|
812
|
-
} else {
|
|
813
|
-
throw this.exception_1;
|
|
814
|
-
}
|
|
815
|
-
case 8:
|
|
816
|
-
this.exceptionState_1 = 12;
|
|
817
|
-
this.t1__1 = this.exception_1;
|
|
818
|
-
this.state_1 = 9;
|
|
819
|
-
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
820
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
821
|
-
return suspendResult;
|
|
822
|
-
}
|
|
823
|
-
continue $sm;
|
|
824
|
-
case 9:
|
|
825
|
-
throw this.t1__1;
|
|
826
|
-
case 10:
|
|
827
|
-
this.exceptionState_1 = 12;
|
|
828
|
-
this.state_1 = 11;
|
|
829
|
-
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
830
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
831
|
-
return suspendResult;
|
|
832
|
-
}
|
|
833
|
-
continue $sm;
|
|
834
|
-
case 11:
|
|
835
|
-
return subtract(this.limit_1, this.remaining0__1);
|
|
836
|
-
case 12:
|
|
837
|
-
throw this.exception_1;
|
|
838
|
-
}
|
|
839
|
-
} catch ($p) {
|
|
840
|
-
var e = $p;
|
|
841
|
-
if (this.exceptionState_1 === 12) {
|
|
842
|
-
throw e;
|
|
843
|
-
} else {
|
|
844
|
-
this.state_1 = this.exceptionState_1;
|
|
845
|
-
this.exception_1 = e;
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
while (true);
|
|
849
|
-
};
|
|
850
|
-
$copyToCOROUTINE$Class = $;
|
|
851
|
-
}
|
|
852
|
-
return $copyToCOROUTINE$Class;
|
|
853
|
-
}
|
|
854
|
-
var $discardCOROUTINE$Class;
|
|
855
|
-
function $discardCOROUTINE$() {
|
|
856
|
-
if ($discardCOROUTINE$Class === VOID2) {
|
|
857
|
-
let $ = function(_this__u8e3s4, max, resultContinuation) {
|
|
858
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
859
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
860
|
-
this.max_1 = max;
|
|
861
|
-
};
|
|
862
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
863
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
864
|
-
var suspendResult = this.result_1;
|
|
865
|
-
$sm: do
|
|
866
|
-
try {
|
|
867
|
-
var tmp = this.state_1;
|
|
868
|
-
switch (tmp) {
|
|
869
|
-
case 0:
|
|
870
|
-
this.exceptionState_1 = 5;
|
|
871
|
-
this.remaining0__1 = this.max_1;
|
|
872
|
-
this.state_1 = 1;
|
|
873
|
-
continue $sm;
|
|
874
|
-
case 1:
|
|
875
|
-
if (!(this.remaining0__1 > 0n && !this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())) {
|
|
876
|
-
this.state_1 = 4;
|
|
877
|
-
continue $sm;
|
|
878
|
-
}
|
|
879
|
-
if (get_availableForRead(this._this__u8e3s4__1) === 0) {
|
|
880
|
-
this.state_1 = 2;
|
|
881
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
882
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
883
|
-
return suspendResult;
|
|
884
|
-
}
|
|
885
|
-
continue $sm;
|
|
886
|
-
} else {
|
|
887
|
-
this.state_1 = 3;
|
|
888
|
-
continue $sm;
|
|
889
|
-
}
|
|
890
|
-
case 2:
|
|
891
|
-
this.state_1 = 3;
|
|
892
|
-
continue $sm;
|
|
893
|
-
case 3:
|
|
894
|
-
var tmp0 = this.remaining0__1;
|
|
895
|
-
var b = get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
896
|
-
var count = tmp0 <= b ? tmp0 : b;
|
|
897
|
-
discard(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$(), count);
|
|
898
|
-
this.remaining0__1 = subtract(this.remaining0__1, count);
|
|
899
|
-
this.state_1 = 1;
|
|
900
|
-
continue $sm;
|
|
901
|
-
case 4:
|
|
902
|
-
return subtract(this.max_1, this.remaining0__1);
|
|
903
|
-
case 5:
|
|
904
|
-
throw this.exception_1;
|
|
905
|
-
}
|
|
906
|
-
} catch ($p) {
|
|
907
|
-
var e = $p;
|
|
908
|
-
if (this.exceptionState_1 === 5) {
|
|
909
|
-
throw e;
|
|
910
|
-
} else {
|
|
911
|
-
this.state_1 = this.exceptionState_1;
|
|
912
|
-
this.exception_1 = e;
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
while (true);
|
|
916
|
-
};
|
|
917
|
-
$discardCOROUTINE$Class = $;
|
|
918
|
-
}
|
|
919
|
-
return $discardCOROUTINE$Class;
|
|
920
|
-
}
|
|
921
|
-
var $copyToCOROUTINE$Class_0;
|
|
922
|
-
function $copyToCOROUTINE$_0() {
|
|
923
|
-
if ($copyToCOROUTINE$Class_0 === VOID2) {
|
|
924
|
-
let $ = function(_this__u8e3s4, channel, resultContinuation) {
|
|
925
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
926
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
927
|
-
this.channel_1 = channel;
|
|
928
|
-
};
|
|
929
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
930
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
931
|
-
var suspendResult = this.result_1;
|
|
932
|
-
$sm: do
|
|
933
|
-
try {
|
|
934
|
-
var tmp = this.state_1;
|
|
935
|
-
switch (tmp) {
|
|
936
|
-
case 0:
|
|
937
|
-
this.exceptionState_1 = 11;
|
|
938
|
-
this.result0__1 = 0n;
|
|
939
|
-
this.state_1 = 1;
|
|
940
|
-
continue $sm;
|
|
941
|
-
case 1:
|
|
942
|
-
this.exceptionState_1 = 7;
|
|
943
|
-
this.exceptionState_1 = 6;
|
|
944
|
-
this.state_1 = 2;
|
|
945
|
-
continue $sm;
|
|
946
|
-
case 2:
|
|
947
|
-
if (!!this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
948
|
-
this.state_1 = 5;
|
|
949
|
-
continue $sm;
|
|
950
|
-
}
|
|
951
|
-
this.result0__1 = add2(this.result0__1, this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().transferTo_lu4ka2_k$(this.channel_1.get_writeBuffer_t7kuc6_k$()));
|
|
952
|
-
this.state_1 = 3;
|
|
953
|
-
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
954
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
955
|
-
return suspendResult;
|
|
956
|
-
}
|
|
957
|
-
continue $sm;
|
|
958
|
-
case 3:
|
|
959
|
-
this.state_1 = 4;
|
|
960
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
961
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
962
|
-
return suspendResult;
|
|
963
|
-
}
|
|
964
|
-
continue $sm;
|
|
965
|
-
case 4:
|
|
966
|
-
this.state_1 = 2;
|
|
967
|
-
continue $sm;
|
|
968
|
-
case 5:
|
|
969
|
-
this.exceptionState_1 = 11;
|
|
970
|
-
this.state_1 = 9;
|
|
971
|
-
continue $sm;
|
|
972
|
-
case 6:
|
|
973
|
-
this.exceptionState_1 = 7;
|
|
974
|
-
var tmp_0 = this.exception_1;
|
|
975
|
-
if (tmp_0 instanceof Error) {
|
|
976
|
-
var cause = this.exception_1;
|
|
977
|
-
this._this__u8e3s4__1.cancel_9i2dv0_k$(cause);
|
|
978
|
-
close(this.channel_1, cause);
|
|
979
|
-
throw cause;
|
|
980
|
-
} else {
|
|
981
|
-
throw this.exception_1;
|
|
982
|
-
}
|
|
983
|
-
case 7:
|
|
984
|
-
this.exceptionState_1 = 11;
|
|
985
|
-
this.t1__1 = this.exception_1;
|
|
986
|
-
this.state_1 = 8;
|
|
987
|
-
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
988
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
989
|
-
return suspendResult;
|
|
990
|
-
}
|
|
991
|
-
continue $sm;
|
|
992
|
-
case 8:
|
|
993
|
-
throw this.t1__1;
|
|
994
|
-
case 9:
|
|
995
|
-
this.exceptionState_1 = 11;
|
|
996
|
-
this.state_1 = 10;
|
|
997
|
-
suspendResult = this.channel_1.flush_4wsz1p_k$(this);
|
|
998
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
999
|
-
return suspendResult;
|
|
1000
|
-
}
|
|
1001
|
-
continue $sm;
|
|
1002
|
-
case 10:
|
|
1003
|
-
return this.result0__1;
|
|
1004
|
-
case 11:
|
|
1005
|
-
throw this.exception_1;
|
|
1006
|
-
}
|
|
1007
|
-
} catch ($p) {
|
|
1008
|
-
var e = $p;
|
|
1009
|
-
if (this.exceptionState_1 === 11) {
|
|
1010
|
-
throw e;
|
|
1011
|
-
} else {
|
|
1012
|
-
this.state_1 = this.exceptionState_1;
|
|
1013
|
-
this.exception_1 = e;
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
while (true);
|
|
1017
|
-
};
|
|
1018
|
-
$copyToCOROUTINE$Class_0 = $;
|
|
1019
|
-
}
|
|
1020
|
-
return $copyToCOROUTINE$Class_0;
|
|
1021
|
-
}
|
|
1022
|
-
var $skipIfFoundCOROUTINE$Class;
|
|
1023
|
-
function $skipIfFoundCOROUTINE$() {
|
|
1024
|
-
if ($skipIfFoundCOROUTINE$Class === VOID2) {
|
|
1025
|
-
let $ = function(_this__u8e3s4, byteString, resultContinuation) {
|
|
1026
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
1027
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1028
|
-
this.byteString_1 = byteString;
|
|
1029
|
-
};
|
|
1030
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
1031
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
1032
|
-
var suspendResult = this.result_1;
|
|
1033
|
-
$sm: do
|
|
1034
|
-
try {
|
|
1035
|
-
var tmp = this.state_1;
|
|
1036
|
-
switch (tmp) {
|
|
1037
|
-
case 0:
|
|
1038
|
-
this.exceptionState_1 = 4;
|
|
1039
|
-
this.state_1 = 1;
|
|
1040
|
-
suspendResult = peek(this._this__u8e3s4__1, this.byteString_1.get_size_woubt6_k$(), this);
|
|
1041
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1042
|
-
return suspendResult;
|
|
1043
|
-
}
|
|
1044
|
-
continue $sm;
|
|
1045
|
-
case 1:
|
|
1046
|
-
var ARGUMENT = suspendResult;
|
|
1047
|
-
if (equals(ARGUMENT, this.byteString_1)) {
|
|
1048
|
-
this.state_1 = 3;
|
|
1049
|
-
suspendResult = discard_0(this._this__u8e3s4__1, fromInt2(this.byteString_1.get_size_woubt6_k$()), this);
|
|
1050
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1051
|
-
return suspendResult;
|
|
1052
|
-
}
|
|
1053
|
-
continue $sm;
|
|
1054
|
-
} else {
|
|
1055
|
-
this.state_1 = 2;
|
|
1056
|
-
continue $sm;
|
|
1057
|
-
}
|
|
1058
|
-
case 2:
|
|
1059
|
-
return false;
|
|
1060
|
-
case 3:
|
|
1061
|
-
return true;
|
|
1062
|
-
case 4:
|
|
1063
|
-
throw this.exception_1;
|
|
1064
|
-
}
|
|
1065
|
-
} catch ($p) {
|
|
1066
|
-
var e = $p;
|
|
1067
|
-
if (this.exceptionState_1 === 4) {
|
|
1068
|
-
throw e;
|
|
1069
|
-
} else {
|
|
1070
|
-
this.state_1 = this.exceptionState_1;
|
|
1071
|
-
this.exception_1 = e;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
while (true);
|
|
1075
|
-
};
|
|
1076
|
-
$skipIfFoundCOROUTINE$Class = $;
|
|
1077
|
-
}
|
|
1078
|
-
return $skipIfFoundCOROUTINE$Class;
|
|
1079
|
-
}
|
|
1080
|
-
var $readPacketCOROUTINE$Class;
|
|
1081
|
-
function $readPacketCOROUTINE$() {
|
|
1082
|
-
if ($readPacketCOROUTINE$Class === VOID2) {
|
|
1083
|
-
let $ = function(_this__u8e3s4, packet, resultContinuation) {
|
|
1084
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
1085
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1086
|
-
this.packet_1 = packet;
|
|
1087
|
-
};
|
|
1088
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
1089
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
1090
|
-
var suspendResult = this.result_1;
|
|
1091
|
-
$sm: do
|
|
1092
|
-
try {
|
|
1093
|
-
var tmp = this.state_1;
|
|
1094
|
-
switch (tmp) {
|
|
1095
|
-
case 0:
|
|
1096
|
-
this.exceptionState_1 = 6;
|
|
1097
|
-
this.result0__1 = new (Buffer2())();
|
|
1098
|
-
this.state_1 = 1;
|
|
1099
|
-
continue $sm;
|
|
1100
|
-
case 1:
|
|
1101
|
-
if (!(this.result0__1.get_size_woubt6_k$() < fromInt2(this.packet_1))) {
|
|
1102
|
-
this.state_1 = 5;
|
|
1103
|
-
continue $sm;
|
|
1104
|
-
}
|
|
1105
|
-
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1106
|
-
this.state_1 = 2;
|
|
1107
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
1108
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1109
|
-
return suspendResult;
|
|
1110
|
-
}
|
|
1111
|
-
continue $sm;
|
|
1112
|
-
} else {
|
|
1113
|
-
this.state_1 = 3;
|
|
1114
|
-
continue $sm;
|
|
1115
|
-
}
|
|
1116
|
-
case 2:
|
|
1117
|
-
this.state_1 = 3;
|
|
1118
|
-
continue $sm;
|
|
1119
|
-
case 3:
|
|
1120
|
-
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
1121
|
-
this.state_1 = 5;
|
|
1122
|
-
continue $sm;
|
|
1123
|
-
} else {
|
|
1124
|
-
this.state_1 = 4;
|
|
1125
|
-
continue $sm;
|
|
1126
|
-
}
|
|
1127
|
-
case 4:
|
|
1128
|
-
if (get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$()) > subtract(numberToLong(this.packet_1), this.result0__1.get_size_woubt6_k$())) {
|
|
1129
|
-
this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().readTo_3vtbf7_k$(this.result0__1, subtract(numberToLong(this.packet_1), this.result0__1.get_size_woubt6_k$()));
|
|
1130
|
-
} else {
|
|
1131
|
-
this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().transferTo_lu4ka2_k$(this.result0__1);
|
|
1132
|
-
}
|
|
1133
|
-
this.state_1 = 1;
|
|
1134
|
-
continue $sm;
|
|
1135
|
-
case 5:
|
|
1136
|
-
if (this.result0__1.get_size_woubt6_k$() < fromInt2(this.packet_1)) {
|
|
1137
|
-
throw EOFException_init_$Create$("Not enough data available, required " + this.packet_1 + " bytes but only " + this.result0__1.get_size_woubt6_k$().toString() + " available");
|
|
1138
|
-
}
|
|
1139
|
-
return this.result0__1;
|
|
1140
|
-
case 6:
|
|
1141
|
-
throw this.exception_1;
|
|
1142
|
-
}
|
|
1143
|
-
} catch ($p) {
|
|
1144
|
-
var e = $p;
|
|
1145
|
-
if (this.exceptionState_1 === 6) {
|
|
1146
|
-
throw e;
|
|
1147
|
-
} else {
|
|
1148
|
-
this.state_1 = this.exceptionState_1;
|
|
1149
|
-
this.exception_1 = e;
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
while (true);
|
|
1153
|
-
};
|
|
1154
|
-
$readPacketCOROUTINE$Class = $;
|
|
1155
|
-
}
|
|
1156
|
-
return $readPacketCOROUTINE$Class;
|
|
1157
|
-
}
|
|
1158
|
-
var $readBufferCOROUTINE$Class_0;
|
|
1159
|
-
function $readBufferCOROUTINE$_0() {
|
|
1160
|
-
if ($readBufferCOROUTINE$Class_0 === VOID2) {
|
|
1161
|
-
let $ = function(_this__u8e3s4, max, resultContinuation) {
|
|
1162
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
1163
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1164
|
-
this.max_1 = max;
|
|
1165
|
-
};
|
|
1166
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
1167
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
1168
|
-
var suspendResult = this.result_1;
|
|
1169
|
-
$sm: do
|
|
1170
|
-
try {
|
|
1171
|
-
var tmp = this.state_1;
|
|
1172
|
-
switch (tmp) {
|
|
1173
|
-
case 0:
|
|
1174
|
-
this.exceptionState_1 = 4;
|
|
1175
|
-
this.result0__1 = new (Buffer2())();
|
|
1176
|
-
this.remaining1__1 = this.max_1;
|
|
1177
|
-
this.state_1 = 1;
|
|
1178
|
-
continue $sm;
|
|
1179
|
-
case 1:
|
|
1180
|
-
if (!(this.remaining1__1 > 0n && !this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())) {
|
|
1181
|
-
this.state_1 = 5;
|
|
1182
|
-
continue $sm;
|
|
1183
|
-
}
|
|
1184
|
-
if (this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1185
|
-
this.state_1 = 2;
|
|
1186
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
1187
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1188
|
-
return suspendResult;
|
|
1189
|
-
}
|
|
1190
|
-
continue $sm;
|
|
1191
|
-
} else {
|
|
1192
|
-
this.state_1 = 3;
|
|
1193
|
-
continue $sm;
|
|
1194
|
-
}
|
|
1195
|
-
case 2:
|
|
1196
|
-
this.state_1 = 3;
|
|
1197
|
-
continue $sm;
|
|
1198
|
-
case 3:
|
|
1199
|
-
var tmp0 = this.remaining1__1;
|
|
1200
|
-
var b = get_remaining(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$());
|
|
1201
|
-
var size = tmp0 <= b ? tmp0 : b;
|
|
1202
|
-
this.result0__1.write_9ocf0z_k$(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$(), size);
|
|
1203
|
-
this.remaining1__1 = subtract(this.remaining1__1, size);
|
|
1204
|
-
this.state_1 = 1;
|
|
1205
|
-
continue $sm;
|
|
1206
|
-
case 4:
|
|
1207
|
-
throw this.exception_1;
|
|
1208
|
-
case 5:
|
|
1209
|
-
return this.result0__1;
|
|
1210
|
-
}
|
|
1211
|
-
} catch ($p) {
|
|
1212
|
-
var e = $p;
|
|
1213
|
-
if (this.exceptionState_1 === 4) {
|
|
1214
|
-
throw e;
|
|
1215
|
-
} else {
|
|
1216
|
-
this.state_1 = this.exceptionState_1;
|
|
1217
|
-
this.exception_1 = e;
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
while (true);
|
|
1221
|
-
};
|
|
1222
|
-
$readBufferCOROUTINE$Class_0 = $;
|
|
1223
|
-
}
|
|
1224
|
-
return $readBufferCOROUTINE$Class_0;
|
|
1225
|
-
}
|
|
1226
|
-
var $peekCOROUTINE$Class;
|
|
1227
|
-
function $peekCOROUTINE$() {
|
|
1228
|
-
if ($peekCOROUTINE$Class === VOID2) {
|
|
1229
|
-
let $ = function(_this__u8e3s4, count, resultContinuation) {
|
|
1230
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
1231
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1232
|
-
this.count_1 = count;
|
|
1233
|
-
};
|
|
1234
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
1235
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
1236
|
-
var suspendResult = this.result_1;
|
|
1237
|
-
$sm: do
|
|
1238
|
-
try {
|
|
1239
|
-
var tmp = this.state_1;
|
|
1240
|
-
switch (tmp) {
|
|
1241
|
-
case 0:
|
|
1242
|
-
this.exceptionState_1 = 3;
|
|
1243
|
-
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
1244
|
-
return null;
|
|
1245
|
-
this.state_1 = 1;
|
|
1246
|
-
suspendResult = this._this__u8e3s4__1.awaitContent_q7m0p7_k$(this.count_1, this);
|
|
1247
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1248
|
-
return suspendResult;
|
|
1249
|
-
}
|
|
1250
|
-
continue $sm;
|
|
1251
|
-
case 1:
|
|
1252
|
-
if (!suspendResult) {
|
|
1253
|
-
return null;
|
|
1254
|
-
} else {
|
|
1255
|
-
this.state_1 = 2;
|
|
1256
|
-
continue $sm;
|
|
1257
|
-
}
|
|
1258
|
-
case 2:
|
|
1259
|
-
return readByteString(this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$().peek_21nx7_k$(), this.count_1);
|
|
1260
|
-
case 3:
|
|
1261
|
-
throw this.exception_1;
|
|
1262
|
-
}
|
|
1263
|
-
} catch ($p) {
|
|
1264
|
-
var e = $p;
|
|
1265
|
-
if (this.exceptionState_1 === 3) {
|
|
1266
|
-
throw e;
|
|
1267
|
-
} else {
|
|
1268
|
-
this.state_1 = this.exceptionState_1;
|
|
1269
|
-
this.exception_1 = e;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
while (true);
|
|
1273
|
-
};
|
|
1274
|
-
$peekCOROUTINE$Class = $;
|
|
1275
|
-
}
|
|
1276
|
-
return $peekCOROUTINE$Class;
|
|
1277
|
-
}
|
|
1278
|
-
var $internalReadLineToCOROUTINE$Class;
|
|
1279
|
-
function $internalReadLineToCOROUTINE$() {
|
|
1280
|
-
if ($internalReadLineToCOROUTINE$Class === VOID2) {
|
|
1281
|
-
let $ = function(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, resultContinuation) {
|
|
1282
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
1283
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1284
|
-
this.out_1 = out;
|
|
1285
|
-
this.limit_1 = limit;
|
|
1286
|
-
this.lenientLineEnding_1 = lenientLineEnding;
|
|
1287
|
-
this.throwOnIncompleteLine_1 = throwOnIncompleteLine;
|
|
1288
|
-
};
|
|
1289
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
1290
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
1291
|
-
var suspendResult = this.result_1;
|
|
1292
|
-
$sm: do
|
|
1293
|
-
try {
|
|
1294
|
-
var tmp = this.state_1;
|
|
1295
|
-
switch (tmp) {
|
|
1296
|
-
case 0:
|
|
1297
|
-
this.exceptionState_1 = 27;
|
|
1298
|
-
this.readBuffer4__1 = this._this__u8e3s4__1.get_readBuffer_yjmj9b_k$();
|
|
1299
|
-
if (this.readBuffer4__1.exhausted_p1jt55_k$()) {
|
|
1300
|
-
this.state_1 = 1;
|
|
1301
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
1302
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1303
|
-
return suspendResult;
|
|
1304
|
-
}
|
|
1305
|
-
continue $sm;
|
|
1306
|
-
} else {
|
|
1307
|
-
this.state_1 = 2;
|
|
1308
|
-
continue $sm;
|
|
1309
|
-
}
|
|
1310
|
-
case 1:
|
|
1311
|
-
this.state_1 = 2;
|
|
1312
|
-
continue $sm;
|
|
1313
|
-
case 2:
|
|
1314
|
-
if (this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())
|
|
1315
|
-
return -1n;
|
|
1316
|
-
this.consumed3__1 = { _v: 0n };
|
|
1317
|
-
this.outBuffer0__1 = { _v: null };
|
|
1318
|
-
this.state_1 = 3;
|
|
1319
|
-
continue $sm;
|
|
1320
|
-
case 3:
|
|
1321
|
-
this.state_1 = 4;
|
|
1322
|
-
continue $sm;
|
|
1323
|
-
case 4:
|
|
1324
|
-
this.exceptionState_1 = 24;
|
|
1325
|
-
this.state_1 = 5;
|
|
1326
|
-
continue $sm;
|
|
1327
|
-
case 5:
|
|
1328
|
-
if (!(this.consumed3__1._v < this.limit_1 && !this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$())) {
|
|
1329
|
-
this.state_1 = 15;
|
|
1330
|
-
continue $sm;
|
|
1331
|
-
}
|
|
1332
|
-
this.limitLeft7__1 = subtract(this.limit_1, this.consumed3__1._v);
|
|
1333
|
-
this.lfIndex8__1 = indexOf2(this.readBuffer4__1, 10, VOID2, this.limitLeft7__1);
|
|
1334
|
-
var crIndex = internalReadLineTo$scanForSoleCr(this.readBuffer4__1, this.lenientLineEnding_1, this.lfIndex8__1, this.limitLeft7__1);
|
|
1335
|
-
if (crIndex >= 0n) {
|
|
1336
|
-
internalReadLineTo$appendOrBuffer(this.outBuffer0__1, this.out_1, this.readBuffer4__1, this.consumed3__1, crIndex);
|
|
1337
|
-
discard(this.readBuffer4__1, 1n);
|
|
1338
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1339
|
-
this.exceptionState_1 = 27;
|
|
1340
|
-
this.state_1 = 25;
|
|
1341
|
-
continue $sm;
|
|
1342
|
-
} else {
|
|
1343
|
-
this.state_1 = 6;
|
|
1344
|
-
continue $sm;
|
|
1345
|
-
}
|
|
1346
|
-
case 6:
|
|
1347
|
-
if (this.lfIndex8__1 === 0n) {
|
|
1348
|
-
discard(this.readBuffer4__1, 1n);
|
|
1349
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1350
|
-
this.exceptionState_1 = 27;
|
|
1351
|
-
this.state_1 = 25;
|
|
1352
|
-
continue $sm;
|
|
1353
|
-
} else {
|
|
1354
|
-
this.state_1 = 7;
|
|
1355
|
-
continue $sm;
|
|
1356
|
-
}
|
|
1357
|
-
case 7:
|
|
1358
|
-
if (this.lfIndex8__1 > 0n) {
|
|
1359
|
-
var tmp_0;
|
|
1360
|
-
var tmp_1 = this.readBuffer4__1.get_buffer_bmaafd_k$();
|
|
1361
|
-
var this_0 = this.lfIndex8__1;
|
|
1362
|
-
if (tmp_1.get_f9lzxq_k$(subtract(this_0, fromInt2(1))) === 13) {
|
|
1363
|
-
tmp_0 = 1n;
|
|
1364
|
-
} else {
|
|
1365
|
-
tmp_0 = 0n;
|
|
1366
|
-
}
|
|
1367
|
-
var isCrlf = tmp_0;
|
|
1368
|
-
internalReadLineTo$appendOrBuffer(this.outBuffer0__1, this.out_1, this.readBuffer4__1, this.consumed3__1, subtract(this.lfIndex8__1, isCrlf));
|
|
1369
|
-
discard(this.readBuffer4__1, add2(numberToLong(1), isCrlf));
|
|
1370
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1371
|
-
this.exceptionState_1 = 27;
|
|
1372
|
-
this.state_1 = 25;
|
|
1373
|
-
continue $sm;
|
|
1374
|
-
} else {
|
|
1375
|
-
this.state_1 = 8;
|
|
1376
|
-
continue $sm;
|
|
1377
|
-
}
|
|
1378
|
-
case 8:
|
|
1379
|
-
var tmp0 = this.limitLeft7__1;
|
|
1380
|
-
var b = get_remaining(this.readBuffer4__1);
|
|
1381
|
-
var count = tmp0 <= b ? tmp0 : b;
|
|
1382
|
-
var tmp_2 = this.readBuffer4__1.get_buffer_bmaafd_k$();
|
|
1383
|
-
if (tmp_2.get_f9lzxq_k$(subtract(count, fromInt2(1))) === 13) {
|
|
1384
|
-
internalReadLineTo$appendOrBuffer(this.outBuffer0__1, this.out_1, this.readBuffer4__1, this.consumed3__1, subtract(count, fromInt2(1)));
|
|
1385
|
-
this.state_1 = 9;
|
|
1386
|
-
suspendResult = internalReadLineTo$discardCrlfOrCr(this.readBuffer4__1, this._this__u8e3s4__1, this.lenientLineEnding_1, this);
|
|
1387
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1388
|
-
return suspendResult;
|
|
1389
|
-
}
|
|
1390
|
-
continue $sm;
|
|
1391
|
-
} else {
|
|
1392
|
-
internalReadLineTo$bufferBytes(this.outBuffer0__1, this.readBuffer4__1, this.consumed3__1, count);
|
|
1393
|
-
this.state_1 = 11;
|
|
1394
|
-
continue $sm;
|
|
1395
|
-
}
|
|
1396
|
-
case 9:
|
|
1397
|
-
if (suspendResult) {
|
|
1398
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1399
|
-
this.exceptionState_1 = 27;
|
|
1400
|
-
this.state_1 = 25;
|
|
1401
|
-
continue $sm;
|
|
1402
|
-
} else {
|
|
1403
|
-
internalReadLineTo$bufferBytes(this.outBuffer0__1, this.readBuffer4__1, this.consumed3__1, 1n);
|
|
1404
|
-
this.state_1 = 10;
|
|
1405
|
-
continue $sm;
|
|
1406
|
-
}
|
|
1407
|
-
case 10:
|
|
1408
|
-
this.state_1 = 11;
|
|
1409
|
-
continue $sm;
|
|
1410
|
-
case 11:
|
|
1411
|
-
if (this.consumed3__1._v < this.limit_1 && get_remaining(this.readBuffer4__1) === 0n) {
|
|
1412
|
-
this.state_1 = 12;
|
|
1413
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
1414
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1415
|
-
return suspendResult;
|
|
1416
|
-
}
|
|
1417
|
-
continue $sm;
|
|
1418
|
-
} else {
|
|
1419
|
-
this.WHEN_RESULT6__1 = false;
|
|
1420
|
-
this.state_1 = 13;
|
|
1421
|
-
continue $sm;
|
|
1422
|
-
}
|
|
1423
|
-
case 12:
|
|
1424
|
-
this.WHEN_RESULT6__1 = !suspendResult;
|
|
1425
|
-
this.state_1 = 13;
|
|
1426
|
-
continue $sm;
|
|
1427
|
-
case 13:
|
|
1428
|
-
if (this.WHEN_RESULT6__1) {
|
|
1429
|
-
this.state_1 = 15;
|
|
1430
|
-
continue $sm;
|
|
1431
|
-
} else {
|
|
1432
|
-
this.state_1 = 14;
|
|
1433
|
-
continue $sm;
|
|
1434
|
-
}
|
|
1435
|
-
case 14:
|
|
1436
|
-
this.state_1 = 5;
|
|
1437
|
-
continue $sm;
|
|
1438
|
-
case 15:
|
|
1439
|
-
if (this.consumed3__1._v === 0n && this._this__u8e3s4__1.get_isClosedForRead_ajcc1s_k$()) {
|
|
1440
|
-
this.tmp$ret$02__1 = -1n;
|
|
1441
|
-
this.exceptionState_1 = 27;
|
|
1442
|
-
this.state_1 = 25;
|
|
1443
|
-
continue $sm;
|
|
1444
|
-
} else {
|
|
1445
|
-
this.state_1 = 16;
|
|
1446
|
-
continue $sm;
|
|
1447
|
-
}
|
|
1448
|
-
case 16:
|
|
1449
|
-
if (!(this.consumed3__1._v <= this.limit_1)) {
|
|
1450
|
-
var message = "Consumed bytes exceed the limit: " + this.consumed3__1._v.toString() + " > " + this.limit_1.toString() + ". It's an implementation bug, please report it.";
|
|
1451
|
-
throw IllegalStateException_init_$Create$(toString2(message));
|
|
1452
|
-
}
|
|
1453
|
-
if (this.consumed3__1._v === this.limit_1) {
|
|
1454
|
-
if (this.limit_1 === 9223372036854775807n)
|
|
1455
|
-
throw new (TooLongLineException())("Max line length exceeded");
|
|
1456
|
-
if (get_remaining(this.readBuffer4__1) === 0n) {
|
|
1457
|
-
this.state_1 = 18;
|
|
1458
|
-
suspendResult = this._this__u8e3s4__1.awaitContent$default_rxihsg_k$(VOID2, this);
|
|
1459
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1460
|
-
return suspendResult;
|
|
1461
|
-
}
|
|
1462
|
-
continue $sm;
|
|
1463
|
-
} else {
|
|
1464
|
-
this.WHEN_RESULT5__1 = false;
|
|
1465
|
-
this.state_1 = 19;
|
|
1466
|
-
continue $sm;
|
|
1467
|
-
}
|
|
1468
|
-
} else {
|
|
1469
|
-
this.state_1 = 17;
|
|
1470
|
-
continue $sm;
|
|
1471
|
-
}
|
|
1472
|
-
case 17:
|
|
1473
|
-
if (this.throwOnIncompleteLine_1) {
|
|
1474
|
-
throwEndOfStreamException(this.consumed3__1._v);
|
|
1475
|
-
}
|
|
1476
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1477
|
-
this.exceptionState_1 = 27;
|
|
1478
|
-
this.state_1 = 25;
|
|
1479
|
-
var tmp_3 = this;
|
|
1480
|
-
continue $sm;
|
|
1481
|
-
case 18:
|
|
1482
|
-
this.WHEN_RESULT5__1 = !suspendResult;
|
|
1483
|
-
this.state_1 = 19;
|
|
1484
|
-
continue $sm;
|
|
1485
|
-
case 19:
|
|
1486
|
-
if (this.WHEN_RESULT5__1) {
|
|
1487
|
-
throwEndOfStreamException(this.consumed3__1._v);
|
|
1488
|
-
} else {
|
|
1489
|
-
this.state_1 = 20;
|
|
1490
|
-
continue $sm;
|
|
1491
|
-
}
|
|
1492
|
-
break;
|
|
1493
|
-
case 20:
|
|
1494
|
-
var tmp0_subject = this.readBuffer4__1.get_buffer_bmaafd_k$().get_f9lzxq_k$(0n);
|
|
1495
|
-
if (tmp0_subject === 10) {
|
|
1496
|
-
discard(this.readBuffer4__1, 1n);
|
|
1497
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1498
|
-
this.exceptionState_1 = 27;
|
|
1499
|
-
this.state_1 = 25;
|
|
1500
|
-
continue $sm;
|
|
1501
|
-
} else {
|
|
1502
|
-
if (tmp0_subject === 13) {
|
|
1503
|
-
this.state_1 = 21;
|
|
1504
|
-
suspendResult = internalReadLineTo$discardCrlfOrCr(this.readBuffer4__1, this._this__u8e3s4__1, this.lenientLineEnding_1, this);
|
|
1505
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1506
|
-
return suspendResult;
|
|
1507
|
-
}
|
|
1508
|
-
continue $sm;
|
|
1509
|
-
} else {
|
|
1510
|
-
this.state_1 = 23;
|
|
1511
|
-
continue $sm;
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
case 21:
|
|
1515
|
-
if (suspendResult) {
|
|
1516
|
-
this.tmp$ret$02__1 = this.consumed3__1._v;
|
|
1517
|
-
this.exceptionState_1 = 27;
|
|
1518
|
-
this.state_1 = 25;
|
|
1519
|
-
continue $sm;
|
|
1520
|
-
} else {
|
|
1521
|
-
this.state_1 = 22;
|
|
1522
|
-
continue $sm;
|
|
1523
|
-
}
|
|
1524
|
-
case 22:
|
|
1525
|
-
this.state_1 = 23;
|
|
1526
|
-
continue $sm;
|
|
1527
|
-
case 23:
|
|
1528
|
-
throwTooLongLineException(this.limit_1);
|
|
1529
|
-
break;
|
|
1530
|
-
case 24:
|
|
1531
|
-
this.exceptionState_1 = 27;
|
|
1532
|
-
var t = this.exception_1;
|
|
1533
|
-
if (!(this.outBuffer0__1._v == null)) {
|
|
1534
|
-
this.out_1.append_jgojdo_k$(readString_0(this.outBuffer0__1._v));
|
|
1535
|
-
}
|
|
1536
|
-
throw t;
|
|
1537
|
-
case 25:
|
|
1538
|
-
var tmp_4 = this.tmp$ret$02__1;
|
|
1539
|
-
this.exceptionState_1 = 27;
|
|
1540
|
-
if (!(this.outBuffer0__1._v == null)) {
|
|
1541
|
-
this.out_1.append_jgojdo_k$(readString_0(this.outBuffer0__1._v));
|
|
1542
|
-
}
|
|
1543
|
-
return tmp_4;
|
|
1544
|
-
case 26:
|
|
1545
|
-
this.exceptionState_1 = 27;
|
|
1546
|
-
if (!(this.outBuffer0__1._v == null)) {
|
|
1547
|
-
this.out_1.append_jgojdo_k$(readString_0(this.outBuffer0__1._v));
|
|
1548
|
-
}
|
|
1549
|
-
return Unit_instance2;
|
|
1550
|
-
case 27:
|
|
1551
|
-
throw this.exception_1;
|
|
1552
|
-
}
|
|
1553
|
-
} catch ($p) {
|
|
1554
|
-
var e = $p;
|
|
1555
|
-
if (this.exceptionState_1 === 27) {
|
|
1556
|
-
throw e;
|
|
1557
|
-
} else {
|
|
1558
|
-
this.state_1 = this.exceptionState_1;
|
|
1559
|
-
this.exception_1 = e;
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
while (true);
|
|
1563
|
-
};
|
|
1564
|
-
$internalReadLineToCOROUTINE$Class = $;
|
|
1565
|
-
}
|
|
1566
|
-
return $internalReadLineToCOROUTINE$Class;
|
|
1567
|
-
}
|
|
1568
|
-
var $internalReadLineTo$discardCrlfOrCrCOROUTINE$Class;
|
|
1569
|
-
function $internalReadLineTo$discardCrlfOrCrCOROUTINE$() {
|
|
1570
|
-
if ($internalReadLineTo$discardCrlfOrCrCOROUTINE$Class === VOID2) {
|
|
1571
|
-
let $ = function(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, resultContinuation) {
|
|
1572
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
1573
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1574
|
-
this.$this_internalReadLineTo_1 = $this_internalReadLineTo;
|
|
1575
|
-
this.$lenientLineEnding_1 = $lenientLineEnding;
|
|
1576
|
-
};
|
|
1577
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
1578
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
1579
|
-
var suspendResult = this.result_1;
|
|
1580
|
-
$sm: do
|
|
1581
|
-
try {
|
|
1582
|
-
var tmp = this.state_1;
|
|
1583
|
-
switch (tmp) {
|
|
1584
|
-
case 0:
|
|
1585
|
-
this.exceptionState_1 = 5;
|
|
1586
|
-
if (get_remaining(this._this__u8e3s4__1) >= 2n) {
|
|
1587
|
-
this.WHEN_RESULT1__1 = true;
|
|
1588
|
-
this.state_1 = 2;
|
|
1589
|
-
continue $sm;
|
|
1590
|
-
} else {
|
|
1591
|
-
this.state_1 = 1;
|
|
1592
|
-
suspendResult = this.$this_internalReadLineTo_1.awaitContent_q7m0p7_k$(2, this);
|
|
1593
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
1594
|
-
return suspendResult;
|
|
1595
|
-
}
|
|
1596
|
-
continue $sm;
|
|
1597
|
-
}
|
|
1598
|
-
case 1:
|
|
1599
|
-
this.WHEN_RESULT1__1 = suspendResult;
|
|
1600
|
-
this.state_1 = 2;
|
|
1601
|
-
continue $sm;
|
|
1602
|
-
case 2:
|
|
1603
|
-
if (this.WHEN_RESULT1__1) {
|
|
1604
|
-
this.WHEN_RESULT0__1 = this._this__u8e3s4__1.get_buffer_bmaafd_k$().get_f9lzxq_k$(1n) === 10;
|
|
1605
|
-
this.state_1 = 3;
|
|
1606
|
-
continue $sm;
|
|
1607
|
-
} else {
|
|
1608
|
-
this.WHEN_RESULT0__1 = false;
|
|
1609
|
-
this.state_1 = 3;
|
|
1610
|
-
continue $sm;
|
|
1611
|
-
}
|
|
1612
|
-
case 3:
|
|
1613
|
-
if (this.WHEN_RESULT0__1) {
|
|
1614
|
-
discard(this._this__u8e3s4__1, 2n);
|
|
1615
|
-
return true;
|
|
1616
|
-
} else {
|
|
1617
|
-
this.state_1 = 4;
|
|
1618
|
-
continue $sm;
|
|
1619
|
-
}
|
|
1620
|
-
case 4:
|
|
1621
|
-
if (this.$lenientLineEnding_1) {
|
|
1622
|
-
discard(this._this__u8e3s4__1, 1n);
|
|
1623
|
-
return true;
|
|
1624
|
-
}
|
|
1625
|
-
return false;
|
|
1626
|
-
case 5:
|
|
1627
|
-
throw this.exception_1;
|
|
1628
|
-
}
|
|
1629
|
-
} catch ($p) {
|
|
1630
|
-
var e = $p;
|
|
1631
|
-
if (this.exceptionState_1 === 5) {
|
|
1632
|
-
throw e;
|
|
1633
|
-
} else {
|
|
1634
|
-
this.state_1 = this.exceptionState_1;
|
|
1635
|
-
this.exception_1 = e;
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
while (true);
|
|
1639
|
-
};
|
|
1640
|
-
$internalReadLineTo$discardCrlfOrCrCOROUTINE$Class = $;
|
|
1641
|
-
}
|
|
1642
|
-
return $internalReadLineTo$discardCrlfOrCrCOROUTINE$Class;
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
|
-
// build/packages/js/ktor-ktor-io/io/ktor/utils/io/ByteWriteChannel.mjs
|
|
1646
|
-
import { protoOf180f3jzyo7rfj as protoOf3 } from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
1647
|
-
import {
|
|
1648
|
-
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
1649
|
-
initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference,
|
|
1650
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine3
|
|
1651
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
1652
|
-
import { VOID3gxj6tk5isa35 as VOID3 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
1653
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance3 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
1654
|
-
import { KFunctionImpl1wt0sp8rkf847 as KFunctionImpl } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/KFunctionImpl.mjs";
|
|
1655
|
-
import { constructCallableReference23y65rf941mch as constructCallableReference } from "../kotlin-kotlin-stdlib/kotlin/js/reflectRuntime.mjs";
|
|
1656
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl3 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
1657
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED3 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
1658
|
-
import { get_size2imoy2jq11jxl as get_size } from "../ktor-ktor-io/io/ktor/utils/io/core/BytePacketBuilder.mjs";
|
|
1659
|
-
function get_autoFlush() {
|
|
1660
|
-
return false;
|
|
1661
|
-
}
|
|
1662
|
-
var ByteWriteChannelClass;
|
|
1663
|
-
function ByteWriteChannel() {
|
|
1664
|
-
if (ByteWriteChannelClass === VOID3) {
|
|
1665
|
-
let $ = function() {
|
|
1666
|
-
};
|
|
1667
|
-
initMetadataForInterface($, "ByteWriteChannel", VOID3, VOID3, VOID3, [0]);
|
|
1668
|
-
ByteWriteChannelClass = $;
|
|
1669
|
-
}
|
|
1670
|
-
return ByteWriteChannelClass;
|
|
1671
|
-
}
|
|
1672
|
-
function close2(_this__u8e3s4) {
|
|
1673
|
-
fireAndForget(ByteWriteChannel$flushAndClose$ref_0(_this__u8e3s4));
|
|
1674
|
-
}
|
|
1675
|
-
function flushIfNeeded(_this__u8e3s4, $completion) {
|
|
1676
|
-
var tmp = new ($flushIfNeededCOROUTINE$())(_this__u8e3s4, $completion);
|
|
1677
|
-
tmp.result_1 = Unit_instance3;
|
|
1678
|
-
tmp.exception_1 = null;
|
|
1679
|
-
return tmp.doResume_5yljmg_k$();
|
|
1680
|
-
}
|
|
1681
|
-
var ByteWriteChannel$flushAndClose$refClass;
|
|
1682
|
-
function ByteWriteChannel$flushAndClose$ref() {
|
|
1683
|
-
if (ByteWriteChannel$flushAndClose$refClass === VOID3) {
|
|
1684
|
-
let $ = function(p0) {
|
|
1685
|
-
KFunctionImpl().call(this, 1, 1, 9);
|
|
1686
|
-
this.f$0__1 = p0;
|
|
1687
|
-
};
|
|
1688
|
-
initMetadataForFunctionReference($, KFunctionImpl(), VOID3, [0]);
|
|
1689
|
-
protoOf3($).invoke_h7udsx_k$ = function($completion) {
|
|
1690
|
-
return this.f$0__1.flushAndClose_3zd2q_k$($completion);
|
|
1691
|
-
};
|
|
1692
|
-
protoOf3($).invoke_ib42db_k$ = function($completion) {
|
|
1693
|
-
return this.invoke_h7udsx_k$($completion);
|
|
1694
|
-
};
|
|
1695
|
-
ByteWriteChannel$flushAndClose$refClass = $;
|
|
1696
|
-
}
|
|
1697
|
-
return ByteWriteChannel$flushAndClose$refClass;
|
|
1698
|
-
}
|
|
1699
|
-
function ByteWriteChannel$flushAndClose$ref_0(p0) {
|
|
1700
|
-
var i = new (ByteWriteChannel$flushAndClose$ref())(p0);
|
|
1701
|
-
return constructCallableReference(function($completion) {
|
|
1702
|
-
return i.invoke_h7udsx_k$($completion);
|
|
1703
|
-
}, 0, 1, 9, "flushAndClose", [p0]);
|
|
1704
|
-
}
|
|
1705
|
-
var $flushIfNeededCOROUTINE$Class;
|
|
1706
|
-
function $flushIfNeededCOROUTINE$() {
|
|
1707
|
-
if ($flushIfNeededCOROUTINE$Class === VOID3) {
|
|
1708
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
1709
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1710
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1711
|
-
};
|
|
1712
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1713
|
-
protoOf3($).doResume_5yljmg_k$ = function() {
|
|
1714
|
-
var suspendResult = this.result_1;
|
|
1715
|
-
$sm: do
|
|
1716
|
-
try {
|
|
1717
|
-
var tmp = this.state_1;
|
|
1718
|
-
switch (tmp) {
|
|
1719
|
-
case 0:
|
|
1720
|
-
this.exceptionState_1 = 3;
|
|
1721
|
-
rethrowCloseCauseIfNeeded_0(this._this__u8e3s4__1);
|
|
1722
|
-
if (this._this__u8e3s4__1.get_autoFlush_zfdl3o_k$() || get_size(this._this__u8e3s4__1.get_writeBuffer_t7kuc6_k$()) >= 1048576) {
|
|
1723
|
-
this.state_1 = 1;
|
|
1724
|
-
suspendResult = this._this__u8e3s4__1.flush_4wsz1p_k$(this);
|
|
1725
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1726
|
-
return suspendResult;
|
|
1727
|
-
}
|
|
1728
|
-
continue $sm;
|
|
1729
|
-
} else {
|
|
1730
|
-
this.state_1 = 2;
|
|
1731
|
-
continue $sm;
|
|
1732
|
-
}
|
|
1733
|
-
case 1:
|
|
1734
|
-
this.state_1 = 2;
|
|
1735
|
-
continue $sm;
|
|
1736
|
-
case 2:
|
|
1737
|
-
return Unit_instance3;
|
|
1738
|
-
case 3:
|
|
1739
|
-
throw this.exception_1;
|
|
1740
|
-
}
|
|
1741
|
-
} catch ($p) {
|
|
1742
|
-
var e = $p;
|
|
1743
|
-
if (this.exceptionState_1 === 3) {
|
|
1744
|
-
throw e;
|
|
1745
|
-
} else {
|
|
1746
|
-
this.state_1 = this.exceptionState_1;
|
|
1747
|
-
this.exception_1 = e;
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
while (true);
|
|
1751
|
-
};
|
|
1752
|
-
$flushIfNeededCOROUTINE$Class = $;
|
|
1753
|
-
}
|
|
1754
|
-
return $flushIfNeededCOROUTINE$Class;
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
// build/packages/js/ktor-ktor-io/io/ktor/utils/io/ByteChannel.mjs
|
|
1758
|
-
import {
|
|
1759
|
-
Companion_instancejy2056q2ma5w as Companion_instance,
|
|
1760
|
-
_Result___init__impl__xyqfz832zdzqrocazzs as _Result___init__impl__xyqfz8,
|
|
1761
|
-
createFailure8paxfkfa5dc7 as createFailure,
|
|
1762
|
-
Result3t1vadv16kmzk as Result
|
|
1763
|
-
} from "../kotlin-kotlin-stdlib/kotlin/Result.mjs";
|
|
1764
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance4 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
1765
|
-
import {
|
|
1766
|
-
protoOf180f3jzyo7rfj as protoOf4,
|
|
1767
|
-
hashCodeq5arwsb9dgti as hashCode,
|
|
1768
|
-
equals2au1ep9vhcato as equals2,
|
|
1769
|
-
newThrowablezl37abp36p5f as newThrowable,
|
|
1770
|
-
toString1pkumu07cwy4m as toString3,
|
|
1771
|
-
captureStack1fzi4aczwc4hg as captureStack
|
|
1772
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
1773
|
-
import {
|
|
1774
|
-
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
1775
|
-
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
1776
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass2,
|
|
1777
|
-
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface2,
|
|
1778
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine4
|
|
1779
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
1780
|
-
import { VOID3gxj6tk5isa35 as VOID4 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
1781
|
-
import { toString30pk9tzaqopn as toString_0 } from "../kotlin-kotlin-stdlib/kotlin/Library.mjs";
|
|
1782
|
-
import { toString1h6jjoch8cjt8 as toString_1 } from "../kotlin-kotlin-stdlib/kotlin/text/numberConversions.mjs";
|
|
1783
|
-
import { stackTraceToString2670q6lbhdojj as stackTraceToString } from "../kotlin-kotlin-stdlib/kotlin/throwableExtensions.mjs";
|
|
1784
|
-
import { get_DEVELOPMENT_MODE18ax9b1n971lk as get_DEVELOPMENT_MODE } from "../ktor-ktor-io/io/ktor/utils/io/ByteChannel.web.mjs";
|
|
1785
|
-
import { isInterface3d6p8outrmvmk as isInterface } from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
1786
|
-
import { FunctionAdapter3lcrrz3moet5b as FunctionAdapter } from "../kotlin-kotlin-stdlib/kotlin/js/FunctionAdapter.mjs";
|
|
1787
|
-
import { DisposableHandle1uzxt8frdchxn as DisposableHandle } from "../kotlinx-coroutines-core/kotlinx/coroutines/Job.mjs";
|
|
1788
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl4 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
1789
|
-
import {
|
|
1790
|
-
fromInt2ii0rejb1w62w as fromInt3,
|
|
1791
|
-
numberToLong2pakxeg38estk as numberToLong2,
|
|
1792
|
-
add2suhfggl4zvkk as add3,
|
|
1793
|
-
convertToInty04h231mmjoh as convertToInt2
|
|
1794
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/internal/longAsBigInt/longAsBigInt.mjs";
|
|
1795
|
-
import { intercepted2ogpsikxxj4u0 as intercepted } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/IntrinsicsJs.mjs";
|
|
1796
|
-
import { CancellableContinuationImpl1cx201opicavg as CancellableContinuationImpl } from "../kotlinx-coroutines-core/kotlinx/coroutines/CancellableContinuationImpl.mjs";
|
|
1797
|
-
import { noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
1798
|
-
import { returnIfSuspended39bw7wdvakhp8 as returnIfSuspended } from "../kotlin-kotlin-stdlib/kotlin/js/coroutineInternalJS.mjs";
|
|
1799
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED4 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
1800
|
-
import {
|
|
1801
|
-
get_CLOSED3uiwvc5y98ftj as get_CLOSED,
|
|
1802
|
-
Companion_instance2dr5be9lgxo2y as Companion_instance_0,
|
|
1803
|
-
access$_get_origin__hdh1qz8t4atr48tdww as access$_get_origin__hdh1qz,
|
|
1804
|
-
CloseToken4utf44psnuyc as CloseToken
|
|
1805
|
-
} from "../ktor-ktor-io/io/ktor/utils/io/CloseToken.mjs";
|
|
1806
|
-
import { Buffergs925ekssbch as Buffer3 } from "../kotlinx-io-kotlinx-io-core/kotlinx/io/Buffer.mjs";
|
|
1807
|
-
import { atomic$ref$130aurmcwdfdf1 as atomic$ref$1 } from "../kotlinx-atomicfu/kotlinx/atomicfu/AtomicFU.mjs";
|
|
1808
|
-
import {
|
|
1809
|
-
ClosedReadChannelException9jdpzh6uy12w as ClosedReadChannelException,
|
|
1810
|
-
ClosedWriteChannelException1eeenxj0c4bxu as ClosedWriteChannelException,
|
|
1811
|
-
ClosedByteChannelException3il8gfpye60w as ClosedByteChannelException
|
|
1812
|
-
} from "../ktor-ktor-io/io/ktor/utils/io/Exceptions.mjs";
|
|
1813
|
-
import {
|
|
1814
|
-
CancellationException_init_$Create$6nn2czcftw2s as CancellationException_init_$Create$,
|
|
1815
|
-
CancellationException3b36o9qz53rgr as CancellationException
|
|
1816
|
-
} from "../kotlin-kotlin-stdlib/kotlin/coroutines/cancellation/CancellationException.mjs";
|
|
1817
|
-
import { CopyableThrowable1mvc99jcyvivf as CopyableThrowable } from "../kotlinx-coroutines-core/kotlinx/coroutines/Debug.common.mjs";
|
|
1818
|
-
import {
|
|
1819
|
-
awaitContent$default2k2a3zkrv0yyf as awaitContent$default,
|
|
1820
|
-
ByteReadChannel2wzou76jce72d as ByteReadChannel
|
|
1821
|
-
} from "../ktor-ktor-io/io/ktor/utils/io/ByteReadChannel.mjs";
|
|
1822
|
-
import {
|
|
1823
|
-
IllegalStateException_init_$Create$38ax6c90susjc as IllegalStateException_init_$Create$2,
|
|
1824
|
-
IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
|
|
1825
|
-
IllegalStateException_init_$Init$3qej4dbq7zzt3 as IllegalStateException_init_$Init$
|
|
1826
|
-
} from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
1827
|
-
var CompanionClass;
|
|
1828
|
-
function Companion() {
|
|
1829
|
-
if (CompanionClass === VOID4) {
|
|
1830
|
-
let $ = function() {
|
|
1831
|
-
Companion_instance_1 = this;
|
|
1832
|
-
this.CLOSED_1 = new (Closed())(null);
|
|
1833
|
-
var tmp = this;
|
|
1834
|
-
tmp.RESUME_1 = _Result___init__impl__xyqfz8(Unit_instance4);
|
|
1835
|
-
};
|
|
1836
|
-
initMetadataForCompanion($);
|
|
1837
|
-
CompanionClass = $;
|
|
1838
|
-
}
|
|
1839
|
-
return CompanionClass;
|
|
1840
|
-
}
|
|
1841
|
-
var Companion_instance_1;
|
|
1842
|
-
function Companion_getInstance() {
|
|
1843
|
-
if (Companion_instance_1 == null)
|
|
1844
|
-
new (Companion())();
|
|
1845
|
-
return Companion_instance_1;
|
|
1846
|
-
}
|
|
1847
|
-
var EmptyClass;
|
|
1848
|
-
function Empty() {
|
|
1849
|
-
if (EmptyClass === VOID4) {
|
|
1850
|
-
let $ = function() {
|
|
1851
|
-
};
|
|
1852
|
-
initMetadataForObject($, "Empty");
|
|
1853
|
-
protoOf4($).toString = function() {
|
|
1854
|
-
return "Empty";
|
|
1855
|
-
};
|
|
1856
|
-
protoOf4($).hashCode = function() {
|
|
1857
|
-
return -231472095;
|
|
1858
|
-
};
|
|
1859
|
-
protoOf4($).equals = function(other) {
|
|
1860
|
-
if (this === other)
|
|
1861
|
-
return true;
|
|
1862
|
-
if (!(other instanceof Empty()))
|
|
1863
|
-
return false;
|
|
1864
|
-
return true;
|
|
1865
|
-
};
|
|
1866
|
-
EmptyClass = $;
|
|
1867
|
-
}
|
|
1868
|
-
return EmptyClass;
|
|
1869
|
-
}
|
|
1870
|
-
var Empty_instance;
|
|
1871
|
-
function Empty_getInstance() {
|
|
1872
|
-
return Empty_instance;
|
|
1873
|
-
}
|
|
1874
|
-
var ClosedClass;
|
|
1875
|
-
function Closed() {
|
|
1876
|
-
if (ClosedClass === VOID4) {
|
|
1877
|
-
let $ = function(cause) {
|
|
1878
|
-
this.cause_1 = cause;
|
|
1879
|
-
};
|
|
1880
|
-
initMetadataForClass2($, "Closed");
|
|
1881
|
-
protoOf4($).toString = function() {
|
|
1882
|
-
return "Closed(cause=" + toString_0(this.cause_1) + ")";
|
|
1883
|
-
};
|
|
1884
|
-
protoOf4($).hashCode = function() {
|
|
1885
|
-
return this.cause_1 == null ? 0 : hashCode(this.cause_1);
|
|
1886
|
-
};
|
|
1887
|
-
protoOf4($).equals = function(other) {
|
|
1888
|
-
if (this === other)
|
|
1889
|
-
return true;
|
|
1890
|
-
if (!(other instanceof Closed()))
|
|
1891
|
-
return false;
|
|
1892
|
-
if (!equals2(this.cause_1, other.cause_1))
|
|
1893
|
-
return false;
|
|
1894
|
-
return true;
|
|
1895
|
-
};
|
|
1896
|
-
ClosedClass = $;
|
|
1897
|
-
}
|
|
1898
|
-
return ClosedClass;
|
|
1899
|
-
}
|
|
1900
|
-
function resume() {
|
|
1901
|
-
return this.get_continuation_7yron4_k$().resumeWith_rk9gbt_k$(Companion_getInstance().RESUME_1);
|
|
1902
|
-
}
|
|
1903
|
-
function resume_0(throwable) {
|
|
1904
|
-
var tmp = this.get_continuation_7yron4_k$();
|
|
1905
|
-
var tmp_0;
|
|
1906
|
-
if (throwable == null) {
|
|
1907
|
-
tmp_0 = null;
|
|
1908
|
-
} else {
|
|
1909
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(throwable));
|
|
1910
|
-
tmp_0 = new (Result())(tmp$ret$0);
|
|
1911
|
-
}
|
|
1912
|
-
var tmp1_elvis_lhs = tmp_0;
|
|
1913
|
-
return tmp.resumeWith_rk9gbt_k$(tmp1_elvis_lhs == null ? Companion_getInstance().RESUME_1 : tmp1_elvis_lhs.value_1);
|
|
1914
|
-
}
|
|
1915
|
-
var TaskClass;
|
|
1916
|
-
function Task() {
|
|
1917
|
-
if (TaskClass === VOID4) {
|
|
1918
|
-
let $ = function() {
|
|
1919
|
-
};
|
|
1920
|
-
initMetadataForInterface2($, "Task");
|
|
1921
|
-
TaskClass = $;
|
|
1922
|
-
}
|
|
1923
|
-
return TaskClass;
|
|
1924
|
-
}
|
|
1925
|
-
var ReadClass;
|
|
1926
|
-
function Read() {
|
|
1927
|
-
if (ReadClass === VOID4) {
|
|
1928
|
-
let $ = function(continuation) {
|
|
1929
|
-
this.continuation_1 = continuation;
|
|
1930
|
-
this.created_1 = null;
|
|
1931
|
-
if (get_DEVELOPMENT_MODE()) {
|
|
1932
|
-
var tmp = this;
|
|
1933
|
-
var this_0 = newThrowable("ReadTask 0x" + toString_1(hashCode(this.continuation_1), 16));
|
|
1934
|
-
stackTraceToString(this_0);
|
|
1935
|
-
tmp.created_1 = this_0;
|
|
1936
|
-
}
|
|
1937
|
-
};
|
|
1938
|
-
initMetadataForClass2($, "Read", VOID4, VOID4, [Task()]);
|
|
1939
|
-
protoOf4($).get_continuation_7yron4_k$ = function() {
|
|
1940
|
-
return this.continuation_1;
|
|
1941
|
-
};
|
|
1942
|
-
protoOf4($).get_created_i9xfr3_k$ = function() {
|
|
1943
|
-
return this.created_1;
|
|
1944
|
-
};
|
|
1945
|
-
protoOf4($).taskName_6sat74_k$ = function() {
|
|
1946
|
-
return "read";
|
|
1947
|
-
};
|
|
1948
|
-
protoOf4($).resume_2o15jx_k$ = resume;
|
|
1949
|
-
protoOf4($).resume_xzb95z_k$ = resume_0;
|
|
1950
|
-
ReadClass = $;
|
|
1951
|
-
}
|
|
1952
|
-
return ReadClass;
|
|
1953
|
-
}
|
|
1954
|
-
var WriteClass;
|
|
1955
|
-
function Write() {
|
|
1956
|
-
if (WriteClass === VOID4) {
|
|
1957
|
-
let $ = function(continuation) {
|
|
1958
|
-
this.continuation_1 = continuation;
|
|
1959
|
-
this.created_1 = null;
|
|
1960
|
-
if (get_DEVELOPMENT_MODE()) {
|
|
1961
|
-
var tmp = this;
|
|
1962
|
-
var this_0 = newThrowable("WriteTask 0x" + toString_1(hashCode(this.continuation_1), 16));
|
|
1963
|
-
stackTraceToString(this_0);
|
|
1964
|
-
tmp.created_1 = this_0;
|
|
1965
|
-
}
|
|
1966
|
-
};
|
|
1967
|
-
initMetadataForClass2($, "Write", VOID4, VOID4, [Task()]);
|
|
1968
|
-
protoOf4($).get_continuation_7yron4_k$ = function() {
|
|
1969
|
-
return this.continuation_1;
|
|
1970
|
-
};
|
|
1971
|
-
protoOf4($).get_created_i9xfr3_k$ = function() {
|
|
1972
|
-
return this.created_1;
|
|
1973
|
-
};
|
|
1974
|
-
protoOf4($).taskName_6sat74_k$ = function() {
|
|
1975
|
-
return "write";
|
|
1976
|
-
};
|
|
1977
|
-
protoOf4($).resume_2o15jx_k$ = resume;
|
|
1978
|
-
protoOf4($).resume_xzb95z_k$ = resume_0;
|
|
1979
|
-
WriteClass = $;
|
|
1980
|
-
}
|
|
1981
|
-
return WriteClass;
|
|
1982
|
-
}
|
|
1983
|
-
function rethrowCloseCauseIfNeeded2($this) {
|
|
1984
|
-
var tmp0_safe_receiver = $this.get_closedCause_o1qcj8_k$();
|
|
1985
|
-
if (tmp0_safe_receiver == null)
|
|
1986
|
-
null;
|
|
1987
|
-
else {
|
|
1988
|
-
throw tmp0_safe_receiver;
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
function moveFlushToReadBuffer($this) {
|
|
1992
|
-
$this.flushBufferMutex_1;
|
|
1993
|
-
$this.flushBuffer_1.transferTo_lu4ka2_k$($this._readBuffer_1);
|
|
1994
|
-
$this.flushBufferSize_1 = 0;
|
|
1995
|
-
var current = $this.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
1996
|
-
var tmp;
|
|
1997
|
-
if (current instanceof Write()) {
|
|
1998
|
-
tmp = $this.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
1999
|
-
} else {
|
|
2000
|
-
tmp = false;
|
|
2001
|
-
}
|
|
2002
|
-
if (tmp) {
|
|
2003
|
-
current.resume_2o15jx_k$();
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
function closeSlot($this, cause) {
|
|
2007
|
-
var closeContinuation = !(cause == null) ? new (Closed())(cause) : Companion_getInstance().CLOSED_1;
|
|
2008
|
-
var continuation = $this.suspensionSlot_1.atomicfu$getAndSet(closeContinuation);
|
|
2009
|
-
if (isInterface(continuation, Task())) {
|
|
2010
|
-
continuation.resume_xzb95z_k$(cause);
|
|
2011
|
-
}
|
|
2012
|
-
var tmp0_safe_receiver = $this.closeHandler_1.atomicfu$getAndSet(null);
|
|
2013
|
-
if (tmp0_safe_receiver == null)
|
|
2014
|
-
null;
|
|
2015
|
-
else
|
|
2016
|
-
tmp0_safe_receiver(cause);
|
|
2017
|
-
}
|
|
2018
|
-
var sam$kotlinx_coroutines_DisposableHandle$0Class;
|
|
2019
|
-
function sam$kotlinx_coroutines_DisposableHandle$0() {
|
|
2020
|
-
if (sam$kotlinx_coroutines_DisposableHandle$0Class === VOID4) {
|
|
2021
|
-
let $ = function(function_0) {
|
|
2022
|
-
this.function_1 = function_0;
|
|
2023
|
-
};
|
|
2024
|
-
initMetadataForClass2($, "sam$kotlinx_coroutines_DisposableHandle$0", VOID4, VOID4, [DisposableHandle(), FunctionAdapter()]);
|
|
2025
|
-
protoOf4($).dispose_3nnxhr_k$ = function() {
|
|
2026
|
-
return this.function_1();
|
|
2027
|
-
};
|
|
2028
|
-
protoOf4($).getFunctionDelegate_jtodtf_k$ = function() {
|
|
2029
|
-
return this.function_1;
|
|
2030
|
-
};
|
|
2031
|
-
protoOf4($).equals = function(other) {
|
|
2032
|
-
var tmp;
|
|
2033
|
-
if (!(other == null) ? isInterface(other, DisposableHandle()) : false) {
|
|
2034
|
-
var tmp_0;
|
|
2035
|
-
if (!(other == null) ? isInterface(other, FunctionAdapter()) : false) {
|
|
2036
|
-
tmp_0 = equals2(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
|
|
2037
|
-
} else {
|
|
2038
|
-
tmp_0 = false;
|
|
2039
|
-
}
|
|
2040
|
-
tmp = tmp_0;
|
|
2041
|
-
} else {
|
|
2042
|
-
tmp = false;
|
|
2043
|
-
}
|
|
2044
|
-
return tmp;
|
|
2045
|
-
};
|
|
2046
|
-
protoOf4($).hashCode = function() {
|
|
2047
|
-
return hashCode(this.getFunctionDelegate_jtodtf_k$());
|
|
2048
|
-
};
|
|
2049
|
-
sam$kotlinx_coroutines_DisposableHandle$0Class = $;
|
|
2050
|
-
}
|
|
2051
|
-
return sam$kotlinx_coroutines_DisposableHandle$0Class;
|
|
2052
|
-
}
|
|
2053
|
-
function ByteChannel$invokeOnClose$lambda() {
|
|
2054
|
-
return Unit_instance4;
|
|
2055
|
-
}
|
|
2056
|
-
function ByteChannel$invokeOnClose$lambda_0() {
|
|
2057
|
-
return Unit_instance4;
|
|
2058
|
-
}
|
|
2059
|
-
function ByteChannel$invokeOnClose$lambda_1(this$0, $handler) {
|
|
2060
|
-
return function() {
|
|
2061
|
-
this$0.closeHandler_1.atomicfu$compareAndSet($handler, null);
|
|
2062
|
-
return Unit_instance4;
|
|
2063
|
-
};
|
|
2064
|
-
}
|
|
2065
|
-
var $awaitContentCOROUTINE$Class;
|
|
2066
|
-
function $awaitContentCOROUTINE$() {
|
|
2067
|
-
if ($awaitContentCOROUTINE$Class === VOID4) {
|
|
2068
|
-
let $ = function(_this__u8e3s4, min, resultContinuation) {
|
|
2069
|
-
CoroutineImpl4().call(this, resultContinuation);
|
|
2070
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2071
|
-
this.min_1 = min;
|
|
2072
|
-
};
|
|
2073
|
-
initMetadataForCoroutine4($, CoroutineImpl4());
|
|
2074
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
2075
|
-
var suspendResult = this.result_1;
|
|
2076
|
-
$sm: do
|
|
2077
|
-
try {
|
|
2078
|
-
var tmp = this.state_1;
|
|
2079
|
-
switch (tmp) {
|
|
2080
|
-
case 0:
|
|
2081
|
-
this.exceptionState_1 = 4;
|
|
2082
|
-
rethrowCloseCauseIfNeeded2(this._this__u8e3s4__1);
|
|
2083
|
-
if (this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$() >= fromInt3(this.min_1))
|
|
2084
|
-
return true;
|
|
2085
|
-
this.this0__1 = this._this__u8e3s4__1;
|
|
2086
|
-
this.state_1 = 1;
|
|
2087
|
-
continue $sm;
|
|
2088
|
-
case 1:
|
|
2089
|
-
if (!(add3(numberToLong2(this._this__u8e3s4__1.flushBufferSize_1), this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$()) < fromInt3(this.min_1) && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
2090
|
-
this.state_1 = 3;
|
|
2091
|
-
continue $sm;
|
|
2092
|
-
}
|
|
2093
|
-
this.state_1 = 2;
|
|
2094
|
-
var cancellable = new (CancellableContinuationImpl())(intercepted(this), 1);
|
|
2095
|
-
cancellable.initCancellability_shqc60_k$();
|
|
2096
|
-
var tmp0 = this.this0__1;
|
|
2097
|
-
var tmp2 = new (Read())(cancellable);
|
|
2098
|
-
l$ret$1: do {
|
|
2099
|
-
var previous = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
2100
|
-
if (!(previous instanceof Closed())) {
|
|
2101
|
-
if (!tmp0.suspensionSlot_1.atomicfu$compareAndSet(previous, tmp2)) {
|
|
2102
|
-
tmp2.resume_2o15jx_k$();
|
|
2103
|
-
break l$ret$1;
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
if (previous instanceof Read()) {
|
|
2107
|
-
previous.resume_xzb95z_k$(new (ConcurrentIOException())(tmp2.taskName_6sat74_k$(), previous.get_created_i9xfr3_k$()));
|
|
2108
|
-
} else {
|
|
2109
|
-
if (isInterface(previous, Task())) {
|
|
2110
|
-
previous.resume_2o15jx_k$();
|
|
2111
|
-
} else {
|
|
2112
|
-
if (previous instanceof Closed()) {
|
|
2113
|
-
tmp2.resume_xzb95z_k$(previous.cause_1);
|
|
2114
|
-
break l$ret$1;
|
|
2115
|
-
} else {
|
|
2116
|
-
if (!equals2(previous, Empty_instance)) {
|
|
2117
|
-
noWhenBranchMatchedException();
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
if (!(add3(numberToLong2(this._this__u8e3s4__1.flushBufferSize_1), this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$()) < fromInt3(this.min_1) && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
2123
|
-
var current = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
2124
|
-
var tmp_0;
|
|
2125
|
-
if (current instanceof Read()) {
|
|
2126
|
-
tmp_0 = tmp0.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
2127
|
-
} else {
|
|
2128
|
-
tmp_0 = false;
|
|
2129
|
-
}
|
|
2130
|
-
if (tmp_0) {
|
|
2131
|
-
current.resume_2o15jx_k$();
|
|
2132
|
-
}
|
|
2133
|
-
}
|
|
2134
|
-
} while (false);
|
|
2135
|
-
suspendResult = returnIfSuspended(cancellable.getResult_fck196_k$(), this);
|
|
2136
|
-
if (suspendResult === get_COROUTINE_SUSPENDED4()) {
|
|
2137
|
-
return suspendResult;
|
|
2138
|
-
}
|
|
2139
|
-
continue $sm;
|
|
2140
|
-
case 2:
|
|
2141
|
-
this.state_1 = 1;
|
|
2142
|
-
continue $sm;
|
|
2143
|
-
case 3:
|
|
2144
|
-
rethrowCloseCauseIfNeeded2(this._this__u8e3s4__1);
|
|
2145
|
-
if (this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$() < 1048576n) {
|
|
2146
|
-
moveFlushToReadBuffer(this._this__u8e3s4__1);
|
|
2147
|
-
}
|
|
2148
|
-
return this._this__u8e3s4__1._readBuffer_1.get_size_woubt6_k$() >= fromInt3(this.min_1);
|
|
2149
|
-
case 4:
|
|
2150
|
-
throw this.exception_1;
|
|
2151
|
-
}
|
|
2152
|
-
} catch ($p) {
|
|
2153
|
-
var e = $p;
|
|
2154
|
-
if (this.exceptionState_1 === 4) {
|
|
2155
|
-
throw e;
|
|
2156
|
-
} else {
|
|
2157
|
-
this.state_1 = this.exceptionState_1;
|
|
2158
|
-
this.exception_1 = e;
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
while (true);
|
|
2162
|
-
};
|
|
2163
|
-
$awaitContentCOROUTINE$Class = $;
|
|
2164
|
-
}
|
|
2165
|
-
return $awaitContentCOROUTINE$Class;
|
|
2166
|
-
}
|
|
2167
|
-
var $flushCOROUTINE$Class;
|
|
2168
|
-
function $flushCOROUTINE$() {
|
|
2169
|
-
if ($flushCOROUTINE$Class === VOID4) {
|
|
2170
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
2171
|
-
CoroutineImpl4().call(this, resultContinuation);
|
|
2172
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2173
|
-
};
|
|
2174
|
-
initMetadataForCoroutine4($, CoroutineImpl4());
|
|
2175
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
2176
|
-
var suspendResult = this.result_1;
|
|
2177
|
-
$sm: do
|
|
2178
|
-
try {
|
|
2179
|
-
var tmp = this.state_1;
|
|
2180
|
-
switch (tmp) {
|
|
2181
|
-
case 0:
|
|
2182
|
-
this.exceptionState_1 = 4;
|
|
2183
|
-
rethrowCloseCauseIfNeeded2(this._this__u8e3s4__1);
|
|
2184
|
-
this._this__u8e3s4__1.flushWriteBuffer_z39w8l_k$();
|
|
2185
|
-
if (this._this__u8e3s4__1.get_hasFreeSpace_krtyyf_k$())
|
|
2186
|
-
return Unit_instance4;
|
|
2187
|
-
this.this0__1 = this._this__u8e3s4__1;
|
|
2188
|
-
this.state_1 = 1;
|
|
2189
|
-
continue $sm;
|
|
2190
|
-
case 1:
|
|
2191
|
-
if (!(!this._this__u8e3s4__1.get_hasFreeSpace_krtyyf_k$() && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
2192
|
-
this.state_1 = 3;
|
|
2193
|
-
continue $sm;
|
|
2194
|
-
}
|
|
2195
|
-
this.state_1 = 2;
|
|
2196
|
-
var cancellable = new (CancellableContinuationImpl())(intercepted(this), 1);
|
|
2197
|
-
cancellable.initCancellability_shqc60_k$();
|
|
2198
|
-
var tmp0 = this.this0__1;
|
|
2199
|
-
var tmp2 = new (Write())(cancellable);
|
|
2200
|
-
l$ret$1: do {
|
|
2201
|
-
var previous = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
2202
|
-
if (!(previous instanceof Closed())) {
|
|
2203
|
-
if (!tmp0.suspensionSlot_1.atomicfu$compareAndSet(previous, tmp2)) {
|
|
2204
|
-
tmp2.resume_2o15jx_k$();
|
|
2205
|
-
break l$ret$1;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
if (previous instanceof Write()) {
|
|
2209
|
-
previous.resume_xzb95z_k$(new (ConcurrentIOException())(tmp2.taskName_6sat74_k$(), previous.get_created_i9xfr3_k$()));
|
|
2210
|
-
} else {
|
|
2211
|
-
if (isInterface(previous, Task())) {
|
|
2212
|
-
previous.resume_2o15jx_k$();
|
|
2213
|
-
} else {
|
|
2214
|
-
if (previous instanceof Closed()) {
|
|
2215
|
-
tmp2.resume_xzb95z_k$(previous.cause_1);
|
|
2216
|
-
break l$ret$1;
|
|
2217
|
-
} else {
|
|
2218
|
-
if (!equals2(previous, Empty_instance)) {
|
|
2219
|
-
noWhenBranchMatchedException();
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
if (!(!this._this__u8e3s4__1.get_hasFreeSpace_krtyyf_k$() && this._this__u8e3s4__1._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
2225
|
-
var current = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
2226
|
-
var tmp_0;
|
|
2227
|
-
if (current instanceof Write()) {
|
|
2228
|
-
tmp_0 = tmp0.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
2229
|
-
} else {
|
|
2230
|
-
tmp_0 = false;
|
|
2231
|
-
}
|
|
2232
|
-
if (tmp_0) {
|
|
2233
|
-
current.resume_2o15jx_k$();
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
} while (false);
|
|
2237
|
-
suspendResult = returnIfSuspended(cancellable.getResult_fck196_k$(), this);
|
|
2238
|
-
if (suspendResult === get_COROUTINE_SUSPENDED4()) {
|
|
2239
|
-
return suspendResult;
|
|
2240
|
-
}
|
|
2241
|
-
continue $sm;
|
|
2242
|
-
case 2:
|
|
2243
|
-
this.state_1 = 1;
|
|
2244
|
-
continue $sm;
|
|
2245
|
-
case 3:
|
|
2246
|
-
return Unit_instance4;
|
|
2247
|
-
case 4:
|
|
2248
|
-
throw this.exception_1;
|
|
2249
|
-
}
|
|
2250
|
-
} catch ($p) {
|
|
2251
|
-
var e = $p;
|
|
2252
|
-
if (this.exceptionState_1 === 4) {
|
|
2253
|
-
throw e;
|
|
2254
|
-
} else {
|
|
2255
|
-
this.state_1 = this.exceptionState_1;
|
|
2256
|
-
this.exception_1 = e;
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
while (true);
|
|
2260
|
-
};
|
|
2261
|
-
$flushCOROUTINE$Class = $;
|
|
2262
|
-
}
|
|
2263
|
-
return $flushCOROUTINE$Class;
|
|
2264
|
-
}
|
|
2265
|
-
var $flushAndCloseCOROUTINE$Class;
|
|
2266
|
-
function $flushAndCloseCOROUTINE$() {
|
|
2267
|
-
if ($flushAndCloseCOROUTINE$Class === VOID4) {
|
|
2268
|
-
let $ = function(_this__u8e3s4, resultContinuation) {
|
|
2269
|
-
CoroutineImpl4().call(this, resultContinuation);
|
|
2270
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2271
|
-
};
|
|
2272
|
-
initMetadataForCoroutine4($, CoroutineImpl4());
|
|
2273
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
2274
|
-
var suspendResult = this.result_1;
|
|
2275
|
-
$sm: do
|
|
2276
|
-
try {
|
|
2277
|
-
var tmp = this.state_1;
|
|
2278
|
-
switch (tmp) {
|
|
2279
|
-
case 0:
|
|
2280
|
-
this.exceptionState_1 = 4;
|
|
2281
|
-
var this_0 = this._this__u8e3s4__1;
|
|
2282
|
-
this.exceptionState_1 = 2;
|
|
2283
|
-
this.tmp01__1 = Companion_instance;
|
|
2284
|
-
this.state_1 = 1;
|
|
2285
|
-
suspendResult = this_0.flush_4wsz1p_k$(this);
|
|
2286
|
-
if (suspendResult === get_COROUTINE_SUSPENDED4()) {
|
|
2287
|
-
return suspendResult;
|
|
2288
|
-
}
|
|
2289
|
-
continue $sm;
|
|
2290
|
-
case 1:
|
|
2291
|
-
var tmp_0 = this;
|
|
2292
|
-
this.tmp01__1;
|
|
2293
|
-
tmp_0.TRY_RESULT0__1 = _Result___init__impl__xyqfz8(Unit_instance4);
|
|
2294
|
-
this.exceptionState_1 = 4;
|
|
2295
|
-
this.state_1 = 3;
|
|
2296
|
-
continue $sm;
|
|
2297
|
-
case 2:
|
|
2298
|
-
this.exceptionState_1 = 4;
|
|
2299
|
-
var tmp_1 = this.exception_1;
|
|
2300
|
-
if (tmp_1 instanceof Error) {
|
|
2301
|
-
var e = this.exception_1;
|
|
2302
|
-
var tmp_2 = this;
|
|
2303
|
-
tmp_2.TRY_RESULT0__1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
2304
|
-
this.state_1 = 3;
|
|
2305
|
-
continue $sm;
|
|
2306
|
-
} else {
|
|
2307
|
-
throw this.exception_1;
|
|
2308
|
-
}
|
|
2309
|
-
case 3:
|
|
2310
|
-
this.exceptionState_1 = 4;
|
|
2311
|
-
if (!this._this__u8e3s4__1._closedCause_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
2312
|
-
return Unit_instance4;
|
|
2313
|
-
closeSlot(this._this__u8e3s4__1, null);
|
|
2314
|
-
return Unit_instance4;
|
|
2315
|
-
case 4:
|
|
2316
|
-
throw this.exception_1;
|
|
2317
|
-
}
|
|
2318
|
-
} catch ($p) {
|
|
2319
|
-
var e_0 = $p;
|
|
2320
|
-
if (this.exceptionState_1 === 4) {
|
|
2321
|
-
throw e_0;
|
|
2322
|
-
} else {
|
|
2323
|
-
this.state_1 = this.exceptionState_1;
|
|
2324
|
-
this.exception_1 = e_0;
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
while (true);
|
|
2328
|
-
};
|
|
2329
|
-
$flushAndCloseCOROUTINE$Class = $;
|
|
2330
|
-
}
|
|
2331
|
-
return $flushAndCloseCOROUTINE$Class;
|
|
2332
|
-
}
|
|
2333
|
-
var ByteChannelClass;
|
|
2334
|
-
function ByteChannel() {
|
|
2335
|
-
if (ByteChannelClass === VOID4) {
|
|
2336
|
-
let $ = function(autoFlush) {
|
|
2337
|
-
autoFlush = autoFlush === VOID4 ? false : autoFlush;
|
|
2338
|
-
this.autoFlush_1 = autoFlush;
|
|
2339
|
-
this.flushBuffer_1 = new (Buffer3())();
|
|
2340
|
-
this.flushBufferSize_1 = 0;
|
|
2341
|
-
this.flushBufferMutex_1 = new Object();
|
|
2342
|
-
this.suspensionSlot_1 = atomic$ref$1(Empty_instance);
|
|
2343
|
-
this._readBuffer_1 = new (Buffer3())();
|
|
2344
|
-
this._writeBuffer_1 = new (Buffer3())();
|
|
2345
|
-
this._closedCause_1 = atomic$ref$1(null);
|
|
2346
|
-
this.closeHandler_1 = atomic$ref$1(null);
|
|
2347
|
-
};
|
|
2348
|
-
initMetadataForClass2($, "ByteChannel", ByteChannel, VOID4, [ByteReadChannel(), ByteWriteChannel()], [1, 0]);
|
|
2349
|
-
protoOf4($).get_autoFlush_zfdl3o_k$ = function() {
|
|
2350
|
-
return this.autoFlush_1;
|
|
2351
|
-
};
|
|
2352
|
-
protoOf4($).get_hasFreeSpace_krtyyf_k$ = function() {
|
|
2353
|
-
return this.flushBufferSize_1 < 1048576;
|
|
2354
|
-
};
|
|
2355
|
-
protoOf4($).get_readBuffer_yjmj9b_k$ = function() {
|
|
2356
|
-
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
2357
|
-
if (tmp0_safe_receiver == null)
|
|
2358
|
-
null;
|
|
2359
|
-
else {
|
|
2360
|
-
var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
2361
|
-
var tmp;
|
|
2362
|
-
if (tmp0_subject == null) {
|
|
2363
|
-
tmp = null;
|
|
2364
|
-
} else {
|
|
2365
|
-
if (isInterface(tmp0_subject, CopyableThrowable())) {
|
|
2366
|
-
tmp = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
2367
|
-
} else {
|
|
2368
|
-
if (tmp0_subject instanceof CancellationException()) {
|
|
2369
|
-
tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
2370
|
-
} else {
|
|
2371
|
-
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
2372
|
-
tmp = new (ClosedReadChannelException())(p0);
|
|
2373
|
-
}
|
|
2374
|
-
}
|
|
2375
|
-
}
|
|
2376
|
-
var tmp0_safe_receiver_0 = tmp;
|
|
2377
|
-
var tmp_0;
|
|
2378
|
-
if (tmp0_safe_receiver_0 == null) {
|
|
2379
|
-
tmp_0 = null;
|
|
2380
|
-
} else {
|
|
2381
|
-
throw tmp0_safe_receiver_0;
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
if (this._readBuffer_1.exhausted_p1jt55_k$()) {
|
|
2385
|
-
moveFlushToReadBuffer(this);
|
|
2386
|
-
}
|
|
2387
|
-
return this._readBuffer_1;
|
|
2388
|
-
};
|
|
2389
|
-
protoOf4($).get_writeBuffer_t7kuc6_k$ = function() {
|
|
2390
|
-
if (this.get_isClosedForWrite_seyg5n_k$()) {
|
|
2391
|
-
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
2392
|
-
var tmp;
|
|
2393
|
-
if (tmp0_safe_receiver == null) {
|
|
2394
|
-
tmp = null;
|
|
2395
|
-
} else {
|
|
2396
|
-
var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
2397
|
-
var tmp_0;
|
|
2398
|
-
if (tmp0_subject == null) {
|
|
2399
|
-
tmp_0 = null;
|
|
2400
|
-
} else {
|
|
2401
|
-
if (isInterface(tmp0_subject, CopyableThrowable())) {
|
|
2402
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
2403
|
-
} else {
|
|
2404
|
-
if (tmp0_subject instanceof CancellationException()) {
|
|
2405
|
-
tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
2406
|
-
} else {
|
|
2407
|
-
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
2408
|
-
tmp_0 = new (ClosedWriteChannelException())(p0);
|
|
2409
|
-
}
|
|
2410
|
-
}
|
|
2411
|
-
}
|
|
2412
|
-
var tmp0_safe_receiver_0 = tmp_0;
|
|
2413
|
-
var tmp_1;
|
|
2414
|
-
if (tmp0_safe_receiver_0 == null) {
|
|
2415
|
-
tmp_1 = null;
|
|
2416
|
-
} else {
|
|
2417
|
-
throw tmp0_safe_receiver_0;
|
|
2418
|
-
}
|
|
2419
|
-
tmp = tmp_1;
|
|
2420
|
-
}
|
|
2421
|
-
if (tmp == null)
|
|
2422
|
-
throw new (ClosedWriteChannelException())();
|
|
2423
|
-
}
|
|
2424
|
-
return this._writeBuffer_1;
|
|
2425
|
-
};
|
|
2426
|
-
protoOf4($).get_closedCause_o1qcj8_k$ = function() {
|
|
2427
|
-
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
2428
|
-
var tmp;
|
|
2429
|
-
if (tmp0_safe_receiver == null) {
|
|
2430
|
-
tmp = null;
|
|
2431
|
-
} else {
|
|
2432
|
-
var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
2433
|
-
var tmp_0;
|
|
2434
|
-
if (tmp0_subject == null) {
|
|
2435
|
-
tmp_0 = null;
|
|
2436
|
-
} else {
|
|
2437
|
-
if (isInterface(tmp0_subject, CopyableThrowable())) {
|
|
2438
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
2439
|
-
} else {
|
|
2440
|
-
if (tmp0_subject instanceof CancellationException()) {
|
|
2441
|
-
tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
2442
|
-
} else {
|
|
2443
|
-
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
2444
|
-
tmp_0 = new (ClosedByteChannelException())(p0);
|
|
2445
|
-
}
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
tmp = tmp_0;
|
|
2449
|
-
}
|
|
2450
|
-
return tmp;
|
|
2451
|
-
};
|
|
2452
|
-
protoOf4($).get_isClosedForWrite_seyg5n_k$ = function() {
|
|
2453
|
-
return !(this._closedCause_1.kotlinx$atomicfu$value == null);
|
|
2454
|
-
};
|
|
2455
|
-
protoOf4($).get_isClosedForRead_ajcc1s_k$ = function() {
|
|
2456
|
-
return !(this.get_closedCause_o1qcj8_k$() == null) || this.get_isClosedForWrite_seyg5n_k$() && this.flushBufferSize_1 === 0 && this._readBuffer_1.exhausted_p1jt55_k$();
|
|
2457
|
-
};
|
|
2458
|
-
protoOf4($).awaitContent_q7m0p7_k$ = function(min, $completion) {
|
|
2459
|
-
var tmp = new ($awaitContentCOROUTINE$())(this, min, $completion);
|
|
2460
|
-
tmp.result_1 = Unit_instance4;
|
|
2461
|
-
tmp.exception_1 = null;
|
|
2462
|
-
return tmp.doResume_5yljmg_k$();
|
|
2463
|
-
};
|
|
2464
|
-
protoOf4($).flush_4wsz1p_k$ = function($completion) {
|
|
2465
|
-
var tmp = new ($flushCOROUTINE$())(this, $completion);
|
|
2466
|
-
tmp.result_1 = Unit_instance4;
|
|
2467
|
-
tmp.exception_1 = null;
|
|
2468
|
-
return tmp.doResume_5yljmg_k$();
|
|
2469
|
-
};
|
|
2470
|
-
protoOf4($).flushWriteBuffer_z39w8l_k$ = function() {
|
|
2471
|
-
if (this._writeBuffer_1.exhausted_p1jt55_k$())
|
|
2472
|
-
return Unit_instance4;
|
|
2473
|
-
this.flushBufferMutex_1;
|
|
2474
|
-
var count = convertToInt2(this._writeBuffer_1.get_size_woubt6_k$());
|
|
2475
|
-
this.flushBuffer_1.transferFrom_v29myr_k$(this._writeBuffer_1);
|
|
2476
|
-
this.flushBufferSize_1 = this.flushBufferSize_1 + count | 0;
|
|
2477
|
-
var current = this.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
2478
|
-
var tmp;
|
|
2479
|
-
if (current instanceof Read()) {
|
|
2480
|
-
tmp = this.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
2481
|
-
} else {
|
|
2482
|
-
tmp = false;
|
|
2483
|
-
}
|
|
2484
|
-
if (tmp) {
|
|
2485
|
-
current.resume_2o15jx_k$();
|
|
2486
|
-
}
|
|
2487
|
-
};
|
|
2488
|
-
protoOf4($).close_yn9xrc_k$ = function() {
|
|
2489
|
-
this.flushWriteBuffer_z39w8l_k$();
|
|
2490
|
-
if (!this._closedCause_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
2491
|
-
return Unit_instance4;
|
|
2492
|
-
closeSlot(this, null);
|
|
2493
|
-
};
|
|
2494
|
-
protoOf4($).flushAndClose_3zd2q_k$ = function($completion) {
|
|
2495
|
-
var tmp = new ($flushAndCloseCOROUTINE$())(this, $completion);
|
|
2496
|
-
tmp.result_1 = Unit_instance4;
|
|
2497
|
-
tmp.exception_1 = null;
|
|
2498
|
-
return tmp.doResume_5yljmg_k$();
|
|
2499
|
-
};
|
|
2500
|
-
protoOf4($).cancel_9i2dv0_k$ = function(cause) {
|
|
2501
|
-
if (!(this._closedCause_1.kotlinx$atomicfu$value == null))
|
|
2502
|
-
return Unit_instance4;
|
|
2503
|
-
var closedToken = new (CloseToken())(cause);
|
|
2504
|
-
this._closedCause_1.atomicfu$compareAndSet(null, closedToken);
|
|
2505
|
-
var tmp0_subject = access$_get_origin__hdh1qz(closedToken);
|
|
2506
|
-
var tmp;
|
|
2507
|
-
if (tmp0_subject == null) {
|
|
2508
|
-
tmp = null;
|
|
2509
|
-
} else {
|
|
2510
|
-
if (isInterface(tmp0_subject, CopyableThrowable())) {
|
|
2511
|
-
tmp = access$_get_origin__hdh1qz(closedToken).createCopy_mmw9ld_k$();
|
|
2512
|
-
} else {
|
|
2513
|
-
if (tmp0_subject instanceof CancellationException()) {
|
|
2514
|
-
tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(closedToken).message, access$_get_origin__hdh1qz(closedToken));
|
|
2515
|
-
} else {
|
|
2516
|
-
var p0 = access$_get_origin__hdh1qz(closedToken);
|
|
2517
|
-
tmp = new (ClosedByteChannelException())(p0);
|
|
2518
|
-
}
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
|
-
var wrappedCause = tmp;
|
|
2522
|
-
closeSlot(this, wrappedCause);
|
|
2523
|
-
};
|
|
2524
|
-
protoOf4($).invokeOnClose_agzauw_k$ = function(handler) {
|
|
2525
|
-
var existingCause = this._closedCause_1.kotlinx$atomicfu$value;
|
|
2526
|
-
if (!(existingCause == null)) {
|
|
2527
|
-
var tmp0_subject = access$_get_origin__hdh1qz(existingCause);
|
|
2528
|
-
var tmp;
|
|
2529
|
-
if (tmp0_subject == null) {
|
|
2530
|
-
tmp = null;
|
|
2531
|
-
} else {
|
|
2532
|
-
if (isInterface(tmp0_subject, CopyableThrowable())) {
|
|
2533
|
-
tmp = access$_get_origin__hdh1qz(existingCause).createCopy_mmw9ld_k$();
|
|
2534
|
-
} else {
|
|
2535
|
-
if (tmp0_subject instanceof CancellationException()) {
|
|
2536
|
-
tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(existingCause).message, access$_get_origin__hdh1qz(existingCause));
|
|
2537
|
-
} else {
|
|
2538
|
-
var p0 = access$_get_origin__hdh1qz(existingCause);
|
|
2539
|
-
tmp = new (ClosedByteChannelException())(p0);
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
handler(tmp);
|
|
2544
|
-
var tmp_0 = ByteChannel$invokeOnClose$lambda;
|
|
2545
|
-
return new (sam$kotlinx_coroutines_DisposableHandle$0())(tmp_0);
|
|
2546
|
-
}
|
|
2547
|
-
if (!this.closeHandler_1.atomicfu$compareAndSet(null, handler)) {
|
|
2548
|
-
var message = "Only one invokeOnClose handler is supported per channel";
|
|
2549
|
-
throw IllegalStateException_init_$Create$2(toString3(message));
|
|
2550
|
-
}
|
|
2551
|
-
var cause = this._closedCause_1.kotlinx$atomicfu$value;
|
|
2552
|
-
if (!(cause == null) && this.closeHandler_1.atomicfu$compareAndSet(handler, null)) {
|
|
2553
|
-
var tmp0_subject_0 = access$_get_origin__hdh1qz(cause);
|
|
2554
|
-
var tmp_1;
|
|
2555
|
-
if (tmp0_subject_0 == null) {
|
|
2556
|
-
tmp_1 = null;
|
|
2557
|
-
} else {
|
|
2558
|
-
if (isInterface(tmp0_subject_0, CopyableThrowable())) {
|
|
2559
|
-
tmp_1 = access$_get_origin__hdh1qz(cause).createCopy_mmw9ld_k$();
|
|
2560
|
-
} else {
|
|
2561
|
-
if (tmp0_subject_0 instanceof CancellationException()) {
|
|
2562
|
-
tmp_1 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(cause).message, access$_get_origin__hdh1qz(cause));
|
|
2563
|
-
} else {
|
|
2564
|
-
var p0_0 = access$_get_origin__hdh1qz(cause);
|
|
2565
|
-
tmp_1 = new (ClosedByteChannelException())(p0_0);
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
handler(tmp_1);
|
|
2570
|
-
var tmp_2 = ByteChannel$invokeOnClose$lambda_0;
|
|
2571
|
-
return new (sam$kotlinx_coroutines_DisposableHandle$0())(tmp_2);
|
|
2572
|
-
}
|
|
2573
|
-
var tmp_3 = ByteChannel$invokeOnClose$lambda_1(this, handler);
|
|
2574
|
-
return new (sam$kotlinx_coroutines_DisposableHandle$0())(tmp_3);
|
|
2575
|
-
};
|
|
2576
|
-
protoOf4($).toString = function() {
|
|
2577
|
-
return "ByteChannel[" + hashCode(this) + "]";
|
|
2578
|
-
};
|
|
2579
|
-
protoOf4($).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
2580
|
-
ByteChannelClass = $;
|
|
2581
|
-
}
|
|
2582
|
-
return ByteChannelClass;
|
|
2583
|
-
}
|
|
2584
|
-
var ConcurrentIOExceptionClass;
|
|
2585
|
-
function ConcurrentIOException() {
|
|
2586
|
-
if (ConcurrentIOExceptionClass === VOID4) {
|
|
2587
|
-
let $ = function(taskName, cause) {
|
|
2588
|
-
cause = cause === VOID4 ? null : cause;
|
|
2589
|
-
IllegalStateException_init_$Init$("Concurrent " + taskName + " attempts", cause, this);
|
|
2590
|
-
captureStack(this, ConcurrentIOException());
|
|
2591
|
-
};
|
|
2592
|
-
initMetadataForClass2($, "ConcurrentIOException", VOID4, IllegalStateException());
|
|
2593
|
-
ConcurrentIOExceptionClass = $;
|
|
2594
|
-
}
|
|
2595
|
-
return ConcurrentIOExceptionClass;
|
|
2596
|
-
}
|
|
2597
|
-
Empty_instance = new (Empty())();
|
|
2598
|
-
|
|
2599
|
-
// build/packages/js/ktor-ktor-io/io/ktor/utils/io/ByteWriteChannelOperations.mjs
|
|
2600
|
-
import { VOID3gxj6tk5isa35 as VOID5 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
2601
|
-
import { protoOf180f3jzyo7rfj as protoOf5 } from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
2602
|
-
import {
|
|
2603
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass3,
|
|
2604
|
-
initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference2,
|
|
2605
|
-
initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
|
|
2606
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine5
|
|
2607
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
2608
|
-
import { EmptyCoroutineContext_instance3dshdbvg42f79 as EmptyCoroutineContext_instance } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineContextImpl.mjs";
|
|
2609
|
-
import { CoroutineScopefcb5f5dwqcas as CoroutineScope } from "../kotlinx-coroutines-core/kotlinx/coroutines/CoroutineScope.mjs";
|
|
2610
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance5 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
2611
|
-
import { startCoroutineCancellable18shtfwdieib as startCoroutineCancellable } from "../kotlinx-coroutines-core/kotlinx/coroutines/intrinsics/Cancellable.mjs";
|
|
2612
|
-
import { launch1c91vkjzdi9sd as launch } from "../kotlinx-coroutines-core/kotlinx/coroutines/Builders.common.mjs";
|
|
2613
|
-
import { Continuation1aa2oekvx7jm7 as Continuation } from "../kotlin-kotlin-stdlib/kotlin/coroutines/Continuation.mjs";
|
|
2614
|
-
import { KFunctionImpl1wt0sp8rkf847 as KFunctionImpl2 } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/KFunctionImpl.mjs";
|
|
2615
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl5 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
2616
|
-
import { THROW_CCE2g6jy02ryeudk as THROW_CCE2 } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
2617
|
-
import { isInterface3d6p8outrmvmk as isInterface2 } from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
2618
|
-
import {
|
|
2619
|
-
get_job2zvlvce9o9a29 as get_job,
|
|
2620
|
-
Job13y4jkazwjho0 as Job,
|
|
2621
|
-
cancel1xim2hrvjmwpn as cancel
|
|
2622
|
-
} from "../kotlinx-coroutines-core/kotlinx/coroutines/Job.mjs";
|
|
2623
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED5 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
2624
|
-
import {
|
|
2625
|
-
Companion_instancejy2056q2ma5w as Companion_instance2,
|
|
2626
|
-
_Result___init__impl__xyqfz832zdzqrocazzs as _Result___init__impl__xyqfz82,
|
|
2627
|
-
createFailure8paxfkfa5dc7 as createFailure2
|
|
2628
|
-
} from "../kotlin-kotlin-stdlib/kotlin/Result.mjs";
|
|
2629
|
-
import { constructCallableReference23y65rf941mch as constructCallableReference2 } from "../kotlin-kotlin-stdlib/kotlin/js/reflectRuntime.mjs";
|
|
2630
|
-
import { get_remaining1lapv95kcmm0y as get_remaining2 } from "../ktor-ktor-io/io/ktor/utils/io/core/ByteReadPacket.mjs";
|
|
2631
|
-
function get_NO_CALLBACK() {
|
|
2632
|
-
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2633
|
-
return NO_CALLBACK;
|
|
2634
|
-
}
|
|
2635
|
-
var NO_CALLBACK;
|
|
2636
|
-
function writeFully(_this__u8e3s4, value, startIndex, endIndex, $completion) {
|
|
2637
|
-
startIndex = startIndex === VOID5 ? 0 : startIndex;
|
|
2638
|
-
endIndex = endIndex === VOID5 ? value.length : endIndex;
|
|
2639
|
-
_this__u8e3s4.get_writeBuffer_t7kuc6_k$().write_ti570x_k$(value, startIndex, endIndex);
|
|
2640
|
-
return flushIfNeeded(_this__u8e3s4, $completion);
|
|
2641
|
-
}
|
|
2642
|
-
var WriterJobClass;
|
|
2643
|
-
function WriterJob() {
|
|
2644
|
-
if (WriterJobClass === VOID5) {
|
|
2645
|
-
let $ = function(channel, job) {
|
|
2646
|
-
this.channel_1 = channel;
|
|
2647
|
-
this.job_1 = job;
|
|
2648
|
-
};
|
|
2649
|
-
initMetadataForClass3($, "WriterJob");
|
|
2650
|
-
protoOf5($).get_job_18j2r0_k$ = function() {
|
|
2651
|
-
return this.job_1;
|
|
2652
|
-
};
|
|
2653
|
-
WriterJobClass = $;
|
|
2654
|
-
}
|
|
2655
|
-
return WriterJobClass;
|
|
2656
|
-
}
|
|
2657
|
-
function writer(_this__u8e3s4, coroutineContext, autoFlush, block) {
|
|
2658
|
-
coroutineContext = coroutineContext === VOID5 ? EmptyCoroutineContext_instance : coroutineContext;
|
|
2659
|
-
autoFlush = autoFlush === VOID5 ? false : autoFlush;
|
|
2660
|
-
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2661
|
-
return writer_0(_this__u8e3s4, coroutineContext, new (ByteChannel())(autoFlush), block);
|
|
2662
|
-
}
|
|
2663
|
-
var WriterScopeClass;
|
|
2664
|
-
function WriterScope() {
|
|
2665
|
-
if (WriterScopeClass === VOID5) {
|
|
2666
|
-
let $ = function(channel, coroutineContext) {
|
|
2667
|
-
this.channel_1 = channel;
|
|
2668
|
-
this.coroutineContext_1 = coroutineContext;
|
|
2669
|
-
};
|
|
2670
|
-
initMetadataForClass3($, "WriterScope", VOID5, VOID5, [CoroutineScope()]);
|
|
2671
|
-
protoOf5($).get_coroutineContext_115oqo_k$ = function() {
|
|
2672
|
-
return this.coroutineContext_1;
|
|
2673
|
-
};
|
|
2674
|
-
WriterScopeClass = $;
|
|
2675
|
-
}
|
|
2676
|
-
return WriterScopeClass;
|
|
2677
|
-
}
|
|
2678
|
-
function invokeOnCompletion(_this__u8e3s4, block) {
|
|
2679
|
-
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2680
|
-
return _this__u8e3s4.get_job_18j2r0_k$().invokeOnCompletion_n6cffu_k$(block);
|
|
2681
|
-
}
|
|
2682
|
-
function close(_this__u8e3s4, cause) {
|
|
2683
|
-
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2684
|
-
if (cause == null) {
|
|
2685
|
-
fireAndForget(ByteWriteChannel$flushAndClose$ref_0(_this__u8e3s4));
|
|
2686
|
-
} else {
|
|
2687
|
-
_this__u8e3s4.cancel_9i2dv0_k$(cause);
|
|
2688
|
-
}
|
|
2689
|
-
}
|
|
2690
|
-
function writePacket(_this__u8e3s4, source, $completion) {
|
|
2691
|
-
var tmp = new ($writePacketCOROUTINE$())(_this__u8e3s4, source, $completion);
|
|
2692
|
-
tmp.result_1 = Unit_instance5;
|
|
2693
|
-
tmp.exception_1 = null;
|
|
2694
|
-
return tmp.doResume_5yljmg_k$();
|
|
2695
|
-
}
|
|
2696
|
-
function fireAndForget(_this__u8e3s4) {
|
|
2697
|
-
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2698
|
-
startCoroutineCancellable(_this__u8e3s4, get_NO_CALLBACK());
|
|
2699
|
-
}
|
|
2700
|
-
function writer_0(_this__u8e3s4, coroutineContext, channel, block) {
|
|
2701
|
-
coroutineContext = coroutineContext === VOID5 ? EmptyCoroutineContext_instance : coroutineContext;
|
|
2702
|
-
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
2703
|
-
var this_0 = launch(_this__u8e3s4, coroutineContext, VOID5, writer$slambda_0(block, channel, null));
|
|
2704
|
-
this_0.invokeOnCompletion_n6cffu_k$(writer$lambda(channel));
|
|
2705
|
-
var job = this_0;
|
|
2706
|
-
return new (WriterJob())(channel, job);
|
|
2707
|
-
}
|
|
2708
|
-
function writeByte(_this__u8e3s4, value, $completion) {
|
|
2709
|
-
_this__u8e3s4.get_writeBuffer_t7kuc6_k$().writeByte_9ih3z3_k$(value);
|
|
2710
|
-
return flushIfNeeded(_this__u8e3s4, $completion);
|
|
2711
|
-
}
|
|
2712
|
-
var NO_CALLBACK$1Class;
|
|
2713
|
-
function NO_CALLBACK$1() {
|
|
2714
|
-
if (NO_CALLBACK$1Class === VOID5) {
|
|
2715
|
-
let $ = function() {
|
|
2716
|
-
this.context_1 = EmptyCoroutineContext_instance;
|
|
2717
|
-
};
|
|
2718
|
-
initMetadataForClass3($, VOID5, VOID5, VOID5, [Continuation()]);
|
|
2719
|
-
protoOf5($).get_context_h02k06_k$ = function() {
|
|
2720
|
-
return this.context_1;
|
|
2721
|
-
};
|
|
2722
|
-
protoOf5($).resumeWith_ol1nfv_k$ = function(result) {
|
|
2723
|
-
return Unit_instance5;
|
|
2724
|
-
};
|
|
2725
|
-
protoOf5($).resumeWith_rk9gbt_k$ = function(result) {
|
|
2726
|
-
return this.resumeWith_ol1nfv_k$(result);
|
|
2727
|
-
};
|
|
2728
|
-
NO_CALLBACK$1Class = $;
|
|
2729
|
-
}
|
|
2730
|
-
return NO_CALLBACK$1Class;
|
|
2731
|
-
}
|
|
2732
|
-
var ByteWriteChannel$flushAndClose$refClass2;
|
|
2733
|
-
function ByteWriteChannel$flushAndClose$ref_02() {
|
|
2734
|
-
if (ByteWriteChannel$flushAndClose$refClass2 === VOID5) {
|
|
2735
|
-
let $ = function(p0) {
|
|
2736
|
-
KFunctionImpl2().call(this, 1, 1, 9);
|
|
2737
|
-
this.f$0__1 = p0;
|
|
2738
|
-
};
|
|
2739
|
-
initMetadataForFunctionReference2($, KFunctionImpl2(), VOID5, [0]);
|
|
2740
|
-
protoOf5($).invoke_h7udsx_k$ = function($completion) {
|
|
2741
|
-
return this.f$0__1.flushAndClose_3zd2q_k$($completion);
|
|
2742
|
-
};
|
|
2743
|
-
protoOf5($).invoke_ib42db_k$ = function($completion) {
|
|
2744
|
-
return this.invoke_h7udsx_k$($completion);
|
|
2745
|
-
};
|
|
2746
|
-
ByteWriteChannel$flushAndClose$refClass2 = $;
|
|
2747
|
-
}
|
|
2748
|
-
return ByteWriteChannel$flushAndClose$refClass2;
|
|
2749
|
-
}
|
|
2750
|
-
var writer$slambdaClass;
|
|
2751
|
-
function writer$slambda() {
|
|
2752
|
-
if (writer$slambdaClass === VOID5) {
|
|
2753
|
-
let $ = function($block, $channel, resultContinuation) {
|
|
2754
|
-
this.$block_1 = $block;
|
|
2755
|
-
this.$channel_1 = $channel;
|
|
2756
|
-
CoroutineImpl5().call(this, resultContinuation);
|
|
2757
|
-
};
|
|
2758
|
-
initMetadataForLambda($, CoroutineImpl5(), VOID5, [1]);
|
|
2759
|
-
protoOf5($).invoke_d9fzmj_k$ = function($this$launch, $completion) {
|
|
2760
|
-
var tmp = this.create_rcuf4x_k$($this$launch, $completion);
|
|
2761
|
-
tmp.result_1 = Unit_instance5;
|
|
2762
|
-
tmp.exception_1 = null;
|
|
2763
|
-
return tmp.doResume_5yljmg_k$();
|
|
2764
|
-
};
|
|
2765
|
-
protoOf5($).invoke_qns8j1_k$ = function(p1, $completion) {
|
|
2766
|
-
return this.invoke_d9fzmj_k$((!(p1 == null) ? isInterface2(p1, CoroutineScope()) : false) ? p1 : THROW_CCE2(), $completion);
|
|
2767
|
-
};
|
|
2768
|
-
protoOf5($).doResume_5yljmg_k$ = function() {
|
|
2769
|
-
var suspendResult = this.result_1;
|
|
2770
|
-
$sm: do
|
|
2771
|
-
try {
|
|
2772
|
-
var tmp = this.state_1;
|
|
2773
|
-
switch (tmp) {
|
|
2774
|
-
case 0:
|
|
2775
|
-
this.exceptionState_1 = 14;
|
|
2776
|
-
this.nested2__1 = Job(get_job(this.$this$launch_1.get_coroutineContext_115oqo_k$()));
|
|
2777
|
-
this.state_1 = 1;
|
|
2778
|
-
continue $sm;
|
|
2779
|
-
case 1:
|
|
2780
|
-
this.exceptionState_1 = 4;
|
|
2781
|
-
this.exceptionState_1 = 3;
|
|
2782
|
-
this.state_1 = 2;
|
|
2783
|
-
suspendResult = this.$block_1(new (WriterScope())(this.$channel_1, this.$this$launch_1.get_coroutineContext_115oqo_k$().plus_s13ygv_k$(this.nested2__1)), this);
|
|
2784
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2785
|
-
return suspendResult;
|
|
2786
|
-
}
|
|
2787
|
-
continue $sm;
|
|
2788
|
-
case 2:
|
|
2789
|
-
this.nested2__1.complete_9ww6vb_k$();
|
|
2790
|
-
var tmp_0;
|
|
2791
|
-
if (get_job(this.$this$launch_1.get_coroutineContext_115oqo_k$()).get_isCancelled_trk8pu_k$()) {
|
|
2792
|
-
this.$channel_1.cancel_9i2dv0_k$(get_job(this.$this$launch_1.get_coroutineContext_115oqo_k$()).getCancellationException_8i1q6u_k$());
|
|
2793
|
-
tmp_0 = Unit_instance5;
|
|
2794
|
-
}
|
|
2795
|
-
this.exceptionState_1 = 14;
|
|
2796
|
-
this.state_1 = 9;
|
|
2797
|
-
continue $sm;
|
|
2798
|
-
case 3:
|
|
2799
|
-
this.exceptionState_1 = 4;
|
|
2800
|
-
var tmp_1 = this.exception_1;
|
|
2801
|
-
if (tmp_1 instanceof Error) {
|
|
2802
|
-
var cause = this.exception_1;
|
|
2803
|
-
cancel(this.nested2__1, "Exception thrown while writing to channel", cause);
|
|
2804
|
-
this.$channel_1.cancel_9i2dv0_k$(cause);
|
|
2805
|
-
this.exceptionState_1 = 14;
|
|
2806
|
-
this.state_1 = 9;
|
|
2807
|
-
continue $sm;
|
|
2808
|
-
} else {
|
|
2809
|
-
throw this.exception_1;
|
|
2810
|
-
}
|
|
2811
|
-
case 4:
|
|
2812
|
-
this.exceptionState_1 = 14;
|
|
2813
|
-
this.t3__1 = this.exception_1;
|
|
2814
|
-
this.state_1 = 5;
|
|
2815
|
-
suspendResult = this.nested2__1.join_o20dar_k$(this);
|
|
2816
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2817
|
-
return suspendResult;
|
|
2818
|
-
}
|
|
2819
|
-
continue $sm;
|
|
2820
|
-
case 5:
|
|
2821
|
-
this.$this$launch_1;
|
|
2822
|
-
this.exceptionState_1 = 7;
|
|
2823
|
-
this.tmp05__1 = Companion_instance2;
|
|
2824
|
-
this.state_1 = 6;
|
|
2825
|
-
suspendResult = this.$channel_1.flushAndClose_3zd2q_k$(this);
|
|
2826
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2827
|
-
return suspendResult;
|
|
2828
|
-
}
|
|
2829
|
-
continue $sm;
|
|
2830
|
-
case 6:
|
|
2831
|
-
var tmp_2 = this;
|
|
2832
|
-
this.tmp05__1;
|
|
2833
|
-
tmp_2.TRY_RESULT4__1 = _Result___init__impl__xyqfz82(Unit_instance5);
|
|
2834
|
-
this.exceptionState_1 = 14;
|
|
2835
|
-
this.state_1 = 8;
|
|
2836
|
-
continue $sm;
|
|
2837
|
-
case 7:
|
|
2838
|
-
this.exceptionState_1 = 14;
|
|
2839
|
-
var tmp_3 = this.exception_1;
|
|
2840
|
-
if (tmp_3 instanceof Error) {
|
|
2841
|
-
var e = this.exception_1;
|
|
2842
|
-
var tmp_4 = this;
|
|
2843
|
-
tmp_4.TRY_RESULT4__1 = _Result___init__impl__xyqfz82(createFailure2(e));
|
|
2844
|
-
this.state_1 = 8;
|
|
2845
|
-
continue $sm;
|
|
2846
|
-
} else {
|
|
2847
|
-
throw this.exception_1;
|
|
2848
|
-
}
|
|
2849
|
-
case 8:
|
|
2850
|
-
this.exceptionState_1 = 14;
|
|
2851
|
-
throw this.t3__1;
|
|
2852
|
-
case 9:
|
|
2853
|
-
this.exceptionState_1 = 14;
|
|
2854
|
-
this.state_1 = 10;
|
|
2855
|
-
suspendResult = this.nested2__1.join_o20dar_k$(this);
|
|
2856
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2857
|
-
return suspendResult;
|
|
2858
|
-
}
|
|
2859
|
-
continue $sm;
|
|
2860
|
-
case 10:
|
|
2861
|
-
this.$this$launch_1;
|
|
2862
|
-
this.exceptionState_1 = 12;
|
|
2863
|
-
this.tmp01__1 = Companion_instance2;
|
|
2864
|
-
this.state_1 = 11;
|
|
2865
|
-
suspendResult = this.$channel_1.flushAndClose_3zd2q_k$(this);
|
|
2866
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2867
|
-
return suspendResult;
|
|
2868
|
-
}
|
|
2869
|
-
continue $sm;
|
|
2870
|
-
case 11:
|
|
2871
|
-
var tmp_5 = this;
|
|
2872
|
-
this.tmp01__1;
|
|
2873
|
-
tmp_5.TRY_RESULT0__1 = _Result___init__impl__xyqfz82(Unit_instance5);
|
|
2874
|
-
this.exceptionState_1 = 14;
|
|
2875
|
-
this.state_1 = 13;
|
|
2876
|
-
continue $sm;
|
|
2877
|
-
case 12:
|
|
2878
|
-
this.exceptionState_1 = 14;
|
|
2879
|
-
var tmp_6 = this.exception_1;
|
|
2880
|
-
if (tmp_6 instanceof Error) {
|
|
2881
|
-
var e_0 = this.exception_1;
|
|
2882
|
-
var tmp_7 = this;
|
|
2883
|
-
tmp_7.TRY_RESULT0__1 = _Result___init__impl__xyqfz82(createFailure2(e_0));
|
|
2884
|
-
this.state_1 = 13;
|
|
2885
|
-
continue $sm;
|
|
2886
|
-
} else {
|
|
2887
|
-
throw this.exception_1;
|
|
2888
|
-
}
|
|
2889
|
-
case 13:
|
|
2890
|
-
this.exceptionState_1 = 14;
|
|
2891
|
-
return Unit_instance5;
|
|
2892
|
-
case 14:
|
|
2893
|
-
throw this.exception_1;
|
|
2894
|
-
}
|
|
2895
|
-
} catch ($p) {
|
|
2896
|
-
var e_1 = $p;
|
|
2897
|
-
if (this.exceptionState_1 === 14) {
|
|
2898
|
-
throw e_1;
|
|
2899
|
-
} else {
|
|
2900
|
-
this.state_1 = this.exceptionState_1;
|
|
2901
|
-
this.exception_1 = e_1;
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
while (true);
|
|
2905
|
-
};
|
|
2906
|
-
protoOf5($).create_rcuf4x_k$ = function($this$launch, completion) {
|
|
2907
|
-
var i = new (writer$slambda())(this.$block_1, this.$channel_1, completion);
|
|
2908
|
-
i.$this$launch_1 = $this$launch;
|
|
2909
|
-
return i;
|
|
2910
|
-
};
|
|
2911
|
-
writer$slambdaClass = $;
|
|
2912
|
-
}
|
|
2913
|
-
return writer$slambdaClass;
|
|
2914
|
-
}
|
|
2915
|
-
function writer$slambda_0($block, $channel, resultContinuation) {
|
|
2916
|
-
var i = new (writer$slambda())($block, $channel, resultContinuation);
|
|
2917
|
-
return constructCallableReference2(function($this$launch, $completion) {
|
|
2918
|
-
return i.invoke_d9fzmj_k$($this$launch, $completion);
|
|
2919
|
-
}, 1);
|
|
2920
|
-
}
|
|
2921
|
-
function writer$lambda($channel) {
|
|
2922
|
-
return function(it) {
|
|
2923
|
-
var tmp;
|
|
2924
|
-
if (!(it == null) && !$channel.get_isClosedForWrite_seyg5n_k$()) {
|
|
2925
|
-
$channel.cancel_9i2dv0_k$(it);
|
|
2926
|
-
tmp = Unit_instance5;
|
|
2927
|
-
}
|
|
2928
|
-
return Unit_instance5;
|
|
2929
|
-
};
|
|
2930
|
-
}
|
|
2931
|
-
var $writePacketCOROUTINE$Class;
|
|
2932
|
-
function $writePacketCOROUTINE$() {
|
|
2933
|
-
if ($writePacketCOROUTINE$Class === VOID5) {
|
|
2934
|
-
let $ = function(_this__u8e3s4, source, resultContinuation) {
|
|
2935
|
-
CoroutineImpl5().call(this, resultContinuation);
|
|
2936
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2937
|
-
this.source_1 = source;
|
|
2938
|
-
};
|
|
2939
|
-
initMetadataForCoroutine5($, CoroutineImpl5());
|
|
2940
|
-
protoOf5($).doResume_5yljmg_k$ = function() {
|
|
2941
|
-
var suspendResult = this.result_1;
|
|
2942
|
-
$sm: do
|
|
2943
|
-
try {
|
|
2944
|
-
var tmp = this.state_1;
|
|
2945
|
-
switch (tmp) {
|
|
2946
|
-
case 0:
|
|
2947
|
-
this.exceptionState_1 = 4;
|
|
2948
|
-
this.state_1 = 1;
|
|
2949
|
-
continue $sm;
|
|
2950
|
-
case 1:
|
|
2951
|
-
if (!!this.source_1.exhausted_p1jt55_k$()) {
|
|
2952
|
-
this.state_1 = 3;
|
|
2953
|
-
continue $sm;
|
|
2954
|
-
}
|
|
2955
|
-
this._this__u8e3s4__1.get_writeBuffer_t7kuc6_k$().write_9ocf0z_k$(this.source_1, get_remaining2(this.source_1));
|
|
2956
|
-
this.state_1 = 2;
|
|
2957
|
-
suspendResult = flushIfNeeded(this._this__u8e3s4__1, this);
|
|
2958
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2959
|
-
return suspendResult;
|
|
2960
|
-
}
|
|
2961
|
-
continue $sm;
|
|
2962
|
-
case 2:
|
|
2963
|
-
this.state_1 = 1;
|
|
2964
|
-
continue $sm;
|
|
2965
|
-
case 3:
|
|
2966
|
-
return Unit_instance5;
|
|
2967
|
-
case 4:
|
|
2968
|
-
throw this.exception_1;
|
|
2969
|
-
}
|
|
2970
|
-
} catch ($p) {
|
|
2971
|
-
var e = $p;
|
|
2972
|
-
if (this.exceptionState_1 === 4) {
|
|
2973
|
-
throw e;
|
|
2974
|
-
} else {
|
|
2975
|
-
this.state_1 = this.exceptionState_1;
|
|
2976
|
-
this.exception_1 = e;
|
|
2977
|
-
}
|
|
2978
|
-
}
|
|
2979
|
-
while (true);
|
|
2980
|
-
};
|
|
2981
|
-
$writePacketCOROUTINE$Class = $;
|
|
2982
|
-
}
|
|
2983
|
-
return $writePacketCOROUTINE$Class;
|
|
2984
|
-
}
|
|
2985
|
-
var properties_initialized_ByteWriteChannelOperations_kt_acrf6u;
|
|
2986
|
-
function _init_properties_ByteWriteChannelOperations_kt__i7slrs() {
|
|
2987
|
-
if (!properties_initialized_ByteWriteChannelOperations_kt_acrf6u) {
|
|
2988
|
-
properties_initialized_ByteWriteChannelOperations_kt_acrf6u = true;
|
|
2989
|
-
NO_CALLBACK = new (NO_CALLBACK$1())();
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
export {
|
|
2993
|
-
ByteChannel as ByteChannel3cxdguezl3lu7,
|
|
2994
|
-
ByteChannelScanner as ByteChannelScanner1h148q1m3y1ey,
|
|
2995
|
-
ByteWriteChannel$flushAndClose$ref_0 as ByteWriteChannel$flushAndClose$ref1atmfnh8l7mk3,
|
|
2996
|
-
ByteWriteChannel as ByteWriteChannel3jkhlhzuuoxp1,
|
|
2997
|
-
WriterScope as WriterScope3b0bo1enaee6b,
|
|
2998
|
-
close as close3semq7pafb42g,
|
|
2999
|
-
close2 as closeqm43o3junf8o,
|
|
3000
|
-
copyTo as copyTo2t9ovypu2ttur,
|
|
3001
|
-
copyTo_0 as copyToi5ntzjcye2q9,
|
|
3002
|
-
discard_0 as discard2sn4jld7unr6m,
|
|
3003
|
-
fireAndForget as fireAndForget1uv0d2zhlhrab,
|
|
3004
|
-
flushIfNeeded as flushIfNeededij7q93lpr53w,
|
|
3005
|
-
invokeOnCompletion as invokeOnCompletion1ziuxzoag0iwj,
|
|
3006
|
-
readAvailable_0 as readAvailable3nvldm7ch5xu5,
|
|
3007
|
-
readBuffer_0 as readBuffer2r3jhsj6oz0wn,
|
|
3008
|
-
readBuffer as readBuffery45c0omfxhxc,
|
|
3009
|
-
readLineStrictTo as readLineStrictTo1b1nwo5trwh7s,
|
|
3010
|
-
readPacket as readPacket290wjvm56mmfy,
|
|
3011
|
-
readUntil as readUntil2ls7o0c1kzd4x,
|
|
3012
|
-
rethrowCloseCauseIfNeeded_0 as rethrowCloseCauseIfNeeded2q8fs9csuucwc,
|
|
3013
|
-
rethrowCloseCauseIfNeeded as rethrowCloseCauseIfNeeded3ixo8wl4o3bz4,
|
|
3014
|
-
skipIfFound as skipIfFoundarb6fjv6fvg7,
|
|
3015
|
-
toByteArray as toByteArraylei52b7x53md,
|
|
3016
|
-
writeByte as writeBytequnf40dx25fy,
|
|
3017
|
-
writeFully as writeFully3k1eaua3t4bqd,
|
|
3018
|
-
writePacket as writePacket12ojj8o5tswuc,
|
|
3019
|
-
writer as writer1eia5its2a1fh
|
|
3020
|
-
};
|