@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,2458 +1,213 @@
|
|
|
1
|
-
// Generated by sdk/scripts/post-process-per-file.js from an import cycle of
|
|
2
|
-
// build/packages/js/ktor-ktor-client-core/io/ktor/client/
|
|
3
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
4
|
-
import { protoOf180f3jzyo7rfj as protoOf } from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
5
|
-
import { emptySetcxexqki71qfa as emptySet } from "../kotlin-kotlin-stdlib/kotlin/collections/Sets.mjs";
|
|
6
|
-
import { initMetadataForObject1cxne3s9w65el as initMetadataForObject } from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
7
|
-
import { VOID3gxj6tk5isa35 as VOID } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
8
|
-
var DisabledStorageClass;
|
|
9
|
-
function DisabledStorage() {
|
|
10
|
-
if (DisabledStorageClass === VOID) {
|
|
11
|
-
let $ = function() {
|
|
12
|
-
};
|
|
13
|
-
initMetadataForObject($, "DisabledStorage", VOID, VOID, VOID, [2, 1, 0]);
|
|
14
|
-
protoOf($).store_476b30_k$ = function(url, data, $completion) {
|
|
15
|
-
return Unit_instance;
|
|
16
|
-
};
|
|
17
|
-
protoOf($).find_jwacpr_k$ = function(url, varyKeys2, $completion) {
|
|
18
|
-
return null;
|
|
19
|
-
};
|
|
20
|
-
protoOf($).findAll_wwhkmd_k$ = function(url, $completion) {
|
|
21
|
-
return emptySet();
|
|
22
|
-
};
|
|
23
|
-
protoOf($).remove_jew64o_k$ = function(url, varyKeys2, $completion) {
|
|
24
|
-
return Unit_instance;
|
|
25
|
-
};
|
|
26
|
-
protoOf($).removeAll_y68mdv_k$ = function(url, $completion) {
|
|
27
|
-
return Unit_instance;
|
|
28
|
-
};
|
|
29
|
-
DisabledStorageClass = $;
|
|
30
|
-
}
|
|
31
|
-
return DisabledStorageClass;
|
|
32
|
-
}
|
|
33
|
-
var DisabledStorage_instance;
|
|
34
|
-
function DisabledStorage_getInstance() {
|
|
35
|
-
return DisabledStorage_instance;
|
|
36
|
-
}
|
|
37
|
-
var DisabledCacheStorageClass;
|
|
38
|
-
function DisabledCacheStorage() {
|
|
39
|
-
if (DisabledCacheStorageClass === VOID) {
|
|
40
|
-
let $ = function() {
|
|
41
|
-
DisabledCacheStorage_instance = this;
|
|
42
|
-
HttpCacheStorage().call(this);
|
|
43
|
-
};
|
|
44
|
-
initMetadataForObject($, "DisabledCacheStorage", VOID, HttpCacheStorage());
|
|
45
|
-
protoOf($).store_mrtbis_k$ = function(url, value) {
|
|
46
|
-
};
|
|
47
|
-
protoOf($).find_dhhj18_k$ = function(url, varyKeys2) {
|
|
48
|
-
return null;
|
|
49
|
-
};
|
|
50
|
-
protoOf($).findByUrl_97s5su_k$ = function(url) {
|
|
51
|
-
return emptySet();
|
|
52
|
-
};
|
|
53
|
-
DisabledCacheStorageClass = $;
|
|
54
|
-
}
|
|
55
|
-
return DisabledCacheStorageClass;
|
|
56
|
-
}
|
|
57
|
-
var DisabledCacheStorage_instance;
|
|
58
|
-
function DisabledCacheStorage_getInstance() {
|
|
59
|
-
if (DisabledCacheStorage_instance == null)
|
|
60
|
-
new (DisabledCacheStorage())();
|
|
61
|
-
return DisabledCacheStorage_instance;
|
|
62
|
-
}
|
|
63
|
-
DisabledStorage_instance = new (DisabledStorage())();
|
|
64
|
-
|
|
65
|
-
// build/packages/js/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCacheValidation.mjs
|
|
66
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance2 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
67
|
-
import { first58ocm7j58k3q as first } from "../kotlin-kotlin-stdlib/kotlin/collections/_Collections.mjs";
|
|
68
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
69
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
70
|
-
import {
|
|
71
|
-
toString1pkumu07cwy4m as toString,
|
|
72
|
-
protoOf180f3jzyo7rfj as protoOf2
|
|
73
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
74
|
-
import { initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine } from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
75
|
-
import { VOID3gxj6tk5isa35 as VOID2 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
76
|
-
function refreshNotModifiedResponse(request, response, findAndRefresh3, $completion) {
|
|
77
|
-
var tmp = new ($refreshNotModifiedResponseCOROUTINE$())(request, response, findAndRefresh3, $completion);
|
|
78
|
-
tmp.result_1 = Unit_instance2;
|
|
79
|
-
tmp.exception_1 = null;
|
|
80
|
-
return tmp.doResume_5yljmg_k$();
|
|
81
|
-
}
|
|
82
|
-
function selectResponseToFreshen(_this__u8e3s4, response, headers) {
|
|
83
|
-
if (haveNoValidator(response.get_headers_ef25jx_k$()) && _this__u8e3s4.get_size_woubt6_k$() === 1) {
|
|
84
|
-
var this_0 = first(_this__u8e3s4);
|
|
85
|
-
var tmp;
|
|
86
|
-
if (haveNoValidator(headers(this_0))) {
|
|
87
|
-
tmp = this_0;
|
|
88
|
-
} else {
|
|
89
|
-
tmp = null;
|
|
90
|
-
}
|
|
91
|
-
return tmp;
|
|
92
|
-
}
|
|
93
|
-
var tmp0_elvis_lhs = response.get_headers_ef25jx_k$().get_6bo4tg_k$("ETag");
|
|
94
|
-
var tmp_0;
|
|
95
|
-
if (tmp0_elvis_lhs == null) {
|
|
96
|
-
return null;
|
|
97
|
-
} else {
|
|
98
|
-
tmp_0 = tmp0_elvis_lhs;
|
|
99
|
-
}
|
|
100
|
-
var etag = tmp_0;
|
|
101
|
-
var tmp$ret$2;
|
|
102
|
-
$l$block: {
|
|
103
|
-
var _iterator__ex2g4s = _this__u8e3s4.iterator_jk1svi_k$();
|
|
104
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
105
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
106
|
-
var cachedEtag = headers(element).get_6bo4tg_k$("ETag");
|
|
107
|
-
if (!(cachedEtag == null) && etagMatches(cachedEtag, etag)) {
|
|
108
|
-
tmp$ret$2 = element;
|
|
109
|
-
break $l$block;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
tmp$ret$2 = null;
|
|
113
|
-
}
|
|
114
|
-
return tmp$ret$2;
|
|
115
|
-
}
|
|
116
|
-
function haveNoValidator(_this__u8e3s4) {
|
|
117
|
-
return !_this__u8e3s4.contains_zh0gsb_k$("ETag") && !_this__u8e3s4.contains_zh0gsb_k$("Last-Modified");
|
|
118
|
-
}
|
|
119
|
-
var $refreshNotModifiedResponseCOROUTINE$Class;
|
|
120
|
-
function $refreshNotModifiedResponseCOROUTINE$() {
|
|
121
|
-
if ($refreshNotModifiedResponseCOROUTINE$Class === VOID2) {
|
|
122
|
-
let $ = function(request, response, findAndRefresh3, resultContinuation) {
|
|
123
|
-
CoroutineImpl().call(this, resultContinuation);
|
|
124
|
-
this.request_1 = request;
|
|
125
|
-
this.response_1 = response;
|
|
126
|
-
this.findAndRefresh_1 = findAndRefresh3;
|
|
127
|
-
};
|
|
128
|
-
initMetadataForCoroutine($, CoroutineImpl());
|
|
129
|
-
protoOf2($).doResume_5yljmg_k$ = function() {
|
|
130
|
-
var suspendResult = this.result_1;
|
|
131
|
-
$sm: do
|
|
132
|
-
try {
|
|
133
|
-
var tmp = this.state_1;
|
|
134
|
-
switch (tmp) {
|
|
135
|
-
case 0:
|
|
136
|
-
this.exceptionState_1 = 2;
|
|
137
|
-
this.state_1 = 1;
|
|
138
|
-
suspendResult = this.findAndRefresh_1(this.request_1, this.response_1, this);
|
|
139
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
140
|
-
return suspendResult;
|
|
141
|
-
}
|
|
142
|
-
continue $sm;
|
|
143
|
-
case 1:
|
|
144
|
-
var tmp0_elvis_lhs = suspendResult;
|
|
145
|
-
var tmp_0;
|
|
146
|
-
if (tmp0_elvis_lhs == null) {
|
|
147
|
-
throw new (InvalidCacheStateException())(this.request_1.get_url_18iuii_k$());
|
|
148
|
-
} else {
|
|
149
|
-
tmp_0 = tmp0_elvis_lhs;
|
|
150
|
-
}
|
|
151
|
-
var responseFromCache = tmp_0;
|
|
152
|
-
if (!(varyKeys(responseFromCache).get_size_woubt6_k$() === varyKeys(this.response_1).get_size_woubt6_k$())) {
|
|
153
|
-
get_LOGGER().warn_mz9voc_k$("Vary header mismatch on cached response for " + this.request_1.get_url_18iuii_k$().toString() + ". " + ("Received 304 Not Modified with Vary: " + toString(varyKeys(this.response_1)) + " ") + ("but cached response has Vary: " + toString(varyKeys(responseFromCache)) + ". ") + "According to RFC 9110 \xA715.4.5 and RFC 9111 \xA74.1, the server must include the full Vary header in 304 responses. Proceeding with cached response despite Vary mismatch. Consider reporting this issue to the server maintainers.");
|
|
154
|
-
}
|
|
155
|
-
return responseFromCache;
|
|
156
|
-
case 2:
|
|
157
|
-
throw this.exception_1;
|
|
158
|
-
}
|
|
159
|
-
} catch ($p) {
|
|
160
|
-
var e = $p;
|
|
161
|
-
if (this.exceptionState_1 === 2) {
|
|
162
|
-
throw e;
|
|
163
|
-
} else {
|
|
164
|
-
this.state_1 = this.exceptionState_1;
|
|
165
|
-
this.exception_1 = e;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
while (true);
|
|
169
|
-
};
|
|
170
|
-
$refreshNotModifiedResponseCOROUTINE$Class = $;
|
|
171
|
-
}
|
|
172
|
-
return $refreshNotModifiedResponseCOROUTINE$Class;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// build/packages/js/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCacheLegacy.mjs
|
|
176
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance3 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
177
|
-
import { Url2829xxbhyjpua as Url } from "../ktor-ktor-http/io/ktor/http/URLUtils.mjs";
|
|
178
|
-
import { plus1ogy4liedzq5j as plus } from "../kotlin-kotlin-stdlib/kotlin/collections/_Sets.mjs";
|
|
179
|
-
import { cacheControlv93jhdro9axn as cacheControl } from "../ktor-ktor-http/io/ktor/http/HttpMessageProperties.mjs";
|
|
180
|
-
import {
|
|
181
|
-
equals2au1ep9vhcato as equals,
|
|
182
|
-
protoOf180f3jzyo7rfj as protoOf3,
|
|
183
|
-
hashCodeq5arwsb9dgti as hashCode
|
|
184
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
185
|
-
import { sortedWith2csnbbb21k0lg as sortedWith } from "../kotlin-kotlin-stdlib/kotlin/collections/_Collections.mjs";
|
|
186
|
-
import { FunctionAdapter3lcrrz3moet5b as FunctionAdapter } from "../kotlin-kotlin-stdlib/kotlin/js/FunctionAdapter.mjs";
|
|
187
|
-
import { isInterface3d6p8outrmvmk as isInterface } from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
188
|
-
import { Comparator2b3maoeh98xtg as Comparator } from "../kotlin-kotlin-stdlib/kotlin/ComparatorJs.mjs";
|
|
189
|
-
import {
|
|
190
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
191
|
-
initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference,
|
|
192
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine2
|
|
193
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
194
|
-
import { VOID3gxj6tk5isa35 as VOID3 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
195
|
-
import { KFunctionImpl1wt0sp8rkf847 as KFunctionImpl } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/KFunctionImpl.mjs";
|
|
196
|
-
import { THROW_CCE2g6jy02ryeudk as THROW_CCE } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
197
|
-
import {
|
|
198
|
-
HttpRequest3fsc4149kgwfg as HttpRequest,
|
|
199
|
-
HttpResponseData2dozo5khuplr6 as HttpResponseData
|
|
200
|
-
} from "../ktor-ktor-client-core/io/ktor/client/request/HttpRequest.mjs";
|
|
201
|
-
import { HttpResponse1532ob1hsse1y as HttpResponse } from "../ktor-ktor-client-core/io/ktor/client/statement/HttpResponse.mjs";
|
|
202
|
-
import { constructCallableReference23y65rf941mch as constructCallableReference } from "../kotlin-kotlin-stdlib/kotlin/js/reflectRuntime.mjs";
|
|
203
|
-
import { compareValues1n2ayl87ihzfk as compareValues } from "../kotlin-kotlin-stdlib/kotlin/comparisons/Comparisons.mjs";
|
|
204
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl2 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
205
|
-
import { parseHeaderValuealpos28fgp6t as parseHeaderValue } from "../ktor-ktor-http/io/ktor/http/HttpHeaderValueParser.mjs";
|
|
206
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED2 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
207
|
-
import { header3kx6g3yb4df1r as header } from "../ktor-ktor-client-core/io/ktor/client/request/utils.mjs";
|
|
208
|
-
import {
|
|
209
|
-
isSuccess1pokn37fdu56v as isSuccess,
|
|
210
|
-
Companion_getInstanceu2wrlss616lb as Companion_getInstance_0
|
|
211
|
-
} from "../ktor-ktor-http/io/ktor/http/HttpStatusCode.mjs";
|
|
212
|
-
import {
|
|
213
|
-
Companion_getInstance72dans54qq1a as Companion_getInstance_1,
|
|
214
|
-
HeadersBuilder3h7sn3kkvu98m as HeadersBuilder
|
|
215
|
-
} from "../ktor-ktor-http/io/ktor/http/Headers.mjs";
|
|
216
|
-
import { HttpClientCall_init_$Create$l01lehg8js2a as HttpClientCall_init_$Create$ } from "../ktor-ktor-client-core/io/ktor/client/call/HttpClientCall.mjs";
|
|
217
|
-
function interceptSendLegacy(_this__u8e3s4, plugin, content, scope, $completion) {
|
|
218
|
-
var tmp = new ($interceptSendLegacyCOROUTINE$())(_this__u8e3s4, plugin, content, scope, $completion);
|
|
219
|
-
tmp.result_1 = Unit_instance3;
|
|
220
|
-
tmp.exception_1 = null;
|
|
221
|
-
return tmp.doResume_5yljmg_k$();
|
|
222
|
-
}
|
|
223
|
-
function interceptReceiveLegacy(_this__u8e3s4, response, plugin, scope, $completion) {
|
|
224
|
-
var tmp = new ($interceptReceiveLegacyCOROUTINE$())(_this__u8e3s4, response, plugin, scope, $completion);
|
|
225
|
-
tmp.result_1 = Unit_instance3;
|
|
226
|
-
tmp.exception_1 = null;
|
|
227
|
-
return tmp.doResume_5yljmg_k$();
|
|
228
|
-
}
|
|
229
|
-
function selectResponseToUpdate(_this__u8e3s4, context, content) {
|
|
230
|
-
var url = Url(context.url_1);
|
|
231
|
-
var tmp = HeadersBuilder$get$ref(context.headers_1);
|
|
232
|
-
var lookup = mergedHeadersLookup(content, tmp, HeadersBuilder$getAll$ref(context.headers_1));
|
|
233
|
-
var cachedResponses = plus(_this__u8e3s4.privateStorage_1.findByUrl_97s5su_k$(url), _this__u8e3s4.publicStorage_1.findByUrl_97s5su_k$(url));
|
|
234
|
-
var _iterator__ex2g4s = cachedResponses.iterator_jk1svi_k$();
|
|
235
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
236
|
-
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
237
|
-
var varyKeys2 = item.varyKeys_1;
|
|
238
|
-
var tmp_0;
|
|
239
|
-
if (varyKeys2.isEmpty_y1axqb_k$()) {
|
|
240
|
-
tmp_0 = true;
|
|
241
|
-
} else {
|
|
242
|
-
var tmp$ret$0;
|
|
243
|
-
$l$block_0: {
|
|
244
|
-
if (varyKeys2.isEmpty_y1axqb_k$()) {
|
|
245
|
-
tmp$ret$0 = true;
|
|
246
|
-
break $l$block_0;
|
|
247
|
-
}
|
|
248
|
-
var _iterator__ex2g4s_0 = varyKeys2.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
249
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
250
|
-
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
251
|
-
var key = element.get_key_18j28a_k$();
|
|
252
|
-
var value = element.get_value_j01efc_k$();
|
|
253
|
-
if (!(lookup(key) === value)) {
|
|
254
|
-
tmp$ret$0 = false;
|
|
255
|
-
break $l$block_0;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
tmp$ret$0 = true;
|
|
259
|
-
}
|
|
260
|
-
tmp_0 = tmp$ret$0;
|
|
261
|
-
}
|
|
262
|
-
if (tmp_0) {
|
|
263
|
-
return item;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return null;
|
|
267
|
-
}
|
|
268
|
-
function proceedWithWarning(_this__u8e3s4, cachedCall, scope, $completion) {
|
|
269
|
-
var tmp = new ($proceedWithWarningCOROUTINE$())(_this__u8e3s4, cachedCall, scope, $completion);
|
|
270
|
-
tmp.result_1 = Unit_instance3;
|
|
271
|
-
tmp.exception_1 = null;
|
|
272
|
-
return tmp.doResume_5yljmg_k$();
|
|
273
|
-
}
|
|
274
|
-
function cacheResponse(_this__u8e3s4, response, $completion) {
|
|
275
|
-
var tmp = new ($cacheResponseCOROUTINE$())(_this__u8e3s4, response, $completion);
|
|
276
|
-
tmp.result_1 = Unit_instance3;
|
|
277
|
-
tmp.exception_1 = null;
|
|
278
|
-
return tmp.doResume_5yljmg_k$();
|
|
279
|
-
}
|
|
280
|
-
function findAndRefresh(_this__u8e3s4, request, response) {
|
|
281
|
-
var url = response.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_url_18iuii_k$();
|
|
282
|
-
var cacheControl_0 = cacheControl(response);
|
|
283
|
-
var storage = cacheControl_0.contains_aljjnj_k$(CacheControl_getInstance().PRIVATE_1) ? _this__u8e3s4.privateStorage_1 : _this__u8e3s4.publicStorage_1;
|
|
284
|
-
var tmp0_elvis_lhs = selectResponseToUpdate_0(storage, response, url, request);
|
|
285
|
-
var tmp;
|
|
286
|
-
if (tmp0_elvis_lhs == null) {
|
|
287
|
-
return null;
|
|
288
|
-
} else {
|
|
289
|
-
tmp = tmp0_elvis_lhs;
|
|
290
|
-
}
|
|
291
|
-
var cache = tmp;
|
|
292
|
-
var this_0 = varyKeys(response);
|
|
293
|
-
var tmp_0;
|
|
294
|
-
if (this_0.isEmpty_y1axqb_k$()) {
|
|
295
|
-
tmp_0 = cache.varyKeys_1;
|
|
296
|
-
} else {
|
|
297
|
-
tmp_0 = this_0;
|
|
298
|
-
}
|
|
299
|
-
var newVaryKeys = tmp_0;
|
|
300
|
-
var mergedHeaders = merge(cache.responseHeaders_1, response.get_headers_ef25jx_k$());
|
|
301
|
-
var expires = cacheExpires(response, _this__u8e3s4.isSharedClient_1);
|
|
302
|
-
var updatedCache = withFreshenedMetadata(cache, expires, newVaryKeys, mergedHeaders);
|
|
303
|
-
var tmp_1;
|
|
304
|
-
if (!equals(cache.varyKeys_1, newVaryKeys)) {
|
|
305
|
-
tmp_1 = storage instanceof UnlimitedCacheStorage();
|
|
306
|
-
} else {
|
|
307
|
-
tmp_1 = false;
|
|
308
|
-
}
|
|
309
|
-
if (tmp_1) {
|
|
310
|
-
storage.remove_cwf7aa_k$(url, cache.varyKeys_1);
|
|
311
|
-
}
|
|
312
|
-
storage.store_mrtbis_k$(url, updatedCache);
|
|
313
|
-
return updatedCache.produceResponse_uy9n9o_k$();
|
|
314
|
-
}
|
|
315
|
-
function selectResponseToUpdate_0(_this__u8e3s4, response, url, request) {
|
|
316
|
-
var this_0 = varyKeys(response);
|
|
317
|
-
var tmp;
|
|
318
|
-
if (!this_0.isEmpty_y1axqb_k$()) {
|
|
319
|
-
tmp = this_0;
|
|
320
|
-
} else {
|
|
321
|
-
tmp = null;
|
|
322
|
-
}
|
|
323
|
-
var varyKeys_0 = tmp;
|
|
324
|
-
var tmp_0;
|
|
325
|
-
if (varyKeys_0 == null) {
|
|
326
|
-
tmp_0 = null;
|
|
327
|
-
} else {
|
|
328
|
-
tmp_0 = _this__u8e3s4.find_dhhj18_k$(url, varyKeys_0);
|
|
329
|
-
}
|
|
330
|
-
var tmp1_safe_receiver = tmp_0;
|
|
331
|
-
if (tmp1_safe_receiver == null)
|
|
332
|
-
null;
|
|
333
|
-
else {
|
|
334
|
-
return tmp1_safe_receiver;
|
|
335
|
-
}
|
|
336
|
-
var tmp_1 = request.get_content_h02jrk_k$();
|
|
337
|
-
var tmp_2 = Headers$get$ref(request.get_headers_ef25jx_k$());
|
|
338
|
-
var requestHeaders = mergedHeadersLookup(tmp_1, tmp_2, Headers$getAll$ref(request.get_headers_ef25jx_k$()));
|
|
339
|
-
var this_1 = _this__u8e3s4.findByUrl_97s5su_k$(url);
|
|
340
|
-
var tmp_3 = selectResponseToUpdate$lambda;
|
|
341
|
-
var tmp$ret$8 = new (sam$kotlin_Comparator$0())(tmp_3);
|
|
342
|
-
var cachedResponses = sortedWith(this_1, tmp$ret$8);
|
|
343
|
-
var tmp$ret$9;
|
|
344
|
-
$l$block_1: {
|
|
345
|
-
var _iterator__ex2g4s = cachedResponses.iterator_jk1svi_k$();
|
|
346
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
347
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
348
|
-
var tmp0 = element.varyKeys_1;
|
|
349
|
-
var tmp$ret$11;
|
|
350
|
-
$l$block_0: {
|
|
351
|
-
if (tmp0.isEmpty_y1axqb_k$()) {
|
|
352
|
-
tmp$ret$11 = true;
|
|
353
|
-
break $l$block_0;
|
|
354
|
-
}
|
|
355
|
-
var _iterator__ex2g4s_0 = tmp0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
356
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
357
|
-
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
358
|
-
var key = element_0.get_key_18j28a_k$();
|
|
359
|
-
var value = element_0.get_value_j01efc_k$();
|
|
360
|
-
if (!(requestHeaders(key) === value)) {
|
|
361
|
-
tmp$ret$11 = false;
|
|
362
|
-
break $l$block_0;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
tmp$ret$11 = true;
|
|
366
|
-
}
|
|
367
|
-
if (tmp$ret$11) {
|
|
368
|
-
tmp$ret$9 = element;
|
|
369
|
-
break $l$block_1;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
tmp$ret$9 = null;
|
|
373
|
-
}
|
|
374
|
-
var tmp2_safe_receiver = tmp$ret$9;
|
|
375
|
-
if (tmp2_safe_receiver == null)
|
|
376
|
-
null;
|
|
377
|
-
else {
|
|
378
|
-
return tmp2_safe_receiver;
|
|
379
|
-
}
|
|
380
|
-
return selectResponseToFreshen(cachedResponses, response, selectResponseToUpdate$lambda_0);
|
|
381
|
-
}
|
|
382
|
-
var sam$kotlin_Comparator$0Class;
|
|
383
|
-
function sam$kotlin_Comparator$0() {
|
|
384
|
-
if (sam$kotlin_Comparator$0Class === VOID3) {
|
|
385
|
-
let $ = function(function_0) {
|
|
386
|
-
this.function_1 = function_0;
|
|
387
|
-
};
|
|
388
|
-
initMetadataForClass($, "sam$kotlin_Comparator$0", VOID3, VOID3, [Comparator(), FunctionAdapter()]);
|
|
389
|
-
protoOf3($).compare_bczr_k$ = function(a, b) {
|
|
390
|
-
return this.function_1(a, b);
|
|
391
|
-
};
|
|
392
|
-
protoOf3($).compare = function(a, b) {
|
|
393
|
-
return this.compare_bczr_k$(a, b);
|
|
394
|
-
};
|
|
395
|
-
protoOf3($).getFunctionDelegate_jtodtf_k$ = function() {
|
|
396
|
-
return this.function_1;
|
|
397
|
-
};
|
|
398
|
-
protoOf3($).equals = function(other) {
|
|
399
|
-
var tmp;
|
|
400
|
-
if (!(other == null) ? isInterface(other, Comparator()) : false) {
|
|
401
|
-
var tmp_0;
|
|
402
|
-
if (!(other == null) ? isInterface(other, FunctionAdapter()) : false) {
|
|
403
|
-
tmp_0 = equals(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
|
|
404
|
-
} else {
|
|
405
|
-
tmp_0 = false;
|
|
406
|
-
}
|
|
407
|
-
tmp = tmp_0;
|
|
408
|
-
} else {
|
|
409
|
-
tmp = false;
|
|
410
|
-
}
|
|
411
|
-
return tmp;
|
|
412
|
-
};
|
|
413
|
-
protoOf3($).hashCode = function() {
|
|
414
|
-
return hashCode(this.getFunctionDelegate_jtodtf_k$());
|
|
415
|
-
};
|
|
416
|
-
sam$kotlin_Comparator$0Class = $;
|
|
417
|
-
}
|
|
418
|
-
return sam$kotlin_Comparator$0Class;
|
|
419
|
-
}
|
|
420
|
-
var findAndRefresh$refClass;
|
|
421
|
-
function findAndRefresh$ref() {
|
|
422
|
-
if (findAndRefresh$refClass === VOID3) {
|
|
423
|
-
let $ = function(p0) {
|
|
424
|
-
KFunctionImpl().call(this, 5, 3, 44);
|
|
425
|
-
this.f$0__1 = p0;
|
|
426
|
-
};
|
|
427
|
-
initMetadataForFunctionReference($, KFunctionImpl(), VOID3, [2]);
|
|
428
|
-
protoOf3($).invoke_54uylr_k$ = function(p0, p1, $completion) {
|
|
429
|
-
var tmp0 = this.f$0__1;
|
|
430
|
-
return findAndRefresh(tmp0, p0, p1);
|
|
431
|
-
};
|
|
432
|
-
protoOf3($).invoke_4tzzq6_k$ = function(p1, p2, $completion) {
|
|
433
|
-
var tmp = (!(p1 == null) ? isInterface(p1, HttpRequest()) : false) ? p1 : THROW_CCE();
|
|
434
|
-
return this.invoke_54uylr_k$(tmp, p2 instanceof HttpResponse() ? p2 : THROW_CCE(), $completion);
|
|
435
|
-
};
|
|
436
|
-
findAndRefresh$refClass = $;
|
|
437
|
-
}
|
|
438
|
-
return findAndRefresh$refClass;
|
|
439
|
-
}
|
|
440
|
-
function findAndRefresh$ref_0(p0) {
|
|
441
|
-
var i = new (findAndRefresh$ref())(p0);
|
|
442
|
-
return constructCallableReference(function(p02, p1, $completion) {
|
|
443
|
-
return i.invoke_54uylr_k$(p02, p1, $completion);
|
|
444
|
-
}, 2, 5, 44, VOID3, [p0]);
|
|
445
|
-
}
|
|
446
|
-
function selectResponseToUpdate$lambda(a, b) {
|
|
447
|
-
var tmp = b.response_1.get_responseTime_scfvg7_k$();
|
|
448
|
-
var tmp$ret$2 = a.response_1.get_responseTime_scfvg7_k$();
|
|
449
|
-
return compareValues(tmp, tmp$ret$2);
|
|
450
|
-
}
|
|
451
|
-
function selectResponseToUpdate$lambda_0(it) {
|
|
452
|
-
return it.responseHeaders_1;
|
|
453
|
-
}
|
|
454
|
-
var $interceptSendLegacyCOROUTINE$Class;
|
|
455
|
-
function $interceptSendLegacyCOROUTINE$() {
|
|
456
|
-
if ($interceptSendLegacyCOROUTINE$Class === VOID3) {
|
|
457
|
-
let $ = function(_this__u8e3s4, plugin, content, scope, resultContinuation) {
|
|
458
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
459
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
460
|
-
this.plugin_1 = plugin;
|
|
461
|
-
this.content_1 = content;
|
|
462
|
-
this.scope_1 = scope;
|
|
463
|
-
};
|
|
464
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
465
|
-
protoOf3($).doResume_5yljmg_k$ = function() {
|
|
466
|
-
var suspendResult = this.result_1;
|
|
467
|
-
$sm: do
|
|
468
|
-
try {
|
|
469
|
-
var tmp = this.state_1;
|
|
470
|
-
switch (tmp) {
|
|
471
|
-
case 0:
|
|
472
|
-
this.exceptionState_1 = 8;
|
|
473
|
-
this.cache0__1 = selectResponseToUpdate(this.plugin_1, this._this__u8e3s4__1.context_1, this.content_1);
|
|
474
|
-
if (this.cache0__1 == null) {
|
|
475
|
-
var header_0 = parseHeaderValue(this._this__u8e3s4__1.context_1.headers_1.get_6bo4tg_k$("Cache-Control"));
|
|
476
|
-
if (header_0.contains_aljjnj_k$(CacheControl_getInstance().ONLY_IF_CACHED_1)) {
|
|
477
|
-
this.state_1 = 6;
|
|
478
|
-
suspendResult = Companion_getInstance_5().proceedWithMissingCache_roaukm_k$(this._this__u8e3s4__1, this.scope_1, this);
|
|
479
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
480
|
-
return suspendResult;
|
|
481
|
-
}
|
|
482
|
-
continue $sm;
|
|
483
|
-
} else {
|
|
484
|
-
this.state_1 = 7;
|
|
485
|
-
continue $sm;
|
|
486
|
-
}
|
|
487
|
-
} else {
|
|
488
|
-
this.state_1 = 1;
|
|
489
|
-
continue $sm;
|
|
490
|
-
}
|
|
491
|
-
case 1:
|
|
492
|
-
this.cachedCall1__1 = this.cache0__1.produceResponse_uy9n9o_k$().get_call_wojxrb_k$();
|
|
493
|
-
this.validateStatus2__1 = shouldValidate(this.cache0__1.expires_1, this.cache0__1.response_1.get_headers_ef25jx_k$(), this._this__u8e3s4__1.context_1);
|
|
494
|
-
if (this.validateStatus2__1.equals(ValidateStatus_ShouldNotValidate_getInstance())) {
|
|
495
|
-
this.state_1 = 5;
|
|
496
|
-
suspendResult = Companion_getInstance_5().proceedWithCache_58joj9_k$(this._this__u8e3s4__1, this.scope_1, this.cachedCall1__1, this);
|
|
497
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
498
|
-
return suspendResult;
|
|
499
|
-
}
|
|
500
|
-
continue $sm;
|
|
501
|
-
} else {
|
|
502
|
-
this.state_1 = 2;
|
|
503
|
-
continue $sm;
|
|
504
|
-
}
|
|
505
|
-
case 2:
|
|
506
|
-
if (this.validateStatus2__1.equals(ValidateStatus_ShouldWarn_getInstance())) {
|
|
507
|
-
this.state_1 = 4;
|
|
508
|
-
suspendResult = proceedWithWarning(this._this__u8e3s4__1, this.cachedCall1__1, this.scope_1, this);
|
|
509
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
510
|
-
return suspendResult;
|
|
511
|
-
}
|
|
512
|
-
continue $sm;
|
|
513
|
-
} else {
|
|
514
|
-
this.state_1 = 3;
|
|
515
|
-
continue $sm;
|
|
516
|
-
}
|
|
517
|
-
case 3:
|
|
518
|
-
var tmp0_safe_receiver = this.cache0__1.responseHeaders_1.get_6bo4tg_k$("ETag");
|
|
519
|
-
if (tmp0_safe_receiver == null)
|
|
520
|
-
null;
|
|
521
|
-
else {
|
|
522
|
-
header(this._this__u8e3s4__1.context_1, "If-None-Match", tmp0_safe_receiver);
|
|
523
|
-
}
|
|
524
|
-
var tmp1_safe_receiver = this.cache0__1.responseHeaders_1.get_6bo4tg_k$("Last-Modified");
|
|
525
|
-
if (tmp1_safe_receiver == null)
|
|
526
|
-
null;
|
|
527
|
-
else {
|
|
528
|
-
header(this._this__u8e3s4__1.context_1, "If-Modified-Since", tmp1_safe_receiver);
|
|
529
|
-
}
|
|
530
|
-
return Unit_instance3;
|
|
531
|
-
case 4:
|
|
532
|
-
return Unit_instance3;
|
|
533
|
-
case 5:
|
|
534
|
-
return Unit_instance3;
|
|
535
|
-
case 6:
|
|
536
|
-
this.state_1 = 7;
|
|
537
|
-
continue $sm;
|
|
538
|
-
case 7:
|
|
539
|
-
return Unit_instance3;
|
|
540
|
-
case 8:
|
|
541
|
-
throw this.exception_1;
|
|
542
|
-
}
|
|
543
|
-
} catch ($p) {
|
|
544
|
-
var e = $p;
|
|
545
|
-
if (this.exceptionState_1 === 8) {
|
|
546
|
-
throw e;
|
|
547
|
-
} else {
|
|
548
|
-
this.state_1 = this.exceptionState_1;
|
|
549
|
-
this.exception_1 = e;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
while (true);
|
|
553
|
-
};
|
|
554
|
-
$interceptSendLegacyCOROUTINE$Class = $;
|
|
555
|
-
}
|
|
556
|
-
return $interceptSendLegacyCOROUTINE$Class;
|
|
557
|
-
}
|
|
558
|
-
var $interceptReceiveLegacyCOROUTINE$Class;
|
|
559
|
-
function $interceptReceiveLegacyCOROUTINE$() {
|
|
560
|
-
if ($interceptReceiveLegacyCOROUTINE$Class === VOID3) {
|
|
561
|
-
let $ = function(_this__u8e3s4, response, plugin, scope, resultContinuation) {
|
|
562
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
563
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
564
|
-
this.response_1 = response;
|
|
565
|
-
this.plugin_1 = plugin;
|
|
566
|
-
this.scope_1 = scope;
|
|
567
|
-
};
|
|
568
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
569
|
-
protoOf3($).doResume_5yljmg_k$ = function() {
|
|
570
|
-
var suspendResult = this.result_1;
|
|
571
|
-
$sm: do
|
|
572
|
-
try {
|
|
573
|
-
var tmp = this.state_1;
|
|
574
|
-
switch (tmp) {
|
|
575
|
-
case 0:
|
|
576
|
-
this.exceptionState_1 = 7;
|
|
577
|
-
if (isSuccess(this.response_1.get_status_jnf6d7_k$())) {
|
|
578
|
-
this.state_1 = 5;
|
|
579
|
-
suspendResult = cacheResponse(this.plugin_1, this.response_1, this);
|
|
580
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
581
|
-
return suspendResult;
|
|
582
|
-
}
|
|
583
|
-
continue $sm;
|
|
584
|
-
} else {
|
|
585
|
-
this.state_1 = 1;
|
|
586
|
-
continue $sm;
|
|
587
|
-
}
|
|
588
|
-
case 1:
|
|
589
|
-
if (this.response_1.get_status_jnf6d7_k$().equals(Companion_getInstance_0().NotModified_1)) {
|
|
590
|
-
this.state_1 = 2;
|
|
591
|
-
var tmp_0 = this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$();
|
|
592
|
-
suspendResult = refreshNotModifiedResponse(tmp_0, this.response_1, findAndRefresh$ref_0(this.plugin_1), this);
|
|
593
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
594
|
-
return suspendResult;
|
|
595
|
-
}
|
|
596
|
-
continue $sm;
|
|
597
|
-
} else {
|
|
598
|
-
this.state_1 = 4;
|
|
599
|
-
continue $sm;
|
|
600
|
-
}
|
|
601
|
-
case 2:
|
|
602
|
-
var responseFromCache = suspendResult;
|
|
603
|
-
this.scope_1.monitor_1.raise_3e7w7u_k$(Companion_getInstance_5().HttpResponseFromCache_1, responseFromCache);
|
|
604
|
-
this.state_1 = 3;
|
|
605
|
-
suspendResult = this._this__u8e3s4__1.proceedWith_i5skhv_k$(responseFromCache, this);
|
|
606
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
607
|
-
return suspendResult;
|
|
608
|
-
}
|
|
609
|
-
continue $sm;
|
|
610
|
-
case 3:
|
|
611
|
-
this.state_1 = 4;
|
|
612
|
-
continue $sm;
|
|
613
|
-
case 4:
|
|
614
|
-
return Unit_instance3;
|
|
615
|
-
case 5:
|
|
616
|
-
var reusableResponse = suspendResult;
|
|
617
|
-
this.state_1 = 6;
|
|
618
|
-
suspendResult = this._this__u8e3s4__1.proceedWith_i5skhv_k$(reusableResponse, this);
|
|
619
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
620
|
-
return suspendResult;
|
|
621
|
-
}
|
|
622
|
-
continue $sm;
|
|
623
|
-
case 6:
|
|
624
|
-
return Unit_instance3;
|
|
625
|
-
case 7:
|
|
626
|
-
throw this.exception_1;
|
|
627
|
-
}
|
|
628
|
-
} catch ($p) {
|
|
629
|
-
var e = $p;
|
|
630
|
-
if (this.exceptionState_1 === 7) {
|
|
631
|
-
throw e;
|
|
632
|
-
} else {
|
|
633
|
-
this.state_1 = this.exceptionState_1;
|
|
634
|
-
this.exception_1 = e;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
while (true);
|
|
638
|
-
};
|
|
639
|
-
$interceptReceiveLegacyCOROUTINE$Class = $;
|
|
640
|
-
}
|
|
641
|
-
return $interceptReceiveLegacyCOROUTINE$Class;
|
|
642
|
-
}
|
|
643
|
-
var $proceedWithWarningCOROUTINE$Class;
|
|
644
|
-
function $proceedWithWarningCOROUTINE$() {
|
|
645
|
-
if ($proceedWithWarningCOROUTINE$Class === VOID3) {
|
|
646
|
-
let $ = function(_this__u8e3s4, cachedCall, scope, resultContinuation) {
|
|
647
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
648
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
649
|
-
this.cachedCall_1 = cachedCall;
|
|
650
|
-
this.scope_1 = scope;
|
|
651
|
-
};
|
|
652
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
653
|
-
protoOf3($).doResume_5yljmg_k$ = function() {
|
|
654
|
-
var suspendResult = this.result_1;
|
|
655
|
-
$sm: do
|
|
656
|
-
try {
|
|
657
|
-
var tmp = this.state_1;
|
|
658
|
-
switch (tmp) {
|
|
659
|
-
case 0:
|
|
660
|
-
this.exceptionState_1 = 2;
|
|
661
|
-
var request = this._this__u8e3s4__1.context_1.build_1k0s4u_k$();
|
|
662
|
-
var tmp_0 = this.cachedCall_1.get_response_xlk07e_k$().get_status_jnf6d7_k$();
|
|
663
|
-
var tmp_1 = this.cachedCall_1.get_response_xlk07e_k$().get_requestTime_wwxhg3_k$();
|
|
664
|
-
Companion_getInstance_1();
|
|
665
|
-
var this_0 = new (HeadersBuilder())();
|
|
666
|
-
this_0.appendAll_k8dlt1_k$(this.cachedCall_1.get_response_xlk07e_k$().get_headers_ef25jx_k$());
|
|
667
|
-
this_0.append_rhug0a_k$("Warning", "110");
|
|
668
|
-
var response = new (HttpResponseData())(tmp_0, tmp_1, this_0.build_1k0s4u_k$(), this.cachedCall_1.get_response_xlk07e_k$().get_version_72w4j3_k$(), this.cachedCall_1.get_response_xlk07e_k$().get_rawContent_u3f8li_k$(), this.cachedCall_1.get_response_xlk07e_k$().get_coroutineContext_115oqo_k$());
|
|
669
|
-
var call = HttpClientCall_init_$Create$(this.scope_1, request, response);
|
|
670
|
-
this._this__u8e3s4__1.finish_mh2air_k$();
|
|
671
|
-
this.scope_1.monitor_1.raise_3e7w7u_k$(Companion_getInstance_5().HttpResponseFromCache_1, call.get_response_xlk07e_k$());
|
|
672
|
-
this.state_1 = 1;
|
|
673
|
-
suspendResult = this._this__u8e3s4__1.proceedWith_i5skhv_k$(call, this);
|
|
674
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
675
|
-
return suspendResult;
|
|
676
|
-
}
|
|
677
|
-
continue $sm;
|
|
678
|
-
case 1:
|
|
679
|
-
return Unit_instance3;
|
|
680
|
-
case 2:
|
|
681
|
-
throw this.exception_1;
|
|
682
|
-
}
|
|
683
|
-
} catch ($p) {
|
|
684
|
-
var e = $p;
|
|
685
|
-
if (this.exceptionState_1 === 2) {
|
|
686
|
-
throw e;
|
|
687
|
-
} else {
|
|
688
|
-
this.state_1 = this.exceptionState_1;
|
|
689
|
-
this.exception_1 = e;
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
while (true);
|
|
693
|
-
};
|
|
694
|
-
$proceedWithWarningCOROUTINE$Class = $;
|
|
695
|
-
}
|
|
696
|
-
return $proceedWithWarningCOROUTINE$Class;
|
|
697
|
-
}
|
|
698
|
-
var $cacheResponseCOROUTINE$Class;
|
|
699
|
-
function $cacheResponseCOROUTINE$() {
|
|
700
|
-
if ($cacheResponseCOROUTINE$Class === VOID3) {
|
|
701
|
-
let $ = function(_this__u8e3s4, response, resultContinuation) {
|
|
702
|
-
CoroutineImpl2().call(this, resultContinuation);
|
|
703
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
704
|
-
this.response_1 = response;
|
|
705
|
-
};
|
|
706
|
-
initMetadataForCoroutine2($, CoroutineImpl2());
|
|
707
|
-
protoOf3($).doResume_5yljmg_k$ = function() {
|
|
708
|
-
var suspendResult = this.result_1;
|
|
709
|
-
$sm: do
|
|
710
|
-
try {
|
|
711
|
-
var tmp = this.state_1;
|
|
712
|
-
switch (tmp) {
|
|
713
|
-
case 0:
|
|
714
|
-
this.exceptionState_1 = 2;
|
|
715
|
-
var request = this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$();
|
|
716
|
-
var responseCacheControl = cacheControl(this.response_1);
|
|
717
|
-
var requestCacheControl = cacheControl(request);
|
|
718
|
-
var storage = responseCacheControl.contains_aljjnj_k$(CacheControl_getInstance().PRIVATE_1) ? this._this__u8e3s4__1.privateStorage_1 : this._this__u8e3s4__1.publicStorage_1;
|
|
719
|
-
if (responseCacheControl.contains_aljjnj_k$(CacheControl_getInstance().NO_STORE_1) || requestCacheControl.contains_aljjnj_k$(CacheControl_getInstance().NO_STORE_1)) {
|
|
720
|
-
return this.response_1;
|
|
721
|
-
}
|
|
722
|
-
this.state_1 = 1;
|
|
723
|
-
suspendResult = store_0(storage, request.get_url_18iuii_k$(), this.response_1, this._this__u8e3s4__1.isSharedClient_1, this);
|
|
724
|
-
if (suspendResult === get_COROUTINE_SUSPENDED2()) {
|
|
725
|
-
return suspendResult;
|
|
726
|
-
}
|
|
727
|
-
continue $sm;
|
|
728
|
-
case 1:
|
|
729
|
-
var cacheEntry = suspendResult;
|
|
730
|
-
return cacheEntry.produceResponse_uy9n9o_k$();
|
|
731
|
-
case 2:
|
|
732
|
-
throw this.exception_1;
|
|
733
|
-
}
|
|
734
|
-
} catch ($p) {
|
|
735
|
-
var e = $p;
|
|
736
|
-
if (this.exceptionState_1 === 2) {
|
|
737
|
-
throw e;
|
|
738
|
-
} else {
|
|
739
|
-
this.state_1 = this.exceptionState_1;
|
|
740
|
-
this.exception_1 = e;
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
while (true);
|
|
744
|
-
};
|
|
745
|
-
$cacheResponseCOROUTINE$Class = $;
|
|
746
|
-
}
|
|
747
|
-
return $cacheResponseCOROUTINE$Class;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// build/packages/js/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCache.mjs
|
|
751
|
-
import { KFunctionImpl1wt0sp8rkf847 as KFunctionImpl2 } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/KFunctionImpl.mjs";
|
|
752
|
-
import {
|
|
753
|
-
protoOf180f3jzyo7rfj as protoOf4,
|
|
754
|
-
equals2au1ep9vhcato as equals2,
|
|
755
|
-
hashCodeq5arwsb9dgti as hashCode2,
|
|
756
|
-
captureStack1fzi4aczwc4hg as captureStack
|
|
757
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
758
|
-
import { THROW_CCE2g6jy02ryeudk as THROW_CCE2 } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
759
|
-
import {
|
|
760
|
-
HttpRequest3fsc4149kgwfg as HttpRequest2,
|
|
761
|
-
HttpResponseData2dozo5khuplr6 as HttpResponseData2,
|
|
762
|
-
get_coroutineContext1djaai1ellg0c as get_coroutineContext
|
|
763
|
-
} from "../ktor-ktor-client-core/io/ktor/client/request/HttpRequest.mjs";
|
|
764
|
-
import { isInterface3d6p8outrmvmk as isInterface2 } from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
765
|
-
import {
|
|
766
|
-
HttpResponse1532ob1hsse1y as HttpResponse2,
|
|
767
|
-
get_request3dwcif5y0fvf1 as get_request
|
|
768
|
-
} from "../ktor-ktor-client-core/io/ktor/client/statement/HttpResponse.mjs";
|
|
769
|
-
import {
|
|
770
|
-
initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference2,
|
|
771
|
-
initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
|
|
772
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine3,
|
|
773
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass2,
|
|
774
|
-
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
775
|
-
initMetadataForObject1cxne3s9w65el as initMetadataForObject2
|
|
776
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
777
|
-
import { VOID3gxj6tk5isa35 as VOID4 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
778
|
-
import { constructCallableReference23y65rf941mch as constructCallableReference2 } from "../kotlin-kotlin-stdlib/kotlin/js/reflectRuntime.mjs";
|
|
779
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance4 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
780
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl3 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
781
|
-
import { PipelineContext34fsb0mycu471 as PipelineContext } from "../ktor-ktor-utils/io/ktor/util/pipeline/PipelineContext.mjs";
|
|
782
|
-
import { NoContent1bdx48poqrifq as NoContent } from "../ktor-ktor-http/io/ktor/http/content/OutgoingContent.mjs";
|
|
783
|
-
import { Companion_getInstance29j9s2wnmk34z as Companion_getInstance } from "../ktor-ktor-http/io/ktor/http/HttpMethod.mjs";
|
|
784
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED3 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
785
|
-
import { get_isTraceEnabled82xibuu04nxp as get_isTraceEnabled } from "../ktor-ktor-utils/io/ktor/util/logging/Logger.web.mjs";
|
|
786
|
-
import {
|
|
787
|
-
parseHeaderValuealpos28fgp6t as parseHeaderValue2,
|
|
788
|
-
HeaderValue25b0y1gtwktpe as HeaderValue
|
|
789
|
-
} from "../ktor-ktor-http/io/ktor/http/HttpHeaderValueParser.mjs";
|
|
790
|
-
import { header3kx6g3yb4df1r as header2 } from "../ktor-ktor-client-core/io/ktor/client/request/utils.mjs";
|
|
791
|
-
import {
|
|
792
|
-
isSuccess1pokn37fdu56v as isSuccess2,
|
|
793
|
-
Companion_getInstanceu2wrlss616lb as Companion_getInstance_2
|
|
794
|
-
} from "../ktor-ktor-http/io/ktor/http/HttpStatusCode.mjs";
|
|
795
|
-
import {
|
|
796
|
-
Companion_getInstance72dans54qq1a as Companion_getInstance_3,
|
|
797
|
-
HeadersBuilder3h7sn3kkvu98m as HeadersBuilder2
|
|
798
|
-
} from "../ktor-ktor-http/io/ktor/http/Headers.mjs";
|
|
799
|
-
import { ByteReadChannel1cb89sbyipkce as ByteReadChannel } from "../ktor-ktor-io/io/ktor/utils/io/ByteChannelCtor.mjs";
|
|
800
|
-
import { HttpClientCall_init_$Create$l01lehg8js2a as HttpClientCall_init_$Create$2 } from "../ktor-ktor-client-core/io/ktor/client/call/HttpClientCall.mjs";
|
|
801
|
-
import { GMTDate36bhedawynxlf as GMTDate } from "../ktor-ktor-utils/io/ktor/util/date/DateJs.mjs";
|
|
802
|
-
import { Companion_getInstance32hwbrsal0o03 as Companion_getInstance_4 } from "../ktor-ktor-http/io/ktor/http/HttpProtocolVersion.mjs";
|
|
803
|
-
import { getKClass3t8tygqu4lcxf as getKClass } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/reflection.mjs";
|
|
804
|
-
import { arrayOf1akklvh2at202 as arrayOf } from "../kotlin-kotlin-stdlib/kotlin/Library.mjs";
|
|
805
|
-
import { createKType31ecntyyaay3k as createKType } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/KTypeHelpers.mjs";
|
|
806
|
-
import { TypeInfo2nbxsuf4v8os2 as TypeInfo } from "../ktor-ktor-utils/io/ktor/util/reflect/Type.mjs";
|
|
807
|
-
import { AttributeKey3aq8ytwgx54f7 as AttributeKey } from "../ktor-ktor-utils/io/ktor/util/Attributes.mjs";
|
|
808
|
-
import { EventDefinition1fymk8xrdelhn as EventDefinition } from "../ktor-ktor-events/io/ktor/events/Events.mjs";
|
|
809
|
-
import { PipelinePhase2q3d54imxjlma as PipelinePhase } from "../ktor-ktor-utils/io/ktor/util/pipeline/PipelinePhase.mjs";
|
|
810
|
-
import { Phases_getInstance2rx62p874ogj4 as Phases_getInstance } from "../ktor-ktor-client-core/io/ktor/client/request/HttpRequestPipeline.mjs";
|
|
811
|
-
import { Phases_getInstance1g6ty5i2ownsw as Phases_getInstance_0 } from "../ktor-ktor-client-core/io/ktor/client/statement/HttpResponsePipeline.mjs";
|
|
812
|
-
import { cacheControlv93jhdro9axn as cacheControl2 } from "../ktor-ktor-http/io/ktor/http/HttpMessageProperties.mjs";
|
|
813
|
-
import { FunctionAdapter3lcrrz3moet5b as FunctionAdapter2 } from "../kotlin-kotlin-stdlib/kotlin/js/FunctionAdapter.mjs";
|
|
814
|
-
import { Comparator2b3maoeh98xtg as Comparator2 } from "../kotlin-kotlin-stdlib/kotlin/ComparatorJs.mjs";
|
|
815
|
-
import { compareValues1n2ayl87ihzfk as compareValues2 } from "../kotlin-kotlin-stdlib/kotlin/comparisons/Comparisons.mjs";
|
|
816
|
-
import { sortedWith2csnbbb21k0lg as sortedWith2 } from "../kotlin-kotlin-stdlib/kotlin/collections/_Collections.mjs";
|
|
817
|
-
import { Url2829xxbhyjpua as Url2 } from "../ktor-ktor-http/io/ktor/http/URLUtils.mjs";
|
|
818
|
-
import { plus1ogy4liedzq5j as plus2 } from "../kotlin-kotlin-stdlib/kotlin/collections/_Sets.mjs";
|
|
819
|
-
import {
|
|
820
|
-
IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
|
|
821
|
-
IllegalStateException_init_$Init$2lydy6bjiiso9 as IllegalStateException_init_$Init$,
|
|
822
|
-
IllegalStateException_init_$Create$38ax6c90susjc as IllegalStateException_init_$Create$
|
|
823
|
-
} from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
824
|
-
import { get_KTOR_DEFAULT_USER_AGENT2t7o4jowvy6v7 as get_KTOR_DEFAULT_USER_AGENT } from "../ktor-ktor-client-core/io/ktor/client/engine/Utils.mjs";
|
|
825
|
-
import { KtorSimpleLogger1xdphsp5l4e48 as KtorSimpleLogger } from "../ktor-ktor-utils/io/ktor/util/logging/KtorSimpleLogger.web.mjs";
|
|
826
|
-
function get_LOGGER() {
|
|
827
|
-
_init_properties_HttpCache_kt__w3juvs();
|
|
828
|
-
return LOGGER;
|
|
829
|
-
}
|
|
830
|
-
var LOGGER;
|
|
831
|
-
var HttpCache$findAndRefresh$refClass;
|
|
832
|
-
function HttpCache$findAndRefresh$ref() {
|
|
833
|
-
if (HttpCache$findAndRefresh$refClass === VOID4) {
|
|
834
|
-
let $ = function(p0) {
|
|
835
|
-
KFunctionImpl2().call(this, 1, 3, 39);
|
|
836
|
-
this.f$0__1 = p0;
|
|
837
|
-
};
|
|
838
|
-
initMetadataForFunctionReference2($, KFunctionImpl2(), VOID4, [2]);
|
|
839
|
-
protoOf4($).invoke_54uylr_k$ = function(p0, p1, $completion) {
|
|
840
|
-
var tmp0 = this.f$0__1;
|
|
841
|
-
return findAndRefresh2(tmp0, p0, p1, $completion);
|
|
842
|
-
};
|
|
843
|
-
protoOf4($).invoke_4tzzq6_k$ = function(p1, p2, $completion) {
|
|
844
|
-
var tmp = (!(p1 == null) ? isInterface2(p1, HttpRequest2()) : false) ? p1 : THROW_CCE2();
|
|
845
|
-
return this.invoke_54uylr_k$(tmp, p2 instanceof HttpResponse2() ? p2 : THROW_CCE2(), $completion);
|
|
846
|
-
};
|
|
847
|
-
HttpCache$findAndRefresh$refClass = $;
|
|
848
|
-
}
|
|
849
|
-
return HttpCache$findAndRefresh$refClass;
|
|
850
|
-
}
|
|
851
|
-
function HttpCache$findAndRefresh$ref_0(p0) {
|
|
852
|
-
var i = new (HttpCache$findAndRefresh$ref())(p0);
|
|
853
|
-
return constructCallableReference2(function(p02, p1, $completion) {
|
|
854
|
-
return i.invoke_54uylr_k$(p02, p1, $completion);
|
|
855
|
-
}, 2, 1, 39, "findAndRefresh", [p0]);
|
|
856
|
-
}
|
|
857
|
-
function proceedWithWarning2($this, $receiver, cachedResponse, scope, callContext, $completion) {
|
|
858
|
-
var tmp = new ($proceedWithWarningCOROUTINE$2())($this, $receiver, cachedResponse, scope, callContext, $completion);
|
|
859
|
-
tmp.result_1 = Unit_instance4;
|
|
860
|
-
tmp.exception_1 = null;
|
|
861
|
-
return tmp.doResume_5yljmg_k$();
|
|
862
|
-
}
|
|
863
|
-
var HttpCache$Companion$install$slambdaClass;
|
|
864
|
-
function HttpCache$Companion$install$slambda() {
|
|
865
|
-
if (HttpCache$Companion$install$slambdaClass === VOID4) {
|
|
866
|
-
let $ = function($plugin, $scope, resultContinuation) {
|
|
867
|
-
this.$plugin_1 = $plugin;
|
|
868
|
-
this.$scope_1 = $scope;
|
|
869
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
870
|
-
};
|
|
871
|
-
initMetadataForLambda($, CoroutineImpl3(), VOID4, [2]);
|
|
872
|
-
protoOf4($).invoke_wpcgmu_k$ = function($this$intercept, content, $completion) {
|
|
873
|
-
var tmp = this.create_l3tkcm_k$($this$intercept, content, $completion);
|
|
874
|
-
tmp.result_1 = Unit_instance4;
|
|
875
|
-
tmp.exception_1 = null;
|
|
876
|
-
return tmp.doResume_5yljmg_k$();
|
|
877
|
-
};
|
|
878
|
-
protoOf4($).invoke_4tzzq6_k$ = function(p1, p2, $completion) {
|
|
879
|
-
var tmp = p1 instanceof PipelineContext() ? p1 : THROW_CCE2();
|
|
880
|
-
return this.invoke_wpcgmu_k$(tmp, !(p2 == null) ? p2 : THROW_CCE2(), $completion);
|
|
881
|
-
};
|
|
882
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
883
|
-
var suspendResult = this.result_1;
|
|
884
|
-
$sm: do
|
|
885
|
-
try {
|
|
886
|
-
var tmp = this.state_1;
|
|
887
|
-
switch (tmp) {
|
|
888
|
-
case 0:
|
|
889
|
-
this.exceptionState_1 = 11;
|
|
890
|
-
var tmp_0 = this.content_1;
|
|
891
|
-
if (!(tmp_0 instanceof NoContent()))
|
|
892
|
-
return Unit_instance4;
|
|
893
|
-
if (!this.$this$intercept_1.context_1.method_1.equals(Companion_getInstance().Get_1) || !canStore(this.$this$intercept_1.context_1.url_1.get_protocol_mv93kx_k$()))
|
|
894
|
-
return Unit_instance4;
|
|
895
|
-
if (this.$plugin_1.isSharedClient_1 && this.$this$intercept_1.context_1.headers_1.contains_zh0gsb_k$("Authorization")) {
|
|
896
|
-
return Unit_instance4;
|
|
897
|
-
}
|
|
898
|
-
if (this.$plugin_1.useOldStorage_1) {
|
|
899
|
-
this.state_1 = 10;
|
|
900
|
-
suspendResult = interceptSendLegacy(this.$this$intercept_1, this.$plugin_1, this.content_1, this.$scope_1, this);
|
|
901
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
902
|
-
return suspendResult;
|
|
903
|
-
}
|
|
904
|
-
continue $sm;
|
|
905
|
-
} else {
|
|
906
|
-
this.state_1 = 1;
|
|
907
|
-
continue $sm;
|
|
908
|
-
}
|
|
909
|
-
case 1:
|
|
910
|
-
this.state_1 = 2;
|
|
911
|
-
suspendResult = findResponse(this.$plugin_1, this.$this$intercept_1.context_1, this.content_1, this);
|
|
912
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
913
|
-
return suspendResult;
|
|
914
|
-
}
|
|
915
|
-
continue $sm;
|
|
916
|
-
case 2:
|
|
917
|
-
this.cache0__1 = suspendResult;
|
|
918
|
-
if (this.cache0__1 == null) {
|
|
919
|
-
var this_0 = get_LOGGER();
|
|
920
|
-
if (get_isTraceEnabled(this_0)) {
|
|
921
|
-
this_0.trace_fti9bv_k$("No cached response for " + this.$this$intercept_1.context_1.url_1.toString() + " found");
|
|
922
|
-
}
|
|
923
|
-
var header_0 = parseHeaderValue2(this.$this$intercept_1.context_1.headers_1.get_6bo4tg_k$("Cache-Control"));
|
|
924
|
-
if (header_0.contains_aljjnj_k$(CacheControl_getInstance().ONLY_IF_CACHED_1)) {
|
|
925
|
-
var this_1 = get_LOGGER();
|
|
926
|
-
if (get_isTraceEnabled(this_1)) {
|
|
927
|
-
this_1.trace_fti9bv_k$('No cache found and "only-if-cached" set for ' + this.$this$intercept_1.context_1.url_1.toString());
|
|
928
|
-
}
|
|
929
|
-
this.state_1 = 8;
|
|
930
|
-
suspendResult = Companion_getInstance_5().proceedWithMissingCache_roaukm_k$(this.$this$intercept_1, this.$scope_1, this);
|
|
931
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
932
|
-
return suspendResult;
|
|
933
|
-
}
|
|
934
|
-
continue $sm;
|
|
935
|
-
} else {
|
|
936
|
-
this.state_1 = 9;
|
|
937
|
-
continue $sm;
|
|
938
|
-
}
|
|
939
|
-
} else {
|
|
940
|
-
this.state_1 = 3;
|
|
941
|
-
continue $sm;
|
|
942
|
-
}
|
|
943
|
-
case 3:
|
|
944
|
-
this.validateStatus1__1 = shouldValidate(this.cache0__1.expires_1, this.cache0__1.headers_1, this.$this$intercept_1.context_1);
|
|
945
|
-
if (this.validateStatus1__1.equals(ValidateStatus_ShouldNotValidate_getInstance())) {
|
|
946
|
-
var cachedCall = createResponse(this.cache0__1, this.$scope_1, new (RequestForCache())(this.$this$intercept_1.context_1.build_1k0s4u_k$()), this.$this$intercept_1.context_1.executionContext_1).get_call_wojxrb_k$();
|
|
947
|
-
this.state_1 = 7;
|
|
948
|
-
suspendResult = Companion_getInstance_5().proceedWithCache_58joj9_k$(this.$this$intercept_1, this.$scope_1, cachedCall, this);
|
|
949
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
950
|
-
return suspendResult;
|
|
951
|
-
}
|
|
952
|
-
continue $sm;
|
|
953
|
-
} else {
|
|
954
|
-
this.state_1 = 4;
|
|
955
|
-
continue $sm;
|
|
956
|
-
}
|
|
957
|
-
case 4:
|
|
958
|
-
if (this.validateStatus1__1.equals(ValidateStatus_ShouldWarn_getInstance())) {
|
|
959
|
-
this.state_1 = 6;
|
|
960
|
-
suspendResult = proceedWithWarning2(Companion_getInstance_5(), this.$this$intercept_1, this.cache0__1, this.$scope_1, this.$this$intercept_1.context_1.executionContext_1, this);
|
|
961
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
962
|
-
return suspendResult;
|
|
963
|
-
}
|
|
964
|
-
continue $sm;
|
|
965
|
-
} else {
|
|
966
|
-
this.state_1 = 5;
|
|
967
|
-
continue $sm;
|
|
968
|
-
}
|
|
969
|
-
case 5:
|
|
970
|
-
var tmp0_safe_receiver = this.cache0__1.headers_1.get_6bo4tg_k$("ETag");
|
|
971
|
-
if (tmp0_safe_receiver == null)
|
|
972
|
-
null;
|
|
973
|
-
else {
|
|
974
|
-
var this_2 = get_LOGGER();
|
|
975
|
-
if (get_isTraceEnabled(this_2)) {
|
|
976
|
-
this_2.trace_fti9bv_k$("Adding If-None-Match=" + tmp0_safe_receiver + " for " + this.$this$intercept_1.context_1.url_1.toString());
|
|
977
|
-
}
|
|
978
|
-
header2(this.$this$intercept_1.context_1, "If-None-Match", tmp0_safe_receiver);
|
|
979
|
-
}
|
|
980
|
-
var tmp1_safe_receiver = this.cache0__1.headers_1.get_6bo4tg_k$("Last-Modified");
|
|
981
|
-
if (tmp1_safe_receiver == null)
|
|
982
|
-
null;
|
|
983
|
-
else {
|
|
984
|
-
var this_3 = get_LOGGER();
|
|
985
|
-
if (get_isTraceEnabled(this_3)) {
|
|
986
|
-
this_3.trace_fti9bv_k$("Adding If-Modified-Since=" + tmp1_safe_receiver + " for " + this.$this$intercept_1.context_1.url_1.toString());
|
|
987
|
-
}
|
|
988
|
-
header2(this.$this$intercept_1.context_1, "If-Modified-Since", tmp1_safe_receiver);
|
|
989
|
-
}
|
|
990
|
-
return Unit_instance4;
|
|
991
|
-
case 6:
|
|
992
|
-
return Unit_instance4;
|
|
993
|
-
case 7:
|
|
994
|
-
return Unit_instance4;
|
|
995
|
-
case 8:
|
|
996
|
-
this.state_1 = 9;
|
|
997
|
-
continue $sm;
|
|
998
|
-
case 9:
|
|
999
|
-
return Unit_instance4;
|
|
1000
|
-
case 10:
|
|
1001
|
-
return Unit_instance4;
|
|
1002
|
-
case 11:
|
|
1003
|
-
throw this.exception_1;
|
|
1004
|
-
}
|
|
1005
|
-
} catch ($p) {
|
|
1006
|
-
var e = $p;
|
|
1007
|
-
if (this.exceptionState_1 === 11) {
|
|
1008
|
-
throw e;
|
|
1009
|
-
} else {
|
|
1010
|
-
this.state_1 = this.exceptionState_1;
|
|
1011
|
-
this.exception_1 = e;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
while (true);
|
|
1015
|
-
};
|
|
1016
|
-
protoOf4($).create_l3tkcm_k$ = function($this$intercept, content, completion) {
|
|
1017
|
-
var i = new (HttpCache$Companion$install$slambda())(this.$plugin_1, this.$scope_1, completion);
|
|
1018
|
-
i.$this$intercept_1 = $this$intercept;
|
|
1019
|
-
i.content_1 = content;
|
|
1020
|
-
return i;
|
|
1021
|
-
};
|
|
1022
|
-
HttpCache$Companion$install$slambdaClass = $;
|
|
1023
|
-
}
|
|
1024
|
-
return HttpCache$Companion$install$slambdaClass;
|
|
1025
|
-
}
|
|
1026
|
-
function HttpCache$Companion$install$slambda_0($plugin, $scope, resultContinuation) {
|
|
1027
|
-
var i = new (HttpCache$Companion$install$slambda())($plugin, $scope, resultContinuation);
|
|
1028
|
-
return constructCallableReference2(function($this$intercept, content, $completion) {
|
|
1029
|
-
return i.invoke_wpcgmu_k$($this$intercept, content, $completion);
|
|
1030
|
-
}, 2);
|
|
1031
|
-
}
|
|
1032
|
-
var HttpCache$Companion$install$slambdaClass_0;
|
|
1033
|
-
function HttpCache$Companion$install$slambda_1() {
|
|
1034
|
-
if (HttpCache$Companion$install$slambdaClass_0 === VOID4) {
|
|
1035
|
-
let $ = function($plugin, $scope, resultContinuation) {
|
|
1036
|
-
this.$plugin_1 = $plugin;
|
|
1037
|
-
this.$scope_1 = $scope;
|
|
1038
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1039
|
-
};
|
|
1040
|
-
initMetadataForLambda($, CoroutineImpl3(), VOID4, [2]);
|
|
1041
|
-
protoOf4($).invoke_s06q6e_k$ = function($this$intercept, response, $completion) {
|
|
1042
|
-
var tmp = this.create_c1uav6_k$($this$intercept, response, $completion);
|
|
1043
|
-
tmp.result_1 = Unit_instance4;
|
|
1044
|
-
tmp.exception_1 = null;
|
|
1045
|
-
return tmp.doResume_5yljmg_k$();
|
|
1046
|
-
};
|
|
1047
|
-
protoOf4($).invoke_4tzzq6_k$ = function(p1, p2, $completion) {
|
|
1048
|
-
var tmp = p1 instanceof PipelineContext() ? p1 : THROW_CCE2();
|
|
1049
|
-
return this.invoke_s06q6e_k$(tmp, p2 instanceof HttpResponse2() ? p2 : THROW_CCE2(), $completion);
|
|
1050
|
-
};
|
|
1051
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1052
|
-
var suspendResult = this.result_1;
|
|
1053
|
-
$sm: do
|
|
1054
|
-
try {
|
|
1055
|
-
var tmp = this.state_1;
|
|
1056
|
-
switch (tmp) {
|
|
1057
|
-
case 0:
|
|
1058
|
-
this.exceptionState_1 = 10;
|
|
1059
|
-
if (!this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_method_gl8esq_k$().equals(Companion_getInstance().Get_1))
|
|
1060
|
-
return Unit_instance4;
|
|
1061
|
-
if (this.$plugin_1.useOldStorage_1) {
|
|
1062
|
-
this.state_1 = 9;
|
|
1063
|
-
suspendResult = interceptReceiveLegacy(this.$this$intercept_1, this.response_1, this.$plugin_1, this.$scope_1, this);
|
|
1064
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1065
|
-
return suspendResult;
|
|
1066
|
-
}
|
|
1067
|
-
continue $sm;
|
|
1068
|
-
} else {
|
|
1069
|
-
this.state_1 = 1;
|
|
1070
|
-
continue $sm;
|
|
1071
|
-
}
|
|
1072
|
-
case 1:
|
|
1073
|
-
if (isSuccess2(this.response_1.get_status_jnf6d7_k$())) {
|
|
1074
|
-
var this_0 = get_LOGGER();
|
|
1075
|
-
if (get_isTraceEnabled(this_0)) {
|
|
1076
|
-
this_0.trace_fti9bv_k$("Caching response for " + this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_url_18iuii_k$().toString());
|
|
1077
|
-
}
|
|
1078
|
-
this.state_1 = 2;
|
|
1079
|
-
suspendResult = cacheResponse2(this.$plugin_1, this.response_1, this);
|
|
1080
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1081
|
-
return suspendResult;
|
|
1082
|
-
}
|
|
1083
|
-
continue $sm;
|
|
1084
|
-
} else {
|
|
1085
|
-
this.state_1 = 4;
|
|
1086
|
-
continue $sm;
|
|
1087
|
-
}
|
|
1088
|
-
case 2:
|
|
1089
|
-
var cachedData = suspendResult;
|
|
1090
|
-
if (!(cachedData == null)) {
|
|
1091
|
-
var reusableResponse = createResponse(cachedData, this.$scope_1, get_request(this.response_1), this.response_1.get_coroutineContext_115oqo_k$());
|
|
1092
|
-
this.state_1 = 8;
|
|
1093
|
-
suspendResult = this.$this$intercept_1.proceedWith_i5skhv_k$(reusableResponse, this);
|
|
1094
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1095
|
-
return suspendResult;
|
|
1096
|
-
}
|
|
1097
|
-
continue $sm;
|
|
1098
|
-
} else {
|
|
1099
|
-
this.state_1 = 3;
|
|
1100
|
-
continue $sm;
|
|
1101
|
-
}
|
|
1102
|
-
case 3:
|
|
1103
|
-
this.state_1 = 4;
|
|
1104
|
-
continue $sm;
|
|
1105
|
-
case 4:
|
|
1106
|
-
if (this.response_1.get_status_jnf6d7_k$().equals(Companion_getInstance_2().NotModified_1)) {
|
|
1107
|
-
var this_1 = get_LOGGER();
|
|
1108
|
-
if (get_isTraceEnabled(this_1)) {
|
|
1109
|
-
this_1.trace_fti9bv_k$("Not modified response for " + this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_url_18iuii_k$().toString() + ", replying from cache");
|
|
1110
|
-
}
|
|
1111
|
-
this.state_1 = 5;
|
|
1112
|
-
var tmp_0 = this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$();
|
|
1113
|
-
suspendResult = refreshNotModifiedResponse(tmp_0, this.response_1, HttpCache$findAndRefresh$ref_0(this.$plugin_1), this);
|
|
1114
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1115
|
-
return suspendResult;
|
|
1116
|
-
}
|
|
1117
|
-
continue $sm;
|
|
1118
|
-
} else {
|
|
1119
|
-
this.state_1 = 7;
|
|
1120
|
-
continue $sm;
|
|
1121
|
-
}
|
|
1122
|
-
case 5:
|
|
1123
|
-
var responseFromCache = suspendResult;
|
|
1124
|
-
this.$scope_1.monitor_1.raise_3e7w7u_k$(Companion_getInstance_5().HttpResponseFromCache_1, responseFromCache);
|
|
1125
|
-
this.state_1 = 6;
|
|
1126
|
-
suspendResult = this.$this$intercept_1.proceedWith_i5skhv_k$(responseFromCache, this);
|
|
1127
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1128
|
-
return suspendResult;
|
|
1129
|
-
}
|
|
1130
|
-
continue $sm;
|
|
1131
|
-
case 6:
|
|
1132
|
-
this.state_1 = 7;
|
|
1133
|
-
continue $sm;
|
|
1134
|
-
case 7:
|
|
1135
|
-
return Unit_instance4;
|
|
1136
|
-
case 8:
|
|
1137
|
-
return Unit_instance4;
|
|
1138
|
-
case 9:
|
|
1139
|
-
return Unit_instance4;
|
|
1140
|
-
case 10:
|
|
1141
|
-
throw this.exception_1;
|
|
1142
|
-
}
|
|
1143
|
-
} catch ($p) {
|
|
1144
|
-
var e = $p;
|
|
1145
|
-
if (this.exceptionState_1 === 10) {
|
|
1146
|
-
throw e;
|
|
1147
|
-
} else {
|
|
1148
|
-
this.state_1 = this.exceptionState_1;
|
|
1149
|
-
this.exception_1 = e;
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
while (true);
|
|
1153
|
-
};
|
|
1154
|
-
protoOf4($).create_c1uav6_k$ = function($this$intercept, response, completion) {
|
|
1155
|
-
var i = new (HttpCache$Companion$install$slambda_1())(this.$plugin_1, this.$scope_1, completion);
|
|
1156
|
-
i.$this$intercept_1 = $this$intercept;
|
|
1157
|
-
i.response_1 = response;
|
|
1158
|
-
return i;
|
|
1159
|
-
};
|
|
1160
|
-
HttpCache$Companion$install$slambdaClass_0 = $;
|
|
1161
|
-
}
|
|
1162
|
-
return HttpCache$Companion$install$slambdaClass_0;
|
|
1163
|
-
}
|
|
1164
|
-
function HttpCache$Companion$install$slambda_2($plugin, $scope, resultContinuation) {
|
|
1165
|
-
var i = new (HttpCache$Companion$install$slambda_1())($plugin, $scope, resultContinuation);
|
|
1166
|
-
return constructCallableReference2(function($this$intercept, response, $completion) {
|
|
1167
|
-
return i.invoke_s06q6e_k$($this$intercept, response, $completion);
|
|
1168
|
-
}, 2);
|
|
1169
|
-
}
|
|
1170
|
-
var $proceedWithCacheCOROUTINE$Class;
|
|
1171
|
-
function $proceedWithCacheCOROUTINE$() {
|
|
1172
|
-
if ($proceedWithCacheCOROUTINE$Class === VOID4) {
|
|
1173
|
-
let $ = function(_this__u8e3s4, _this__u8e3s4_0, scope, cachedCall, resultContinuation) {
|
|
1174
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1175
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1176
|
-
this._this__u8e3s4__2 = _this__u8e3s4_0;
|
|
1177
|
-
this.scope_1 = scope;
|
|
1178
|
-
this.cachedCall_1 = cachedCall;
|
|
1179
|
-
};
|
|
1180
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1181
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1182
|
-
var suspendResult = this.result_1;
|
|
1183
|
-
$sm: do
|
|
1184
|
-
try {
|
|
1185
|
-
var tmp = this.state_1;
|
|
1186
|
-
switch (tmp) {
|
|
1187
|
-
case 0:
|
|
1188
|
-
this.exceptionState_1 = 2;
|
|
1189
|
-
this._this__u8e3s4__2.finish_mh2air_k$();
|
|
1190
|
-
this.scope_1.monitor_1.raise_3e7w7u_k$(this._this__u8e3s4__1.HttpResponseFromCache_1, this.cachedCall_1.get_response_xlk07e_k$());
|
|
1191
|
-
this.state_1 = 1;
|
|
1192
|
-
suspendResult = this._this__u8e3s4__2.proceedWith_i5skhv_k$(this.cachedCall_1, this);
|
|
1193
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1194
|
-
return suspendResult;
|
|
1195
|
-
}
|
|
1196
|
-
continue $sm;
|
|
1197
|
-
case 1:
|
|
1198
|
-
return Unit_instance4;
|
|
1199
|
-
case 2:
|
|
1200
|
-
throw this.exception_1;
|
|
1201
|
-
}
|
|
1202
|
-
} catch ($p) {
|
|
1203
|
-
var e = $p;
|
|
1204
|
-
if (this.exceptionState_1 === 2) {
|
|
1205
|
-
throw e;
|
|
1206
|
-
} else {
|
|
1207
|
-
this.state_1 = this.exceptionState_1;
|
|
1208
|
-
this.exception_1 = e;
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
while (true);
|
|
1212
|
-
};
|
|
1213
|
-
$proceedWithCacheCOROUTINE$Class = $;
|
|
1214
|
-
}
|
|
1215
|
-
return $proceedWithCacheCOROUTINE$Class;
|
|
1216
|
-
}
|
|
1217
|
-
var $proceedWithWarningCOROUTINE$Class2;
|
|
1218
|
-
function $proceedWithWarningCOROUTINE$2() {
|
|
1219
|
-
if ($proceedWithWarningCOROUTINE$Class2 === VOID4) {
|
|
1220
|
-
let $ = function(_this__u8e3s4, _this__u8e3s4_0, cachedResponse, scope, callContext, resultContinuation) {
|
|
1221
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1222
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1223
|
-
this._this__u8e3s4__2 = _this__u8e3s4_0;
|
|
1224
|
-
this.cachedResponse_1 = cachedResponse;
|
|
1225
|
-
this.scope_1 = scope;
|
|
1226
|
-
this.callContext_1 = callContext;
|
|
1227
|
-
};
|
|
1228
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1229
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1230
|
-
var suspendResult = this.result_1;
|
|
1231
|
-
$sm: do
|
|
1232
|
-
try {
|
|
1233
|
-
var tmp = this.state_1;
|
|
1234
|
-
switch (tmp) {
|
|
1235
|
-
case 0:
|
|
1236
|
-
this.exceptionState_1 = 2;
|
|
1237
|
-
var request = this._this__u8e3s4__2.context_1.build_1k0s4u_k$();
|
|
1238
|
-
Companion_getInstance_3();
|
|
1239
|
-
var this_0 = new (HeadersBuilder2())();
|
|
1240
|
-
this_0.appendAll_k8dlt1_k$(this.cachedResponse_1.headers_1);
|
|
1241
|
-
this_0.append_rhug0a_k$("Warning", "110");
|
|
1242
|
-
var response = new (HttpResponseData2())(this.cachedResponse_1.statusCode_1, this.cachedResponse_1.requestTime_1, this_0.build_1k0s4u_k$(), this.cachedResponse_1.version_1, ByteReadChannel(this.cachedResponse_1.body_1), this.callContext_1);
|
|
1243
|
-
var call = HttpClientCall_init_$Create$2(this.scope_1, request, response);
|
|
1244
|
-
this._this__u8e3s4__2.finish_mh2air_k$();
|
|
1245
|
-
this.scope_1.monitor_1.raise_3e7w7u_k$(this._this__u8e3s4__1.HttpResponseFromCache_1, call.get_response_xlk07e_k$());
|
|
1246
|
-
this.state_1 = 1;
|
|
1247
|
-
suspendResult = this._this__u8e3s4__2.proceedWith_i5skhv_k$(call, this);
|
|
1248
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1249
|
-
return suspendResult;
|
|
1250
|
-
}
|
|
1251
|
-
continue $sm;
|
|
1252
|
-
case 1:
|
|
1253
|
-
return Unit_instance4;
|
|
1254
|
-
case 2:
|
|
1255
|
-
throw this.exception_1;
|
|
1256
|
-
}
|
|
1257
|
-
} catch ($p) {
|
|
1258
|
-
var e = $p;
|
|
1259
|
-
if (this.exceptionState_1 === 2) {
|
|
1260
|
-
throw e;
|
|
1261
|
-
} else {
|
|
1262
|
-
this.state_1 = this.exceptionState_1;
|
|
1263
|
-
this.exception_1 = e;
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
while (true);
|
|
1267
|
-
};
|
|
1268
|
-
$proceedWithWarningCOROUTINE$Class2 = $;
|
|
1269
|
-
}
|
|
1270
|
-
return $proceedWithWarningCOROUTINE$Class2;
|
|
1271
|
-
}
|
|
1272
|
-
var $proceedWithMissingCacheCOROUTINE$Class;
|
|
1273
|
-
function $proceedWithMissingCacheCOROUTINE$() {
|
|
1274
|
-
if ($proceedWithMissingCacheCOROUTINE$Class === VOID4) {
|
|
1275
|
-
let $ = function(_this__u8e3s4, _this__u8e3s4_0, scope, resultContinuation) {
|
|
1276
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1277
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1278
|
-
this._this__u8e3s4__2 = _this__u8e3s4_0;
|
|
1279
|
-
this.scope_1 = scope;
|
|
1280
|
-
};
|
|
1281
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1282
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1283
|
-
var suspendResult = this.result_1;
|
|
1284
|
-
$sm: do
|
|
1285
|
-
try {
|
|
1286
|
-
var tmp = this.state_1;
|
|
1287
|
-
switch (tmp) {
|
|
1288
|
-
case 0:
|
|
1289
|
-
this.exceptionState_1 = 2;
|
|
1290
|
-
this._this__u8e3s4__2.finish_mh2air_k$();
|
|
1291
|
-
var request = this._this__u8e3s4__2.context_1.build_1k0s4u_k$();
|
|
1292
|
-
var response = new (HttpResponseData2())(Companion_getInstance_2().GatewayTimeout_1, GMTDate(), Companion_getInstance_3().Empty_1, Companion_getInstance_4().HTTP_1_1__1, ByteReadChannel(new Int8Array(0)), request.executionContext_1);
|
|
1293
|
-
var call = HttpClientCall_init_$Create$2(this.scope_1, request, response);
|
|
1294
|
-
this.state_1 = 1;
|
|
1295
|
-
suspendResult = this._this__u8e3s4__2.proceedWith_i5skhv_k$(call, this);
|
|
1296
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1297
|
-
return suspendResult;
|
|
1298
|
-
}
|
|
1299
|
-
continue $sm;
|
|
1300
|
-
case 1:
|
|
1301
|
-
return Unit_instance4;
|
|
1302
|
-
case 2:
|
|
1303
|
-
throw this.exception_1;
|
|
1304
|
-
}
|
|
1305
|
-
} catch ($p) {
|
|
1306
|
-
var e = $p;
|
|
1307
|
-
if (this.exceptionState_1 === 2) {
|
|
1308
|
-
throw e;
|
|
1309
|
-
} else {
|
|
1310
|
-
this.state_1 = this.exceptionState_1;
|
|
1311
|
-
this.exception_1 = e;
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
while (true);
|
|
1315
|
-
};
|
|
1316
|
-
$proceedWithMissingCacheCOROUTINE$Class = $;
|
|
1317
|
-
}
|
|
1318
|
-
return $proceedWithMissingCacheCOROUTINE$Class;
|
|
1319
|
-
}
|
|
1320
|
-
var ConfigClass;
|
|
1321
|
-
function Config() {
|
|
1322
|
-
if (ConfigClass === VOID4) {
|
|
1323
|
-
let $ = function() {
|
|
1324
|
-
this.publicStorageNew_1 = Companion_getInstance_02().Unlimited_1();
|
|
1325
|
-
this.privateStorageNew_1 = Companion_getInstance_02().Unlimited_1();
|
|
1326
|
-
this.useOldStorage_1 = false;
|
|
1327
|
-
this.isShared_1 = false;
|
|
1328
|
-
this.publicStorage_1 = Companion_getInstance_12().Unlimited_1();
|
|
1329
|
-
this.privateStorage_1 = Companion_getInstance_12().Unlimited_1();
|
|
1330
|
-
};
|
|
1331
|
-
initMetadataForClass2($, "Config", Config);
|
|
1332
|
-
protoOf4($).publicStorage_gtmqh9_k$ = function(storage) {
|
|
1333
|
-
this.publicStorageNew_1 = storage;
|
|
1334
|
-
};
|
|
1335
|
-
protoOf4($).privateStorage_dcznfd_k$ = function(storage) {
|
|
1336
|
-
this.privateStorageNew_1 = storage;
|
|
1337
|
-
};
|
|
1338
|
-
ConfigClass = $;
|
|
1339
|
-
}
|
|
1340
|
-
return ConfigClass;
|
|
1341
|
-
}
|
|
1342
|
-
var CompanionClass;
|
|
1343
|
-
function Companion() {
|
|
1344
|
-
if (CompanionClass === VOID4) {
|
|
1345
|
-
let $ = function() {
|
|
1346
|
-
Companion_instance = this;
|
|
1347
|
-
var tmp = this;
|
|
1348
|
-
var name = "HttpCache";
|
|
1349
|
-
var tmp_0 = getKClass(HttpCache());
|
|
1350
|
-
var tmp_1 = null instanceof HttpCache();
|
|
1351
|
-
var tmp_2;
|
|
1352
|
-
try {
|
|
1353
|
-
tmp_2 = createKType(getKClass(HttpCache()), arrayOf([]), false);
|
|
1354
|
-
} catch ($p) {
|
|
1355
|
-
var tmp_3;
|
|
1356
|
-
if ($p instanceof Error) {
|
|
1357
|
-
var _unused_var__etf5q3 = $p;
|
|
1358
|
-
tmp_3 = null;
|
|
1359
|
-
} else {
|
|
1360
|
-
throw $p;
|
|
1361
|
-
}
|
|
1362
|
-
tmp_2 = tmp_3;
|
|
1363
|
-
}
|
|
1364
|
-
var tmp$ret$2 = tmp_2;
|
|
1365
|
-
var tmp$ret$1 = new (TypeInfo())(tmp_0, tmp_1, tmp$ret$2);
|
|
1366
|
-
tmp.key_1 = new (AttributeKey())(name, tmp$ret$1);
|
|
1367
|
-
this.HttpResponseFromCache_1 = new (EventDefinition())();
|
|
1368
|
-
};
|
|
1369
|
-
initMetadataForCompanion($, VOID4, VOID4, [3, 4, 2]);
|
|
1370
|
-
protoOf4($).get_key_18j28a_k$ = function() {
|
|
1371
|
-
return this.key_1;
|
|
1372
|
-
};
|
|
1373
|
-
protoOf4($).prepare_gp5y32_k$ = function(block) {
|
|
1374
|
-
var this_0 = new (Config())();
|
|
1375
|
-
block(this_0);
|
|
1376
|
-
var config = this_0;
|
|
1377
|
-
return new (HttpCache())(config.publicStorage_1, config.privateStorage_1, config.publicStorageNew_1, config.privateStorageNew_1, config.useOldStorage_1, config.isShared_1);
|
|
1378
|
-
};
|
|
1379
|
-
protoOf4($).prepare_t1xtpw_k$ = function(block) {
|
|
1380
|
-
return this.prepare_gp5y32_k$(block);
|
|
1381
|
-
};
|
|
1382
|
-
protoOf4($).install_38362c_k$ = function(plugin, scope) {
|
|
1383
|
-
var cacheRequestPhase = new (PipelinePhase())("Cache");
|
|
1384
|
-
scope.sendPipeline_1.insertPhaseAfter_gfhxiu_k$(Phases_getInstance().State_1, cacheRequestPhase);
|
|
1385
|
-
scope.sendPipeline_1.intercept_k21bv3_k$(cacheRequestPhase, HttpCache$Companion$install$slambda_0(plugin, scope, null));
|
|
1386
|
-
var cacheResponsePhase = new (PipelinePhase())("Cache");
|
|
1387
|
-
scope.receivePipeline_1.insertPhaseAfter_gfhxiu_k$(Phases_getInstance_0().State_1, cacheResponsePhase);
|
|
1388
|
-
scope.receivePipeline_1.intercept_k21bv3_k$(cacheResponsePhase, HttpCache$Companion$install$slambda_2(plugin, scope, null));
|
|
1389
|
-
};
|
|
1390
|
-
protoOf4($).install_blfu15_k$ = function(plugin, scope) {
|
|
1391
|
-
return this.install_38362c_k$(plugin instanceof HttpCache() ? plugin : THROW_CCE2(), scope);
|
|
1392
|
-
};
|
|
1393
|
-
protoOf4($).proceedWithCache_58joj9_k$ = function(_this__u8e3s4, scope, cachedCall, $completion) {
|
|
1394
|
-
var tmp = new ($proceedWithCacheCOROUTINE$())(this, _this__u8e3s4, scope, cachedCall, $completion);
|
|
1395
|
-
tmp.result_1 = Unit_instance4;
|
|
1396
|
-
tmp.exception_1 = null;
|
|
1397
|
-
return tmp.doResume_5yljmg_k$();
|
|
1398
|
-
};
|
|
1399
|
-
protoOf4($).proceedWithMissingCache_roaukm_k$ = function(_this__u8e3s4, scope, $completion) {
|
|
1400
|
-
var tmp = new ($proceedWithMissingCacheCOROUTINE$())(this, _this__u8e3s4, scope, $completion);
|
|
1401
|
-
tmp.result_1 = Unit_instance4;
|
|
1402
|
-
tmp.exception_1 = null;
|
|
1403
|
-
return tmp.doResume_5yljmg_k$();
|
|
1404
|
-
};
|
|
1405
|
-
CompanionClass = $;
|
|
1406
|
-
}
|
|
1407
|
-
return CompanionClass;
|
|
1408
|
-
}
|
|
1409
|
-
var Companion_instance;
|
|
1410
|
-
function Companion_getInstance_5() {
|
|
1411
|
-
if (Companion_instance == null)
|
|
1412
|
-
new (Companion())();
|
|
1413
|
-
return Companion_instance;
|
|
1414
|
-
}
|
|
1415
|
-
function cacheResponse2($this, response, $completion) {
|
|
1416
|
-
var request = response.get_call_wojxrb_k$().get_request_jdwg4m_k$();
|
|
1417
|
-
var responseCacheControl = cacheControl2(response);
|
|
1418
|
-
var requestCacheControl = cacheControl2(request);
|
|
1419
|
-
var isPrivate = responseCacheControl.contains_aljjnj_k$(CacheControl_getInstance().PRIVATE_1);
|
|
1420
|
-
var tmp;
|
|
1421
|
-
if (isPrivate && $this.isSharedClient_1) {
|
|
1422
|
-
return null;
|
|
1423
|
-
} else if (isPrivate) {
|
|
1424
|
-
tmp = $this.privateStorageNew_1;
|
|
1425
|
-
} else {
|
|
1426
|
-
tmp = $this.publicStorageNew_1;
|
|
1427
|
-
}
|
|
1428
|
-
var storage = tmp;
|
|
1429
|
-
if (responseCacheControl.contains_aljjnj_k$(CacheControl_getInstance().NO_STORE_1) || requestCacheControl.contains_aljjnj_k$(CacheControl_getInstance().NO_STORE_1)) {
|
|
1430
|
-
return null;
|
|
1431
|
-
}
|
|
1432
|
-
return store(storage, response, varyKeys(response), $this.isSharedClient_1, $completion);
|
|
1433
|
-
}
|
|
1434
|
-
function findAndRefresh2($this, request, response, $completion) {
|
|
1435
|
-
var tmp = new ($findAndRefreshCOROUTINE$())($this, request, response, $completion);
|
|
1436
|
-
tmp.result_1 = Unit_instance4;
|
|
1437
|
-
tmp.exception_1 = null;
|
|
1438
|
-
return tmp.doResume_5yljmg_k$();
|
|
1439
|
-
}
|
|
1440
|
-
function selectResponseToUpdate2($this, $receiver, response, url, request, $completion) {
|
|
1441
|
-
var tmp = new ($selectResponseToUpdateCOROUTINE$())($this, $receiver, response, url, request, $completion);
|
|
1442
|
-
tmp.result_1 = Unit_instance4;
|
|
1443
|
-
tmp.exception_1 = null;
|
|
1444
|
-
return tmp.doResume_5yljmg_k$();
|
|
1445
|
-
}
|
|
1446
|
-
function findResponse($this, context, content, $completion) {
|
|
1447
|
-
var tmp = new ($findResponseCOROUTINE$())($this, context, content, $completion);
|
|
1448
|
-
tmp.result_1 = Unit_instance4;
|
|
1449
|
-
tmp.exception_1 = null;
|
|
1450
|
-
return tmp.doResume_5yljmg_k$();
|
|
1451
|
-
}
|
|
1452
|
-
var sam$kotlin_Comparator$0Class2;
|
|
1453
|
-
function sam$kotlin_Comparator$02() {
|
|
1454
|
-
if (sam$kotlin_Comparator$0Class2 === VOID4) {
|
|
1455
|
-
let $ = function(function_0) {
|
|
1456
|
-
this.function_1 = function_0;
|
|
1457
|
-
};
|
|
1458
|
-
initMetadataForClass2($, "sam$kotlin_Comparator$0", VOID4, VOID4, [Comparator2(), FunctionAdapter2()]);
|
|
1459
|
-
protoOf4($).compare_bczr_k$ = function(a, b) {
|
|
1460
|
-
return this.function_1(a, b);
|
|
1461
|
-
};
|
|
1462
|
-
protoOf4($).compare = function(a, b) {
|
|
1463
|
-
return this.compare_bczr_k$(a, b);
|
|
1464
|
-
};
|
|
1465
|
-
protoOf4($).getFunctionDelegate_jtodtf_k$ = function() {
|
|
1466
|
-
return this.function_1;
|
|
1467
|
-
};
|
|
1468
|
-
protoOf4($).equals = function(other) {
|
|
1469
|
-
var tmp;
|
|
1470
|
-
if (!(other == null) ? isInterface2(other, Comparator2()) : false) {
|
|
1471
|
-
var tmp_0;
|
|
1472
|
-
if (!(other == null) ? isInterface2(other, FunctionAdapter2()) : false) {
|
|
1473
|
-
tmp_0 = equals2(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
|
|
1474
|
-
} else {
|
|
1475
|
-
tmp_0 = false;
|
|
1476
|
-
}
|
|
1477
|
-
tmp = tmp_0;
|
|
1478
|
-
} else {
|
|
1479
|
-
tmp = false;
|
|
1480
|
-
}
|
|
1481
|
-
return tmp;
|
|
1482
|
-
};
|
|
1483
|
-
protoOf4($).hashCode = function() {
|
|
1484
|
-
return hashCode2(this.getFunctionDelegate_jtodtf_k$());
|
|
1485
|
-
};
|
|
1486
|
-
sam$kotlin_Comparator$0Class2 = $;
|
|
1487
|
-
}
|
|
1488
|
-
return sam$kotlin_Comparator$0Class2;
|
|
1489
|
-
}
|
|
1490
|
-
function Headers$get$ref(p0) {
|
|
1491
|
-
return constructCallableReference2(function(p0_0) {
|
|
1492
|
-
return p0.get_6bo4tg_k$(p0_0);
|
|
1493
|
-
}, 1, 0, 40, "get", [p0]);
|
|
1494
|
-
}
|
|
1495
|
-
function Headers$getAll$ref(p0) {
|
|
1496
|
-
return constructCallableReference2(function(p0_0) {
|
|
1497
|
-
return p0.getAll_ffxf4h_k$(p0_0);
|
|
1498
|
-
}, 1, 0, 41, "getAll", [p0]);
|
|
1499
|
-
}
|
|
1500
|
-
function HttpCache$selectResponseToUpdate$lambda(a, b) {
|
|
1501
|
-
var tmp = b.responseTime_1;
|
|
1502
|
-
var tmp$ret$2 = a.responseTime_1;
|
|
1503
|
-
return compareValues2(tmp, tmp$ret$2);
|
|
1504
|
-
}
|
|
1505
|
-
function HttpCache$selectResponseToUpdate$lambda_0(it) {
|
|
1506
|
-
return it.headers_1;
|
|
1507
|
-
}
|
|
1508
|
-
function HeadersBuilder$get$ref(p0) {
|
|
1509
|
-
return constructCallableReference2(function(p0_0) {
|
|
1510
|
-
return p0.get_6bo4tg_k$(p0_0);
|
|
1511
|
-
}, 1, 0, 42, "get", [p0]);
|
|
1512
|
-
}
|
|
1513
|
-
function HeadersBuilder$getAll$ref(p0) {
|
|
1514
|
-
return constructCallableReference2(function(p0_0) {
|
|
1515
|
-
return p0.getAll_ffxf4h_k$(p0_0);
|
|
1516
|
-
}, 1, 0, 43, "getAll", [p0]);
|
|
1517
|
-
}
|
|
1518
|
-
var $findAndRefreshCOROUTINE$Class;
|
|
1519
|
-
function $findAndRefreshCOROUTINE$() {
|
|
1520
|
-
if ($findAndRefreshCOROUTINE$Class === VOID4) {
|
|
1521
|
-
let $ = function(_this__u8e3s4, request, response, resultContinuation) {
|
|
1522
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1523
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1524
|
-
this.request_1 = request;
|
|
1525
|
-
this.response_1 = response;
|
|
1526
|
-
};
|
|
1527
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1528
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1529
|
-
var suspendResult = this.result_1;
|
|
1530
|
-
$sm: do
|
|
1531
|
-
try {
|
|
1532
|
-
var tmp = this.state_1;
|
|
1533
|
-
switch (tmp) {
|
|
1534
|
-
case 0:
|
|
1535
|
-
this.exceptionState_1 = 5;
|
|
1536
|
-
this.url2__1 = this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_url_18iuii_k$();
|
|
1537
|
-
var cacheControl_0 = cacheControl2(this.response_1);
|
|
1538
|
-
var isPrivate = cacheControl_0.contains_aljjnj_k$(CacheControl_getInstance().PRIVATE_1);
|
|
1539
|
-
var tmp_0 = this;
|
|
1540
|
-
var tmp_1;
|
|
1541
|
-
if (isPrivate && this._this__u8e3s4__1.isSharedClient_1) {
|
|
1542
|
-
return null;
|
|
1543
|
-
} else if (isPrivate) {
|
|
1544
|
-
tmp_1 = this._this__u8e3s4__1.privateStorageNew_1;
|
|
1545
|
-
} else {
|
|
1546
|
-
tmp_1 = this._this__u8e3s4__1.publicStorageNew_1;
|
|
1547
|
-
}
|
|
1548
|
-
tmp_0.storage1__1 = tmp_1;
|
|
1549
|
-
this.state_1 = 1;
|
|
1550
|
-
suspendResult = selectResponseToUpdate2(this._this__u8e3s4__1, this.storage1__1, this.response_1, this.url2__1, this.request_1, this);
|
|
1551
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1552
|
-
return suspendResult;
|
|
1553
|
-
}
|
|
1554
|
-
continue $sm;
|
|
1555
|
-
case 1:
|
|
1556
|
-
var tmp0_elvis_lhs = suspendResult;
|
|
1557
|
-
var tmp_2;
|
|
1558
|
-
if (tmp0_elvis_lhs == null) {
|
|
1559
|
-
return null;
|
|
1560
|
-
} else {
|
|
1561
|
-
tmp_2 = tmp0_elvis_lhs;
|
|
1562
|
-
}
|
|
1563
|
-
var cache = tmp_2;
|
|
1564
|
-
var this_0 = varyKeys(this.response_1);
|
|
1565
|
-
var tmp_3;
|
|
1566
|
-
if (this_0.isEmpty_y1axqb_k$()) {
|
|
1567
|
-
tmp_3 = cache.varyKeys_1;
|
|
1568
|
-
} else {
|
|
1569
|
-
tmp_3 = this_0;
|
|
1570
|
-
}
|
|
1571
|
-
var newVaryKeys = tmp_3;
|
|
1572
|
-
var mergedHeaders = merge(cache.headers_1, this.response_1.get_headers_ef25jx_k$());
|
|
1573
|
-
var expires = cacheExpires(this.response_1, this._this__u8e3s4__1.isSharedClient_1);
|
|
1574
|
-
this.updatedCache0__1 = cache.copy_6ndwaz_k$(newVaryKeys, expires, mergedHeaders);
|
|
1575
|
-
if (!equals2(cache.varyKeys_1, newVaryKeys)) {
|
|
1576
|
-
this.state_1 = 2;
|
|
1577
|
-
suspendResult = this.storage1__1.remove_jew64o_k$(this.url2__1, cache.varyKeys_1, this);
|
|
1578
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1579
|
-
return suspendResult;
|
|
1580
|
-
}
|
|
1581
|
-
continue $sm;
|
|
1582
|
-
} else {
|
|
1583
|
-
this.state_1 = 3;
|
|
1584
|
-
continue $sm;
|
|
1585
|
-
}
|
|
1586
|
-
case 2:
|
|
1587
|
-
this.state_1 = 3;
|
|
1588
|
-
continue $sm;
|
|
1589
|
-
case 3:
|
|
1590
|
-
this.state_1 = 4;
|
|
1591
|
-
suspendResult = this.storage1__1.store_476b30_k$(this.request_1.get_url_18iuii_k$(), this.updatedCache0__1, this);
|
|
1592
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1593
|
-
return suspendResult;
|
|
1594
|
-
}
|
|
1595
|
-
continue $sm;
|
|
1596
|
-
case 4:
|
|
1597
|
-
return createResponse(this.updatedCache0__1, this.request_1.get_call_wojxrb_k$().client_1, this.request_1, this.response_1.get_coroutineContext_115oqo_k$());
|
|
1598
|
-
case 5:
|
|
1599
|
-
throw this.exception_1;
|
|
1600
|
-
}
|
|
1601
|
-
} catch ($p) {
|
|
1602
|
-
var e = $p;
|
|
1603
|
-
if (this.exceptionState_1 === 5) {
|
|
1604
|
-
throw e;
|
|
1605
|
-
} else {
|
|
1606
|
-
this.state_1 = this.exceptionState_1;
|
|
1607
|
-
this.exception_1 = e;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
while (true);
|
|
1611
|
-
};
|
|
1612
|
-
$findAndRefreshCOROUTINE$Class = $;
|
|
1613
|
-
}
|
|
1614
|
-
return $findAndRefreshCOROUTINE$Class;
|
|
1615
|
-
}
|
|
1616
|
-
var $selectResponseToUpdateCOROUTINE$Class;
|
|
1617
|
-
function $selectResponseToUpdateCOROUTINE$() {
|
|
1618
|
-
if ($selectResponseToUpdateCOROUTINE$Class === VOID4) {
|
|
1619
|
-
let $ = function(_this__u8e3s4, _this__u8e3s4_0, response, url, request, resultContinuation) {
|
|
1620
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1621
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1622
|
-
this._this__u8e3s4__2 = _this__u8e3s4_0;
|
|
1623
|
-
this.response_1 = response;
|
|
1624
|
-
this.url_1 = url;
|
|
1625
|
-
this.request_1 = request;
|
|
1626
|
-
};
|
|
1627
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1628
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1629
|
-
var suspendResult = this.result_1;
|
|
1630
|
-
$sm: do
|
|
1631
|
-
try {
|
|
1632
|
-
var tmp = this.state_1;
|
|
1633
|
-
switch (tmp) {
|
|
1634
|
-
case 0:
|
|
1635
|
-
this.exceptionState_1 = 4;
|
|
1636
|
-
var this_0 = varyKeys(this.response_1);
|
|
1637
|
-
var tmp_0;
|
|
1638
|
-
if (!this_0.isEmpty_y1axqb_k$()) {
|
|
1639
|
-
tmp_0 = this_0;
|
|
1640
|
-
} else {
|
|
1641
|
-
tmp_0 = null;
|
|
1642
|
-
}
|
|
1643
|
-
var varyKeys_0 = tmp_0;
|
|
1644
|
-
if (varyKeys_0 == null) {
|
|
1645
|
-
this.WHEN_RESULT1__1 = null;
|
|
1646
|
-
this.state_1 = 2;
|
|
1647
|
-
continue $sm;
|
|
1648
|
-
} else {
|
|
1649
|
-
this.state_1 = 1;
|
|
1650
|
-
suspendResult = this._this__u8e3s4__2.find_jwacpr_k$(this.url_1, varyKeys_0, this);
|
|
1651
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1652
|
-
return suspendResult;
|
|
1653
|
-
}
|
|
1654
|
-
continue $sm;
|
|
1655
|
-
}
|
|
1656
|
-
case 1:
|
|
1657
|
-
this.WHEN_RESULT1__1 = suspendResult;
|
|
1658
|
-
this.state_1 = 2;
|
|
1659
|
-
continue $sm;
|
|
1660
|
-
case 2:
|
|
1661
|
-
var tmp1_safe_receiver = this.WHEN_RESULT1__1;
|
|
1662
|
-
if (tmp1_safe_receiver == null)
|
|
1663
|
-
null;
|
|
1664
|
-
else {
|
|
1665
|
-
return tmp1_safe_receiver;
|
|
1666
|
-
}
|
|
1667
|
-
var tmp_1 = this;
|
|
1668
|
-
var tmp_2 = this.request_1.get_content_h02jrk_k$();
|
|
1669
|
-
var tmp_3 = Headers$get$ref(this.request_1.get_headers_ef25jx_k$());
|
|
1670
|
-
tmp_1.requestHeaders0__1 = mergedHeadersLookup(tmp_2, tmp_3, Headers$getAll$ref(this.request_1.get_headers_ef25jx_k$()));
|
|
1671
|
-
this.state_1 = 3;
|
|
1672
|
-
suspendResult = this._this__u8e3s4__2.findAll_wwhkmd_k$(this.url_1, this);
|
|
1673
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1674
|
-
return suspendResult;
|
|
1675
|
-
}
|
|
1676
|
-
continue $sm;
|
|
1677
|
-
case 3:
|
|
1678
|
-
var this_1 = suspendResult;
|
|
1679
|
-
var tmp_4 = HttpCache$selectResponseToUpdate$lambda;
|
|
1680
|
-
var cachedResponses = sortedWith2(this_1, new (sam$kotlin_Comparator$02())(tmp_4));
|
|
1681
|
-
var tmp$ret$2;
|
|
1682
|
-
l$ret$3: do {
|
|
1683
|
-
var _iterator__ex2g4s = cachedResponses.iterator_jk1svi_k$();
|
|
1684
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
1685
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
1686
|
-
var tmp0 = element.varyKeys_1;
|
|
1687
|
-
var tmp$ret$0;
|
|
1688
|
-
l$ret$1: do {
|
|
1689
|
-
if (tmp0.isEmpty_y1axqb_k$()) {
|
|
1690
|
-
tmp$ret$0 = true;
|
|
1691
|
-
break l$ret$1;
|
|
1692
|
-
}
|
|
1693
|
-
var _iterator__ex2g4s_0 = tmp0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
1694
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
1695
|
-
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
1696
|
-
var key = element_0.get_key_18j28a_k$();
|
|
1697
|
-
var value = element_0.get_value_j01efc_k$();
|
|
1698
|
-
if (!(this.requestHeaders0__1(key) === value)) {
|
|
1699
|
-
tmp$ret$0 = false;
|
|
1700
|
-
break l$ret$1;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
tmp$ret$0 = true;
|
|
1704
|
-
} while (false);
|
|
1705
|
-
if (tmp$ret$0) {
|
|
1706
|
-
tmp$ret$2 = element;
|
|
1707
|
-
break l$ret$3;
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
tmp$ret$2 = null;
|
|
1711
|
-
} while (false);
|
|
1712
|
-
var tmp2_safe_receiver = tmp$ret$2;
|
|
1713
|
-
if (tmp2_safe_receiver == null)
|
|
1714
|
-
null;
|
|
1715
|
-
else {
|
|
1716
|
-
return tmp2_safe_receiver;
|
|
1717
|
-
}
|
|
1718
|
-
return selectResponseToFreshen(cachedResponses, this.response_1, HttpCache$selectResponseToUpdate$lambda_0);
|
|
1719
|
-
case 4:
|
|
1720
|
-
throw this.exception_1;
|
|
1721
|
-
}
|
|
1722
|
-
} catch ($p) {
|
|
1723
|
-
var e = $p;
|
|
1724
|
-
if (this.exceptionState_1 === 4) {
|
|
1725
|
-
throw e;
|
|
1726
|
-
} else {
|
|
1727
|
-
this.state_1 = this.exceptionState_1;
|
|
1728
|
-
this.exception_1 = e;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
while (true);
|
|
1732
|
-
};
|
|
1733
|
-
$selectResponseToUpdateCOROUTINE$Class = $;
|
|
1734
|
-
}
|
|
1735
|
-
return $selectResponseToUpdateCOROUTINE$Class;
|
|
1736
|
-
}
|
|
1737
|
-
var $findResponseCOROUTINE$Class;
|
|
1738
|
-
function $findResponseCOROUTINE$() {
|
|
1739
|
-
if ($findResponseCOROUTINE$Class === VOID4) {
|
|
1740
|
-
let $ = function(_this__u8e3s4, context, content, resultContinuation) {
|
|
1741
|
-
CoroutineImpl3().call(this, resultContinuation);
|
|
1742
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1743
|
-
this.context_1 = context;
|
|
1744
|
-
this.content_1 = content;
|
|
1745
|
-
};
|
|
1746
|
-
initMetadataForCoroutine3($, CoroutineImpl3());
|
|
1747
|
-
protoOf4($).doResume_5yljmg_k$ = function() {
|
|
1748
|
-
var suspendResult = this.result_1;
|
|
1749
|
-
$sm: do
|
|
1750
|
-
try {
|
|
1751
|
-
var tmp = this.state_1;
|
|
1752
|
-
switch (tmp) {
|
|
1753
|
-
case 0:
|
|
1754
|
-
this.exceptionState_1 = 3;
|
|
1755
|
-
this.url2__1 = Url2(this.context_1.url_1);
|
|
1756
|
-
var tmp_0 = this;
|
|
1757
|
-
var tmp_1 = HeadersBuilder$get$ref(this.context_1.headers_1);
|
|
1758
|
-
tmp_0.lookup0__1 = mergedHeadersLookup(this.content_1, tmp_1, HeadersBuilder$getAll$ref(this.context_1.headers_1));
|
|
1759
|
-
this.state_1 = 1;
|
|
1760
|
-
suspendResult = this._this__u8e3s4__1.privateStorageNew_1.findAll_wwhkmd_k$(this.url2__1, this);
|
|
1761
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1762
|
-
return suspendResult;
|
|
1763
|
-
}
|
|
1764
|
-
continue $sm;
|
|
1765
|
-
case 1:
|
|
1766
|
-
this.ARGUMENT1__1 = suspendResult;
|
|
1767
|
-
this.state_1 = 2;
|
|
1768
|
-
suspendResult = this._this__u8e3s4__1.publicStorageNew_1.findAll_wwhkmd_k$(this.url2__1, this);
|
|
1769
|
-
if (suspendResult === get_COROUTINE_SUSPENDED3()) {
|
|
1770
|
-
return suspendResult;
|
|
1771
|
-
}
|
|
1772
|
-
continue $sm;
|
|
1773
|
-
case 2:
|
|
1774
|
-
var ARGUMENT = suspendResult;
|
|
1775
|
-
var cachedResponses = plus2(this.ARGUMENT1__1, ARGUMENT);
|
|
1776
|
-
var _iterator__ex2g4s = cachedResponses.iterator_jk1svi_k$();
|
|
1777
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
1778
|
-
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
1779
|
-
var varyKeys2 = item.varyKeys_1;
|
|
1780
|
-
var tmp_2;
|
|
1781
|
-
if (varyKeys2.isEmpty_y1axqb_k$()) {
|
|
1782
|
-
tmp_2 = true;
|
|
1783
|
-
} else {
|
|
1784
|
-
var tmp$ret$0;
|
|
1785
|
-
l$ret$1: do {
|
|
1786
|
-
if (varyKeys2.isEmpty_y1axqb_k$()) {
|
|
1787
|
-
tmp$ret$0 = true;
|
|
1788
|
-
break l$ret$1;
|
|
1789
|
-
}
|
|
1790
|
-
var _iterator__ex2g4s_0 = varyKeys2.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
1791
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
1792
|
-
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
1793
|
-
var key = element.get_key_18j28a_k$();
|
|
1794
|
-
var value = element.get_value_j01efc_k$();
|
|
1795
|
-
if (!(this.lookup0__1(key) === value)) {
|
|
1796
|
-
tmp$ret$0 = false;
|
|
1797
|
-
break l$ret$1;
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
tmp$ret$0 = true;
|
|
1801
|
-
} while (false);
|
|
1802
|
-
tmp_2 = tmp$ret$0;
|
|
1803
|
-
}
|
|
1804
|
-
if (tmp_2) {
|
|
1805
|
-
return item;
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
return null;
|
|
1809
|
-
case 3:
|
|
1810
|
-
throw this.exception_1;
|
|
1811
|
-
}
|
|
1812
|
-
} catch ($p) {
|
|
1813
|
-
var e = $p;
|
|
1814
|
-
if (this.exceptionState_1 === 3) {
|
|
1815
|
-
throw e;
|
|
1816
|
-
} else {
|
|
1817
|
-
this.state_1 = this.exceptionState_1;
|
|
1818
|
-
this.exception_1 = e;
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
while (true);
|
|
1822
|
-
};
|
|
1823
|
-
$findResponseCOROUTINE$Class = $;
|
|
1824
|
-
}
|
|
1825
|
-
return $findResponseCOROUTINE$Class;
|
|
1826
|
-
}
|
|
1827
|
-
var HttpCacheClass;
|
|
1828
|
-
function HttpCache() {
|
|
1829
|
-
if (HttpCacheClass === VOID4) {
|
|
1830
|
-
let $ = function(publicStorage, privateStorage, publicStorageNew, privateStorageNew, useOldStorage, isSharedClient) {
|
|
1831
|
-
Companion_getInstance_5();
|
|
1832
|
-
this.publicStorage_1 = publicStorage;
|
|
1833
|
-
this.privateStorage_1 = privateStorage;
|
|
1834
|
-
this.publicStorageNew_1 = publicStorageNew;
|
|
1835
|
-
this.privateStorageNew_1 = privateStorageNew;
|
|
1836
|
-
this.useOldStorage_1 = useOldStorage;
|
|
1837
|
-
this.isSharedClient_1 = isSharedClient;
|
|
1838
|
-
};
|
|
1839
|
-
initMetadataForClass2($, "HttpCache", VOID4, VOID4, VOID4, [0, 1, 2, 4]);
|
|
1840
|
-
HttpCacheClass = $;
|
|
1841
|
-
}
|
|
1842
|
-
return HttpCacheClass;
|
|
1843
|
-
}
|
|
1844
|
-
var InvalidCacheStateExceptionClass;
|
|
1845
|
-
function InvalidCacheStateException() {
|
|
1846
|
-
if (InvalidCacheStateExceptionClass === VOID4) {
|
|
1847
|
-
let $ = function(requestUrl) {
|
|
1848
|
-
IllegalStateException_init_$Init$("The entry for url: " + requestUrl.toString() + " was removed from cache", this);
|
|
1849
|
-
captureStack(this, InvalidCacheStateException());
|
|
1850
|
-
};
|
|
1851
|
-
initMetadataForClass2($, "InvalidCacheStateException", VOID4, IllegalStateException());
|
|
1852
|
-
InvalidCacheStateExceptionClass = $;
|
|
1853
|
-
}
|
|
1854
|
-
return InvalidCacheStateExceptionClass;
|
|
1855
|
-
}
|
|
1856
|
-
function canStore(_this__u8e3s4) {
|
|
1857
|
-
_init_properties_HttpCache_kt__w3juvs();
|
|
1858
|
-
return _this__u8e3s4.name_1 === "http" || _this__u8e3s4.name_1 === "https";
|
|
1859
|
-
}
|
|
1860
|
-
var CacheControlClass;
|
|
1861
|
-
function CacheControl() {
|
|
1862
|
-
if (CacheControlClass === VOID4) {
|
|
1863
|
-
let $ = function() {
|
|
1864
|
-
CacheControl_instance = this;
|
|
1865
|
-
this.NO_STORE_1 = new (HeaderValue())("no-store");
|
|
1866
|
-
this.NO_CACHE_1 = new (HeaderValue())("no-cache");
|
|
1867
|
-
this.PRIVATE_1 = new (HeaderValue())("private");
|
|
1868
|
-
this.ONLY_IF_CACHED_1 = new (HeaderValue())("only-if-cached");
|
|
1869
|
-
this.MUST_REVALIDATE_1 = new (HeaderValue())("must-revalidate");
|
|
1870
|
-
};
|
|
1871
|
-
initMetadataForObject2($, "CacheControl");
|
|
1872
|
-
CacheControlClass = $;
|
|
1873
|
-
}
|
|
1874
|
-
return CacheControlClass;
|
|
1875
|
-
}
|
|
1876
|
-
var CacheControl_instance;
|
|
1877
|
-
function CacheControl_getInstance() {
|
|
1878
|
-
if (CacheControl_instance == null)
|
|
1879
|
-
new (CacheControl())();
|
|
1880
|
-
return CacheControl_instance;
|
|
1881
|
-
}
|
|
1882
|
-
var RequestForCacheClass;
|
|
1883
|
-
function RequestForCache() {
|
|
1884
|
-
if (RequestForCacheClass === VOID4) {
|
|
1885
|
-
let $ = function(data) {
|
|
1886
|
-
this.method_1 = data.method_1;
|
|
1887
|
-
this.url_1 = data.url_1;
|
|
1888
|
-
this.attributes_1 = data.attributes_1;
|
|
1889
|
-
this.content_1 = data.body_1;
|
|
1890
|
-
this.headers_1 = data.headers_1;
|
|
1891
|
-
};
|
|
1892
|
-
initMetadataForClass2($, "RequestForCache", VOID4, VOID4, [HttpRequest2()]);
|
|
1893
|
-
protoOf4($).get_call_wojxrb_k$ = function() {
|
|
1894
|
-
throw IllegalStateException_init_$Create$("This request has no call");
|
|
1895
|
-
};
|
|
1896
|
-
protoOf4($).get_method_gl8esq_k$ = function() {
|
|
1897
|
-
return this.method_1;
|
|
1898
|
-
};
|
|
1899
|
-
protoOf4($).get_url_18iuii_k$ = function() {
|
|
1900
|
-
return this.url_1;
|
|
1901
|
-
};
|
|
1902
|
-
protoOf4($).get_attributes_dgqof4_k$ = function() {
|
|
1903
|
-
return this.attributes_1;
|
|
1904
|
-
};
|
|
1905
|
-
protoOf4($).get_content_h02jrk_k$ = function() {
|
|
1906
|
-
return this.content_1;
|
|
1907
|
-
};
|
|
1908
|
-
protoOf4($).get_headers_ef25jx_k$ = function() {
|
|
1909
|
-
return this.headers_1;
|
|
1910
|
-
};
|
|
1911
|
-
protoOf4($).get_coroutineContext_115oqo_k$ = get_coroutineContext;
|
|
1912
|
-
RequestForCacheClass = $;
|
|
1913
|
-
}
|
|
1914
|
-
return RequestForCacheClass;
|
|
1915
|
-
}
|
|
1916
|
-
function mergedHeadersLookup(content, headerExtractor, allHeadersExtractor) {
|
|
1917
|
-
_init_properties_HttpCache_kt__w3juvs();
|
|
1918
|
-
return mergedHeadersLookup$lambda(content, headerExtractor, allHeadersExtractor);
|
|
1919
|
-
}
|
|
1920
|
-
function mergedHeadersLookup$lambda($content, $headerExtractor, $allHeadersExtractor) {
|
|
1921
|
-
return function(header3) {
|
|
1922
|
-
var tmp;
|
|
1923
|
-
switch (header3) {
|
|
1924
|
-
case "Content-Length":
|
|
1925
|
-
var tmp1_safe_receiver = $content.get_contentLength_a5o8yy_k$();
|
|
1926
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
|
|
1927
|
-
tmp = tmp2_elvis_lhs == null ? "" : tmp2_elvis_lhs;
|
|
1928
|
-
break;
|
|
1929
|
-
case "Content-Type":
|
|
1930
|
-
var tmp3_safe_receiver = $content.get_contentType_7git4a_k$();
|
|
1931
|
-
var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.toString();
|
|
1932
|
-
tmp = tmp4_elvis_lhs == null ? "" : tmp4_elvis_lhs;
|
|
1933
|
-
break;
|
|
1934
|
-
case "User-Agent":
|
|
1935
|
-
var tmp5_elvis_lhs = $content.get_headers_ef25jx_k$().get_6bo4tg_k$("User-Agent");
|
|
1936
|
-
var tmp6_elvis_lhs = tmp5_elvis_lhs == null ? $headerExtractor("User-Agent") : tmp5_elvis_lhs;
|
|
1937
|
-
tmp = tmp6_elvis_lhs == null ? get_KTOR_DEFAULT_USER_AGENT() : tmp6_elvis_lhs;
|
|
1938
|
-
break;
|
|
1939
|
-
default:
|
|
1940
|
-
var tmp7_elvis_lhs = $content.get_headers_ef25jx_k$().getAll_ffxf4h_k$(header3);
|
|
1941
|
-
var value = tmp7_elvis_lhs == null ? $allHeadersExtractor(header3) : tmp7_elvis_lhs;
|
|
1942
|
-
tmp = joinHeaderValues(value);
|
|
1943
|
-
break;
|
|
1944
|
-
}
|
|
1945
|
-
return tmp;
|
|
1946
|
-
};
|
|
1947
|
-
}
|
|
1948
|
-
var properties_initialized_HttpCache_kt_wph2h6;
|
|
1949
|
-
function _init_properties_HttpCache_kt__w3juvs() {
|
|
1950
|
-
if (!properties_initialized_HttpCache_kt_wph2h6) {
|
|
1951
|
-
properties_initialized_HttpCache_kt_wph2h6 = true;
|
|
1952
|
-
LOGGER = KtorSimpleLogger("io.ktor.client.plugins.HttpCache");
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
// build/packages/js/ktor-ktor-client-core/io/ktor/client/plugins/cache/HttpCacheEntry.mjs
|
|
1957
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance5 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
1958
|
-
import { Enum3alwj03lh1n41 as Enum } from "../kotlin-kotlin-stdlib/kotlin/Enum.mjs";
|
|
1959
|
-
import {
|
|
1960
|
-
protoOf180f3jzyo7rfj as protoOf5,
|
|
1961
|
-
equals2au1ep9vhcato as equals3,
|
|
1962
|
-
hashCodeq5arwsb9dgti as hashCode3
|
|
1963
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
1964
|
-
import {
|
|
1965
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass3,
|
|
1966
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine4
|
|
1967
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
1968
|
-
import { VOID3gxj6tk5isa35 as VOID5 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
1969
|
-
import {
|
|
1970
|
-
joinToString1cxrrlmo0chqs as joinToString,
|
|
1971
|
-
getOrNull1go7ef9ldk0df as getOrNull
|
|
1972
|
-
} from "../kotlin-kotlin-stdlib/kotlin/collections/_Collections.mjs";
|
|
1973
|
-
import { parseHeaderValuealpos28fgp6t as parseHeaderValue3 } from "../ktor-ktor-http/io/ktor/http/HttpHeaderValueParser.mjs";
|
|
1974
|
-
import { get_isTraceEnabled82xibuu04nxp as get_isTraceEnabled2 } from "../ktor-ktor-utils/io/ktor/util/logging/Logger.web.mjs";
|
|
1975
|
-
import { startsWith26w8qjqapeeq6 as startsWith } from "../kotlin-kotlin-stdlib/kotlin/text/stringsCode.mjs";
|
|
1976
|
-
import {
|
|
1977
|
-
split2bvyvnrlcifjv as split,
|
|
1978
|
-
isBlank1dvkhjjvox3p0 as isBlank
|
|
1979
|
-
} from "../kotlin-kotlin-stdlib/kotlin/text/Strings.mjs";
|
|
1
|
+
// Generated by sdk/scripts/post-process-per-file.js from an import cycle of 2 files; see collapseCycles.
|
|
2
|
+
// build/packages/js/ktor-ktor-client-core/io/ktor/client/engine/HttpClientEngine.mjs
|
|
1980
3
|
import {
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
import {
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
} from "../ktor-ktor-
|
|
1999
|
-
import {
|
|
2000
|
-
import {
|
|
2001
|
-
import {
|
|
2002
|
-
import {
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
import {
|
|
2007
|
-
import {
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
} from "../
|
|
2018
|
-
import {
|
|
2019
|
-
import {
|
|
2020
|
-
import {
|
|
2021
|
-
import {
|
|
2022
|
-
import {
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
this_0.trace_fti9bv_k$(tmp$ret$1);
|
|
2057
|
-
}
|
|
2058
|
-
return ValidateStatus_ShouldValidate_getInstance();
|
|
2059
|
-
}
|
|
2060
|
-
var tmp$ret$2;
|
|
2061
|
-
$l$block: {
|
|
2062
|
-
var _iterator__ex2g4s = requestCacheControl.iterator_jk1svi_k$();
|
|
2063
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2064
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
2065
|
-
if (startsWith(element.value_1, "max-age=")) {
|
|
2066
|
-
tmp$ret$2 = element;
|
|
2067
|
-
break $l$block;
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
tmp$ret$2 = null;
|
|
2071
|
-
}
|
|
2072
|
-
var tmp2_safe_receiver = tmp$ret$2;
|
|
2073
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.value_1;
|
|
2074
|
-
var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : split(tmp3_safe_receiver, ["="]);
|
|
2075
|
-
var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.get_c1px32_k$(1);
|
|
2076
|
-
var tmp;
|
|
2077
|
-
if (tmp5_safe_receiver == null) {
|
|
2078
|
-
tmp = null;
|
|
2079
|
-
} else {
|
|
2080
|
-
var tmp0_elvis_lhs = toIntOrNull(tmp5_safe_receiver);
|
|
2081
|
-
tmp = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
|
|
2082
|
-
}
|
|
2083
|
-
var requestMaxAge = tmp;
|
|
2084
|
-
if (requestMaxAge === 0) {
|
|
2085
|
-
var this_1 = get_LOGGER();
|
|
2086
|
-
if (get_isTraceEnabled2(this_1)) {
|
|
2087
|
-
var tmp$ret$7 = '"max-age" is not set for ' + request.url_1.toString() + ", should validate cached response";
|
|
2088
|
-
this_1.trace_fti9bv_k$(tmp$ret$7);
|
|
2089
|
-
}
|
|
2090
|
-
return ValidateStatus_ShouldValidate_getInstance();
|
|
2091
|
-
}
|
|
2092
|
-
if (responseCacheControl.contains_aljjnj_k$(CacheControl_getInstance().NO_CACHE_1)) {
|
|
2093
|
-
var this_2 = get_LOGGER();
|
|
2094
|
-
if (get_isTraceEnabled2(this_2)) {
|
|
2095
|
-
var tmp$ret$9 = '"no-cache" is set for ' + request.url_1.toString() + ", should validate cached response";
|
|
2096
|
-
this_2.trace_fti9bv_k$(tmp$ret$9);
|
|
2097
|
-
}
|
|
2098
|
-
return ValidateStatus_ShouldValidate_getInstance();
|
|
2099
|
-
}
|
|
2100
|
-
var validMillis = subtract(cacheExpires2.timestamp_1, getTimeMillis());
|
|
2101
|
-
if (validMillis > 0n) {
|
|
2102
|
-
var this_3 = get_LOGGER();
|
|
2103
|
-
if (get_isTraceEnabled2(this_3)) {
|
|
2104
|
-
var tmp$ret$11 = "Cached response is valid for " + request.url_1.toString() + ", should not validate";
|
|
2105
|
-
this_3.trace_fti9bv_k$(tmp$ret$11);
|
|
2106
|
-
}
|
|
2107
|
-
return ValidateStatus_ShouldNotValidate_getInstance();
|
|
2108
|
-
}
|
|
2109
|
-
if (responseCacheControl.contains_aljjnj_k$(CacheControl_getInstance().MUST_REVALIDATE_1)) {
|
|
2110
|
-
var this_4 = get_LOGGER();
|
|
2111
|
-
if (get_isTraceEnabled2(this_4)) {
|
|
2112
|
-
var tmp$ret$13 = '"must-revalidate" is set for ' + request.url_1.toString() + ", should validate cached response";
|
|
2113
|
-
this_4.trace_fti9bv_k$(tmp$ret$13);
|
|
2114
|
-
}
|
|
2115
|
-
return ValidateStatus_ShouldValidate_getInstance();
|
|
2116
|
-
}
|
|
2117
|
-
var tmp$ret$14;
|
|
2118
|
-
$l$block_0: {
|
|
2119
|
-
var _iterator__ex2g4s_0 = requestCacheControl.iterator_jk1svi_k$();
|
|
2120
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
2121
|
-
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
2122
|
-
if (startsWith(element_0.value_1, "max-stale=")) {
|
|
2123
|
-
tmp$ret$14 = element_0;
|
|
2124
|
-
break $l$block_0;
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
tmp$ret$14 = null;
|
|
2128
|
-
}
|
|
2129
|
-
var tmp6_safe_receiver = tmp$ret$14;
|
|
2130
|
-
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.value_1;
|
|
2131
|
-
var tmp8_safe_receiver = tmp7_safe_receiver == null ? null : substring(tmp7_safe_receiver, 10);
|
|
2132
|
-
var tmp9_elvis_lhs = tmp8_safe_receiver == null ? null : toIntOrNull(tmp8_safe_receiver);
|
|
2133
|
-
var maxStale = tmp9_elvis_lhs == null ? 0 : tmp9_elvis_lhs;
|
|
2134
|
-
var maxStaleMillis = multiply(numberToLong(maxStale), 1000n);
|
|
2135
|
-
if (add(validMillis, maxStaleMillis) > 0n) {
|
|
2136
|
-
var this_5 = get_LOGGER();
|
|
2137
|
-
if (get_isTraceEnabled2(this_5)) {
|
|
2138
|
-
var tmp$ret$17 = "Cached response is stale for " + request.url_1.toString() + " but less than max-stale, should warn";
|
|
2139
|
-
this_5.trace_fti9bv_k$(tmp$ret$17);
|
|
2140
|
-
}
|
|
2141
|
-
return ValidateStatus_ShouldWarn_getInstance();
|
|
2142
|
-
}
|
|
2143
|
-
var this_6 = get_LOGGER();
|
|
2144
|
-
if (get_isTraceEnabled2(this_6)) {
|
|
2145
|
-
var tmp$ret$19 = "Cached response is stale for " + request.url_1.toString() + ", should validate cached response";
|
|
2146
|
-
this_6.trace_fti9bv_k$(tmp$ret$19);
|
|
2147
|
-
}
|
|
2148
|
-
return ValidateStatus_ShouldValidate_getInstance();
|
|
2149
|
-
}
|
|
2150
|
-
function varyKeys(_this__u8e3s4) {
|
|
2151
|
-
var tmp0_elvis_lhs = vary(_this__u8e3s4);
|
|
2152
|
-
var tmp;
|
|
2153
|
-
if (tmp0_elvis_lhs == null) {
|
|
2154
|
-
return emptyMap();
|
|
2155
|
-
} else {
|
|
2156
|
-
tmp = tmp0_elvis_lhs;
|
|
2157
|
-
}
|
|
2158
|
-
var validationKeys = tmp;
|
|
2159
|
-
var result = LinkedHashMap_init_$Create$();
|
|
2160
|
-
var requestHeaders = _this__u8e3s4.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_headers_ef25jx_k$();
|
|
2161
|
-
var _iterator__ex2g4s = validationKeys.iterator_jk1svi_k$();
|
|
2162
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2163
|
-
var key = _iterator__ex2g4s.next_20eer_k$();
|
|
2164
|
-
var tmp2 = key.toLowerCase();
|
|
2165
|
-
var value = joinHeaderValues(requestHeaders.getAll_ffxf4h_k$(key));
|
|
2166
|
-
result.put_4fpzoq_k$(tmp2, value);
|
|
2167
|
-
}
|
|
2168
|
-
return result;
|
|
2169
|
-
}
|
|
2170
|
-
function cacheExpires(_this__u8e3s4, isShared, fallback) {
|
|
2171
|
-
var tmp;
|
|
2172
|
-
if (fallback === VOID5) {
|
|
2173
|
-
tmp = cacheExpires$lambda;
|
|
2174
|
-
} else {
|
|
2175
|
-
tmp = fallback;
|
|
2176
|
-
}
|
|
2177
|
-
fallback = tmp;
|
|
2178
|
-
var cacheControl_0 = cacheControl3(_this__u8e3s4);
|
|
2179
|
-
var tmp_0;
|
|
2180
|
-
var tmp_1;
|
|
2181
|
-
if (isShared) {
|
|
2182
|
-
var tmp$ret$0;
|
|
2183
|
-
$l$block_0: {
|
|
2184
|
-
var tmp_2;
|
|
2185
|
-
if (isInterface3(cacheControl_0, Collection())) {
|
|
2186
|
-
tmp_2 = cacheControl_0.isEmpty_y1axqb_k$();
|
|
2187
|
-
} else {
|
|
2188
|
-
tmp_2 = false;
|
|
2189
|
-
}
|
|
2190
|
-
if (tmp_2) {
|
|
2191
|
-
tmp$ret$0 = false;
|
|
2192
|
-
break $l$block_0;
|
|
2193
|
-
}
|
|
2194
|
-
var _iterator__ex2g4s = cacheControl_0.iterator_jk1svi_k$();
|
|
2195
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2196
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
2197
|
-
if (startsWith(element.value_1, "s-maxage")) {
|
|
2198
|
-
tmp$ret$0 = true;
|
|
2199
|
-
break $l$block_0;
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
tmp$ret$0 = false;
|
|
2203
|
-
}
|
|
2204
|
-
tmp_1 = tmp$ret$0;
|
|
2205
|
-
} else {
|
|
2206
|
-
tmp_1 = false;
|
|
2207
|
-
}
|
|
2208
|
-
if (tmp_1) {
|
|
2209
|
-
tmp_0 = "s-maxage";
|
|
2210
|
-
} else {
|
|
2211
|
-
tmp_0 = "max-age";
|
|
2212
|
-
}
|
|
2213
|
-
var maxAgeKey = tmp_0;
|
|
2214
|
-
var tmp$ret$2;
|
|
2215
|
-
$l$block_1: {
|
|
2216
|
-
var _iterator__ex2g4s_0 = cacheControl_0.iterator_jk1svi_k$();
|
|
2217
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
2218
|
-
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
2219
|
-
if (startsWith(element_0.value_1, maxAgeKey)) {
|
|
2220
|
-
tmp$ret$2 = element_0;
|
|
2221
|
-
break $l$block_1;
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
tmp$ret$2 = null;
|
|
2225
|
-
}
|
|
2226
|
-
var tmp0_safe_receiver = tmp$ret$2;
|
|
2227
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.value_1;
|
|
2228
|
-
var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : split(tmp1_safe_receiver, ["="]);
|
|
2229
|
-
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : getOrNull(tmp2_safe_receiver, 1);
|
|
2230
|
-
var maxAge = tmp3_safe_receiver == null ? null : toLongOrNull(tmp3_safe_receiver);
|
|
2231
|
-
if (!(maxAge == null)) {
|
|
2232
|
-
return plus3(_this__u8e3s4.get_requestTime_wwxhg3_k$(), multiply(maxAge, 1000n));
|
|
2233
|
-
}
|
|
2234
|
-
var expires = _this__u8e3s4.get_headers_ef25jx_k$().get_6bo4tg_k$("Expires");
|
|
2235
|
-
var tmp_3;
|
|
2236
|
-
if (expires == null) {
|
|
2237
|
-
tmp_3 = null;
|
|
2238
|
-
} else {
|
|
2239
|
-
if (expires === "0" || isBlank(expires))
|
|
2240
|
-
return fallback();
|
|
2241
|
-
var tmp_4;
|
|
2242
|
-
try {
|
|
2243
|
-
tmp_4 = fromHttpToGmtDate(expires);
|
|
2244
|
-
} catch ($p) {
|
|
2245
|
-
var tmp_5;
|
|
2246
|
-
if ($p instanceof Error) {
|
|
2247
|
-
var _unused_var__etf5q3 = $p;
|
|
2248
|
-
tmp_5 = fallback();
|
|
2249
|
-
} else {
|
|
2250
|
-
throw $p;
|
|
2251
|
-
}
|
|
2252
|
-
tmp_4 = tmp_5;
|
|
2253
|
-
}
|
|
2254
|
-
return tmp_4;
|
|
2255
|
-
}
|
|
2256
|
-
var tmp5_elvis_lhs = tmp_3;
|
|
2257
|
-
return tmp5_elvis_lhs == null ? fallback() : tmp5_elvis_lhs;
|
|
2258
|
-
}
|
|
2259
|
-
function joinHeaderValues(_this__u8e3s4) {
|
|
2260
|
-
var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : joinToString(_this__u8e3s4, ",");
|
|
2261
|
-
return tmp1_elvis_lhs == null ? "" : tmp1_elvis_lhs;
|
|
2262
|
-
}
|
|
2263
|
-
var HttpCacheEntry$produceResponse$filteredResponse$1Class;
|
|
2264
|
-
function HttpCacheEntry$produceResponse$filteredResponse$1() {
|
|
2265
|
-
if (HttpCacheEntry$produceResponse$filteredResponse$1Class === VOID5) {
|
|
2266
|
-
let $ = function(this$0) {
|
|
2267
|
-
this.this$0__1 = this$0;
|
|
2268
|
-
HttpResponse3().call(this);
|
|
2269
|
-
};
|
|
2270
|
-
initMetadataForClass3($, VOID5, VOID5, HttpResponse3());
|
|
2271
|
-
protoOf5($).get_call_wojxrb_k$ = function() {
|
|
2272
|
-
return this.this$0__1.response_1.get_call_wojxrb_k$();
|
|
2273
|
-
};
|
|
2274
|
-
protoOf5($).get_status_jnf6d7_k$ = function() {
|
|
2275
|
-
return this.this$0__1.response_1.get_status_jnf6d7_k$();
|
|
2276
|
-
};
|
|
2277
|
-
protoOf5($).get_version_72w4j3_k$ = function() {
|
|
2278
|
-
return this.this$0__1.response_1.get_version_72w4j3_k$();
|
|
2279
|
-
};
|
|
2280
|
-
protoOf5($).get_requestTime_wwxhg3_k$ = function() {
|
|
2281
|
-
return this.this$0__1.response_1.get_requestTime_wwxhg3_k$();
|
|
2282
|
-
};
|
|
2283
|
-
protoOf5($).get_responseTime_scfvg7_k$ = function() {
|
|
2284
|
-
return this.this$0__1.response_1.get_responseTime_scfvg7_k$();
|
|
2285
|
-
};
|
|
2286
|
-
protoOf5($).get_headers_ef25jx_k$ = function() {
|
|
2287
|
-
return this.this$0__1.responseHeaders_1;
|
|
2288
|
-
};
|
|
2289
|
-
protoOf5($).get_coroutineContext_115oqo_k$ = function() {
|
|
2290
|
-
return this.this$0__1.response_1.get_coroutineContext_115oqo_k$();
|
|
2291
|
-
};
|
|
2292
|
-
protoOf5($).get_rawContent_u3f8li_k$ = function() {
|
|
2293
|
-
return this.this$0__1.response_1.get_rawContent_u3f8li_k$();
|
|
2294
|
-
};
|
|
2295
|
-
HttpCacheEntry$produceResponse$filteredResponse$1Class = $;
|
|
2296
|
-
}
|
|
2297
|
-
return HttpCacheEntry$produceResponse$filteredResponse$1Class;
|
|
2298
|
-
}
|
|
2299
|
-
var HttpCacheEntryClass;
|
|
2300
|
-
function HttpCacheEntry() {
|
|
2301
|
-
if (HttpCacheEntryClass === VOID5) {
|
|
2302
|
-
let $ = function(expires, varyKeys2, response, body) {
|
|
2303
|
-
this.expires_1 = expires;
|
|
2304
|
-
this.varyKeys_1 = varyKeys2;
|
|
2305
|
-
this.response_1 = response;
|
|
2306
|
-
this.body_1 = body;
|
|
2307
|
-
this.responseHeaders_1 = filterForCacheStorage(this.response_1.get_headers_ef25jx_k$());
|
|
2308
|
-
};
|
|
2309
|
-
initMetadataForClass3($, "HttpCacheEntry");
|
|
2310
|
-
protoOf5($).produceResponse_uy9n9o_k$ = function() {
|
|
2311
|
-
var filteredResponse = new (HttpCacheEntry$produceResponse$filteredResponse$1())(this);
|
|
2312
|
-
return new (SavedHttpCall())(this.response_1.get_call_wojxrb_k$().client_1, this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$(), filteredResponse, this.body_1).get_response_xlk07e_k$();
|
|
2313
|
-
};
|
|
2314
|
-
protoOf5($).equals = function(other) {
|
|
2315
|
-
var tmp;
|
|
2316
|
-
if (other == null) {
|
|
2317
|
-
tmp = true;
|
|
2318
|
-
} else {
|
|
2319
|
-
tmp = !(other instanceof HttpCacheEntry());
|
|
2320
|
-
}
|
|
2321
|
-
if (tmp)
|
|
2322
|
-
return false;
|
|
2323
|
-
if (other === this)
|
|
2324
|
-
return true;
|
|
2325
|
-
return equals3(this.varyKeys_1, other.varyKeys_1);
|
|
2326
|
-
};
|
|
2327
|
-
protoOf5($).hashCode = function() {
|
|
2328
|
-
return hashCode3(this.varyKeys_1);
|
|
2329
|
-
};
|
|
2330
|
-
HttpCacheEntryClass = $;
|
|
2331
|
-
}
|
|
2332
|
-
return HttpCacheEntryClass;
|
|
2333
|
-
}
|
|
2334
|
-
function withFreshenedMetadata(_this__u8e3s4, expires, varyKeys2, mergedHeaders) {
|
|
2335
|
-
var freshenedResponse = new (withFreshenedMetadata$freshenedResponse$1())(mergedHeaders, _this__u8e3s4);
|
|
2336
|
-
return new (HttpCacheEntry())(expires, varyKeys2, freshenedResponse, _this__u8e3s4.body_1);
|
|
2337
|
-
}
|
|
2338
|
-
function etagMatches(cachedEtag, validationEtag) {
|
|
2339
|
-
var tmp;
|
|
2340
|
-
try {
|
|
2341
|
-
var cached = Companion_getInstance2().parseSingle_uqtfi7_k$(cachedEtag);
|
|
2342
|
-
var validation = Companion_getInstance2().parseSingle_uqtfi7_k$(validationEtag);
|
|
2343
|
-
return cached.noneMatch_ka7xhr_k$(listOf(validation)).equals(VersionCheckResult_NOT_MODIFIED_getInstance());
|
|
2344
|
-
} catch ($p) {
|
|
2345
|
-
var tmp_0;
|
|
2346
|
-
if ($p instanceof Error) {
|
|
2347
|
-
var e = $p;
|
|
2348
|
-
tmp_0 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
2349
|
-
} else {
|
|
2350
|
-
throw $p;
|
|
2351
|
-
}
|
|
2352
|
-
tmp = tmp_0;
|
|
2353
|
-
}
|
|
2354
|
-
var tmp0 = tmp;
|
|
2355
|
-
var tmp$ret$4;
|
|
2356
|
-
$l$block: {
|
|
2357
|
-
if (_Result___get_isFailure__impl__jpiriv(tmp0)) {
|
|
2358
|
-
tmp$ret$4 = false;
|
|
2359
|
-
break $l$block;
|
|
4
|
+
get_HttpResponseCancelled3685lnxbzknld as get_HttpResponseCancelled,
|
|
5
|
+
get_HttpRequestIsReadyForSending2qftypei374ml as get_HttpRequestIsReadyForSending,
|
|
6
|
+
get_HttpResponseReceived23ai4hzotyx3a as get_HttpResponseReceived
|
|
7
|
+
} from "../ktor-ktor-client-core/io/ktor/client/utils/ClientEvents.mjs";
|
|
8
|
+
import { Unit_instance3kz1zqli6gr1r as Unit_instance } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
9
|
+
import {
|
|
10
|
+
Key_instancepi2bbb0csu5f as Key_instance,
|
|
11
|
+
get_job2zvlvce9o9a29 as get_job,
|
|
12
|
+
Job13y4jkazwjho0 as Job
|
|
13
|
+
} from "../kotlinx-coroutines-core/kotlinx/coroutines/Job.mjs";
|
|
14
|
+
import {
|
|
15
|
+
toString1pkumu07cwy4m as toString,
|
|
16
|
+
protoOf180f3jzyo7rfj as protoOf
|
|
17
|
+
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
18
|
+
import { IllegalArgumentException_init_$Create$1gox8sdqs91jy as IllegalArgumentException_init_$Create$ } from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
19
|
+
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
20
|
+
import { THROW_CCE2g6jy02ryeudk as THROW_CCE } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
21
|
+
import { PipelineContext34fsb0mycu471 as PipelineContext } from "../ktor-ktor-utils/io/ktor/util/pipeline/PipelineContext.mjs";
|
|
22
|
+
import { HttpRequestBuilder15f2nnx9sjuv1 as HttpRequestBuilder } from "../ktor-ktor-client-core/io/ktor/client/request/HttpRequest.mjs";
|
|
23
|
+
import { PrimitiveClasses_getInstance13wbaztpz3e2d as PrimitiveClasses_getInstance } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/primitives.mjs";
|
|
24
|
+
import { arrayOf1akklvh2at202 as arrayOf } from "../kotlin-kotlin-stdlib/kotlin/Library.mjs";
|
|
25
|
+
import {
|
|
26
|
+
createKType31ecntyyaay3k as createKType,
|
|
27
|
+
getStarKTypeProjection316vzroubdy0t as getStarKTypeProjection
|
|
28
|
+
} from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/KTypeHelpers.mjs";
|
|
29
|
+
import { TypeInfo2nbxsuf4v8os2 as TypeInfo } from "../ktor-ktor-utils/io/ktor/util/reflect/Type.mjs";
|
|
30
|
+
import {
|
|
31
|
+
OutgoingContent3t2ohmyam9o76 as OutgoingContent,
|
|
32
|
+
NullBody_instance22vwyocs8eppk as NullBody_instance
|
|
33
|
+
} from "../ktor-ktor-http/io/ktor/http/content/OutgoingContent.mjs";
|
|
34
|
+
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
35
|
+
import { HttpClientCall_init_$Create$l01lehg8js2a as HttpClientCall_init_$Create$ } from "../ktor-ktor-client-core/io/ktor/client/call/HttpClientCall.mjs";
|
|
36
|
+
import {
|
|
37
|
+
initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
|
|
38
|
+
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
|
|
39
|
+
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface
|
|
40
|
+
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
41
|
+
import { VOID3gxj6tk5isa35 as VOID } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
42
|
+
import { constructCallableReference23y65rf941mch as constructCallableReference } from "../kotlin-kotlin-stdlib/kotlin/js/reflectRuntime.mjs";
|
|
43
|
+
import { CoroutineScopefcb5f5dwqcas as CoroutineScope } from "../kotlinx-coroutines-core/kotlinx/coroutines/CoroutineScope.mjs";
|
|
44
|
+
import { isInterface3d6p8outrmvmk as isInterface } from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
45
|
+
import { KtorCallContextElementudwxlrp3zgdl as KtorCallContextElement } from "../ktor-ktor-client-core/io/ktor/client/engine/Utils.mjs";
|
|
46
|
+
import { asyncz02dsa2nb2zt as async } from "../kotlinx-coroutines-core/kotlinx/coroutines/Builders.common.mjs";
|
|
47
|
+
import { emptySetcxexqki71qfa as emptySet } from "../kotlin-kotlin-stdlib/kotlin/collections/Sets.mjs";
|
|
48
|
+
import { Phases_getInstance2rx62p874ogj4 as Phases_getInstance } from "../ktor-ktor-client-core/io/ktor/client/request/HttpRequestPipeline.mjs";
|
|
49
|
+
import { AutoCloseable1l5p57f9lp7kv as AutoCloseable } from "../kotlin-kotlin-stdlib/kotlin/AutoCloseableJs.mjs";
|
|
50
|
+
import { ArrayList_init_$Create$2xrifdqz5xirg as ArrayList_init_$Create$ } from "../kotlin-kotlin-stdlib/kotlin/collections/ArrayListJs.mjs";
|
|
51
|
+
import {
|
|
52
|
+
HttpHeaders_getInstance1avhj7ffsen7f as HttpHeaders_getInstance,
|
|
53
|
+
UnsafeHeaderException3ncvrrp48xjzq as UnsafeHeaderException
|
|
54
|
+
} from "../ktor-ktor-http/io/ktor/http/HttpHeaders.mjs";
|
|
55
|
+
import {
|
|
56
|
+
CancellationException3b36o9qz53rgr as CancellationException,
|
|
57
|
+
CancellationException_init_$Create$1flhbcsrur0zx as CancellationException_init_$Create$
|
|
58
|
+
} from "../kotlin-kotlin-stdlib/kotlin/coroutines/cancellation/CancellationException.mjs";
|
|
59
|
+
import { CoroutineName2g5zosw74tf0f as CoroutineName } from "../kotlinx-coroutines-core/kotlinx/coroutines/CoroutineName.mjs";
|
|
60
|
+
import { HttpClientConfigo6p492ed655g as HttpClientConfig } from "../ktor-ktor-client-core/io/ktor/client/HttpClientConfig.mjs";
|
|
61
|
+
import { getKClass3t8tygqu4lcxf as getKClass } from "../kotlin-kotlin-stdlib/kotlin/reflect/js/internal/reflection.mjs";
|
|
62
|
+
import { AttributeKey3aq8ytwgx54f7 as AttributeKey } from "../ktor-ktor-utils/io/ktor/util/Attributes.mjs";
|
|
63
|
+
function get_CALL_COROUTINE() {
|
|
64
|
+
_init_properties_HttpClientEngine_kt__h91z5h();
|
|
65
|
+
return CALL_COROUTINE;
|
|
66
|
+
}
|
|
67
|
+
var CALL_COROUTINE;
|
|
68
|
+
function get_CLIENT_CONFIG() {
|
|
69
|
+
_init_properties_HttpClientEngine_kt__h91z5h();
|
|
70
|
+
return CLIENT_CONFIG;
|
|
71
|
+
}
|
|
72
|
+
var CLIENT_CONFIG;
|
|
73
|
+
function HttpClientEngine$install$slambda$lambda($client, $response) {
|
|
74
|
+
return function(it) {
|
|
75
|
+
var tmp;
|
|
76
|
+
if (!(it == null)) {
|
|
77
|
+
$client.monitor_1.raise_3e7w7u_k$(get_HttpResponseCancelled(), $response);
|
|
78
|
+
tmp = Unit_instance;
|
|
2360
79
|
}
|
|
2361
|
-
|
|
2362
|
-
}
|
|
2363
|
-
return tmp$ret$4;
|
|
80
|
+
return Unit_instance;
|
|
81
|
+
};
|
|
2364
82
|
}
|
|
2365
|
-
function
|
|
2366
|
-
var
|
|
2367
|
-
|
|
83
|
+
function _get_closed__iwkfs1($this) {
|
|
84
|
+
var tmp0_safe_receiver = $this.get_coroutineContext_115oqo_k$().get_y2st91_k$(Key_instance);
|
|
85
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_isActive_quafmh_k$();
|
|
86
|
+
return !(tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs);
|
|
87
|
+
}
|
|
88
|
+
function executeWithinCallContext($this, requestData, $completion) {
|
|
89
|
+
var tmp = new ($executeWithinCallContextCOROUTINE$())($this, requestData, $completion);
|
|
90
|
+
tmp.result_1 = Unit_instance;
|
|
2368
91
|
tmp.exception_1 = null;
|
|
2369
92
|
return tmp.doResume_5yljmg_k$();
|
|
2370
93
|
}
|
|
2371
|
-
function
|
|
2372
|
-
|
|
94
|
+
function checkExtensions($this, requestData) {
|
|
95
|
+
var _iterator__ex2g4s = requestData.requiredCapabilities_1.iterator_jk1svi_k$();
|
|
96
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
97
|
+
var requestedExtension = _iterator__ex2g4s.next_20eer_k$();
|
|
98
|
+
if (!$this.get_supportedCapabilities_gwz15x_k$().contains_aljjnj_k$(requestedExtension)) {
|
|
99
|
+
var message = "Engine doesn't support " + toString(requestedExtension);
|
|
100
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
2373
103
|
}
|
|
2374
|
-
var
|
|
2375
|
-
function
|
|
2376
|
-
if (
|
|
2377
|
-
let $ = function($
|
|
2378
|
-
this.$
|
|
2379
|
-
|
|
2380
|
-
this
|
|
2381
|
-
};
|
|
2382
|
-
initMetadataForClass3($, VOID5, VOID5, HttpResponse3());
|
|
2383
|
-
protoOf5($).get_call_wojxrb_k$ = function() {
|
|
2384
|
-
return this.$this_withFreshenedMetadata_1.response_1.get_call_wojxrb_k$();
|
|
2385
|
-
};
|
|
2386
|
-
protoOf5($).get_status_jnf6d7_k$ = function() {
|
|
2387
|
-
return this.$this_withFreshenedMetadata_1.response_1.get_status_jnf6d7_k$();
|
|
2388
|
-
};
|
|
2389
|
-
protoOf5($).get_version_72w4j3_k$ = function() {
|
|
2390
|
-
return this.$this_withFreshenedMetadata_1.response_1.get_version_72w4j3_k$();
|
|
2391
|
-
};
|
|
2392
|
-
protoOf5($).get_requestTime_wwxhg3_k$ = function() {
|
|
2393
|
-
return this.$this_withFreshenedMetadata_1.response_1.get_requestTime_wwxhg3_k$();
|
|
2394
|
-
};
|
|
2395
|
-
protoOf5($).get_responseTime_scfvg7_k$ = function() {
|
|
2396
|
-
return this.$this_withFreshenedMetadata_1.response_1.get_responseTime_scfvg7_k$();
|
|
2397
|
-
};
|
|
2398
|
-
protoOf5($).get_headers_ef25jx_k$ = function() {
|
|
2399
|
-
return this.headers_1;
|
|
2400
|
-
};
|
|
2401
|
-
protoOf5($).get_coroutineContext_115oqo_k$ = function() {
|
|
2402
|
-
return this.$this_withFreshenedMetadata_1.response_1.get_coroutineContext_115oqo_k$();
|
|
104
|
+
var HttpClientEngine$install$slambdaClass;
|
|
105
|
+
function HttpClientEngine$install$slambda() {
|
|
106
|
+
if (HttpClientEngine$install$slambdaClass === VOID) {
|
|
107
|
+
let $ = function($client, this$0, resultContinuation) {
|
|
108
|
+
this.$client_1 = $client;
|
|
109
|
+
this.this$0__1 = this$0;
|
|
110
|
+
CoroutineImpl().call(this, resultContinuation);
|
|
2403
111
|
};
|
|
2404
|
-
|
|
2405
|
-
|
|
112
|
+
initMetadataForLambda($, CoroutineImpl(), VOID, [2]);
|
|
113
|
+
protoOf($).invoke_wpcgmu_k$ = function($this$intercept, content, $completion) {
|
|
114
|
+
var tmp = this.create_l3tkcm_k$($this$intercept, content, $completion);
|
|
115
|
+
tmp.result_1 = Unit_instance;
|
|
116
|
+
tmp.exception_1 = null;
|
|
117
|
+
return tmp.doResume_5yljmg_k$();
|
|
2406
118
|
};
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
}
|
|
2411
|
-
function ValidateStatus_ShouldValidate_getInstance() {
|
|
2412
|
-
static_init();
|
|
2413
|
-
return ValidateStatus_ShouldValidate_instance;
|
|
2414
|
-
}
|
|
2415
|
-
function ValidateStatus_ShouldNotValidate_getInstance() {
|
|
2416
|
-
static_init();
|
|
2417
|
-
return ValidateStatus_ShouldNotValidate_instance;
|
|
2418
|
-
}
|
|
2419
|
-
function ValidateStatus_ShouldWarn_getInstance() {
|
|
2420
|
-
static_init();
|
|
2421
|
-
return ValidateStatus_ShouldWarn_instance;
|
|
2422
|
-
}
|
|
2423
|
-
var $HttpCacheEntryCOROUTINE$Class;
|
|
2424
|
-
function $HttpCacheEntryCOROUTINE$() {
|
|
2425
|
-
if ($HttpCacheEntryCOROUTINE$Class === VOID5) {
|
|
2426
|
-
let $ = function(isShared, response, resultContinuation) {
|
|
2427
|
-
CoroutineImpl4().call(this, resultContinuation);
|
|
2428
|
-
this.isShared_1 = isShared;
|
|
2429
|
-
this.response_1 = response;
|
|
119
|
+
protoOf($).invoke_4tzzq6_k$ = function(p1, p2, $completion) {
|
|
120
|
+
var tmp = p1 instanceof PipelineContext() ? p1 : THROW_CCE();
|
|
121
|
+
return this.invoke_wpcgmu_k$(tmp, !(p2 == null) ? p2 : THROW_CCE(), $completion);
|
|
2430
122
|
};
|
|
2431
|
-
|
|
2432
|
-
protoOf5($).doResume_5yljmg_k$ = function() {
|
|
123
|
+
protoOf($).doResume_5yljmg_k$ = function() {
|
|
2433
124
|
var suspendResult = this.result_1;
|
|
2434
125
|
$sm: do
|
|
2435
126
|
try {
|
|
2436
127
|
var tmp = this.state_1;
|
|
2437
128
|
switch (tmp) {
|
|
2438
129
|
case 0:
|
|
2439
|
-
this.exceptionState_1 =
|
|
130
|
+
this.exceptionState_1 = 3;
|
|
131
|
+
var this_0 = new (HttpRequestBuilder())();
|
|
132
|
+
this_0.takeFromWithExecutionContext_gp1ep9_k$(this.$this$intercept_1.context_1);
|
|
133
|
+
var body = this.content_1;
|
|
134
|
+
if (body == null) {
|
|
135
|
+
this_0.body_1 = NullBody_instance;
|
|
136
|
+
var tmp_0 = PrimitiveClasses_getInstance().get_anyClass_x0jl4l_k$();
|
|
137
|
+
var tmp_1 = false;
|
|
138
|
+
var tmp_2;
|
|
139
|
+
try {
|
|
140
|
+
tmp_2 = createKType(PrimitiveClasses_getInstance().get_anyClass_x0jl4l_k$(), arrayOf([]), false);
|
|
141
|
+
} catch ($p) {
|
|
142
|
+
var tmp_3;
|
|
143
|
+
if ($p instanceof Error) {
|
|
144
|
+
var _unused_var__etf5q3 = $p;
|
|
145
|
+
tmp_3 = null;
|
|
146
|
+
} else {
|
|
147
|
+
throw $p;
|
|
148
|
+
}
|
|
149
|
+
tmp_2 = tmp_3;
|
|
150
|
+
}
|
|
151
|
+
this_0.set_bodyType_8pgqkl_k$(new (TypeInfo())(tmp_0, tmp_1, tmp_2));
|
|
152
|
+
} else {
|
|
153
|
+
if (body instanceof OutgoingContent()) {
|
|
154
|
+
this_0.body_1 = body;
|
|
155
|
+
this_0.set_bodyType_8pgqkl_k$(null);
|
|
156
|
+
} else {
|
|
157
|
+
this_0.body_1 = body;
|
|
158
|
+
var tmp_4 = PrimitiveClasses_getInstance().get_anyClass_x0jl4l_k$();
|
|
159
|
+
var tmp_5 = false;
|
|
160
|
+
var tmp_6;
|
|
161
|
+
try {
|
|
162
|
+
tmp_6 = createKType(PrimitiveClasses_getInstance().get_anyClass_x0jl4l_k$(), arrayOf([]), false);
|
|
163
|
+
} catch ($p_0) {
|
|
164
|
+
var tmp_7;
|
|
165
|
+
if ($p_0 instanceof Error) {
|
|
166
|
+
var _unused_var__etf5q3_0 = $p_0;
|
|
167
|
+
tmp_7 = null;
|
|
168
|
+
} else {
|
|
169
|
+
throw $p_0;
|
|
170
|
+
}
|
|
171
|
+
tmp_6 = tmp_7;
|
|
172
|
+
}
|
|
173
|
+
this_0.set_bodyType_8pgqkl_k$(new (TypeInfo())(tmp_4, tmp_5, tmp_6));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
var builder = this_0;
|
|
177
|
+
this.$client_1.monitor_1.raise_3e7w7u_k$(get_HttpRequestIsReadyForSending(), builder);
|
|
178
|
+
var tmp_8 = this;
|
|
179
|
+
var this_1 = builder.build_1k0s4u_k$();
|
|
180
|
+
this_1.attributes_1.put_gkntno_k$(get_CLIENT_CONFIG(), this.$client_1.config_1);
|
|
181
|
+
tmp_8.requestData0__1 = this_1;
|
|
182
|
+
validateHeaders(this.requestData0__1);
|
|
183
|
+
checkExtensions(this.this$0__1, this.requestData0__1);
|
|
2440
184
|
this.state_1 = 1;
|
|
2441
|
-
suspendResult =
|
|
2442
|
-
if (suspendResult ===
|
|
185
|
+
suspendResult = executeWithinCallContext(this.this$0__1, this.requestData0__1, this);
|
|
186
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2443
187
|
return suspendResult;
|
|
2444
188
|
}
|
|
2445
189
|
continue $sm;
|
|
2446
190
|
case 1:
|
|
2447
|
-
var
|
|
2448
|
-
var
|
|
2449
|
-
|
|
191
|
+
var responseData = suspendResult;
|
|
192
|
+
var call = HttpClientCall_init_$Create$(this.$client_1, this.requestData0__1, responseData);
|
|
193
|
+
var response = call.get_response_xlk07e_k$();
|
|
194
|
+
this.$client_1.monitor_1.raise_3e7w7u_k$(get_HttpResponseReceived(), response);
|
|
195
|
+
var tmp_9 = get_job(response.get_coroutineContext_115oqo_k$());
|
|
196
|
+
tmp_9.invokeOnCompletion_n6cffu_k$(HttpClientEngine$install$slambda$lambda(this.$client_1, response));
|
|
197
|
+
this.state_1 = 2;
|
|
198
|
+
suspendResult = this.$this$intercept_1.proceedWith_i5skhv_k$(call, this);
|
|
199
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
200
|
+
return suspendResult;
|
|
201
|
+
}
|
|
202
|
+
continue $sm;
|
|
2450
203
|
case 2:
|
|
204
|
+
return Unit_instance;
|
|
205
|
+
case 3:
|
|
2451
206
|
throw this.exception_1;
|
|
2452
207
|
}
|
|
2453
|
-
} catch ($
|
|
2454
|
-
var e = $
|
|
2455
|
-
if (this.exceptionState_1 ===
|
|
208
|
+
} catch ($p_1) {
|
|
209
|
+
var e = $p_1;
|
|
210
|
+
if (this.exceptionState_1 === 3) {
|
|
2456
211
|
throw e;
|
|
2457
212
|
} else {
|
|
2458
213
|
this.state_1 = this.exceptionState_1;
|
|
@@ -2461,395 +216,65 @@ function $HttpCacheEntryCOROUTINE$() {
|
|
|
2461
216
|
}
|
|
2462
217
|
while (true);
|
|
2463
218
|
};
|
|
2464
|
-
$
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
// build/packages/js/ktor-ktor-client-core/io/ktor/client/plugins/cache/storage/HttpCacheStorage.mjs
|
|
2470
|
-
import {
|
|
2471
|
-
protoOf180f3jzyo7rfj as protoOf6,
|
|
2472
|
-
equals2au1ep9vhcato as equals4,
|
|
2473
|
-
hashCodeq5arwsb9dgti as hashCode4,
|
|
2474
|
-
toString1pkumu07cwy4m as toString2
|
|
2475
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
2476
|
-
import {
|
|
2477
|
-
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion2,
|
|
2478
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass4,
|
|
2479
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine5
|
|
2480
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
2481
|
-
import { VOID3gxj6tk5isa35 as VOID6 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
2482
|
-
import { SavedHttpCall36iotslsp8nj5 as SavedHttpCall2 } from "../ktor-ktor-client-core/io/ktor/client/call/SavedCall.mjs";
|
|
2483
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance6 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
2484
|
-
import {
|
|
2485
|
-
Companion_getInstance72dans54qq1a as Companion_getInstance3,
|
|
2486
|
-
HeadersBuilder3h7sn3kkvu98m as HeadersBuilder3
|
|
2487
|
-
} from "../ktor-ktor-http/io/ktor/http/Headers.mjs";
|
|
2488
|
-
import {
|
|
2489
|
-
plus20p0vtfmu0596 as plus4,
|
|
2490
|
-
plus310ted5e4i90h as plus_0,
|
|
2491
|
-
toSet2orjxp16sotqu as toSet
|
|
2492
|
-
} from "../kotlin-kotlin-stdlib/kotlin/collections/_Collections.mjs";
|
|
2493
|
-
import { Collection1k04j3hzsbod0 as Collection2 } from "../kotlin-kotlin-stdlib/kotlin/collections/Collections.mjs";
|
|
2494
|
-
import {
|
|
2495
|
-
isInterface3d6p8outrmvmk as isInterface4,
|
|
2496
|
-
isCharSequence1ju9jr1w86plq as isCharSequence
|
|
2497
|
-
} from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
2498
|
-
import { equals2v6cggk171b6e as equals_0 } from "../kotlin-kotlin-stdlib/kotlin/text/stringsCode.mjs";
|
|
2499
|
-
import { emptySetcxexqki71qfa as emptySet2 } from "../kotlin-kotlin-stdlib/kotlin/collections/Sets.mjs";
|
|
2500
|
-
import { _Char___init__impl__6a9atxrzocepzq3zgi as _Char___init__impl__6a9atx } from "../kotlin-kotlin-stdlib/kotlin/Char.mjs";
|
|
2501
|
-
import { charArrayOf27f4r3dozbrk1 as charArrayOf } from "../kotlin-kotlin-stdlib/kotlin/js/arrays.mjs";
|
|
2502
|
-
import {
|
|
2503
|
-
split3d3yeauc4rm2n as split2,
|
|
2504
|
-
trim11nh7r46at6sx as trim
|
|
2505
|
-
} from "../kotlin-kotlin-stdlib/kotlin/text/Strings.mjs";
|
|
2506
|
-
import { collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault } from "../kotlin-kotlin-stdlib/kotlin/collections/Iterables.mjs";
|
|
2507
|
-
import {
|
|
2508
|
-
ArrayList_init_$Create$a978fvbbts3d as ArrayList_init_$Create$,
|
|
2509
|
-
ArrayList_init_$Create$2xrifdqz5xirg as ArrayList_init_$Create$_0
|
|
2510
|
-
} from "../kotlin-kotlin-stdlib/kotlin/collections/ArrayListJs.mjs";
|
|
2511
|
-
import { THROW_CCE2g6jy02ryeudk as THROW_CCE3 } from "../kotlin-kotlin-stdlib/kotlin/hacks.mjs";
|
|
2512
|
-
import { charSequenceLength3278n89t01tmv as charSequenceLength } from "../kotlin-kotlin-stdlib/kotlin/js/charSequenceJs.mjs";
|
|
2513
|
-
import { HttpResponse1532ob1hsse1y as HttpResponse4 } from "../ktor-ktor-client-core/io/ktor/client/statement/HttpResponse.mjs";
|
|
2514
|
-
import { IllegalStateException_init_$Create$38ax6c90susjc as IllegalStateException_init_$Create$2 } from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
2515
|
-
import { CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl5 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/CoroutineImpl.mjs";
|
|
2516
|
-
import { readBuffery45c0omfxhxc as readBuffer2 } from "../ktor-ktor-io/io/ktor/utils/io/ByteReadChannelOperations.mjs";
|
|
2517
|
-
import { get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED5 } from "../kotlin-kotlin-stdlib/kotlin/coroutines/intrinsics/Intrinsics.mjs";
|
|
2518
|
-
import { readBytesj5m5qe40si0k as readBytes } from "../ktor-ktor-io/io/ktor/utils/io/core/Buffers.mjs";
|
|
2519
|
-
import { listOf1jh22dvmctj1r as listOf2 } from "../kotlin-kotlin-stdlib/kotlin/collections/CollectionsKt.mjs";
|
|
2520
|
-
var imul = Math.imul;
|
|
2521
|
-
function get_hopByHopHeaders() {
|
|
2522
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2523
|
-
return hopByHopHeaders;
|
|
2524
|
-
}
|
|
2525
|
-
var hopByHopHeaders;
|
|
2526
|
-
function get_proxyAuthHeaders() {
|
|
2527
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2528
|
-
return proxyAuthHeaders;
|
|
2529
|
-
}
|
|
2530
|
-
var proxyAuthHeaders;
|
|
2531
|
-
function get_staticStorageExcludedHeaders() {
|
|
2532
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2533
|
-
return staticStorageExcludedHeaders;
|
|
2534
|
-
}
|
|
2535
|
-
var staticStorageExcludedHeaders;
|
|
2536
|
-
function get_connectionOptionsWithoutFieldNames() {
|
|
2537
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2538
|
-
return connectionOptionsWithoutFieldNames;
|
|
2539
|
-
}
|
|
2540
|
-
var connectionOptionsWithoutFieldNames;
|
|
2541
|
-
function CacheStorage$Companion$Unlimited$lambda() {
|
|
2542
|
-
return new (UnlimitedStorage())();
|
|
2543
|
-
}
|
|
2544
|
-
var CompanionClass2;
|
|
2545
|
-
function Companion2() {
|
|
2546
|
-
if (CompanionClass2 === VOID6) {
|
|
2547
|
-
let $ = function() {
|
|
2548
|
-
Companion_instance3 = this;
|
|
2549
|
-
var tmp = this;
|
|
2550
|
-
tmp.Unlimited_1 = CacheStorage$Companion$Unlimited$lambda;
|
|
2551
|
-
this.Disabled_1 = DisabledStorage_instance;
|
|
2552
|
-
};
|
|
2553
|
-
initMetadataForCompanion2($);
|
|
2554
|
-
CompanionClass2 = $;
|
|
2555
|
-
}
|
|
2556
|
-
return CompanionClass2;
|
|
2557
|
-
}
|
|
2558
|
-
var Companion_instance3;
|
|
2559
|
-
function Companion_getInstance_02() {
|
|
2560
|
-
if (Companion_instance3 == null)
|
|
2561
|
-
new (Companion2())();
|
|
2562
|
-
return Companion_instance3;
|
|
2563
|
-
}
|
|
2564
|
-
var CachedResponseDataClass;
|
|
2565
|
-
function CachedResponseData() {
|
|
2566
|
-
if (CachedResponseDataClass === VOID6) {
|
|
2567
|
-
let $ = function(url, statusCode, requestTime, responseTime, version, expires, headers, varyKeys2, body) {
|
|
2568
|
-
this.url_1 = url;
|
|
2569
|
-
this.statusCode_1 = statusCode;
|
|
2570
|
-
this.requestTime_1 = requestTime;
|
|
2571
|
-
this.responseTime_1 = responseTime;
|
|
2572
|
-
this.version_1 = version;
|
|
2573
|
-
this.expires_1 = expires;
|
|
2574
|
-
this.headers_1 = headers;
|
|
2575
|
-
this.varyKeys_1 = varyKeys2;
|
|
2576
|
-
this.body_1 = body;
|
|
2577
|
-
};
|
|
2578
|
-
initMetadataForClass4($, "CachedResponseData");
|
|
2579
|
-
protoOf6($).equals = function(other) {
|
|
2580
|
-
if (this === other)
|
|
2581
|
-
return true;
|
|
2582
|
-
if (!(other instanceof CachedResponseData()))
|
|
2583
|
-
return false;
|
|
2584
|
-
if (!this.url_1.equals(other.url_1))
|
|
2585
|
-
return false;
|
|
2586
|
-
if (!equals4(this.varyKeys_1, other.varyKeys_1))
|
|
2587
|
-
return false;
|
|
2588
|
-
return true;
|
|
2589
|
-
};
|
|
2590
|
-
protoOf6($).hashCode = function() {
|
|
2591
|
-
var result = this.url_1.hashCode();
|
|
2592
|
-
result = imul(31, result) + hashCode4(this.varyKeys_1) | 0;
|
|
2593
|
-
return result;
|
|
2594
|
-
};
|
|
2595
|
-
protoOf6($).copy_6ndwaz_k$ = function(varyKeys2, expires, headers) {
|
|
2596
|
-
return new (CachedResponseData())(this.url_1, this.statusCode_1, this.requestTime_1, this.responseTime_1, this.version_1, expires, headers, varyKeys2, this.body_1);
|
|
2597
|
-
};
|
|
2598
|
-
CachedResponseDataClass = $;
|
|
2599
|
-
}
|
|
2600
|
-
return CachedResponseDataClass;
|
|
2601
|
-
}
|
|
2602
|
-
function HttpCacheStorage$Companion$Unlimited$lambda() {
|
|
2603
|
-
return new (UnlimitedCacheStorage())();
|
|
2604
|
-
}
|
|
2605
|
-
var CompanionClass_0;
|
|
2606
|
-
function Companion_0() {
|
|
2607
|
-
if (CompanionClass_0 === VOID6) {
|
|
2608
|
-
let $ = function() {
|
|
2609
|
-
Companion_instance_0 = this;
|
|
2610
|
-
var tmp = this;
|
|
2611
|
-
tmp.Unlimited_1 = HttpCacheStorage$Companion$Unlimited$lambda;
|
|
2612
|
-
this.Disabled_1 = DisabledCacheStorage_getInstance();
|
|
2613
|
-
};
|
|
2614
|
-
initMetadataForCompanion2($);
|
|
2615
|
-
CompanionClass_0 = $;
|
|
2616
|
-
}
|
|
2617
|
-
return CompanionClass_0;
|
|
2618
|
-
}
|
|
2619
|
-
var Companion_instance_0;
|
|
2620
|
-
function Companion_getInstance_12() {
|
|
2621
|
-
if (Companion_instance_0 == null)
|
|
2622
|
-
new (Companion_0())();
|
|
2623
|
-
return Companion_instance_0;
|
|
2624
|
-
}
|
|
2625
|
-
var HttpCacheStorageClass;
|
|
2626
|
-
function HttpCacheStorage() {
|
|
2627
|
-
if (HttpCacheStorageClass === VOID6) {
|
|
2628
|
-
let $ = function() {
|
|
2629
|
-
Companion_getInstance_12();
|
|
219
|
+
protoOf($).create_l3tkcm_k$ = function($this$intercept, content, completion) {
|
|
220
|
+
var i = new (HttpClientEngine$install$slambda())(this.$client_1, this.this$0__1, completion);
|
|
221
|
+
i.$this$intercept_1 = $this$intercept;
|
|
222
|
+
i.content_1 = content;
|
|
223
|
+
return i;
|
|
2630
224
|
};
|
|
2631
|
-
|
|
2632
|
-
HttpCacheStorageClass = $;
|
|
2633
|
-
}
|
|
2634
|
-
return HttpCacheStorageClass;
|
|
2635
|
-
}
|
|
2636
|
-
function createResponse(_this__u8e3s4, client, request, responseContext) {
|
|
2637
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2638
|
-
var response = new (createResponse$response$1())(_this__u8e3s4, responseContext);
|
|
2639
|
-
return new (SavedHttpCall2())(client, request, response, _this__u8e3s4.body_1).get_response_xlk07e_k$();
|
|
2640
|
-
}
|
|
2641
|
-
function store(_this__u8e3s4, response, varyKeys2, isShared, $completion) {
|
|
2642
|
-
isShared = isShared === VOID6 ? false : isShared;
|
|
2643
|
-
var tmp = new ($storeCOROUTINE$())(_this__u8e3s4, response, varyKeys2, isShared, $completion);
|
|
2644
|
-
tmp.result_1 = Unit_instance6;
|
|
2645
|
-
tmp.exception_1 = null;
|
|
2646
|
-
return tmp.doResume_5yljmg_k$();
|
|
2647
|
-
}
|
|
2648
|
-
function merge(_this__u8e3s4, other) {
|
|
2649
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2650
|
-
Companion_getInstance3();
|
|
2651
|
-
var this_0 = new (HeadersBuilder3())();
|
|
2652
|
-
this_0.appendAll_k8dlt1_k$(_this__u8e3s4);
|
|
2653
|
-
var excluded = plus4(excludedNamesForCacheStorage(other), "Content-Length");
|
|
2654
|
-
var _iterator__ex2g4s = other.entries_qbkxv4_k$().iterator_jk1svi_k$();
|
|
2655
|
-
$l$loop: while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2656
|
-
var _destruct__k2r9zo = _iterator__ex2g4s.next_20eer_k$();
|
|
2657
|
-
var name = _destruct__k2r9zo.get_key_18j28a_k$();
|
|
2658
|
-
var values = _destruct__k2r9zo.get_value_j01efc_k$();
|
|
2659
|
-
if (containsIgnoreCase(excluded, name))
|
|
2660
|
-
continue $l$loop;
|
|
2661
|
-
this_0.remove_6241ba_k$(name);
|
|
2662
|
-
this_0.appendAll_ytnfgb_k$(name, values);
|
|
2663
|
-
}
|
|
2664
|
-
return this_0.build_1k0s4u_k$();
|
|
2665
|
-
}
|
|
2666
|
-
function store_0(_this__u8e3s4, url, value, isShared, $completion) {
|
|
2667
|
-
var tmp = new ($storeCOROUTINE$_0())(_this__u8e3s4, url, value, isShared, $completion);
|
|
2668
|
-
tmp.result_1 = Unit_instance6;
|
|
2669
|
-
tmp.exception_1 = null;
|
|
2670
|
-
return tmp.doResume_5yljmg_k$();
|
|
2671
|
-
}
|
|
2672
|
-
function filterForCacheStorage(_this__u8e3s4) {
|
|
2673
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2674
|
-
return filterExcluded(_this__u8e3s4, excludedNamesForCacheStorage(_this__u8e3s4));
|
|
2675
|
-
}
|
|
2676
|
-
function excludedNamesForCacheStorage(_this__u8e3s4) {
|
|
2677
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2678
|
-
var names = connectionOptionFieldNames(_this__u8e3s4);
|
|
2679
|
-
if (names.isEmpty_y1axqb_k$())
|
|
2680
|
-
return get_staticStorageExcludedHeaders();
|
|
2681
|
-
return plus_0(get_staticStorageExcludedHeaders(), names);
|
|
2682
|
-
}
|
|
2683
|
-
function containsIgnoreCase(_this__u8e3s4, element) {
|
|
2684
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2685
|
-
var tmp$ret$0;
|
|
2686
|
-
$l$block_0: {
|
|
2687
|
-
var tmp;
|
|
2688
|
-
if (isInterface4(_this__u8e3s4, Collection2())) {
|
|
2689
|
-
tmp = _this__u8e3s4.isEmpty_y1axqb_k$();
|
|
2690
|
-
} else {
|
|
2691
|
-
tmp = false;
|
|
2692
|
-
}
|
|
2693
|
-
if (tmp) {
|
|
2694
|
-
tmp$ret$0 = false;
|
|
2695
|
-
break $l$block_0;
|
|
2696
|
-
}
|
|
2697
|
-
var _iterator__ex2g4s = _this__u8e3s4.iterator_jk1svi_k$();
|
|
2698
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2699
|
-
var element_0 = _iterator__ex2g4s.next_20eer_k$();
|
|
2700
|
-
if (equals_0(element_0, element, true)) {
|
|
2701
|
-
tmp$ret$0 = true;
|
|
2702
|
-
break $l$block_0;
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
tmp$ret$0 = false;
|
|
2706
|
-
}
|
|
2707
|
-
return tmp$ret$0;
|
|
2708
|
-
}
|
|
2709
|
-
function filterExcluded(_this__u8e3s4, excluded) {
|
|
2710
|
-
_init_properties_HttpCacheStorage_kt__rkfacf();
|
|
2711
|
-
Companion_getInstance3();
|
|
2712
|
-
var this_0 = new (HeadersBuilder3())();
|
|
2713
|
-
var _iterator__ex2g4s = _this__u8e3s4.entries_qbkxv4_k$().iterator_jk1svi_k$();
|
|
2714
|
-
$l$loop: while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2715
|
-
var _destruct__k2r9zo = _iterator__ex2g4s.next_20eer_k$();
|
|
2716
|
-
var name = _destruct__k2r9zo.get_key_18j28a_k$();
|
|
2717
|
-
var values = _destruct__k2r9zo.get_value_j01efc_k$();
|
|
2718
|
-
if (containsIgnoreCase(excluded, name))
|
|
2719
|
-
continue $l$loop;
|
|
2720
|
-
this_0.appendAll_ytnfgb_k$(name, values);
|
|
225
|
+
HttpClientEngine$install$slambdaClass = $;
|
|
2721
226
|
}
|
|
2722
|
-
return
|
|
227
|
+
return HttpClientEngine$install$slambdaClass;
|
|
2723
228
|
}
|
|
2724
|
-
function
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
return emptySet2();
|
|
2730
|
-
} else {
|
|
2731
|
-
tmp = tmp0_elvis_lhs;
|
|
2732
|
-
}
|
|
2733
|
-
var connection = tmp;
|
|
2734
|
-
var this_0 = split2(connection, charArrayOf([_Char___init__impl__6a9atx(44)]));
|
|
2735
|
-
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
2736
|
-
var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
|
|
2737
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2738
|
-
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
2739
|
-
var tmp$ret$2 = toString2(trim(isCharSequence(item) ? item : THROW_CCE3()));
|
|
2740
|
-
destination.add_utx5q5_k$(tmp$ret$2);
|
|
2741
|
-
}
|
|
2742
|
-
var destination_0 = ArrayList_init_$Create$_0();
|
|
2743
|
-
var _iterator__ex2g4s_0 = destination.iterator_jk1svi_k$();
|
|
2744
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
2745
|
-
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
2746
|
-
var tmp_0;
|
|
2747
|
-
if (charSequenceLength(element) > 0) {
|
|
2748
|
-
var tmp_1 = get_connectionOptionsWithoutFieldNames();
|
|
2749
|
-
var tmp$ret$8 = element.toLowerCase();
|
|
2750
|
-
tmp_0 = !tmp_1.contains_aljjnj_k$(tmp$ret$8);
|
|
2751
|
-
} else {
|
|
2752
|
-
tmp_0 = false;
|
|
2753
|
-
}
|
|
2754
|
-
if (tmp_0) {
|
|
2755
|
-
destination_0.add_utx5q5_k$(element);
|
|
2756
|
-
}
|
|
2757
|
-
}
|
|
2758
|
-
return toSet(destination_0);
|
|
229
|
+
function HttpClientEngine$install$slambda_0($client, this$0, resultContinuation) {
|
|
230
|
+
var i = new (HttpClientEngine$install$slambda())($client, this$0, resultContinuation);
|
|
231
|
+
return constructCallableReference(function($this$intercept, content, $completion) {
|
|
232
|
+
return i.invoke_wpcgmu_k$($this$intercept, content, $completion);
|
|
233
|
+
}, 2);
|
|
2759
234
|
}
|
|
2760
|
-
var
|
|
2761
|
-
function
|
|
2762
|
-
if (
|
|
2763
|
-
let $ = function($
|
|
2764
|
-
|
|
2765
|
-
this
|
|
2766
|
-
this
|
|
2767
|
-
this.requestTime_1 = $this_createResponse.requestTime_1;
|
|
2768
|
-
this.responseTime_1 = $this_createResponse.responseTime_1;
|
|
2769
|
-
this.headers_1 = $this_createResponse.headers_1;
|
|
2770
|
-
this.coroutineContext_1 = $responseContext;
|
|
2771
|
-
};
|
|
2772
|
-
initMetadataForClass4($, VOID6, VOID6, HttpResponse4());
|
|
2773
|
-
protoOf6($).get_call_wojxrb_k$ = function() {
|
|
2774
|
-
throw IllegalStateException_init_$Create$2("This is a fake response");
|
|
2775
|
-
};
|
|
2776
|
-
protoOf6($).get_status_jnf6d7_k$ = function() {
|
|
2777
|
-
return this.status_1;
|
|
2778
|
-
};
|
|
2779
|
-
protoOf6($).get_version_72w4j3_k$ = function() {
|
|
2780
|
-
return this.version_1;
|
|
2781
|
-
};
|
|
2782
|
-
protoOf6($).get_requestTime_wwxhg3_k$ = function() {
|
|
2783
|
-
return this.requestTime_1;
|
|
2784
|
-
};
|
|
2785
|
-
protoOf6($).get_responseTime_scfvg7_k$ = function() {
|
|
2786
|
-
return this.responseTime_1;
|
|
2787
|
-
};
|
|
2788
|
-
protoOf6($).get_rawContent_u3f8li_k$ = function() {
|
|
2789
|
-
throw IllegalStateException_init_$Create$2("This is a fake response");
|
|
2790
|
-
};
|
|
2791
|
-
protoOf6($).get_headers_ef25jx_k$ = function() {
|
|
2792
|
-
return this.headers_1;
|
|
235
|
+
var HttpClientEngine$executeWithinCallContext$slambdaClass;
|
|
236
|
+
function HttpClientEngine$executeWithinCallContext$slambda() {
|
|
237
|
+
if (HttpClientEngine$executeWithinCallContext$slambdaClass === VOID) {
|
|
238
|
+
let $ = function(this$0, $requestData, resultContinuation) {
|
|
239
|
+
this.this$0__1 = this$0;
|
|
240
|
+
this.$requestData_1 = $requestData;
|
|
241
|
+
CoroutineImpl().call(this, resultContinuation);
|
|
2793
242
|
};
|
|
2794
|
-
|
|
2795
|
-
|
|
243
|
+
initMetadataForLambda($, CoroutineImpl(), VOID, [1]);
|
|
244
|
+
protoOf($).invoke_hvk5sg_k$ = function($this$async, $completion) {
|
|
245
|
+
var tmp = this.create_rcuf4x_k$($this$async, $completion);
|
|
246
|
+
tmp.result_1 = Unit_instance;
|
|
247
|
+
tmp.exception_1 = null;
|
|
248
|
+
return tmp.doResume_5yljmg_k$();
|
|
2796
249
|
};
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
return createResponse$response$1Class;
|
|
2800
|
-
}
|
|
2801
|
-
var $storeCOROUTINE$Class;
|
|
2802
|
-
function $storeCOROUTINE$() {
|
|
2803
|
-
if ($storeCOROUTINE$Class === VOID6) {
|
|
2804
|
-
let $ = function(_this__u8e3s4, response, varyKeys2, isShared, resultContinuation) {
|
|
2805
|
-
CoroutineImpl5().call(this, resultContinuation);
|
|
2806
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2807
|
-
this.response_1 = response;
|
|
2808
|
-
this.varyKeys_1 = varyKeys2;
|
|
2809
|
-
this.isShared_1 = isShared;
|
|
250
|
+
protoOf($).invoke_qns8j1_k$ = function(p1, $completion) {
|
|
251
|
+
return this.invoke_hvk5sg_k$((!(p1 == null) ? isInterface(p1, CoroutineScope()) : false) ? p1 : THROW_CCE(), $completion);
|
|
2810
252
|
};
|
|
2811
|
-
|
|
2812
|
-
protoOf6($).doResume_5yljmg_k$ = function() {
|
|
253
|
+
protoOf($).doResume_5yljmg_k$ = function() {
|
|
2813
254
|
var suspendResult = this.result_1;
|
|
2814
255
|
$sm: do
|
|
2815
256
|
try {
|
|
2816
257
|
var tmp = this.state_1;
|
|
2817
258
|
switch (tmp) {
|
|
2818
259
|
case 0:
|
|
2819
|
-
this.exceptionState_1 =
|
|
2820
|
-
this.
|
|
260
|
+
this.exceptionState_1 = 2;
|
|
261
|
+
if (_get_closed__iwkfs1(this.this$0__1)) {
|
|
262
|
+
throw new (ClientEngineClosedException())();
|
|
263
|
+
}
|
|
2821
264
|
this.state_1 = 1;
|
|
2822
|
-
suspendResult =
|
|
2823
|
-
if (suspendResult ===
|
|
265
|
+
suspendResult = this.this$0__1.execute_bvjlbk_k$(this.$requestData_1, this);
|
|
266
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2824
267
|
return suspendResult;
|
|
2825
268
|
}
|
|
2826
269
|
continue $sm;
|
|
2827
270
|
case 1:
|
|
2828
|
-
|
|
2829
|
-
var body = readBytes(ARGUMENT);
|
|
2830
|
-
var tmp_0 = this;
|
|
2831
|
-
var tmp0_url = this.response_1.get_call_wojxrb_k$().get_request_jdwg4m_k$().get_url_18iuii_k$();
|
|
2832
|
-
var tmp1_statusCode = this.response_1.get_status_jnf6d7_k$();
|
|
2833
|
-
var tmp2_requestTime = this.response_1.get_requestTime_wwxhg3_k$();
|
|
2834
|
-
var tmp3_headers = filterForCacheStorage(this.response_1.get_headers_ef25jx_k$());
|
|
2835
|
-
var tmp4_version = this.response_1.get_version_72w4j3_k$();
|
|
2836
|
-
var tmp5_responseTime = this.response_1.get_responseTime_scfvg7_k$();
|
|
2837
|
-
var tmp6_expires = cacheExpires(this.response_1, this.isShared_1);
|
|
2838
|
-
tmp_0.data0__1 = new (CachedResponseData())(tmp0_url, tmp1_statusCode, tmp2_requestTime, tmp5_responseTime, tmp4_version, tmp6_expires, tmp3_headers, this.varyKeys_1, body);
|
|
2839
|
-
this.state_1 = 2;
|
|
2840
|
-
suspendResult = this._this__u8e3s4__1.store_476b30_k$(this.url1__1, this.data0__1, this);
|
|
2841
|
-
if (suspendResult === get_COROUTINE_SUSPENDED5()) {
|
|
2842
|
-
return suspendResult;
|
|
2843
|
-
}
|
|
2844
|
-
continue $sm;
|
|
271
|
+
return suspendResult;
|
|
2845
272
|
case 2:
|
|
2846
|
-
return this.data0__1;
|
|
2847
|
-
case 3:
|
|
2848
273
|
throw this.exception_1;
|
|
2849
274
|
}
|
|
2850
275
|
} catch ($p) {
|
|
2851
276
|
var e = $p;
|
|
2852
|
-
if (this.exceptionState_1 ===
|
|
277
|
+
if (this.exceptionState_1 === 2) {
|
|
2853
278
|
throw e;
|
|
2854
279
|
} else {
|
|
2855
280
|
this.state_1 = this.exceptionState_1;
|
|
@@ -2858,45 +283,61 @@ function $storeCOROUTINE$() {
|
|
|
2858
283
|
}
|
|
2859
284
|
while (true);
|
|
2860
285
|
};
|
|
2861
|
-
$
|
|
286
|
+
protoOf($).create_rcuf4x_k$ = function($this$async, completion) {
|
|
287
|
+
var i = new (HttpClientEngine$executeWithinCallContext$slambda())(this.this$0__1, this.$requestData_1, completion);
|
|
288
|
+
i.$this$async_1 = $this$async;
|
|
289
|
+
return i;
|
|
290
|
+
};
|
|
291
|
+
HttpClientEngine$executeWithinCallContext$slambdaClass = $;
|
|
2862
292
|
}
|
|
2863
|
-
return $
|
|
293
|
+
return HttpClientEngine$executeWithinCallContext$slambdaClass;
|
|
2864
294
|
}
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
295
|
+
function HttpClientEngine$executeWithinCallContext$slambda_0(this$0, $requestData, resultContinuation) {
|
|
296
|
+
var i = new (HttpClientEngine$executeWithinCallContext$slambda())(this$0, $requestData, resultContinuation);
|
|
297
|
+
return constructCallableReference(function($this$async, $completion) {
|
|
298
|
+
return i.invoke_hvk5sg_k$($this$async, $completion);
|
|
299
|
+
}, 1);
|
|
300
|
+
}
|
|
301
|
+
var $executeWithinCallContextCOROUTINE$Class;
|
|
302
|
+
function $executeWithinCallContextCOROUTINE$() {
|
|
303
|
+
if ($executeWithinCallContextCOROUTINE$Class === VOID) {
|
|
304
|
+
let $ = function(_this__u8e3s4, requestData, resultContinuation) {
|
|
305
|
+
CoroutineImpl().call(this, resultContinuation);
|
|
2870
306
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
2871
|
-
this.
|
|
2872
|
-
this.value_1 = value;
|
|
2873
|
-
this.isShared_1 = isShared;
|
|
307
|
+
this.requestData_1 = requestData;
|
|
2874
308
|
};
|
|
2875
|
-
|
|
2876
|
-
|
|
309
|
+
initMetadataForCoroutine($, CoroutineImpl());
|
|
310
|
+
protoOf($).doResume_5yljmg_k$ = function() {
|
|
2877
311
|
var suspendResult = this.result_1;
|
|
2878
312
|
$sm: do
|
|
2879
313
|
try {
|
|
2880
314
|
var tmp = this.state_1;
|
|
2881
315
|
switch (tmp) {
|
|
2882
316
|
case 0:
|
|
2883
|
-
this.exceptionState_1 =
|
|
317
|
+
this.exceptionState_1 = 3;
|
|
2884
318
|
this.state_1 = 1;
|
|
2885
|
-
suspendResult =
|
|
2886
|
-
if (suspendResult ===
|
|
319
|
+
suspendResult = createCallContext(this._this__u8e3s4__1, this.requestData_1.executionContext_1, this);
|
|
320
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2887
321
|
return suspendResult;
|
|
2888
322
|
}
|
|
2889
323
|
continue $sm;
|
|
2890
324
|
case 1:
|
|
2891
|
-
var
|
|
2892
|
-
|
|
2893
|
-
|
|
325
|
+
var callContext = suspendResult;
|
|
326
|
+
var context = callContext.plus_s13ygv_k$(new (KtorCallContextElement())(callContext));
|
|
327
|
+
this.state_1 = 2;
|
|
328
|
+
suspendResult = async(this._this__u8e3s4__1, context, VOID, HttpClientEngine$executeWithinCallContext$slambda_0(this._this__u8e3s4__1, this.requestData_1, null)).await_4rdzbx_k$(this);
|
|
329
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
330
|
+
return suspendResult;
|
|
331
|
+
}
|
|
332
|
+
continue $sm;
|
|
2894
333
|
case 2:
|
|
334
|
+
return suspendResult;
|
|
335
|
+
case 3:
|
|
2895
336
|
throw this.exception_1;
|
|
2896
337
|
}
|
|
2897
338
|
} catch ($p) {
|
|
2898
339
|
var e = $p;
|
|
2899
|
-
if (this.exceptionState_1 ===
|
|
340
|
+
if (this.exceptionState_1 === 3) {
|
|
2900
341
|
throw e;
|
|
2901
342
|
} else {
|
|
2902
343
|
this.state_1 = this.exceptionState_1;
|
|
@@ -2905,272 +346,225 @@ function $storeCOROUTINE$_0() {
|
|
|
2905
346
|
}
|
|
2906
347
|
while (true);
|
|
2907
348
|
};
|
|
2908
|
-
$
|
|
349
|
+
$executeWithinCallContextCOROUTINE$Class = $;
|
|
2909
350
|
}
|
|
2910
|
-
return $
|
|
351
|
+
return $executeWithinCallContextCOROUTINE$Class;
|
|
2911
352
|
}
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
if (!properties_initialized_HttpCacheStorage_kt_bvj7s3) {
|
|
2915
|
-
properties_initialized_HttpCacheStorage_kt_bvj7s3 = true;
|
|
2916
|
-
hopByHopHeaders = listOf2(["Connection", "TE", "Transfer-Encoding", "Upgrade", "Content-Range", "Keep-Alive", "Proxy-Connection"]);
|
|
2917
|
-
proxyAuthHeaders = listOf2(["Proxy-Authenticate", "Proxy-Authentication-Info", "Proxy-Authorization"]);
|
|
2918
|
-
staticStorageExcludedHeaders = plus_0(get_hopByHopHeaders(), get_proxyAuthHeaders());
|
|
2919
|
-
connectionOptionsWithoutFieldNames = listOf2(["close", "keep-alive", "upgrade"]);
|
|
2920
|
-
}
|
|
353
|
+
function get_supportedCapabilities() {
|
|
354
|
+
return emptySet();
|
|
2921
355
|
}
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
import { ConcurrentMapxp8jrjtp6gef as ConcurrentMap } from "../ktor-ktor-utils/io/ktor/util/collections/ConcurrentMap.web.mjs";
|
|
2926
|
-
import { Unit_instance3kz1zqli6gr1r as Unit_instance7 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
2927
|
-
import { protoOf180f3jzyo7rfj as protoOf7 } from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
2928
|
-
import { emptySetcxexqki71qfa as emptySet3 } from "../kotlin-kotlin-stdlib/kotlin/collections/Sets.mjs";
|
|
2929
|
-
import { removeAll3cm9rh0qak2y6 as removeAll } from "../kotlin-kotlin-stdlib/kotlin/collections/MutableCollections.mjs";
|
|
2930
|
-
import { initMetadataForClassbxx6q50dy2s7 as initMetadataForClass5 } from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
2931
|
-
import { VOID3gxj6tk5isa35 as VOID7 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
2932
|
-
function UnlimitedCacheStorage$store$lambda() {
|
|
2933
|
-
return ConcurrentSet();
|
|
356
|
+
function install(client) {
|
|
357
|
+
var tmp = Phases_getInstance().Engine_1;
|
|
358
|
+
client.sendPipeline_1.intercept_k21bv3_k$(tmp, HttpClientEngine$install$slambda_0(client, this, null));
|
|
2934
359
|
}
|
|
2935
|
-
|
|
2936
|
-
|
|
360
|
+
var HttpClientEngineClass;
|
|
361
|
+
function HttpClientEngine() {
|
|
362
|
+
if (HttpClientEngineClass === VOID) {
|
|
363
|
+
let $ = function() {
|
|
364
|
+
};
|
|
365
|
+
initMetadataForInterface($, "HttpClientEngine", VOID, VOID, [CoroutineScope(), AutoCloseable()], [1]);
|
|
366
|
+
HttpClientEngineClass = $;
|
|
367
|
+
}
|
|
368
|
+
return HttpClientEngineClass;
|
|
369
|
+
}
|
|
370
|
+
function validateHeaders(request) {
|
|
371
|
+
_init_properties_HttpClientEngine_kt__h91z5h();
|
|
372
|
+
var requestHeaders = request.headers_1;
|
|
373
|
+
var tmp0 = requestHeaders.names_1q9mbs_k$();
|
|
374
|
+
var destination = ArrayList_init_$Create$();
|
|
375
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
376
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
377
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
378
|
+
if (HttpHeaders_getInstance().UnsafeHeadersList_1.contains_aljjnj_k$(element)) {
|
|
379
|
+
destination.add_utx5q5_k$(element);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
var unsafeRequestHeaders = destination;
|
|
383
|
+
if (!unsafeRequestHeaders.isEmpty_y1axqb_k$()) {
|
|
384
|
+
throw new (UnsafeHeaderException())(toString(unsafeRequestHeaders));
|
|
385
|
+
}
|
|
2937
386
|
}
|
|
2938
|
-
function
|
|
2939
|
-
|
|
387
|
+
function createCallContext(_this__u8e3s4, parentJob, $completion) {
|
|
388
|
+
var callJob = Job(parentJob);
|
|
389
|
+
var callContext = _this__u8e3s4.get_coroutineContext_115oqo_k$().plus_s13ygv_k$(callJob).plus_s13ygv_k$(get_CALL_COROUTINE());
|
|
390
|
+
$l$block: {
|
|
391
|
+
var tmp0_elvis_lhs = $completion.get_context_h02k06_k$().get_y2st91_k$(Key_instance);
|
|
2940
392
|
var tmp;
|
|
2941
|
-
if (
|
|
2942
|
-
|
|
2943
|
-
var tmp$ret$0;
|
|
2944
|
-
$l$block_0: {
|
|
2945
|
-
if (tmp0.isEmpty_y1axqb_k$()) {
|
|
2946
|
-
tmp$ret$0 = true;
|
|
2947
|
-
break $l$block_0;
|
|
2948
|
-
}
|
|
2949
|
-
var _iterator__ex2g4s = tmp0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
2950
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
2951
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
2952
|
-
var key = element.get_key_18j28a_k$();
|
|
2953
|
-
var value = element.get_value_j01efc_k$();
|
|
2954
|
-
if (!(entry.varyKeys_1.get_wei43m_k$(key) === value)) {
|
|
2955
|
-
tmp$ret$0 = false;
|
|
2956
|
-
break $l$block_0;
|
|
2957
|
-
}
|
|
2958
|
-
}
|
|
2959
|
-
tmp$ret$0 = true;
|
|
2960
|
-
}
|
|
2961
|
-
tmp = tmp$ret$0;
|
|
393
|
+
if (tmp0_elvis_lhs == null) {
|
|
394
|
+
break $l$block;
|
|
2962
395
|
} else {
|
|
2963
|
-
tmp =
|
|
396
|
+
tmp = tmp0_elvis_lhs;
|
|
2964
397
|
}
|
|
2965
|
-
|
|
398
|
+
var userJob = tmp;
|
|
399
|
+
var cleanupHandler = userJob.invokeOnCompletion$default_1v3utx_k$(true, VOID, createCallContext$lambda(callJob));
|
|
400
|
+
callJob.invokeOnCompletion_n6cffu_k$(createCallContext$lambda_0(cleanupHandler));
|
|
401
|
+
}
|
|
402
|
+
return callContext;
|
|
403
|
+
}
|
|
404
|
+
function createCallContext$lambda($callJob) {
|
|
405
|
+
return function(cause) {
|
|
406
|
+
if (cause == null)
|
|
407
|
+
return Unit_instance;
|
|
408
|
+
var tmp1_elvis_lhs = cause instanceof CancellationException() ? cause : null;
|
|
409
|
+
var cancellation = tmp1_elvis_lhs == null ? CancellationException_init_$Create$(cause.message) : tmp1_elvis_lhs;
|
|
410
|
+
$callJob.cancel_hkmm2i_k$(cancellation);
|
|
411
|
+
return Unit_instance;
|
|
2966
412
|
};
|
|
2967
413
|
}
|
|
2968
|
-
|
|
2969
|
-
function
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
var tmp$ret$3;
|
|
2991
|
-
$l$block_0: {
|
|
2992
|
-
if (varyKeys2.isEmpty_y1axqb_k$()) {
|
|
2993
|
-
tmp$ret$3 = true;
|
|
2994
|
-
break $l$block_0;
|
|
2995
|
-
}
|
|
2996
|
-
var _iterator__ex2g4s_0 = varyKeys2.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
2997
|
-
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
2998
|
-
var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
|
|
2999
|
-
var key = element_0.get_key_18j28a_k$();
|
|
3000
|
-
var value = element_0.get_value_j01efc_k$();
|
|
3001
|
-
if (!(element.varyKeys_1.get_wei43m_k$(key) === value)) {
|
|
3002
|
-
tmp$ret$3 = false;
|
|
3003
|
-
break $l$block_0;
|
|
3004
|
-
}
|
|
3005
|
-
}
|
|
3006
|
-
tmp$ret$3 = true;
|
|
3007
|
-
}
|
|
3008
|
-
if (tmp$ret$3) {
|
|
3009
|
-
tmp$ret$1 = element;
|
|
3010
|
-
break $l$block_1;
|
|
3011
|
-
}
|
|
3012
|
-
}
|
|
3013
|
-
tmp$ret$1 = null;
|
|
3014
|
-
}
|
|
3015
|
-
return tmp$ret$1;
|
|
3016
|
-
};
|
|
3017
|
-
protoOf7($).findByUrl_97s5su_k$ = function(url) {
|
|
3018
|
-
var tmp0_elvis_lhs = this.store_1.get_tg54oi_k$(url);
|
|
3019
|
-
return tmp0_elvis_lhs == null ? emptySet3() : tmp0_elvis_lhs;
|
|
3020
|
-
};
|
|
3021
|
-
protoOf7($).remove_cwf7aa_k$ = function(url, varyKeys2) {
|
|
3022
|
-
var tmp0_safe_receiver = this.store_1.get_tg54oi_k$(url);
|
|
3023
|
-
var tmp;
|
|
3024
|
-
if (tmp0_safe_receiver == null) {
|
|
3025
|
-
tmp = null;
|
|
414
|
+
function createCallContext$lambda_0($cleanupHandler) {
|
|
415
|
+
return function(it) {
|
|
416
|
+
$cleanupHandler.dispose_3nnxhr_k$();
|
|
417
|
+
return Unit_instance;
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
var properties_initialized_HttpClientEngine_kt_5uiebb;
|
|
421
|
+
function _init_properties_HttpClientEngine_kt__h91z5h() {
|
|
422
|
+
if (!properties_initialized_HttpClientEngine_kt_5uiebb) {
|
|
423
|
+
properties_initialized_HttpClientEngine_kt_5uiebb = true;
|
|
424
|
+
CALL_COROUTINE = new (CoroutineName())("call-context");
|
|
425
|
+
var name = "client-config";
|
|
426
|
+
var tmp = getKClass(HttpClientConfig());
|
|
427
|
+
var tmp_0 = null instanceof HttpClientConfig();
|
|
428
|
+
var tmp_1;
|
|
429
|
+
try {
|
|
430
|
+
tmp_1 = createKType(getKClass(HttpClientConfig()), arrayOf([getStarKTypeProjection()]), false);
|
|
431
|
+
} catch ($p) {
|
|
432
|
+
var tmp_2;
|
|
433
|
+
if ($p instanceof Error) {
|
|
434
|
+
var _unused_var__etf5q3 = $p;
|
|
435
|
+
tmp_2 = null;
|
|
3026
436
|
} else {
|
|
3027
|
-
|
|
437
|
+
throw $p;
|
|
3028
438
|
}
|
|
3029
|
-
|
|
3030
|
-
}
|
|
3031
|
-
|
|
439
|
+
tmp_1 = tmp_2;
|
|
440
|
+
}
|
|
441
|
+
var tmp$ret$2 = tmp_1;
|
|
442
|
+
var tmp$ret$1 = new (TypeInfo())(tmp, tmp_0, tmp$ret$2);
|
|
443
|
+
CLIENT_CONFIG = new (AttributeKey())(name, tmp$ret$1);
|
|
3032
444
|
}
|
|
3033
|
-
return UnlimitedCacheStorageClass;
|
|
3034
445
|
}
|
|
3035
|
-
|
|
3036
|
-
|
|
446
|
+
|
|
447
|
+
// build/packages/js/ktor-ktor-client-core/io/ktor/client/engine/HttpClientEngineBase.mjs
|
|
448
|
+
import {
|
|
449
|
+
IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
|
|
450
|
+
IllegalStateException_init_$Init$2lydy6bjiiso9 as IllegalStateException_init_$Init$
|
|
451
|
+
} from "../kotlin-kotlin-stdlib/kotlin/exceptions.mjs";
|
|
452
|
+
import { VOID3gxj6tk5isa35 as VOID2 } from "../kotlin-kotlin-stdlib/kotlin/js/void.mjs";
|
|
453
|
+
import {
|
|
454
|
+
captureStack1fzi4aczwc4hg as captureStack,
|
|
455
|
+
protoOf180f3jzyo7rfj as protoOf2,
|
|
456
|
+
defineProp3ur6h3slcvq4x as defineProp
|
|
457
|
+
} from "../kotlin-kotlin-stdlib/kotlin/js/coreRuntime.mjs";
|
|
458
|
+
import { initMetadataForClassbxx6q50dy2s7 as initMetadataForClass } from "../kotlin-kotlin-stdlib/kotlin/js/metadataUtils.mjs";
|
|
459
|
+
import { ioDispatcher3b9pa3x0duop as ioDispatcher } from "../ktor-ktor-io/io/ktor/utils/io/IODispatcher.web.mjs";
|
|
460
|
+
import {
|
|
461
|
+
constructCallableReference23y65rf941mch as constructCallableReference2,
|
|
462
|
+
getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef
|
|
463
|
+
} from "../kotlin-kotlin-stdlib/kotlin/js/reflectRuntime.mjs";
|
|
464
|
+
import { SilentSupervisorlzoikirj0zeo as SilentSupervisor } from "../ktor-ktor-utils/io/ktor/util/CoroutinesUtils.mjs";
|
|
465
|
+
import { CoroutineName2g5zosw74tf0f as CoroutineName2 } from "../kotlinx-coroutines-core/kotlinx/coroutines/CoroutineName.mjs";
|
|
466
|
+
import {
|
|
467
|
+
atomic$boolean$1iggki4z65a2h as atomic$boolean$1,
|
|
468
|
+
atomic$int$11d5swdyn6j0pu as atomic$int$1
|
|
469
|
+
} from "../kotlinx-atomicfu/kotlinx/atomicfu/AtomicFU.mjs";
|
|
470
|
+
import { lazy2hsh8ze7j6ikd as lazy } from "../kotlin-kotlin-stdlib/kotlin/kotlin.mjs";
|
|
471
|
+
import { KProperty1ca4yb4wlo496 as KProperty1 } from "../kotlin-kotlin-stdlib/kotlin/reflect/KPropertyJs.mjs";
|
|
472
|
+
import { Unit_instance3kz1zqli6gr1r as Unit_instance2 } from "../kotlin-kotlin-stdlib/kotlin/Unit.mjs";
|
|
473
|
+
import { Key_instancepi2bbb0csu5f as Key_instance2 } from "../kotlinx-coroutines-core/kotlinx/coroutines/Job.mjs";
|
|
474
|
+
import { CompletableJob1w6swnu15iclo as CompletableJob } from "../kotlinx-coroutines-core/kotlinx/coroutines/CompletableJob.mjs";
|
|
475
|
+
import { isInterface3d6p8outrmvmk as isInterface2 } from "../kotlin-kotlin-stdlib/kotlin/js/typeCheckUtils.mjs";
|
|
476
|
+
var ClientEngineClosedExceptionClass;
|
|
477
|
+
function ClientEngineClosedException() {
|
|
478
|
+
if (ClientEngineClosedExceptionClass === VOID2) {
|
|
479
|
+
let $ = function(cause) {
|
|
480
|
+
cause = cause === VOID2 ? null : cause;
|
|
481
|
+
IllegalStateException_init_$Init$("Client already closed", this);
|
|
482
|
+
captureStack(this, ClientEngineClosedException());
|
|
483
|
+
this.cause_1 = cause;
|
|
484
|
+
delete this.cause;
|
|
485
|
+
};
|
|
486
|
+
initMetadataForClass($, "ClientEngineClosedException", ClientEngineClosedException, IllegalStateException());
|
|
487
|
+
protoOf2($).get_cause_iplhs0_k$ = function() {
|
|
488
|
+
return this.cause_1;
|
|
489
|
+
};
|
|
490
|
+
defineProp(protoOf2($), "cause", function() {
|
|
491
|
+
return this.get_cause_iplhs0_k$();
|
|
492
|
+
});
|
|
493
|
+
ClientEngineClosedExceptionClass = $;
|
|
494
|
+
}
|
|
495
|
+
return ClientEngineClosedExceptionClass;
|
|
496
|
+
}
|
|
497
|
+
function HttpClientEngineBase$dispatcher$delegate$lambda(this$0) {
|
|
498
|
+
return function() {
|
|
499
|
+
var tmp0_elvis_lhs = this$0.get_config_c0698r_k$().dispatcher_1;
|
|
500
|
+
return tmp0_elvis_lhs == null ? ioDispatcher() : tmp0_elvis_lhs;
|
|
501
|
+
};
|
|
3037
502
|
}
|
|
3038
|
-
function
|
|
3039
|
-
return
|
|
503
|
+
function HttpClientEngineBase$_get_dispatcher_$ref_kz5x8v() {
|
|
504
|
+
return constructCallableReference2(function(p0) {
|
|
505
|
+
return p0.get_dispatcher_usy1bk_k$();
|
|
506
|
+
}, 1, 0, 31);
|
|
3040
507
|
}
|
|
3041
|
-
function
|
|
3042
|
-
return function(
|
|
3043
|
-
|
|
3044
|
-
if ($varyKeys.get_size_woubt6_k$() === entry.varyKeys_1.get_size_woubt6_k$()) {
|
|
3045
|
-
var tmp0 = $varyKeys;
|
|
3046
|
-
var tmp$ret$0;
|
|
3047
|
-
$l$block_0: {
|
|
3048
|
-
if (tmp0.isEmpty_y1axqb_k$()) {
|
|
3049
|
-
tmp$ret$0 = true;
|
|
3050
|
-
break $l$block_0;
|
|
3051
|
-
}
|
|
3052
|
-
var _iterator__ex2g4s = tmp0.get_entries_p20ztl_k$().iterator_jk1svi_k$();
|
|
3053
|
-
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
3054
|
-
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
3055
|
-
var key = element.get_key_18j28a_k$();
|
|
3056
|
-
var value = element.get_value_j01efc_k$();
|
|
3057
|
-
if (!(entry.varyKeys_1.get_wei43m_k$(key) === value)) {
|
|
3058
|
-
tmp$ret$0 = false;
|
|
3059
|
-
break $l$block_0;
|
|
3060
|
-
}
|
|
3061
|
-
}
|
|
3062
|
-
tmp$ret$0 = true;
|
|
3063
|
-
}
|
|
3064
|
-
tmp = tmp$ret$0;
|
|
3065
|
-
} else {
|
|
3066
|
-
tmp = false;
|
|
3067
|
-
}
|
|
3068
|
-
return tmp;
|
|
508
|
+
function HttpClientEngineBase$coroutineContext$delegate$lambda(this$0) {
|
|
509
|
+
return function() {
|
|
510
|
+
return SilentSupervisor().plus_s13ygv_k$(this$0.get_dispatcher_usy1bk_k$()).plus_s13ygv_k$(new (CoroutineName2())(this$0.engineName_1 + "-context"));
|
|
3069
511
|
};
|
|
3070
512
|
}
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
if (tmp$ret$3) {
|
|
3112
|
-
tmp$ret$1 = element;
|
|
3113
|
-
break $l$block_1;
|
|
3114
|
-
}
|
|
3115
|
-
}
|
|
3116
|
-
tmp$ret$1 = null;
|
|
3117
|
-
}
|
|
3118
|
-
return tmp$ret$1;
|
|
3119
|
-
};
|
|
3120
|
-
protoOf7($).findAll_wwhkmd_k$ = function(url, $completion) {
|
|
3121
|
-
var tmp0_elvis_lhs = this.store_1.get_tg54oi_k$(url);
|
|
3122
|
-
return tmp0_elvis_lhs == null ? emptySet3() : tmp0_elvis_lhs;
|
|
3123
|
-
};
|
|
3124
|
-
protoOf7($).remove_jew64o_k$ = function(url, varyKeys2, $completion) {
|
|
3125
|
-
var tmp0_safe_receiver = this.store_1.get_tg54oi_k$(url);
|
|
3126
|
-
if (tmp0_safe_receiver == null)
|
|
3127
|
-
null;
|
|
3128
|
-
else {
|
|
3129
|
-
removeAll(tmp0_safe_receiver, UnlimitedStorage$remove$lambda(varyKeys2));
|
|
513
|
+
function HttpClientEngineBase$_get_coroutineContext_$ref_p82ehr() {
|
|
514
|
+
return constructCallableReference2(function(p0) {
|
|
515
|
+
return p0.get_coroutineContext_115oqo_k$();
|
|
516
|
+
}, 1, 0, 32);
|
|
517
|
+
}
|
|
518
|
+
var HttpClientEngineBaseClass;
|
|
519
|
+
function HttpClientEngineBase() {
|
|
520
|
+
if (HttpClientEngineBaseClass === VOID2) {
|
|
521
|
+
let $ = function(engineName) {
|
|
522
|
+
this.engineName_1 = engineName;
|
|
523
|
+
this.closed_1 = atomic$boolean$1(false);
|
|
524
|
+
this.clientRefCount_1 = atomic$int$1(0);
|
|
525
|
+
var tmp = this;
|
|
526
|
+
tmp.dispatcher$delegate_1 = lazy(HttpClientEngineBase$dispatcher$delegate$lambda(this));
|
|
527
|
+
var tmp_0 = this;
|
|
528
|
+
tmp_0.coroutineContext$delegate_1 = lazy(HttpClientEngineBase$coroutineContext$delegate$lambda(this));
|
|
529
|
+
};
|
|
530
|
+
initMetadataForClass($, "HttpClientEngineBase", VOID2, VOID2, [HttpClientEngine()], [1]);
|
|
531
|
+
protoOf2($).get_dispatcher_usy1bk_k$ = function() {
|
|
532
|
+
var tmp0 = this.dispatcher$delegate_1;
|
|
533
|
+
var tmp = KProperty1();
|
|
534
|
+
getPropertyCallableRef("dispatcher", 1, tmp, HttpClientEngineBase$_get_dispatcher_$ref_kz5x8v(), null);
|
|
535
|
+
return tmp0.get_value_j01efc_k$();
|
|
536
|
+
};
|
|
537
|
+
protoOf2($).get_coroutineContext_115oqo_k$ = function() {
|
|
538
|
+
var tmp0 = this.coroutineContext$delegate_1;
|
|
539
|
+
var tmp = KProperty1();
|
|
540
|
+
getPropertyCallableRef("coroutineContext", 1, tmp, HttpClientEngineBase$_get_coroutineContext_$ref_p82ehr(), null);
|
|
541
|
+
return tmp0.get_value_j01efc_k$();
|
|
542
|
+
};
|
|
543
|
+
protoOf2($).close_yn9xrc_k$ = function() {
|
|
544
|
+
if (!this.closed_1.atomicfu$compareAndSet(false, true))
|
|
545
|
+
return Unit_instance2;
|
|
546
|
+
var tmp = this.get_coroutineContext_115oqo_k$().get_y2st91_k$(Key_instance2);
|
|
547
|
+
var tmp0_elvis_lhs = (!(tmp == null) ? isInterface2(tmp, CompletableJob()) : false) ? tmp : null;
|
|
548
|
+
var tmp_0;
|
|
549
|
+
if (tmp0_elvis_lhs == null) {
|
|
550
|
+
return Unit_instance2;
|
|
551
|
+
} else {
|
|
552
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
3130
553
|
}
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
protoOf7($).removeAll_y68mdv_k$ = function(url, $completion) {
|
|
3134
|
-
this.store_1.remove_nl221s_k$(url);
|
|
3135
|
-
return Unit_instance7;
|
|
554
|
+
var requestJob = tmp_0;
|
|
555
|
+
requestJob.complete_9ww6vb_k$();
|
|
3136
556
|
};
|
|
3137
|
-
|
|
557
|
+
protoOf2($).get_supportedCapabilities_gwz15x_k$ = get_supportedCapabilities;
|
|
558
|
+
protoOf2($).install_55cq5g_k$ = install;
|
|
559
|
+
HttpClientEngineBaseClass = $;
|
|
3138
560
|
}
|
|
3139
|
-
return
|
|
561
|
+
return HttpClientEngineBaseClass;
|
|
3140
562
|
}
|
|
3141
563
|
export {
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
Headers$get$ref as Headers$get$ref681ow29e3f5j,
|
|
3149
|
-
Headers$getAll$ref as Headers$getAll$ref1whnezd71112n,
|
|
3150
|
-
HeadersBuilder$get$ref as HeadersBuilder$get$ref1uy52fya3gmf9,
|
|
3151
|
-
HeadersBuilder$getAll$ref as HeadersBuilder$getAll$ref23mjbqh1hxuej,
|
|
3152
|
-
HttpCacheEntry_0 as HttpCacheEntry13jgqryncqxs9,
|
|
3153
|
-
HttpCacheStorage as HttpCacheStorage37tgfvzpx6yr2,
|
|
3154
|
-
InvalidCacheStateException as InvalidCacheStateException1l4ckerh5nyw0,
|
|
3155
|
-
UnlimitedCacheStorage as UnlimitedCacheStoragedq8661dtudkf,
|
|
3156
|
-
UnlimitedStorage as UnlimitedStorage3hm98272azwsd,
|
|
3157
|
-
ValidateStatus_ShouldNotValidate_getInstance as ValidateStatus_ShouldNotValidate_getInstance1u0b3srpl02eu,
|
|
3158
|
-
ValidateStatus_ShouldWarn_getInstance as ValidateStatus_ShouldWarn_getInstance38vt0hhexoobv,
|
|
3159
|
-
cacheExpires as cacheExpiresr7l85zvffazs,
|
|
3160
|
-
createResponse as createResponse1hsujn1ery79c,
|
|
3161
|
-
etagMatches as etagMatches2nt7bosl9xaya,
|
|
3162
|
-
filterForCacheStorage as filterForCacheStorage1c89rydp5hc0a,
|
|
3163
|
-
get_LOGGER as get_LOGGER2x5rmkjqri7yj,
|
|
3164
|
-
interceptReceiveLegacy as interceptReceiveLegacy3qd2zwv6tzk2y,
|
|
3165
|
-
interceptSendLegacy as interceptSendLegacydbcani9vwwv2,
|
|
3166
|
-
joinHeaderValues as joinHeaderValues3vzs0dkwy1z5x,
|
|
3167
|
-
merge as merge12gww3h11rpaa,
|
|
3168
|
-
mergedHeadersLookup as mergedHeadersLookupxss9hqruwqp5,
|
|
3169
|
-
refreshNotModifiedResponse as refreshNotModifiedResponsevz0l793h5o1o,
|
|
3170
|
-
selectResponseToFreshen as selectResponseToFreshen1fzoon80ffc3j,
|
|
3171
|
-
shouldValidate as shouldValidate1ngkon749bsty,
|
|
3172
|
-
store_0 as store1aopmhdyskq7a,
|
|
3173
|
-
store as storeo8ubc3mufpsu,
|
|
3174
|
-
varyKeys as varyKeys3mjwsrronllfc,
|
|
3175
|
-
withFreshenedMetadata as withFreshenedMetadata1tw15qozv6m7z
|
|
564
|
+
ClientEngineClosedException as ClientEngineClosedException1qtw9cl0kd5fk,
|
|
565
|
+
HttpClientEngine as HttpClientEngine3f41d0b7i209y,
|
|
566
|
+
HttpClientEngineBase as HttpClientEngineBase2tgisnw4e4drr,
|
|
567
|
+
get_CLIENT_CONFIG as get_CLIENT_CONFIG1oazdiwjd1qe0,
|
|
568
|
+
get_supportedCapabilities as get_supportedCapabilities36x6e2ixit204,
|
|
569
|
+
install as install34ed8l0uhurm0
|
|
3176
570
|
};
|