(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_io, kotlin_org_jetbrains_kotlinx_kotlinx_io_core, kotlin_org_jetbrains_kotlinx_atomicfu) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.p6;
  var mapCapacity = kotlin_kotlin.$_$.m8;
  var coerceAtLeast = kotlin_kotlin.$_$.xd;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t1;
  var Unit_instance = kotlin_kotlin.$_$.b1;
  var protoOf = kotlin_kotlin.$_$.od;
  var initMetadataForCompanion = kotlin_kotlin.$_$.qc;
  var enumEntries = kotlin_kotlin.$_$.za;
  var objectCreate = kotlin_kotlin.$_$.nd;
  var Enum = kotlin_kotlin.$_$.mi;
  var initMetadataForClass = kotlin_kotlin.$_$.pc;
  var VOID = kotlin_kotlin.$_$.c;
  var toString = kotlin_kotlin.$_$.rd;
  var getStringHashCode = kotlin_kotlin.$_$.nc;
  var initMetadataForInterface = kotlin_kotlin.$_$.tc;
  var isInterface = kotlin_kotlin.$_$.ed;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.u2;
  var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
  var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d2;
  var CoroutineStart_UNDISPATCHED_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
  var ChannelResult = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
  var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
  var CoroutineImpl = kotlin_kotlin.$_$.xa;
  var THROW_CCE = kotlin_kotlin.$_$.vi;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t1;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.fa;
  var initMetadataForLambda = kotlin_kotlin.$_$.uc;
  var get_isTraceEnabled = kotlin_io_ktor_ktor_utils.$_$.h;
  var BytePacketBuilder = kotlin_io_ktor_ktor_io.$_$.t;
  var writeFully = kotlin_io_ktor_ktor_io.$_$.c1;
  var ensureNotNull = kotlin_kotlin.$_$.nj;
  var build = kotlin_io_ktor_ktor_io.$_$.u;
  var readByteArray = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.k;
  var cancelConsumed = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a1;
  var ClosedSendChannelException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w;
  var CancellationException_init_$Create$ = kotlin_kotlin.$_$.b2;
  var ChannelIOException = kotlin_io_ktor_ktor_utils.$_$.b;
  var CancellationException = kotlin_kotlin.$_$.ea;
  var ClosedReceiveChannelException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
  var IOException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.c;
  var initMetadataForCoroutine = kotlin_kotlin.$_$.rc;
  var toString_0 = kotlin_kotlin.$_$.ak;
  var get_size = kotlin_io_ktor_ktor_io.$_$.z;
  var fromInt = kotlin_kotlin.$_$.jb;
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
  var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
  var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v1;
  var Key_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
  var CoroutineName = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r1;
  var Factory_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l1;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.y2;
  var joinToString = kotlin_kotlin.$_$.c8;
  var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
  var Buffer = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.f;
  var readText = kotlin_io_ktor_ktor_io.$_$.x;
  var DisposableHandle = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u1;
  var initMetadataForObject = kotlin_kotlin.$_$.vc;
  var Exception = kotlin_kotlin.$_$.oi;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.k2;
  var captureStack = kotlin_kotlin.$_$.zb;
  var defineProp = kotlin_kotlin.$_$.hc;
  var CopyableThrowable = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p1;
  var compareTo = kotlin_kotlin.$_$.gc;
  var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u;
  var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.a;
  var toByteArray = kotlin_io_ktor_ktor_io.$_$.b1;
  var decodeToString = kotlin_kotlin.$_$.ef;
  var getTimeMillis = kotlin_io_ktor_ktor_utils.$_$.e;
  var Random = kotlin_kotlin.$_$.ud;
  var withTimeoutOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o;
  var toHexString = kotlin_kotlin.$_$.gh;
  var ClosedByteChannelException = kotlin_io_ktor_ktor_io.$_$.k1;
  var BufferOverflow_SUSPEND_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
  var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ab;
  var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
  var _ChannelResult___get_isClosed__impl__mg7kuu = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
  var close$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
  var cancel$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
  var ReceiveChannel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y;
  var SendChannel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
  var RuntimeException = kotlin_kotlin.$_$.ui;
  var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.h3;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.k1;
  var split = kotlin_kotlin.$_$.kg;
  var first = kotlin_kotlin.$_$.s7;
  var isCharSequence = kotlin_kotlin.$_$.ad;
  var trim = kotlin_kotlin.$_$.xh;
  var drop = kotlin_kotlin.$_$.j7;
  var writeText = kotlin_io_ktor_ktor_io.$_$.d1;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.uj;
  //endregion
  //region block: pre-declaration
  initMetadataForCompanion(Companion);
  initMetadataForClass(Codes, 'Codes', VOID, Enum);
  initMetadataForClass(CloseReason, 'CloseReason');
  function send(frame, $completion) {
    return this.q4p().e3a(frame, $completion);
  }
  initMetadataForInterface(WebSocketSession, 'WebSocketSession', VOID, VOID, [CoroutineScope], [1, 0]);
  initMetadataForInterface(DefaultWebSocketSession, 'DefaultWebSocketSession', VOID, VOID, [WebSocketSession], [1, 0]);
  initMetadataForCompanion(Companion_0);
  initMetadataForLambda(DefaultWebSocketSessionImpl$start$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForLambda(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForLambda(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForLambda(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForCoroutine($outgoingProcessorLoopCOROUTINE$, CoroutineImpl);
  initMetadataForCoroutine($sendCloseSequenceCOROUTINE$, CoroutineImpl);
  initMetadataForCoroutine($checkMaxFrameSizeCOROUTINE$, CoroutineImpl);
  initMetadataForClass(DefaultWebSocketSessionImpl, 'DefaultWebSocketSessionImpl', VOID, VOID, [DefaultWebSocketSession, WebSocketSession], [1, 0, 2]);
  initMetadataForObject(NonDisposableHandle, 'NonDisposableHandle', VOID, VOID, [DisposableHandle]);
  initMetadataForClass(FrameTooBigException, 'FrameTooBigException', VOID, Exception, [CopyableThrowable]);
  initMetadataForCompanion(Companion_1);
  initMetadataForClass(FrameType, 'FrameType', VOID, Enum);
  initMetadataForLambda(ponger$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForLambda(pinger$slambda$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForLambda(pinger$slambda$slambda_1, CoroutineImpl, VOID, [1]);
  initMetadataForLambda(pinger$slambda, CoroutineImpl, VOID, [1]);
  initMetadataForCompanion(Companion_2);
  initMetadataForClass(WebSocketChannelsConfig, 'WebSocketChannelsConfig', WebSocketChannelsConfig);
  initMetadataForCompanion(Companion_3);
  initMetadataForClass(ChannelConfig, 'ChannelConfig');
  initMetadataForClass(ChannelOverflow, 'ChannelOverflow', VOID, Enum);
  initMetadataForCompanion(Companion_4);
  initMetadataForClass(BoundedChannel, 'BoundedChannel', VOID, VOID, [ReceiveChannel, SendChannel], [1, 0]);
  initMetadataForClass(ChannelOverflowException, 'ChannelOverflowException', VOID, RuntimeException);
  initMetadataForInterface(WebSocketExtension, 'WebSocketExtension');
  initMetadataForClass(WebSocketExtensionsConfig, 'WebSocketExtensionsConfig', WebSocketExtensionsConfig);
  initMetadataForClass(WebSocketExtensionHeader, 'WebSocketExtensionHeader');
  initMetadataForCoroutine($closeCOROUTINE$, CoroutineImpl);
  initMetadataForClass(Frame, 'Frame');
  initMetadataForClass(Binary, 'Binary', VOID, Frame);
  initMetadataForClass(Text, 'Text', VOID, Frame);
  initMetadataForClass(Close, 'Close', Close_init_$Create$_0, Frame);
  initMetadataForClass(Ping, 'Ping', VOID, Frame);
  initMetadataForClass(Pong, 'Pong', VOID, Frame);
  initMetadataForCompanion(Companion_5);
  //endregion
  var Codes_NORMAL_instance;
  var Codes_GOING_AWAY_instance;
  var Codes_PROTOCOL_ERROR_instance;
  var Codes_CANNOT_ACCEPT_instance;
  var Codes_CLOSED_ABNORMALLY_instance;
  var Codes_NOT_CONSISTENT_instance;
  var Codes_VIOLATED_POLICY_instance;
  var Codes_TOO_BIG_instance;
  var Codes_NO_EXTENSION_instance;
  var Codes_INTERNAL_ERROR_instance;
  var Codes_SERVICE_RESTART_instance;
  var Codes_TRY_AGAIN_LATER_instance;
  function Companion() {
    Companion_instance = this;
    var tmp = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_0 = get_entries();
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination = LinkedHashMap_init_$Create$(capacity);
    var _iterator__ex2g4s = this_0.t();
    while (_iterator__ex2g4s.u()) {
      var element = _iterator__ex2g4s.v();
      var tmp$ret$2 = element.f4p_1;
      destination.u2(tmp$ret$2, element);
    }
    tmp.g4p_1 = destination;
    this.h4p_1 = Codes_INTERNAL_ERROR_getInstance();
  }
  protoOf(Companion).i4p = function (code) {
    return this.g4p_1.c3(code);
  };
  var Companion_instance;
  function Companion_getInstance() {
    Codes_initEntries();
    if (Companion_instance == null)
      new Companion();
    return Companion_instance;
  }
  function values() {
    return [Codes_NORMAL_getInstance(), Codes_GOING_AWAY_getInstance(), Codes_PROTOCOL_ERROR_getInstance(), Codes_CANNOT_ACCEPT_getInstance(), Codes_CLOSED_ABNORMALLY_getInstance(), Codes_NOT_CONSISTENT_getInstance(), Codes_VIOLATED_POLICY_getInstance(), Codes_TOO_BIG_getInstance(), Codes_NO_EXTENSION_getInstance(), Codes_INTERNAL_ERROR_getInstance(), Codes_SERVICE_RESTART_getInstance(), Codes_TRY_AGAIN_LATER_getInstance()];
  }
  function get_entries() {
    if ($ENTRIES == null)
      $ENTRIES = enumEntries(values());
    return $ENTRIES;
  }
  var Codes_entriesInitialized;
  function Codes_initEntries() {
    if (Codes_entriesInitialized)
      return Unit_instance;
    Codes_entriesInitialized = true;
    Codes_NORMAL_instance = new Codes('NORMAL', 0, 1000);
    Codes_GOING_AWAY_instance = new Codes('GOING_AWAY', 1, 1001);
    Codes_PROTOCOL_ERROR_instance = new Codes('PROTOCOL_ERROR', 2, 1002);
    Codes_CANNOT_ACCEPT_instance = new Codes('CANNOT_ACCEPT', 3, 1003);
    Codes_CLOSED_ABNORMALLY_instance = new Codes('CLOSED_ABNORMALLY', 4, 1006);
    Codes_NOT_CONSISTENT_instance = new Codes('NOT_CONSISTENT', 5, 1007);
    Codes_VIOLATED_POLICY_instance = new Codes('VIOLATED_POLICY', 6, 1008);
    Codes_TOO_BIG_instance = new Codes('TOO_BIG', 7, 1009);
    Codes_NO_EXTENSION_instance = new Codes('NO_EXTENSION', 8, 1010);
    Codes_INTERNAL_ERROR_instance = new Codes('INTERNAL_ERROR', 9, 1011);
    Codes_SERVICE_RESTART_instance = new Codes('SERVICE_RESTART', 10, 1012);
    Codes_TRY_AGAIN_LATER_instance = new Codes('TRY_AGAIN_LATER', 11, 1013);
    Companion_getInstance();
  }
  var $ENTRIES;
  function CloseReason_init_$Init$(code, message, $this) {
    CloseReason.call($this, code.f4p_1, message);
    return $this;
  }
  function CloseReason_init_$Create$(code, message) {
    return CloseReason_init_$Init$(code, message, objectCreate(protoOf(CloseReason)));
  }
  function Codes(name, ordinal, code) {
    Enum.call(this, name, ordinal);
    this.f4p_1 = code;
  }
  function Codes_NORMAL_getInstance() {
    Codes_initEntries();
    return Codes_NORMAL_instance;
  }
  function Codes_GOING_AWAY_getInstance() {
    Codes_initEntries();
    return Codes_GOING_AWAY_instance;
  }
  function Codes_PROTOCOL_ERROR_getInstance() {
    Codes_initEntries();
    return Codes_PROTOCOL_ERROR_instance;
  }
  function Codes_CANNOT_ACCEPT_getInstance() {
    Codes_initEntries();
    return Codes_CANNOT_ACCEPT_instance;
  }
  function Codes_CLOSED_ABNORMALLY_getInstance() {
    Codes_initEntries();
    return Codes_CLOSED_ABNORMALLY_instance;
  }
  function Codes_NOT_CONSISTENT_getInstance() {
    Codes_initEntries();
    return Codes_NOT_CONSISTENT_instance;
  }
  function Codes_VIOLATED_POLICY_getInstance() {
    Codes_initEntries();
    return Codes_VIOLATED_POLICY_instance;
  }
  function Codes_TOO_BIG_getInstance() {
    Codes_initEntries();
    return Codes_TOO_BIG_instance;
  }
  function Codes_NO_EXTENSION_getInstance() {
    Codes_initEntries();
    return Codes_NO_EXTENSION_instance;
  }
  function Codes_INTERNAL_ERROR_getInstance() {
    Codes_initEntries();
    return Codes_INTERNAL_ERROR_instance;
  }
  function Codes_SERVICE_RESTART_getInstance() {
    Codes_initEntries();
    return Codes_SERVICE_RESTART_instance;
  }
  function Codes_TRY_AGAIN_LATER_getInstance() {
    Codes_initEntries();
    return Codes_TRY_AGAIN_LATER_instance;
  }
  function CloseReason(code, message) {
    this.j4p_1 = code;
    this.k4p_1 = message;
  }
  protoOf(CloseReason).l4p = function () {
    return Companion_getInstance().i4p(this.j4p_1);
  };
  protoOf(CloseReason).toString = function () {
    var tmp0_elvis_lhs = this.l4p();
    return 'CloseReason(reason=' + toString(tmp0_elvis_lhs == null ? this.j4p_1 : tmp0_elvis_lhs) + ', message=' + this.k4p_1 + ')';
  };
  protoOf(CloseReason).hashCode = function () {
    var result = this.j4p_1;
    result = imul(result, 31) + getStringHashCode(this.k4p_1) | 0;
    return result;
  };
  protoOf(CloseReason).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CloseReason))
      return false;
    if (!(this.j4p_1 === other.j4p_1))
      return false;
    if (!(this.k4p_1 === other.k4p_1))
      return false;
    return true;
  };
  function get_LOGGER() {
    _init_properties_DefaultWebSocketSession_kt__469s0y();
    return LOGGER;
  }
  var LOGGER;
  function get_IncomingProcessorCoroutineName() {
    _init_properties_DefaultWebSocketSession_kt__469s0y();
    return IncomingProcessorCoroutineName;
  }
  var IncomingProcessorCoroutineName;
  function get_OutgoingProcessorCoroutineName() {
    _init_properties_DefaultWebSocketSession_kt__469s0y();
    return OutgoingProcessorCoroutineName;
  }
  var OutgoingProcessorCoroutineName;
  function get_NORMAL_CLOSE() {
    _init_properties_DefaultWebSocketSession_kt__469s0y();
    return NORMAL_CLOSE;
  }
  var NORMAL_CLOSE;
  var OUTGOING_CHANNEL_CONFIG;
  function DefaultWebSocketSession() {
  }
  function DefaultWebSocketSession_0(session, pingIntervalMillis, timeoutMillis, channelsConfig) {
    pingIntervalMillis = pingIntervalMillis === VOID ? 0n : pingIntervalMillis;
    timeoutMillis = timeoutMillis === VOID ? 15000n : timeoutMillis;
    channelsConfig = channelsConfig === VOID ? Companion_getInstance_2().s4p_1 : channelsConfig;
    _init_properties_DefaultWebSocketSession_kt__469s0y();
    // Inline function 'kotlin.require' call
    if (!!isInterface(session, DefaultWebSocketSession)) {
      var message = 'Cannot wrap other DefaultWebSocketSession';
      throw IllegalArgumentException_init_$Create$(toString(message));
    }
    return new DefaultWebSocketSessionImpl(session, pingIntervalMillis, timeoutMillis, channelsConfig.t4p_1, channelsConfig.u4p_1);
  }
  function runIncomingProcessor($this, ponger) {
    var tmp = get_IncomingProcessorCoroutineName().pk(Dispatchers_getInstance().w33_1);
    return launch($this, tmp, VOID, DefaultWebSocketSessionImpl$runIncomingProcessor$slambda_0($this, ponger, null));
  }
  function runOutgoingProcessor($this) {
    var tmp = get_OutgoingProcessorCoroutineName().pk(Dispatchers_getInstance().w33_1);
    var tmp_0 = CoroutineStart_UNDISPATCHED_getInstance();
    return launch($this, tmp, tmp_0, DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda_0($this, null));
  }
  function outgoingProcessorLoop($this, $completion) {
    var tmp = new $outgoingProcessorLoopCOROUTINE$($this, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  }
  function sendCloseSequence($this, reason, exception, $completion) {
    exception = exception === VOID ? null : exception;
    var tmp = new $sendCloseSequenceCOROUTINE$($this, reason, exception, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  }
  function tryClose($this) {
    return $this.z4q_1.atomicfu$compareAndSet(false, true);
  }
  function runOrCancelPinger($this) {
    var interval = $this.c4r_1;
    var tmp;
    if ($this.z4q_1.kotlinx$atomicfu$value) {
      tmp = null;
    } else if (interval > 0n) {
      var tmp_0 = $this.s4q_1.q4p();
      var tmp_1 = $this.d4r_1;
      tmp = pinger($this, tmp_0, interval, tmp_1, DefaultWebSocketSessionImpl$runOrCancelPinger$slambda_0($this, null));
    } else {
      tmp = null;
    }
    var newPinger = tmp;
    var tmp0_safe_receiver = $this.t4q_1.atomicfu$getAndSet(newPinger);
    if (tmp0_safe_receiver == null)
      null;
    else
      tmp0_safe_receiver.l3a();
    var tmp2_safe_receiver = newPinger == null ? null : new ChannelResult(newPinger.f3a(Companion_getInstance_0().f4r_1));
    if (tmp2_safe_receiver == null)
      null;
    else
      _ChannelResult___get_isSuccess__impl__odq1z9(tmp2_safe_receiver.p38_1);
    if ($this.z4q_1.kotlinx$atomicfu$value && !(newPinger == null)) {
      runOrCancelPinger($this);
    }
  }
  function checkMaxFrameSize($this, packet, frame, $completion) {
    var tmp = new $checkMaxFrameSizeCOROUTINE$($this, packet, frame, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  }
  function processIncomingExtensions($this, frame) {
    // Inline function 'kotlin.collections.fold' call
    var accumulator = frame;
    var _iterator__ex2g4s = $this.o22().t();
    while (_iterator__ex2g4s.u()) {
      var element = _iterator__ex2g4s.v();
      var current = accumulator;
      accumulator = element.s4r(current);
    }
    return accumulator;
  }
  function processOutgoingExtensions($this, frame) {
    // Inline function 'kotlin.collections.fold' call
    var accumulator = frame;
    var _iterator__ex2g4s = $this.o22().t();
    while (_iterator__ex2g4s.u()) {
      var element = _iterator__ex2g4s.v();
      var current = accumulator;
      accumulator = element.t4r(current);
    }
    return accumulator;
  }
  function Companion_0() {
    Companion_instance_0 = this;
    this.f4r_1 = new Pong(new Int8Array(0), NonDisposableHandle_instance);
  }
  var Companion_instance_0;
  function Companion_getInstance_0() {
    if (Companion_instance_0 == null)
      new Companion_0();
    return Companion_instance_0;
  }
  function DefaultWebSocketSessionImpl$start$slambda($incomingJob, $outgoingJob, this$0, resultContinuation) {
    this.c4s_1 = $incomingJob;
    this.d4s_1 = $outgoingJob;
    this.e4s_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DefaultWebSocketSessionImpl$start$slambda).p3e = function ($this$launch, $completion) {
    var tmp = this.q3e($this$launch, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(DefaultWebSocketSessionImpl$start$slambda).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DefaultWebSocketSessionImpl$start$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 3;
            this.e9_1 = 1;
            suspendResult = this.c4s_1.i2t(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.e9_1 = 2;
            suspendResult = this.d4s_1.i2t(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.e4s_1.v4q_1.m2t();
            return Unit_instance;
          case 3:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 3) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  protoOf(DefaultWebSocketSessionImpl$start$slambda).q3e = function ($this$launch, completion) {
    var i = new DefaultWebSocketSessionImpl$start$slambda(this.c4s_1, this.d4s_1, this.e4s_1, completion);
    i.f4s_1 = $this$launch;
    return i;
  };
  function DefaultWebSocketSessionImpl$start$slambda_0($incomingJob, $outgoingJob, this$0, resultContinuation) {
    var i = new DefaultWebSocketSessionImpl$start$slambda($incomingJob, $outgoingJob, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.p3e($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this$0, $ponger, resultContinuation) {
    this.o4s_1 = this$0;
    this.p4s_1 = $ponger;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).p3e = function ($this$launch, $completion) {
    var tmp = this.q3e($this$launch, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 39;
            this.a4t_1 = null;
            this.t4s_1 = null;
            this.s4s_1 = false;
            this.u4s_1 = Unit_instance;
            this.e9_1 = 1;
            continue $sm;
          case 1:
            this.e9_1 = 2;
            continue $sm;
          case 2:
            this.f9_1 = 33;
            this.f9_1 = 32;
            this.e4t_1 = this.o4s_1.s4q_1.p4p();
            this.e9_1 = 3;
            continue $sm;
          case 3:
            this.x4s_1 = this.e4t_1;
            this.w4s_1 = null;
            this.e9_1 = 4;
            continue $sm;
          case 4:
            this.e9_1 = 5;
            continue $sm;
          case 5:
            this.e9_1 = 6;
            continue $sm;
          case 6:
            this.f9_1 = 29;
            this.f9_1 = 28;
            this.d4t_1 = this.x4s_1.t();
            this.e9_1 = 7;
            continue $sm;
          case 7:
            this.e9_1 = 8;
            suspendResult = this.d4t_1.h38(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            if (!suspendResult) {
              this.e9_1 = 26;
              continue $sm;
            }

            var e = this.d4t_1.v();
            this.c4t_1 = e;
            this.e9_1 = 9;
            continue $sm;
          case 9:
            this.b4t_1 = this.c4t_1;
            var this_0 = get_LOGGER();
            if (get_isTraceEnabled(this_0)) {
              this_0.t45('WebSocketSession(' + toString(this.q4s_1) + ') receiving frame ' + this.b4t_1.toString());
            }

            var tmp0_subject = this.b4t_1;
            if (tmp0_subject instanceof Close) {
              if (!this.o4s_1.q4p().j38()) {
                this.e9_1 = 18;
                var tmp_0 = this.o4s_1.q4p();
                var tmp1_elvis_lhs = readReason(this.b4t_1);
                suspendResult = tmp_0.e3a(Close_init_$Create$(tmp1_elvis_lhs == null ? get_NORMAL_CLOSE() : tmp1_elvis_lhs), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.e9_1 = 19;
                continue $sm;
              }
            } else {
              if (tmp0_subject instanceof Pong) {
                var tmp2_safe_receiver = this.o4s_1.t4q_1.kotlinx$atomicfu$value;
                if (tmp2_safe_receiver == null) {
                  this.z4s_1 = null;
                  this.e9_1 = 17;
                  continue $sm;
                } else {
                  this.e9_1 = 16;
                  suspendResult = tmp2_safe_receiver.e3a(this.b4t_1, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              } else {
                if (tmp0_subject instanceof Ping) {
                  this.e9_1 = 15;
                  suspendResult = this.p4s_1.e3a(this.b4t_1, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.e9_1 = 10;
                  suspendResult = checkMaxFrameSize(this.o4s_1, this.t4s_1, this.b4t_1, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 10:
            if (!this.b4t_1.f4t_1) {
              if (this.a4t_1 == null) {
                this.a4t_1 = this.b4t_1;
              }
              if (this.t4s_1 == null) {
                this.t4s_1 = BytePacketBuilder();
              }
              writeFully(this.t4s_1, this.b4t_1.h4t_1);
              this.e9_1 = 21;
              continue $sm;
            } else {
              this.e9_1 = 11;
              continue $sm;
            }

          case 11:
            if (this.a4t_1 == null) {
              this.e9_1 = 14;
              suspendResult = this.o4s_1.x4q_1.e3a(processIncomingExtensions(this.o4s_1, this.b4t_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 12;
              continue $sm;
            }

          case 12:
            writeFully(ensureNotNull(this.t4s_1), this.b4t_1.h4t_1);
            var defragmented = Companion_getInstance_5().n4t(true, this.a4t_1.g4t_1, readByteArray(build(this.t4s_1)), this.a4t_1.j4t_1, this.a4t_1.k4t_1, this.a4t_1.l4t_1);
            this.a4t_1 = null;
            this.e9_1 = 13;
            suspendResult = this.o4s_1.x4q_1.e3a(processIncomingExtensions(this.o4s_1, defragmented), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            var tmp_1 = this;
            tmp_1.y4s_1 = Unit_instance;
            this.e9_1 = 20;
            continue $sm;
          case 14:
            this.e9_1 = 21;
            continue $sm;
          case 15:
            var tmp_2 = this;
            tmp_2.y4s_1 = Unit_instance;
            this.e9_1 = 20;
            continue $sm;
          case 16:
            var tmp_3 = this;
            tmp_3.z4s_1 = Unit_instance;
            this.e9_1 = 17;
            continue $sm;
          case 17:
            this.y4s_1 = this.z4s_1;
            this.e9_1 = 20;
            continue $sm;
          case 18:
            this.e9_1 = 19;
            continue $sm;
          case 19:
            this.s4s_1 = true;
            this.e9_1 = 22;
            var tmp_4 = this;
            continue $sm;
          case 20:
            if (false) {
              this.e9_1 = 9;
              continue $sm;
            }

            this.e9_1 = 21;
            continue $sm;
          case 21:
            this.e9_1 = 7;
            continue $sm;
          case 22:
            this.f9_1 = 32;
            cancelConsumed(this.x4s_1, this.w4s_1);
            this.f9_1 = 39;
            this.e9_1 = 23;
            continue $sm;
          case 23:
            this.f9_1 = 39;
            this.p4s_1.l3a();
            var tmp0_safe_receiver = this.t4s_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              tmp0_safe_receiver.n4();
            }

            this.o4s_1.x4q_1.l3a();
            if (!this.s4s_1) {
              this.e9_1 = 24;
              suspendResult = close(this.o4s_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 25;
              continue $sm;
            }

          case 24:
            this.e9_1 = 25;
            continue $sm;
          case 25:
            var tmp_5 = this;
            return Unit_instance;
          case 26:
            this.e9_1 = 27;
            var tmp_6 = this;
            continue $sm;
          case 27:
            this.f9_1 = 32;
            cancelConsumed(this.x4s_1, this.w4s_1);
            this.e9_1 = 31;
            continue $sm;
          case 28:
            this.f9_1 = 29;
            var tmp_7 = this.h9_1;
            if (tmp_7 instanceof Error) {
              var e_0 = this.h9_1;
              var tmp_8 = this;
              this.w4s_1 = e_0;
              throw e_0;
            } else {
              throw this.h9_1;
            }

          case 29:
            this.f9_1 = 32;
            var t = this.h9_1;
            cancelConsumed(this.x4s_1, this.w4s_1);
            throw t;
          case 30:
            this.f9_1 = 32;
            cancelConsumed(this.x4s_1, this.w4s_1);
            if (false) {
              this.e9_1 = 3;
              continue $sm;
            }

            this.e9_1 = 31;
            continue $sm;
          case 31:
            this.u4s_1 = Unit_instance;
            this.f9_1 = 39;
            this.e9_1 = 36;
            continue $sm;
          case 32:
            this.f9_1 = 33;
            var tmp_9 = this.h9_1;
            if (tmp_9 instanceof ClosedSendChannelException) {
              var _unused_var__etf5q3 = this.h9_1;
              var tmp_10 = this;
              tmp_10.u4s_1 = Unit_instance;
              this.f9_1 = 39;
              this.e9_1 = 36;
              continue $sm;
            } else {
              var tmp_11 = this.h9_1;
              if (tmp_11 instanceof Error) {
                var cause = this.h9_1;
                var tmp_12 = this;
                this.p4s_1.l3a();
                tmp_12.u4s_1 = this.o4s_1.x4q_1.j3a(cause);
                this.f9_1 = 39;
                this.e9_1 = 36;
                continue $sm;
              } else {
                throw this.h9_1;
              }
            }

          case 33:
            this.f9_1 = 39;
            this.v4s_1 = this.h9_1;
            this.p4s_1.l3a();
            var tmp0_safe_receiver_0 = this.t4s_1;
            if (tmp0_safe_receiver_0 == null)
              null;
            else {
              tmp0_safe_receiver_0.n4();
            }

            this.o4s_1.x4q_1.l3a();
            if (!this.s4s_1) {
              this.e9_1 = 34;
              suspendResult = close(this.o4s_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 35;
              continue $sm;
            }

          case 34:
            this.e9_1 = 35;
            continue $sm;
          case 35:
            throw this.v4s_1;
          case 36:
            this.r4s_1 = this.u4s_1;
            this.f9_1 = 39;
            this.p4s_1.l3a();
            var tmp0_safe_receiver_1 = this.t4s_1;
            if (tmp0_safe_receiver_1 == null)
              null;
            else {
              tmp0_safe_receiver_1.n4();
            }

            this.o4s_1.x4q_1.l3a();
            if (!this.s4s_1) {
              this.e9_1 = 37;
              suspendResult = close(this.o4s_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 38;
              continue $sm;
            }

          case 37:
            this.e9_1 = 38;
            continue $sm;
          case 38:
            return Unit_instance;
          case 39:
            throw this.h9_1;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.f9_1 === 39) {
          throw e_1;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).q3e = function ($this$launch, completion) {
    var i = new DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this.o4s_1, this.p4s_1, completion);
    i.q4s_1 = $this$launch;
    return i;
  };
  function DefaultWebSocketSessionImpl$runIncomingProcessor$slambda_0(this$0, $ponger, resultContinuation) {
    var i = new DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this$0, $ponger, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.p3e($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this$0, resultContinuation) {
    this.w4t_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).p3e = function ($this$launch, $completion) {
    var tmp = this.q3e($this$launch, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 13;
            this.e9_1 = 1;
            continue $sm;
          case 1:
            this.e9_1 = 2;
            continue $sm;
          case 2:
            this.f9_1 = 9;
            this.f9_1 = 4;
            this.e9_1 = 3;
            suspendResult = outgoingProcessorLoop(this.w4t_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.f9_1 = 13;
            this.e9_1 = 11;
            continue $sm;
          case 4:
            this.f9_1 = 9;
            var tmp_0 = this.h9_1;
            if (tmp_0 instanceof ClosedSendChannelException) {
              var _unused_var__etf5q3 = this.h9_1;
              this.f9_1 = 13;
              this.e9_1 = 11;
              continue $sm;
            } else {
              var tmp_1 = this.h9_1;
              if (tmp_1 instanceof ClosedReceiveChannelException) {
                var _unused_var__etf5q3_0 = this.h9_1;
                this.f9_1 = 13;
                this.e9_1 = 11;
                continue $sm;
              } else {
                var tmp_2 = this.h9_1;
                if (tmp_2 instanceof CancellationException) {
                  var _unused_var__etf5q3_1 = this.h9_1;
                  this.e9_1 = 5;
                  suspendResult = sendCloseSequence(this.w4t_1, CloseReason_init_$Create$(Codes_NORMAL_getInstance(), ''), VOID, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  var tmp_3 = this.h9_1;
                  if (tmp_3 instanceof ChannelIOException) {
                    var _unused_var__etf5q3_2 = this.h9_1;
                    this.f9_1 = 13;
                    this.e9_1 = 11;
                    continue $sm;
                  } else {
                    var tmp_4 = this.h9_1;
                    if (tmp_4 instanceof Error) {
                      var cause = this.h9_1;
                      this.w4t_1.y4q_1.l2t(CancellationException_init_$Create$('Failed to send frame', cause));
                      this.e9_1 = 6;
                      suspendResult = closeExceptionally(this.w4t_1.s4q_1, cause, this);
                      if (suspendResult === get_COROUTINE_SUSPENDED()) {
                        return suspendResult;
                      }
                      continue $sm;
                    } else {
                      throw this.h9_1;
                    }
                  }
                }
              }
            }

          case 5:
            this.f9_1 = 13;
            this.e9_1 = 11;
            continue $sm;
          case 6:
            this.f9_1 = 13;
            this.e9_1 = 7;
            continue $sm;
          case 7:
            this.f9_1 = 13;
            this.w4t_1.y4q_1.n3a();
            this.e9_1 = 8;
            suspendResult = close(this.w4t_1.s4q_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            return Unit_instance;
          case 9:
            this.f9_1 = 13;
            this.y4t_1 = this.h9_1;
            this.w4t_1.y4q_1.n3a();
            this.e9_1 = 10;
            suspendResult = close(this.w4t_1.s4q_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            throw this.y4t_1;
          case 11:
            this.f9_1 = 13;
            this.w4t_1.y4q_1.n3a();
            this.e9_1 = 12;
            suspendResult = close(this.w4t_1.s4q_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 12:
            return Unit_instance;
          case 13:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 13) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).q3e = function ($this$launch, completion) {
    var i = new DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this.w4t_1, completion);
    i.x4t_1 = $this$launch;
    return i;
  };
  function DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda_0(this$0, resultContinuation) {
    var i = new DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.p3e($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this$0, resultContinuation) {
    this.h4u_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).j4u = function (it, $completion) {
    var tmp = this.k4u(it, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).z9 = function (p1, $completion) {
    return this.j4u(p1 instanceof CloseReason ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 2;
            this.e9_1 = 1;
            suspendResult = sendCloseSequence(this.h4u_1, this.i4u_1, IOException_init_$Create$('Ping timeout'), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 2) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).k4u = function (it, completion) {
    var i = new DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this.h4u_1, completion);
    i.i4u_1 = it;
    return i;
  };
  function DefaultWebSocketSessionImpl$runOrCancelPinger$slambda_0(this$0, resultContinuation) {
    var i = new DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.j4u(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $outgoingProcessorLoopCOROUTINE$(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.d4q_1 = _this__u8e3s4;
  }
  protoOf($outgoingProcessorLoopCOROUTINE$).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 7;
            this.f4q_1 = this.d4q_1.y4q_1.t();
            this.e9_1 = 1;
            continue $sm;
          case 1:
            this.e9_1 = 2;
            suspendResult = this.f4q_1.h38(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (!suspendResult) {
              this.e9_1 = 6;
              continue $sm;
            }

            var frame = this.f4q_1.v();
            var this_0 = get_LOGGER();
            if (get_isTraceEnabled(this_0)) {
              this_0.t45('Sending ' + frame.toString() + ' from session ' + toString(this.d4q_1));
            }

            if (frame instanceof Close) {
              this.e9_1 = 3;
              suspendResult = sendCloseSequence(this.d4q_1, readReason(frame), VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0;
              if (frame instanceof Text) {
                tmp_0 = true;
              } else {
                tmp_0 = frame instanceof Binary;
              }
              if (tmp_0) {
                this.e4q_1 = processOutgoingExtensions(this.d4q_1, frame);
                this.e9_1 = 4;
                continue $sm;
              } else {
                this.e4q_1 = frame;
                this.e9_1 = 4;
                continue $sm;
              }
            }

          case 3:
            this.e9_1 = 6;
            var tmp_1 = this;
            continue $sm;
          case 4:
            var processedFrame = this.e4q_1;
            this.e9_1 = 5;
            suspendResult = this.d4q_1.s4q_1.q4p().e3a(processedFrame, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.e9_1 = 1;
            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 7) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  function $sendCloseSequenceCOROUTINE$(_this__u8e3s4, reason, exception, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.o4q_1 = _this__u8e3s4;
    this.p4q_1 = reason;
    this.q4q_1 = exception;
  }
  protoOf($sendCloseSequenceCOROUTINE$).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 6;
            if (!tryClose(this.o4q_1))
              return Unit_instance;
            var this_0 = get_LOGGER();
            if (get_isTraceEnabled(this_0)) {
              this_0.t45('Sending Close Sequence for session ' + toString(this.o4q_1) + ' with reason ' + toString_0(this.p4q_1) + ' and exception ' + toString_0(this.q4q_1));
            }

            this.o4q_1.v4q_1.y2z();
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.p4q_1;
            tmp_0.r4q_1 = tmp0_elvis_lhs == null ? CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '') : tmp0_elvis_lhs;
            this.e9_1 = 1;
            continue $sm;
          case 1:
            this.f9_1 = 5;
            runOrCancelPinger(this.o4q_1);
            if (!(this.r4q_1.j4p_1 === Codes_CLOSED_ABNORMALLY_getInstance().f4p_1)) {
              this.e9_1 = 2;
              suspendResult = this.o4q_1.s4q_1.q4p().e3a(Close_init_$Create$(this.r4q_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 3;
              continue $sm;
            }

          case 2:
            this.e9_1 = 3;
            continue $sm;
          case 3:
            this.f9_1 = 6;
            this.e9_1 = 4;
            continue $sm;
          case 4:
            this.f9_1 = 6;
            this.o4q_1.u4q_1.w2z(this.r4q_1);
            if (!(this.q4q_1 == null)) {
              this.o4q_1.y4q_1.j3a(this.q4q_1);
              this.o4q_1.x4q_1.j3a(this.q4q_1);
            }

            return Unit_instance;
          case 5:
            this.f9_1 = 6;
            var t = this.h9_1;
            this.o4q_1.u4q_1.w2z(this.r4q_1);
            if (!(this.q4q_1 == null)) {
              this.o4q_1.y4q_1.j3a(this.q4q_1);
              this.o4q_1.x4q_1.j3a(this.q4q_1);
            }

            throw t;
          case 6:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 6) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  function $checkMaxFrameSizeCOROUTINE$(_this__u8e3s4, packet, frame, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.o4r_1 = _this__u8e3s4;
    this.p4r_1 = packet;
    this.q4r_1 = frame;
  }
  protoOf($checkMaxFrameSizeCOROUTINE$).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.q4r_1.h4t_1.length;
            var tmp0_safe_receiver = this.p4r_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_size(tmp0_safe_receiver);
            tmp_0.r4r_1 = tmp_1 + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
            if (fromInt(this.r4r_1) > this.o4r_1.o4p()) {
              var tmp2_safe_receiver = this.p4r_1;
              if (tmp2_safe_receiver == null)
                null;
              else {
                tmp2_safe_receiver.n4();
              }
              this.e9_1 = 2;
              suspendResult = close(this.o4r_1, CloseReason_init_$Create$(Codes_TOO_BIG_getInstance(), 'Frame is too big: ' + this.r4r_1 + '. Max size is ' + this.o4r_1.o4p().toString()), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 1;
              continue $sm;
            }

          case 1:
            return Unit_instance;
          case 2:
            throw new FrameTooBigException(fromInt(this.r4r_1));
          case 3:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 3) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  function DefaultWebSocketSessionImpl(raw, pingIntervalMillis, timeoutMillis, incomingFramesConfig, outgoingFramesConfig) {
    Companion_getInstance_0();
    this.s4q_1 = raw;
    this.t4q_1 = atomic$ref$1(null);
    this.u4q_1 = CompletableDeferred();
    this.v4q_1 = Job();
    this.w4q_1 = this.s4q_1.b2s().nk(Key_instance).pk(this.v4q_1).pk(new CoroutineName('ws-default'));
    this.x4q_1 = from(Factory_getInstance(), incomingFramesConfig);
    this.y4q_1 = from(Factory_getInstance(), outgoingFramesConfig);
    this.z4q_1 = atomic$boolean$1(false);
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.a4r_1 = ArrayList_init_$Create$();
    this.b4r_1 = atomic$boolean$1(false);
    this.c4r_1 = pingIntervalMillis;
    this.d4r_1 = timeoutMillis;
    this.e4r_1 = this.u4q_1;
  }
  protoOf(DefaultWebSocketSessionImpl).b2s = function () {
    return this.w4q_1;
  };
  protoOf(DefaultWebSocketSessionImpl).p4p = function () {
    return this.x4q_1;
  };
  protoOf(DefaultWebSocketSessionImpl).q4p = function () {
    return this.y4q_1;
  };
  protoOf(DefaultWebSocketSessionImpl).o22 = function () {
    return this.a4r_1;
  };
  protoOf(DefaultWebSocketSessionImpl).n4p = function (value) {
    this.s4q_1.n4p(value);
  };
  protoOf(DefaultWebSocketSessionImpl).o4p = function () {
    return this.s4q_1.o4p();
  };
  protoOf(DefaultWebSocketSessionImpl).m4p = function (negotiatedExtensions) {
    if (!this.b4r_1.atomicfu$compareAndSet(false, true)) {
      // Inline function 'kotlin.error' call
      var message = 'WebSocket session ' + toString(this) + ' is already started.';
      throw IllegalStateException_init_$Create$(toString(message));
    }
    // Inline function 'io.ktor.util.logging.trace' call
    var this_0 = get_LOGGER();
    if (get_isTraceEnabled(this_0)) {
      var tmp$ret$2 = 'Starting default WebSocketSession(' + toString(this) + ') ' + ('with negotiated extensions: ' + joinToString(negotiatedExtensions));
      this_0.t45(tmp$ret$2);
    }
    this.a4r_1.j1(negotiatedExtensions);
    runOrCancelPinger(this);
    var incomingJob = runIncomingProcessor(this, ponger(this, this.q4p()));
    var outgoingJob = runOutgoingProcessor(this);
    launch(this, VOID, VOID, DefaultWebSocketSessionImpl$start$slambda_0(incomingJob, outgoingJob, this, null));
  };
  protoOf(DefaultWebSocketSessionImpl).r3o = function ($completion) {
    return this.s4q_1.r3o($completion);
  };
  var properties_initialized_DefaultWebSocketSession_kt_6cjlhc;
  function _init_properties_DefaultWebSocketSession_kt__469s0y() {
    if (!properties_initialized_DefaultWebSocketSession_kt_6cjlhc) {
      properties_initialized_DefaultWebSocketSession_kt_6cjlhc = true;
      LOGGER = KtorSimpleLogger('io.ktor.websocket.WebSocket');
      IncomingProcessorCoroutineName = new CoroutineName('ws-incoming-processor');
      OutgoingProcessorCoroutineName = new CoroutineName('ws-outgoing-processor');
      NORMAL_CLOSE = CloseReason_init_$Create$(Codes_NORMAL_getInstance(), 'OK');
      var tmp0_safe_receiver = get_OUTGOING_CHANNEL_CAPACITY();
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        tmp = new ChannelConfig(tmp0_safe_receiver, ChannelOverflow_SUSPEND_getInstance());
      }
      OUTGOING_CHANNEL_CONFIG = tmp;
    }
  }
  function readReason(_this__u8e3s4) {
    if (_this__u8e3s4.h4t_1.length < 2) {
      return null;
    }
    // Inline function 'io.ktor.utils.io.core.buildPacket' call
    var builder = new Buffer();
    writeFully(builder, _this__u8e3s4.h4t_1);
    var packet = builder;
    var code = packet.e2p();
    var message = readText(packet);
    return new CloseReason(code, message);
  }
  function NonDisposableHandle() {
  }
  protoOf(NonDisposableHandle).y2u = function () {
    return Unit_instance;
  };
  protoOf(NonDisposableHandle).toString = function () {
    return 'NonDisposableHandle';
  };
  protoOf(NonDisposableHandle).hashCode = function () {
    return 207988788;
  };
  protoOf(NonDisposableHandle).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NonDisposableHandle))
      return false;
    return true;
  };
  var NonDisposableHandle_instance;
  function NonDisposableHandle_getInstance() {
    return NonDisposableHandle_instance;
  }
  function FrameTooBigException(frameSize, cause) {
    cause = cause === VOID ? null : cause;
    Exception_init_$Init$(cause, this);
    captureStack(this, FrameTooBigException);
    this.l4u_1 = frameSize;
    delete this.message;
  }
  protoOf(FrameTooBigException).e = function () {
    var sizeSuffix = this.l4u_1 >= 0n ? ': ' + this.l4u_1.toString() : '';
    return 'Frame is too big' + sizeSuffix;
  };
  protoOf(FrameTooBigException).h30 = function () {
    return new FrameTooBigException(this.l4u_1, this);
  };
  var FrameType_TEXT_instance;
  var FrameType_BINARY_instance;
  var FrameType_CLOSE_instance;
  var FrameType_PING_instance;
  var FrameType_PONG_instance;
  function Companion_1() {
    Companion_instance_1 = this;
    var tmp = this;
    var tmp0 = get_entries_0();
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.maxByOrNull' call
      var iterator = tmp0.t();
      if (!iterator.u()) {
        tmp$ret$0 = null;
        break $l$block_0;
      }
      var maxElem = iterator.v();
      if (!iterator.u()) {
        tmp$ret$0 = maxElem;
        break $l$block_0;
      }
      var maxValue = maxElem.p4u_1;
      do {
        var e = iterator.v();
        var v = e.p4u_1;
        if (compareTo(maxValue, v) < 0) {
          maxElem = e;
          maxValue = v;
        }
      }
       while (iterator.u());
      tmp$ret$0 = maxElem;
    }
    tmp.q4u_1 = ensureNotNull(tmp$ret$0).p4u_1;
    var tmp_0 = this;
    var tmp_1 = 0;
    var tmp_2 = this.q4u_1 + 1 | 0;
    // Inline function 'kotlin.arrayOfNulls' call
    var tmp_3 = Array(tmp_2);
    while (tmp_1 < tmp_2) {
      var tmp_4 = tmp_1;
      var tmp0_0 = get_entries_0();
      var tmp$ret$5;
      $l$block_2: {
        // Inline function 'kotlin.collections.singleOrNull' call
        var single = null;
        var found = false;
        var _iterator__ex2g4s = tmp0_0.t();
        while (_iterator__ex2g4s.u()) {
          var element = _iterator__ex2g4s.v();
          if (element.p4u_1 === tmp_4) {
            if (found) {
              tmp$ret$5 = null;
              break $l$block_2;
            }
            single = element;
            found = true;
          }
        }
        if (!found) {
          tmp$ret$5 = null;
          break $l$block_2;
        }
        tmp$ret$5 = single;
      }
      tmp_3[tmp_4] = tmp$ret$5;
      tmp_1 = tmp_1 + 1 | 0;
    }
    tmp_0.r4u_1 = tmp_3;
  }
  var Companion_instance_1;
  function Companion_getInstance_1() {
    FrameType_initEntries();
    if (Companion_instance_1 == null)
      new Companion_1();
    return Companion_instance_1;
  }
  function values_0() {
    return [FrameType_TEXT_getInstance(), FrameType_BINARY_getInstance(), FrameType_CLOSE_getInstance(), FrameType_PING_getInstance(), FrameType_PONG_getInstance()];
  }
  function get_entries_0() {
    if ($ENTRIES_0 == null)
      $ENTRIES_0 = enumEntries(values_0());
    return $ENTRIES_0;
  }
  var FrameType_entriesInitialized;
  function FrameType_initEntries() {
    if (FrameType_entriesInitialized)
      return Unit_instance;
    FrameType_entriesInitialized = true;
    FrameType_TEXT_instance = new FrameType('TEXT', 0, false, 1);
    FrameType_BINARY_instance = new FrameType('BINARY', 1, false, 2);
    FrameType_CLOSE_instance = new FrameType('CLOSE', 2, true, 8);
    FrameType_PING_instance = new FrameType('PING', 3, true, 9);
    FrameType_PONG_instance = new FrameType('PONG', 4, true, 10);
    Companion_getInstance_1();
  }
  var $ENTRIES_0;
  function FrameType(name, ordinal, controlFrame, opcode) {
    Enum.call(this, name, ordinal);
    this.o4u_1 = controlFrame;
    this.p4u_1 = opcode;
  }
  function FrameType_TEXT_getInstance() {
    FrameType_initEntries();
    return FrameType_TEXT_instance;
  }
  function FrameType_BINARY_getInstance() {
    FrameType_initEntries();
    return FrameType_BINARY_instance;
  }
  function FrameType_CLOSE_getInstance() {
    FrameType_initEntries();
    return FrameType_CLOSE_instance;
  }
  function FrameType_PING_getInstance() {
    FrameType_initEntries();
    return FrameType_PING_instance;
  }
  function FrameType_PONG_getInstance() {
    FrameType_initEntries();
    return FrameType_PONG_instance;
  }
  function get_PongerCoroutineName() {
    _init_properties_PingPong_kt__9aqxey();
    return PongerCoroutineName;
  }
  var PongerCoroutineName;
  function get_PingerCoroutineName() {
    _init_properties_PingPong_kt__9aqxey();
    return PingerCoroutineName;
  }
  var PingerCoroutineName;
  function ponger(_this__u8e3s4, outgoing) {
    _init_properties_PingPong_kt__9aqxey();
    var channel = Channel(5);
    var tmp = get_PongerCoroutineName();
    launch(_this__u8e3s4, tmp, VOID, ponger$slambda_0(channel, outgoing, null));
    return channel;
  }
  function pinger(_this__u8e3s4, outgoing, periodMillis, timeoutMillis, onTimeout) {
    _init_properties_PingPong_kt__9aqxey();
    var actorJob = Job();
    var channel = Channel(2147483647);
    var tmp = actorJob.pk(get_PingerCoroutineName());
    launch(_this__u8e3s4, tmp, VOID, pinger$slambda_0(periodMillis, timeoutMillis, onTimeout, channel, outgoing, null));
    var tmp_0 = ensureNotNull(_this__u8e3s4.b2s().r9(Key_instance));
    tmp_0.e2t(pinger$lambda(actorJob));
    return channel;
  }
  function ponger$slambda($channel, $outgoing, resultContinuation) {
    this.a4v_1 = $channel;
    this.b4v_1 = $outgoing;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ponger$slambda).p3e = function ($this$launch, $completion) {
    var tmp = this.q3e($this$launch, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(ponger$slambda).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ponger$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 14;
            this.f9_1 = 13;
            this.g4v_1 = this.a4v_1;
            this.e9_1 = 1;
            continue $sm;
          case 1:
            this.e4v_1 = this.g4v_1;
            this.d4v_1 = null;
            this.e9_1 = 2;
            continue $sm;
          case 2:
            this.e9_1 = 3;
            continue $sm;
          case 3:
            this.f9_1 = 10;
            this.f9_1 = 9;
            this.f4v_1 = this.e4v_1.t();
            this.e9_1 = 4;
            continue $sm;
          case 4:
            this.e9_1 = 5;
            suspendResult = this.f4v_1.h38(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            if (!suspendResult) {
              this.e9_1 = 7;
              continue $sm;
            }

            var e = this.f4v_1.v();
            get_LOGGER().t45('Received ping message, sending pong message');
            this.e9_1 = 6;
            suspendResult = this.b4v_1.e3a(new Pong(e.h4t_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.e9_1 = 4;
            continue $sm;
          case 7:
            this.e9_1 = 8;
            var tmp_0 = this;
            continue $sm;
          case 8:
            this.f9_1 = 13;
            cancelConsumed(this.e4v_1, this.d4v_1);
            this.e9_1 = 12;
            continue $sm;
          case 9:
            this.f9_1 = 10;
            var tmp_1 = this.h9_1;
            if (tmp_1 instanceof Error) {
              var e_0 = this.h9_1;
              var tmp_2 = this;
              this.d4v_1 = e_0;
              throw e_0;
            } else {
              throw this.h9_1;
            }

          case 10:
            this.f9_1 = 13;
            var t = this.h9_1;
            cancelConsumed(this.e4v_1, this.d4v_1);
            throw t;
          case 11:
            this.f9_1 = 13;
            cancelConsumed(this.e4v_1, this.d4v_1);
            if (false) {
              this.e9_1 = 1;
              continue $sm;
            }

            this.e9_1 = 12;
            continue $sm;
          case 12:
            this.f9_1 = 14;
            this.e9_1 = 15;
            continue $sm;
          case 13:
            this.f9_1 = 14;
            var tmp_3 = this.h9_1;
            if (tmp_3 instanceof ClosedSendChannelException) {
              var _unused_var__etf5q3 = this.h9_1;
              this.e9_1 = 15;
              continue $sm;
            } else {
              throw this.h9_1;
            }

          case 14:
            throw this.h9_1;
          case 15:
            this.f9_1 = 14;
            return Unit_instance;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.f9_1 === 14) {
          throw e_1;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(ponger$slambda).q3e = function ($this$launch, completion) {
    var i = new ponger$slambda(this.a4v_1, this.b4v_1, completion);
    i.c4v_1 = $this$launch;
    return i;
  };
  function ponger$slambda_0($channel, $outgoing, resultContinuation) {
    var i = new ponger$slambda($channel, $outgoing, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.p3e($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function pinger$slambda$slambda($channel, resultContinuation) {
    this.p4v_1 = $channel;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(pinger$slambda$slambda).p3e = function ($this$withTimeoutOrNull, $completion) {
    var tmp = this.q3e($this$withTimeoutOrNull, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(pinger$slambda$slambda).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(pinger$slambda$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 3;
            this.e9_1 = 1;
            continue $sm;
          case 1:
            if (!true) {
              this.e9_1 = 4;
              continue $sm;
            }

            this.e9_1 = 2;
            suspendResult = this.p4v_1.h3a(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.e9_1 = 1;
            continue $sm;
          case 3:
            throw this.h9_1;
          case 4:
            return Unit_instance;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 3) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  protoOf(pinger$slambda$slambda).q3e = function ($this$withTimeoutOrNull, completion) {
    var i = new pinger$slambda$slambda(this.p4v_1, completion);
    i.q4v_1 = $this$withTimeoutOrNull;
    return i;
  };
  function pinger$slambda$slambda_0($channel, resultContinuation) {
    var i = new pinger$slambda$slambda($channel, resultContinuation);
    var l = function ($this$withTimeoutOrNull, $completion) {
      return i.p3e($this$withTimeoutOrNull, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function pinger$slambda$slambda_1($outgoing, $pingMessage, $channel, resultContinuation) {
    this.z4v_1 = $outgoing;
    this.a4w_1 = $pingMessage;
    this.b4w_1 = $channel;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(pinger$slambda$slambda_1).p3e = function ($this$withTimeoutOrNull, $completion) {
    var tmp = this.q3e($this$withTimeoutOrNull, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(pinger$slambda$slambda_1).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(pinger$slambda$slambda_1).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 6;
            get_LOGGER().t45('WebSocket Pinger: sending ping frame');
            this.e9_1 = 1;
            suspendResult = this.z4v_1.e3a(new Ping(toByteArray(this.a4w_1, Charsets_getInstance().y3x_1)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.e9_1 = 2;
            continue $sm;
          case 2:
            if (!true) {
              this.e9_1 = 5;
              continue $sm;
            }

            this.e9_1 = 3;
            suspendResult = this.b4w_1.h3a(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.d4w_1 = suspendResult;
            if (decodeToString(this.d4w_1.h4t_1, 0, 0 + this.d4w_1.h4t_1.length | 0) === this.a4w_1) {
              get_LOGGER().t45('WebSocket Pinger: received valid pong frame ' + this.d4w_1.toString());
              this.e9_1 = 5;
              continue $sm;
            } else {
              this.e9_1 = 4;
              continue $sm;
            }

          case 4:
            get_LOGGER().t45('WebSocket Pinger: received invalid pong frame ' + this.d4w_1.toString() + ', continue waiting');
            this.e9_1 = 2;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 6) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  protoOf(pinger$slambda$slambda_1).q3e = function ($this$withTimeoutOrNull, completion) {
    var i = new pinger$slambda$slambda_1(this.z4v_1, this.a4w_1, this.b4w_1, completion);
    i.c4w_1 = $this$withTimeoutOrNull;
    return i;
  };
  function pinger$slambda$slambda_2($outgoing, $pingMessage, $channel, resultContinuation) {
    var i = new pinger$slambda$slambda_1($outgoing, $pingMessage, $channel, resultContinuation);
    var l = function ($this$withTimeoutOrNull, $completion) {
      return i.p3e($this$withTimeoutOrNull, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function pinger$slambda($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation) {
    this.m4w_1 = $periodMillis;
    this.n4w_1 = $timeoutMillis;
    this.o4w_1 = $onTimeout;
    this.p4w_1 = $channel;
    this.q4w_1 = $outgoing;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(pinger$slambda).p3e = function ($this$launch, $completion) {
    var tmp = this.q3e($this$launch, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  };
  protoOf(pinger$slambda).z9 = function (p1, $completion) {
    return this.p3e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(pinger$slambda).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 9;
            get_LOGGER().t45('Starting WebSocket pinger coroutine with period ' + this.m4w_1.toString() + ' ms and timeout ' + this.n4w_1.toString() + ' ms');
            this.t4w_1 = Random(getTimeMillis());
            this.s4w_1 = new Int8Array(32);
            this.f9_1 = 7;
            this.e9_1 = 1;
            continue $sm;
          case 1:
            if (!true) {
              this.e9_1 = 6;
              continue $sm;
            }

            this.e9_1 = 2;
            suspendResult = withTimeoutOrNull(this.m4w_1, pinger$slambda$slambda_0(this.p4w_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.t4w_1.mm(this.s4w_1);
            var pingMessage = '[ping ' + toHexString(this.s4w_1) + ' ping]';
            this.e9_1 = 3;
            suspendResult = withTimeoutOrNull(this.n4w_1, pinger$slambda$slambda_2(this.q4w_1, pingMessage, this.p4w_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var rc = suspendResult;
            if (rc == null) {
              get_LOGGER().t45('WebSocket pinger has timed out');
              this.e9_1 = 5;
              suspendResult = this.o4w_1(CloseReason_init_$Create$(Codes_INTERNAL_ERROR_getInstance(), 'Ping timeout'), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.e9_1 = 4;
              continue $sm;
            }

          case 4:
            this.e9_1 = 1;
            continue $sm;
          case 5:
            this.e9_1 = 6;
            continue $sm;
          case 6:
            this.f9_1 = 9;
            this.e9_1 = 8;
            continue $sm;
          case 7:
            this.f9_1 = 9;
            var tmp_0 = this.h9_1;
            if (tmp_0 instanceof CancellationException) {
              var ignore = this.h9_1;
              this.e9_1 = 8;
              continue $sm;
            } else {
              var tmp_1 = this.h9_1;
              if (tmp_1 instanceof ClosedReceiveChannelException) {
                var ignore_0 = this.h9_1;
                this.e9_1 = 8;
                continue $sm;
              } else {
                var tmp_2 = this.h9_1;
                if (tmp_2 instanceof ClosedSendChannelException) {
                  var ignore_1 = this.h9_1;
                  this.e9_1 = 8;
                  continue $sm;
                } else {
                  var tmp_3 = this.h9_1;
                  if (tmp_3 instanceof ClosedByteChannelException) {
                    var ignore_2 = this.h9_1;
                    this.e9_1 = 8;
                    continue $sm;
                  } else {
                    throw this.h9_1;
                  }
                }
              }
            }

          case 8:
            this.f9_1 = 9;
            return Unit_instance;
          case 9:
            throw this.h9_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 9) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  protoOf(pinger$slambda).q3e = function ($this$launch, completion) {
    var i = new pinger$slambda(this.m4w_1, this.n4w_1, this.o4w_1, this.p4w_1, this.q4w_1, completion);
    i.r4w_1 = $this$launch;
    return i;
  };
  function pinger$slambda_0($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation) {
    var i = new pinger$slambda($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.p3e($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function pinger$lambda($actorJob) {
    return function (it) {
      $actorJob.m2t();
      return Unit_instance;
    };
  }
  var properties_initialized_PingPong_kt_fbfhmc;
  function _init_properties_PingPong_kt__9aqxey() {
    if (!properties_initialized_PingPong_kt_fbfhmc) {
      properties_initialized_PingPong_kt_fbfhmc = true;
      PongerCoroutineName = new CoroutineName('ws-ponger');
      PingerCoroutineName = new CoroutineName('ws-pinger');
    }
  }
  function Companion_2() {
    Companion_instance_2 = this;
    var tmp = this;
    // Inline function 'kotlin.apply' call
    var this_0 = new WebSocketChannelsConfig();
    this_0.t4p_1 = this_0.u4w();
    this_0.u4p_1 = this_0.u4w();
    tmp.s4p_1 = this_0;
  }
  var Companion_instance_2;
  function Companion_getInstance_2() {
    if (Companion_instance_2 == null)
      new Companion_2();
    return Companion_instance_2;
  }
  function WebSocketChannelsConfig() {
    Companion_getInstance_2();
    this.t4p_1 = Companion_getInstance_3().v4w_1;
    this.u4p_1 = Companion_getInstance_3().v4w_1;
  }
  protoOf(WebSocketChannelsConfig).u4w = function () {
    return Companion_getInstance_3().v4w_1;
  };
  function from(_this__u8e3s4, config) {
    // Inline function 'kotlin.with' call
    var tmp;
    if (config.w4w_1 === 2147483647) {
      tmp = Channel(2147483647);
    } else if (config.x4w_1.equals(ChannelOverflow_SUSPEND_getInstance())) {
      tmp = Channel(config.w4w_1, BufferOverflow_SUSPEND_getInstance());
    } else if (config.x4w_1.equals(ChannelOverflow_CLOSE_getInstance())) {
      tmp = new BoundedChannel(config.w4w_1);
    } else {
      // Inline function 'kotlin.error' call
      var message = 'Unsupported channel config.';
      throw IllegalStateException_init_$Create$(toString(message));
    }
    return tmp;
  }
  function Companion_3() {
    Companion_instance_3 = this;
    this.v4w_1 = new ChannelConfig(2147483647, ChannelOverflow_SUSPEND_getInstance());
  }
  var Companion_instance_3;
  function Companion_getInstance_3() {
    if (Companion_instance_3 == null)
      new Companion_3();
    return Companion_instance_3;
  }
  function ChannelConfig(capacity, onOverflow) {
    Companion_getInstance_3();
    this.w4w_1 = capacity;
    this.x4w_1 = onOverflow;
  }
  protoOf(ChannelConfig).y4w = function () {
    return this.x4w_1.equals(ChannelOverflow_SUSPEND_getInstance()) && !(this.w4w_1 === 2147483647);
  };
  var ChannelOverflow_SUSPEND_instance;
  var ChannelOverflow_CLOSE_instance;
  var ChannelOverflow_entriesInitialized;
  function ChannelOverflow_initEntries() {
    if (ChannelOverflow_entriesInitialized)
      return Unit_instance;
    ChannelOverflow_entriesInitialized = true;
    ChannelOverflow_SUSPEND_instance = new ChannelOverflow('SUSPEND', 0);
    ChannelOverflow_CLOSE_instance = new ChannelOverflow('CLOSE', 1);
  }
  function ChannelOverflow(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function BoundedChannel$Companion$createDelegate$lambda($channel) {
    return function (it) {
      var tmp;
      var tmp_0;
      if ($channel._v == null) {
        throwUninitializedPropertyAccessException('channel');
      } else {
        tmp_0 = $channel._v;
      }
      if (!tmp_0.j38()) {
        var tmp_1;
        if ($channel._v == null) {
          throwUninitializedPropertyAccessException('channel');
        } else {
          tmp_1 = $channel._v;
        }
        tmp_1.j3a(new ChannelOverflowException('Channel overflowed'));
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function Companion_4() {
  }
  protoOf(Companion_4).z4w = function (capacity) {
    var channel = {_v: null};
    var tmp = BufferOverflow_DROP_OLDEST_getInstance();
    // Inline function 'kotlin.also' call
    var this_0 = Channel(capacity, tmp, BoundedChannel$Companion$createDelegate$lambda(channel));
    channel._v = this_0;
    return this_0;
  };
  var Companion_instance_4;
  function Companion_getInstance_4() {
    return Companion_instance_4;
  }
  function BoundedChannel(capacity, delegate) {
    delegate = delegate === VOID ? Companion_instance_4.z4w(capacity) : delegate;
    this.a4x_1 = delegate;
  }
  protoOf(BoundedChannel).b4x = function (element) {
    var result = this.a4x_1.f3a(element);
    if (!_ChannelResult___get_isSuccess__impl__odq1z9(result) && !_ChannelResult___get_isClosed__impl__mg7kuu(result)) {
      this.j3a(new ChannelOverflowException('Channel overflowed'));
    }
    return result;
  };
  protoOf(BoundedChannel).f3a = function (element) {
    return this.b4x(element);
  };
  protoOf(BoundedChannel).c4x = function (element, $completion) {
    return this.a4x_1.e3a(element, $completion);
  };
  protoOf(BoundedChannel).e3a = function (element, $completion) {
    return this.c4x(element, $completion);
  };
  protoOf(BoundedChannel).j3a = function (cause) {
    return this.a4x_1.j3a(cause);
  };
  protoOf(BoundedChannel).j38 = function () {
    return this.a4x_1.j38();
  };
  protoOf(BoundedChannel).d4x = function ($completion) {
    return this.a4x_1.h3a($completion);
  };
  protoOf(BoundedChannel).h3a = function ($completion) {
    return this.d4x($completion);
  };
  protoOf(BoundedChannel).t = function () {
    return this.a4x_1.t();
  };
  protoOf(BoundedChannel).l2t = function (cause) {
    this.a4x_1.l2t(cause);
  };
  function ChannelOverflowException(message) {
    RuntimeException_init_$Init$(message, this);
    captureStack(this, ChannelOverflowException);
  }
  function ChannelOverflow_SUSPEND_getInstance() {
    ChannelOverflow_initEntries();
    return ChannelOverflow_SUSPEND_instance;
  }
  function ChannelOverflow_CLOSE_getInstance() {
    ChannelOverflow_initEntries();
    return ChannelOverflow_CLOSE_instance;
  }
  function WebSocketExtension() {
  }
  function WebSocketExtensionsConfig() {
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.g4x_1 = ArrayList_init_$Create$();
    var tmp_0 = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp_0.h4x_1 = [false, false, false];
  }
  protoOf(WebSocketExtensionsConfig).r48 = function () {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.g4x_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var _iterator__ex2g4s = this_0.t();
    while (_iterator__ex2g4s.u()) {
      var item = _iterator__ex2g4s.v();
      var tmp$ret$2 = item();
      destination.e1(tmp$ret$2);
    }
    return destination;
  };
  function parametersToString($this) {
    return $this.j4x_1.r() ? '' : '; ' + joinToString($this.j4x_1, ';');
  }
  function WebSocketExtensionHeader(name, parameters) {
    this.i4x_1 = name;
    this.j4x_1 = parameters;
  }
  protoOf(WebSocketExtensionHeader).toString = function () {
    return this.i4x_1 + ' ' + parametersToString(this);
  };
  function parseWebSocketExtensions(value) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = split(value, [',']);
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var _iterator__ex2g4s = this_0.t();
    while (_iterator__ex2g4s.u()) {
      var item = _iterator__ex2g4s.v();
      var extension = split(item, [';']);
      // Inline function 'kotlin.text.trim' call
      var this_1 = first(extension);
      var name = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
      // Inline function 'kotlin.collections.map' call
      var this_2 = drop(extension, 1);
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
      var _iterator__ex2g4s_0 = this_2.t();
      while (_iterator__ex2g4s_0.u()) {
        var item_0 = _iterator__ex2g4s_0.v();
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$6 = toString(trim(isCharSequence(item_0) ? item_0 : THROW_CCE()));
        destination_0.e1(tmp$ret$6);
      }
      var parameters = destination_0;
      var tmp$ret$2 = new WebSocketExtensionHeader(name, parameters);
      destination.e1(tmp$ret$2);
    }
    return destination;
  }
  function WebSocketSession() {
  }
  function close(_this__u8e3s4, reason, $completion) {
    reason = reason === VOID ? CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '') : reason;
    var tmp = new $closeCOROUTINE$(_this__u8e3s4, reason, $completion);
    tmp.g9_1 = Unit_instance;
    tmp.h9_1 = null;
    return tmp.m9();
  }
  function closeExceptionally(_this__u8e3s4, cause, $completion) {
    var tmp;
    if (cause instanceof CancellationException) {
      tmp = CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '');
    } else {
      tmp = CloseReason_init_$Create$(Codes_INTERNAL_ERROR_getInstance(), cause.toString());
    }
    var reason = tmp;
    return close(_this__u8e3s4, reason, $completion);
  }
  function $closeCOROUTINE$(_this__u8e3s4, reason, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.s4x_1 = _this__u8e3s4;
    this.t4x_1 = reason;
  }
  protoOf($closeCOROUTINE$).m9 = function () {
    var suspendResult = this.g9_1;
    $sm: do
      try {
        var tmp = this.e9_1;
        switch (tmp) {
          case 0:
            this.f9_1 = 4;
            this.f9_1 = 3;
            this.e9_1 = 1;
            suspendResult = this.s4x_1.r4p(Close_init_$Create$(this.t4x_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.e9_1 = 2;
            suspendResult = this.s4x_1.r3o(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.f9_1 = 4;
            this.e9_1 = 5;
            continue $sm;
          case 3:
            this.f9_1 = 4;
            var tmp_0 = this.h9_1;
            if (tmp_0 instanceof Error) {
              var _unused_var__etf5q3 = this.h9_1;
              this.e9_1 = 5;
              continue $sm;
            } else {
              throw this.h9_1;
            }

          case 4:
            throw this.h9_1;
          case 5:
            this.f9_1 = 4;
            return Unit_instance;
        }
      } catch ($p) {
        var e = $p;
        if (this.f9_1 === 4) {
          throw e;
        } else {
          this.e9_1 = this.f9_1;
          this.h9_1 = e;
        }
      }
     while (true);
  };
  function Binary_init_$Init$(fin, data, $this) {
    Binary.call($this, fin, data, false, false, false);
    return $this;
  }
  function Binary_init_$Create$(fin, data) {
    return Binary_init_$Init$(fin, data, objectCreate(protoOf(Binary)));
  }
  function Text_init_$Init$(fin, data, $this) {
    Text.call($this, fin, data, false, false, false);
    return $this;
  }
  function Text_init_$Init$_0(text, $this) {
    Text_init_$Init$(true, toByteArray(text), $this);
    return $this;
  }
  function Text_init_$Create$(text) {
    return Text_init_$Init$_0(text, objectCreate(protoOf(Text)));
  }
  function Close_init_$Init$(reason, $this) {
    // Inline function 'io.ktor.utils.io.core.buildPacket' call
    var builder = new Buffer();
    builder.l2q(reason.j4p_1);
    writeText(builder, reason.k4p_1);
    Close_init_$Init$_0(builder, $this);
    return $this;
  }
  function Close_init_$Create$(reason) {
    return Close_init_$Init$(reason, objectCreate(protoOf(Close)));
  }
  function Close_init_$Init$_0(packet, $this) {
    Close.call($this, readByteArray(packet));
    return $this;
  }
  function Close_init_$Init$_1($this) {
    Close.call($this, Companion_getInstance_5().m4t_1);
    return $this;
  }
  function Close_init_$Create$_0() {
    return Close_init_$Init$_1(objectCreate(protoOf(Close)));
  }
  function Binary(fin, data, rsv1, rsv2, rsv3) {
    rsv1 = rsv1 === VOID ? false : rsv1;
    rsv2 = rsv2 === VOID ? false : rsv2;
    rsv3 = rsv3 === VOID ? false : rsv3;
    Frame.call(this, fin, FrameType_BINARY_getInstance(), data, NonDisposableHandle_instance, rsv1, rsv2, rsv3);
  }
  function Text(fin, data, rsv1, rsv2, rsv3) {
    rsv1 = rsv1 === VOID ? false : rsv1;
    rsv2 = rsv2 === VOID ? false : rsv2;
    rsv3 = rsv3 === VOID ? false : rsv3;
    Frame.call(this, fin, FrameType_TEXT_getInstance(), data, NonDisposableHandle_instance, rsv1, rsv2, rsv3);
  }
  function Close(data) {
    Frame.call(this, true, FrameType_CLOSE_getInstance(), data, NonDisposableHandle_instance, false, false, false);
  }
  function Ping(data) {
    Frame.call(this, true, FrameType_PING_getInstance(), data, NonDisposableHandle_instance, false, false, false);
  }
  function Pong(data, disposableHandle) {
    disposableHandle = disposableHandle === VOID ? NonDisposableHandle_instance : disposableHandle;
    Frame.call(this, true, FrameType_PONG_getInstance(), data, disposableHandle, false, false, false);
  }
  function Companion_5() {
    Companion_instance_5 = this;
    this.m4t_1 = new Int8Array(0);
  }
  protoOf(Companion_5).n4t = function (fin, frameType, data, rsv1, rsv2, rsv3) {
    var tmp;
    switch (frameType.a1_1) {
      case 1:
        tmp = new Binary(fin, data, rsv1, rsv2, rsv3);
        break;
      case 0:
        tmp = new Text(fin, data, rsv1, rsv2, rsv3);
        break;
      case 2:
        tmp = new Close(data);
        break;
      case 3:
        tmp = new Ping(data);
        break;
      case 4:
        tmp = new Pong(data, NonDisposableHandle_instance);
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  };
  var Companion_instance_5;
  function Companion_getInstance_5() {
    if (Companion_instance_5 == null)
      new Companion_5();
    return Companion_instance_5;
  }
  function Frame(fin, frameType, data, disposableHandle, rsv1, rsv2, rsv3) {
    Companion_getInstance_5();
    disposableHandle = disposableHandle === VOID ? NonDisposableHandle_instance : disposableHandle;
    rsv1 = rsv1 === VOID ? false : rsv1;
    rsv2 = rsv2 === VOID ? false : rsv2;
    rsv3 = rsv3 === VOID ? false : rsv3;
    this.f4t_1 = fin;
    this.g4t_1 = frameType;
    this.h4t_1 = data;
    this.i4t_1 = disposableHandle;
    this.j4t_1 = rsv1;
    this.k4t_1 = rsv2;
    this.l4t_1 = rsv3;
  }
  protoOf(Frame).toString = function () {
    return 'Frame ' + this.g4t_1.toString() + ' (fin=' + this.f4t_1 + ', buffer len = ' + this.h4t_1.length + ')';
  };
  function get_OUTGOING_CHANNEL_CAPACITY() {
    return OUTGOING_CHANNEL_CAPACITY;
  }
  var OUTGOING_CHANNEL_CAPACITY;
  //region block: post-declaration
  protoOf(DefaultWebSocketSessionImpl).r4p = send;
  defineProp(protoOf(FrameTooBigException), 'message', function () {
    return this.e();
  });
  protoOf(BoundedChannel).l3a = close$default;
  protoOf(BoundedChannel).n3a = cancel$default;
  //endregion
  //region block: init
  NonDisposableHandle_instance = new NonDisposableHandle();
  Companion_instance_4 = new Companion_4();
  OUTGOING_CHANNEL_CAPACITY = null;
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = Companion_getInstance;
  _.$_$.b = Companion_getInstance_2;
  _.$_$.c = Codes_CLOSED_ABNORMALLY_getInstance;
  _.$_$.d = Codes_NORMAL_getInstance;
  _.$_$.e = send;
  _.$_$.f = Binary_init_$Create$;
  _.$_$.g = Close_init_$Create$;
  _.$_$.h = Text_init_$Create$;
  _.$_$.i = CloseReason;
  _.$_$.j = DefaultWebSocketSession_0;
  _.$_$.k = DefaultWebSocketSession;
  _.$_$.l = WebSocketChannelsConfig;
  _.$_$.m = WebSocketExtensionsConfig;
  _.$_$.n = WebSocketExtension;
  _.$_$.o = WebSocketSession;
  _.$_$.p = from;
  _.$_$.q = parseWebSocketExtensions;
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-io.js'), require('./kotlinx-io-kotlinx-io-core.js'), require('./kotlinx-atomicfu.js')));

//# sourceMappingURL=ktor-ktor-websockets.js.map
