(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_io, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_org_jetbrains_kotlinx_atomicfu) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var charSequenceLength = kotlin_kotlin.$_$.hb;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
  var protoOf = kotlin_kotlin.$_$.uc;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var THROW_CCE = kotlin_kotlin.$_$.ci;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var getStringHashCode = kotlin_kotlin.$_$.tb;
  var classMeta = kotlin_kotlin.$_$.jb;
  var setMetadataFor = kotlin_kotlin.$_$.vc;
  var interfaceMeta = kotlin_kotlin.$_$.vb;
  var BytePacketBuilder = kotlin_io_ktor_ktor_io.$_$.p;
  var get_lastIndex = kotlin_kotlin.$_$.jf;
  var charSequenceGet = kotlin_kotlin.$_$.gb;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.u2;
  var writeText = kotlin_io_ktor_ktor_io.$_$.b1;
  var readBytes = kotlin_io_ktor_ktor_io.$_$.v;
  var Long = kotlin_kotlin.$_$.vh;
  var readAvailable = kotlin_io_ktor_ktor_io.$_$.u;
  var toByte = kotlin_kotlin.$_$.wc;
  var readBytes_0 = kotlin_io_ktor_ktor_io.$_$.w;
  var charArray = kotlin_kotlin.$_$.fb;
  var concatToString = kotlin_kotlin.$_$.ne;
  var numberToChar = kotlin_kotlin.$_$.oc;
  var indexOf = kotlin_kotlin.$_$.af;
  var CoroutineImpl = kotlin_kotlin.$_$.ta;
  var VOID = kotlin_kotlin.$_$.f;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.fa;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
  var equals = kotlin_kotlin.$_$.mb;
  var hashCode = kotlin_kotlin.$_$.ub;
  var MutableMap = kotlin_kotlin.$_$.a6;
  var ensureNotNull = kotlin_kotlin.$_$.ui;
  var Entry = kotlin_kotlin.$_$.x5;
  var isInterface = kotlin_kotlin.$_$.ec;
  var toString = kotlin_kotlin.$_$.c3;
  var SupervisorJob = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c2;
  var AbstractCoroutineContextElement = kotlin_kotlin.$_$.ia;
  var Key_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
  var Element = kotlin_kotlin.$_$.ra;
  var Iterator = kotlin_kotlin.$_$.t5;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
  var Set = kotlin_kotlin.$_$.c6;
  var toString_0 = kotlin_kotlin.$_$.zc;
  var MutableSet = kotlin_kotlin.$_$.b6;
  var Enum = kotlin_kotlin.$_$.ph;
  var objectMeta = kotlin_kotlin.$_$.tc;
  var firstOrNull = kotlin_kotlin.$_$.n7;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u;
  var emptyMap = kotlin_kotlin.$_$.j7;
  var getBooleanHashCode = kotlin_kotlin.$_$.pb;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.e1;
  var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.z2;
  var equals_0 = kotlin_kotlin.$_$.we;
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
  var Comparable = kotlin_kotlin.$_$.lh;
  var isSuspendFunction = kotlin_kotlin.$_$.hc;
  var MutableList = kotlin_kotlin.$_$.z5;
  var objectCreate = kotlin_kotlin.$_$.sc;
  var ArrayList = kotlin_kotlin.$_$.o5;
  var emptyList = kotlin_kotlin.$_$.i7;
  var get_lastIndex_0 = kotlin_kotlin.$_$.d8;
  var last = kotlin_kotlin.$_$.g8;
  var mutableListOf = kotlin_kotlin.$_$.o8;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x1;
  var extendThrowable = kotlin_kotlin.$_$.nb;
  var captureStack = kotlin_kotlin.$_$.db;
  var recoverStackTrace = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p1;
  var Companion_instance = kotlin_kotlin.$_$.h5;
  var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.d3;
  var createFailure = kotlin_kotlin.$_$.ti;
  var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.e3;
  var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.f3;
  var IntCompanionObject_instance = kotlin_kotlin.$_$.y4;
  var Continuation = kotlin_kotlin.$_$.na;
  var fillArrayVal = kotlin_kotlin.$_$.ob;
  var intercepted = kotlin_kotlin.$_$.ha;
  var toList = kotlin_kotlin.$_$.r9;
  var isNaN_0 = kotlin_kotlin.$_$.yi;
  var numberToLong = kotlin_kotlin.$_$.rc;
  var IllegalStateException = kotlin_kotlin.$_$.th;
  var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.z1;
  var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.g3;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.bj;
  //endregion
  //region block: pre-declaration
  setMetadataFor(AttributeKey, 'AttributeKey', classMeta);
  function get(key) {
    var tmp0_elvis_lhs = this.h2l(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$('No instance for key ' + key);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  setMetadataFor(Attributes, 'Attributes', interfaceMeta);
  setMetadataFor($toByteArrayCOROUTINE$0, '$toByteArrayCOROUTINE$0', classMeta, CoroutineImpl);
  setMetadataFor(CaseInsensitiveMap, 'CaseInsensitiveMap', classMeta, VOID, [MutableMap], CaseInsensitiveMap);
  setMetadataFor(Entry_0, 'Entry', classMeta, VOID, [Entry]);
  setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, AbstractCoroutineContextElement, [AbstractCoroutineContextElement, Element]);
  setMetadataFor(DelegatingMutableSet$iterator$1, VOID, classMeta, VOID, [Iterator]);
  setMetadataFor(DelegatingMutableSet, 'DelegatingMutableSet', classMeta, VOID, [MutableSet]);
  setMetadataFor(Platform, 'Platform', classMeta, Enum);
  setMetadataFor(PlatformUtils, 'PlatformUtils', objectMeta);
  function get_0(name) {
    var tmp0_safe_receiver = this.a2n(name);
    return tmp0_safe_receiver == null ? null : firstOrNull(tmp0_safe_receiver);
  }
  function forEach(body) {
    var tmp0_iterator = this.c2n().w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.ktor.util.StringValues.forEach.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var k = element.s2();
      // Inline function 'kotlin.collections.component2' call
      var v = element.t2();
      body(k, v);
    }
    return Unit_instance;
  }
  setMetadataFor(StringValues, 'StringValues', interfaceMeta);
  setMetadataFor(StringValuesBuilderImpl, 'StringValuesBuilderImpl', classMeta, VOID, VOID, StringValuesBuilderImpl);
  setMetadataFor(StringValuesImpl, 'StringValuesImpl', classMeta, VOID, [StringValues], StringValuesImpl);
  setMetadataFor(CaseInsensitiveString, 'CaseInsensitiveString', classMeta);
  setMetadataFor(CopyOnWriteHashMap, 'CopyOnWriteHashMap', classMeta, VOID, VOID, CopyOnWriteHashMap);
  setMetadataFor(Companion, 'Companion', objectMeta);
  setMetadataFor(GMTDate, 'GMTDate', classMeta, VOID, [Comparable]);
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(WeekDay, 'WeekDay', classMeta, Enum);
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor(Month, 'Month', classMeta, Enum);
  setMetadataFor($proceedLoopCOROUTINE$1, '$proceedLoopCOROUTINE$1', classMeta, CoroutineImpl);
  setMetadataFor(PipelineContext, 'PipelineContext', classMeta, VOID, [CoroutineScope], VOID, VOID, VOID, [1, 0]);
  setMetadataFor(DebugPipelineContext, 'DebugPipelineContext', classMeta, PipelineContext, VOID, VOID, VOID, VOID, [1, 0]);
  setMetadataFor(Companion_2, 'Companion', objectMeta);
  setMetadataFor(PhaseContent, 'PhaseContent', classMeta);
  setMetadataFor(Pipeline, 'Pipeline', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(PipelinePhase, 'PipelinePhase', classMeta);
  setMetadataFor(InvalidPhaseException, 'InvalidPhaseException', classMeta, Error);
  setMetadataFor(PipelinePhaseRelation, 'PipelinePhaseRelation', classMeta);
  setMetadataFor(After, 'After', classMeta, PipelinePhaseRelation);
  setMetadataFor(Before, 'Before', classMeta, PipelinePhaseRelation);
  setMetadataFor(Last, 'Last', objectMeta, PipelinePhaseRelation);
  setMetadataFor(SuspendFunctionGun$continuation$1, VOID, classMeta, VOID, [Continuation]);
  setMetadataFor(SuspendFunctionGun, 'SuspendFunctionGun', classMeta, PipelineContext, VOID, VOID, VOID, VOID, [0, 1]);
  setMetadataFor(TypeInfo, 'TypeInfo', classMeta);
  setMetadataFor(AttributesJs, 'AttributesJs', classMeta, VOID, [Attributes], AttributesJs);
  setMetadataFor(InvalidTimestampException, 'InvalidTimestampException', classMeta, IllegalStateException);
  setMetadataFor(KtorSimpleLogger$1, VOID, classMeta);
  setMetadataFor(LogLevel, 'LogLevel', classMeta, Enum);
  setMetadataFor(JsType, 'JsType', objectMeta);
  //endregion
  function AttributeKey(name) {
    this.f2l_1 = name;
    // Inline function 'kotlin.text.isEmpty' call
    var this_0 = this.f2l_1;
    if (charSequenceLength(this_0) === 0) {
      throw IllegalStateException_init_$Create$("Name can't be blank");
    }
  }
  protoOf(AttributeKey).toString = function () {
    return 'AttributeKey: ' + this.f2l_1;
  };
  protoOf(AttributeKey).equals = function (other) {
    if (this === other)
      return true;
    if (other == null ? true : !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
      return false;
    if (!(other instanceof AttributeKey))
      THROW_CCE();
    if (!(this.f2l_1 === other.f2l_1))
      return false;
    return true;
  };
  protoOf(AttributeKey).hashCode = function () {
    return getStringHashCode(this.f2l_1);
  };
  function Attributes() {
  }
  function putAll(_this__u8e3s4, other) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = other.m2l().w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.ktor.util.putAll.<anonymous>' call
      _this__u8e3s4.j2l(element instanceof AttributeKey ? element : THROW_CCE(), other.g2l(element));
    }
  }
  function get_BASE64_INVERSE_ALPHABET() {
    _init_properties_Base64_kt__ymmsz3();
    return BASE64_INVERSE_ALPHABET;
  }
  var BASE64_INVERSE_ALPHABET;
  function decodeBase64Bytes(_this__u8e3s4) {
    _init_properties_Base64_kt__ymmsz3();
    var tmp$ret$4;
    $l$block_0: {
      // Inline function 'io.ktor.utils.io.core.buildPacket' call
      // Inline function 'kotlin.contracts.contract' call
      var builder = new BytePacketBuilder();
      try {
        // Inline function 'io.ktor.util.decodeBase64Bytes.<anonymous>' call
        var tmp$ret$3;
        $l$block: {
          // Inline function 'kotlin.text.dropLastWhile' call
          var inductionVariable = get_lastIndex(_this__u8e3s4);
          if (0 <= inductionVariable)
            do {
              var index = inductionVariable;
              inductionVariable = inductionVariable + -1 | 0;
              // Inline function 'io.ktor.util.decodeBase64Bytes.<anonymous>.<anonymous>' call
              if (!(charSequenceGet(_this__u8e3s4, index) === _Char___init__impl__6a9atx(61))) {
                // Inline function 'kotlin.text.substring' call
                var endIndex = index + 1 | 0;
                // Inline function 'kotlin.js.asDynamic' call
                tmp$ret$3 = _this__u8e3s4.substring(0, endIndex);
                break $l$block;
              }
            }
             while (0 <= inductionVariable);
          tmp$ret$3 = '';
        }
        writeText(builder, tmp$ret$3);
        tmp$ret$4 = builder.f3();
        break $l$block_0;
      } catch ($p) {
        if ($p instanceof Error) {
          var t = $p;
          builder.qy();
          throw t;
        } else {
          throw $p;
        }
      }
    }
    return readBytes(decodeBase64Bytes_0(tmp$ret$4));
  }
  function decodeBase64Bytes_0(_this__u8e3s4) {
    _init_properties_Base64_kt__ymmsz3();
    var tmp$ret$4;
    $l$block: {
      // Inline function 'io.ktor.utils.io.core.buildPacket' call
      // Inline function 'kotlin.contracts.contract' call
      var builder = new BytePacketBuilder();
      try {
        // Inline function 'io.ktor.util.decodeBase64Bytes.<anonymous>' call
        var data = new Int8Array(4);
        while (_this__u8e3s4.r2a().c7(new Long(0, 0)) > 0) {
          var read = readAvailable(_this__u8e3s4, data);
          // Inline function 'kotlin.collections.foldIndexed' call
          var index = 0;
          var accumulator = 0;
          var inductionVariable = 0;
          var last = data.length;
          while (inductionVariable < last) {
            var element = data[inductionVariable];
            inductionVariable = inductionVariable + 1 | 0;
            // Inline function 'io.ktor.util.decodeBase64Bytes.<anonymous>.<anonymous>' call
            var tmp1 = index;
            index = tmp1 + 1 | 0;
            var result = accumulator;
            // Inline function 'io.ktor.util.fromBase64' call
            // Inline function 'kotlin.experimental.and' call
            var this_0 = toByte(_get_BASE64_INVERSE_ALPHABET_$accessor$1rlrljx_ynhlmj()[element & 255]);
            var other = _get_BASE64_MASK_$accessor$1rlrljx_e67tnp();
            accumulator = result | toByte(this_0 & other) << imul(3 - tmp1 | 0, 6);
          }
          var chunk = accumulator;
          var inductionVariable_0 = data.length - 2 | 0;
          var last_0 = data.length - read | 0;
          if (last_0 <= inductionVariable_0)
            do {
              var index_0 = inductionVariable_0;
              inductionVariable_0 = inductionVariable_0 + -1 | 0;
              var origin = chunk >> imul(8, index_0) & 255;
              builder.s2e(toByte(origin));
            }
             while (!(index_0 === last_0));
        }
        tmp$ret$4 = builder.f3();
        break $l$block;
      } catch ($p) {
        if ($p instanceof Error) {
          var t = $p;
          builder.qy();
          throw t;
        } else {
          throw $p;
        }
      }
    }
    return tmp$ret$4;
  }
  function encodeBase64(_this__u8e3s4) {
    _init_properties_Base64_kt__ymmsz3();
    var tmp$ret$0;
    $l$block: {
      // Inline function 'io.ktor.utils.io.core.buildPacket' call
      // Inline function 'kotlin.contracts.contract' call
      var builder = new BytePacketBuilder();
      try {
        // Inline function 'io.ktor.util.encodeBase64.<anonymous>' call
        writeText(builder, _this__u8e3s4);
        tmp$ret$0 = builder.f3();
        break $l$block;
      } catch ($p) {
        if ($p instanceof Error) {
          var t = $p;
          builder.qy();
          throw t;
        } else {
          throw $p;
        }
      }
    }
    return encodeBase64_0(tmp$ret$0);
  }
  function encodeBase64_0(_this__u8e3s4) {
    _init_properties_Base64_kt__ymmsz3();
    return encodeBase64_1(readBytes_0(_this__u8e3s4));
  }
  function encodeBase64_1(_this__u8e3s4) {
    _init_properties_Base64_kt__ymmsz3();
    var array = _this__u8e3s4;
    var position = 0;
    var writeOffset = 0;
    var charArray_0 = charArray((imul(_this__u8e3s4.length, 8) / 6 | 0) + 3 | 0);
    while ((position + 3 | 0) <= array.length) {
      var first = array[position];
      var second = array[position + 1 | 0];
      var third = array[position + 2 | 0];
      position = position + 3 | 0;
      var chunk = (first & 255) << 16 | (second & 255) << 8 | third & 255;
      var inductionVariable = 3;
      if (0 <= inductionVariable)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + -1 | 0;
          var char = chunk >> imul(6, index) & 63;
          var tmp1 = writeOffset;
          writeOffset = tmp1 + 1 | 0;
          // Inline function 'io.ktor.util.toBase64' call
          charArray_0[tmp1] = charSequenceGet(_get_BASE64_ALPHABET_$accessor$1rlrljx_834nh0(), char);
        }
         while (0 <= inductionVariable);
    }
    var remaining = array.length - position | 0;
    if (remaining === 0)
      return concatToString(charArray_0, 0, writeOffset);
    var tmp;
    if (remaining === 1) {
      tmp = (array[position] & 255) << 16 | 0 | 0;
    } else {
      tmp = (array[position] & 255) << 16 | (array[position + 1 | 0] & 255) << 8 | 0;
    }
    var chunk_0 = tmp;
    var padSize = imul(3 - remaining | 0, 8) / 6 | 0;
    var inductionVariable_0 = 3;
    if (padSize <= inductionVariable_0)
      do {
        var index_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + -1 | 0;
        var char_0 = chunk_0 >> imul(6, index_0) & 63;
        var tmp3 = writeOffset;
        writeOffset = tmp3 + 1 | 0;
        // Inline function 'io.ktor.util.toBase64' call
        charArray_0[tmp3] = charSequenceGet(_get_BASE64_ALPHABET_$accessor$1rlrljx_834nh0(), char_0);
      }
       while (!(index_0 === padSize));
    // Inline function 'kotlin.repeat' call
    // Inline function 'kotlin.contracts.contract' call
    var inductionVariable_1 = 0;
    if (inductionVariable_1 < padSize)
      do {
        var index_1 = inductionVariable_1;
        inductionVariable_1 = inductionVariable_1 + 1 | 0;
        // Inline function 'io.ktor.util.encodeBase64.<anonymous>' call
        var tmp0 = writeOffset;
        writeOffset = tmp0 + 1 | 0;
        charArray_0[tmp0] = _Char___init__impl__6a9atx(61);
      }
       while (inductionVariable_1 < padSize);
    return concatToString(charArray_0, 0, writeOffset);
  }
  function _get_BASE64_INVERSE_ALPHABET_$accessor$1rlrljx_ynhlmj() {
    _init_properties_Base64_kt__ymmsz3();
    return get_BASE64_INVERSE_ALPHABET();
  }
  function _get_BASE64_MASK_$accessor$1rlrljx_e67tnp() {
    _init_properties_Base64_kt__ymmsz3();
    return 63;
  }
  function _get_BASE64_ALPHABET_$accessor$1rlrljx_834nh0() {
    _init_properties_Base64_kt__ymmsz3();
    return 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  }
  var properties_initialized_Base64_kt_5g824v;
  function _init_properties_Base64_kt__ymmsz3() {
    if (!properties_initialized_Base64_kt_5g824v) {
      properties_initialized_Base64_kt_5g824v = true;
      var tmp = 0;
      var tmp_0 = new Int32Array(256);
      while (tmp < 256) {
        var tmp_1 = tmp;
        tmp_0[tmp_1] = indexOf(_get_BASE64_ALPHABET_$accessor$1rlrljx_834nh0(), numberToChar(tmp_1));
        tmp = tmp + 1 | 0;
      }
      BASE64_INVERSE_ALPHABET = tmp_0;
    }
  }
  function toByteArray(_this__u8e3s4, $completion) {
    var tmp = new $toByteArrayCOROUTINE$0(_this__u8e3s4, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $toByteArrayCOROUTINE$0(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.v2l_1 = _this__u8e3s4;
  }
  protoOf($toByteArrayCOROUTINE$0).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.v2l_1.y2c(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return readBytes_0(ARGUMENT);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function CaseInsensitiveMap$_get_keys_$lambda_ptzlqj($this$$receiver) {
    return $this$$receiver.w2l_1;
  }
  function CaseInsensitiveMap$_get_keys_$lambda_ptzlqj_0($this$$receiver) {
    return caseInsensitive($this$$receiver);
  }
  function CaseInsensitiveMap$_get_entries_$lambda_r32w19($this$$receiver) {
    return new Entry_0($this$$receiver.s2().w2l_1, $this$$receiver.t2());
  }
  function CaseInsensitiveMap$_get_entries_$lambda_r32w19_0($this$$receiver) {
    return new Entry_0(caseInsensitive($this$$receiver.s2()), $this$$receiver.t2());
  }
  function CaseInsensitiveMap() {
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.y2l_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(CaseInsensitiveMap).u = function () {
    return this.y2l_1.u();
  };
  protoOf(CaseInsensitiveMap).z2l = function (key) {
    return this.y2l_1.r(new CaseInsensitiveString(key));
  };
  protoOf(CaseInsensitiveMap).r = function (key) {
    if (!(!(key == null) ? typeof key === 'string' : false))
      return false;
    return this.z2l((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
  };
  protoOf(CaseInsensitiveMap).ba = function (key) {
    return this.y2l_1.q(caseInsensitive(key));
  };
  protoOf(CaseInsensitiveMap).q = function (key) {
    if (!(!(key == null) ? typeof key === 'string' : false))
      return null;
    return this.ba((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
  };
  protoOf(CaseInsensitiveMap).c1 = function () {
    return this.y2l_1.c1();
  };
  protoOf(CaseInsensitiveMap).n1 = function () {
    this.y2l_1.n1();
  };
  protoOf(CaseInsensitiveMap).a2m = function (key, value) {
    return this.y2l_1.s(caseInsensitive(key), value);
  };
  protoOf(CaseInsensitiveMap).s = function (key, value) {
    var tmp = (!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE();
    return this.a2m(tmp, !(value == null) ? value : THROW_CCE());
  };
  protoOf(CaseInsensitiveMap).b2m = function (from) {
    // Inline function 'kotlin.collections.forEach' call
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = from.q2().w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.ktor.util.CaseInsensitiveMap.putAll.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var key = element.s2();
      // Inline function 'kotlin.collections.component2' call
      var value = element.t2();
      this.a2m(key, value);
    }
  };
  protoOf(CaseInsensitiveMap).r2 = function (from) {
    return this.b2m(from);
  };
  protoOf(CaseInsensitiveMap).c2m = function (key) {
    return this.y2l_1.u2(caseInsensitive(key));
  };
  protoOf(CaseInsensitiveMap).u2 = function (key) {
    if (!(!(key == null) ? typeof key === 'string' : false))
      return null;
    return this.c2m((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
  };
  protoOf(CaseInsensitiveMap).o2 = function () {
    var tmp = this.y2l_1.o2();
    var tmp_0 = CaseInsensitiveMap$_get_keys_$lambda_ptzlqj;
    return new DelegatingMutableSet(tmp, tmp_0, CaseInsensitiveMap$_get_keys_$lambda_ptzlqj_0);
  };
  protoOf(CaseInsensitiveMap).q2 = function () {
    var tmp = this.y2l_1.q2();
    var tmp_0 = CaseInsensitiveMap$_get_entries_$lambda_r32w19;
    return new DelegatingMutableSet(tmp, tmp_0, CaseInsensitiveMap$_get_entries_$lambda_r32w19_0);
  };
  protoOf(CaseInsensitiveMap).p2 = function () {
    return this.y2l_1.p2();
  };
  protoOf(CaseInsensitiveMap).equals = function (other) {
    var tmp;
    if (other == null) {
      tmp = true;
    } else {
      tmp = !(other instanceof CaseInsensitiveMap);
    }
    if (tmp)
      return false;
    return equals(other.y2l_1, this.y2l_1);
  };
  protoOf(CaseInsensitiveMap).hashCode = function () {
    return hashCode(this.y2l_1);
  };
  function Entry_0(key, value) {
    this.d2m_1 = key;
    this.e2m_1 = value;
  }
  protoOf(Entry_0).s2 = function () {
    return this.d2m_1;
  };
  protoOf(Entry_0).t2 = function () {
    return this.e2m_1;
  };
  protoOf(Entry_0).hashCode = function () {
    return (527 + hashCode(ensureNotNull(this.d2m_1)) | 0) + hashCode(ensureNotNull(this.e2m_1)) | 0;
  };
  protoOf(Entry_0).equals = function (other) {
    var tmp;
    if (other == null) {
      tmp = true;
    } else {
      tmp = !(!(other == null) ? isInterface(other, Entry) : false);
    }
    if (tmp)
      return false;
    return equals(other.s2(), this.d2m_1) ? equals(other.t2(), this.e2m_1) : false;
  };
  protoOf(Entry_0).toString = function () {
    return '' + this.d2m_1 + '=' + this.e2m_1;
  };
  function toCharArray(_this__u8e3s4) {
    var tmp = 0;
    var tmp_0 = _this__u8e3s4.length;
    var tmp_1 = charArray(tmp_0);
    while (tmp < tmp_0) {
      var tmp_2 = tmp;
      tmp_1[tmp_2] = charSequenceGet(_this__u8e3s4, tmp_2);
      tmp = tmp + 1 | 0;
    }
    return tmp_1;
  }
  function isLowerCase(_this__u8e3s4) {
    // Inline function 'kotlin.text.lowercaseChar' call
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$2 = toString(_this__u8e3s4).toLowerCase();
    return charSequenceGet(tmp$ret$2, 0) === _this__u8e3s4;
  }
  function caseInsensitiveMap() {
    return new CaseInsensitiveMap();
  }
  function SilentSupervisor(parent) {
    parent = parent === VOID ? null : parent;
    var tmp = SupervisorJob(parent);
    // Inline function 'kotlinx.coroutines.CoroutineExceptionHandler' call
    var tmp$ret$0 = new _no_name_provided__qut3iv();
    return tmp.lj(tmp$ret$0);
  }
  function _no_name_provided__qut3iv() {
    AbstractCoroutineContextElement.call(this, Key_instance);
  }
  protoOf(_no_name_provided__qut3iv).ry = function (context, exception) {
    // Inline function 'io.ktor.util.SilentSupervisor.<anonymous>' call
    return Unit_instance;
  };
  function DelegatingMutableSet$iterator$1(this$0) {
    this.h2m_1 = this$0;
    this.g2m_1 = this$0.i2m_1.w();
  }
  protoOf(DelegatingMutableSet$iterator$1).f = function () {
    return this.g2m_1.f();
  };
  protoOf(DelegatingMutableSet$iterator$1).e = function () {
    return this.h2m_1.j2m_1(this.g2m_1.e());
  };
  protoOf(DelegatingMutableSet$iterator$1).l1 = function () {
    return this.g2m_1.l1();
  };
  function DelegatingMutableSet(delegate, convertTo, convert) {
    this.i2m_1 = delegate;
    this.j2m_1 = convertTo;
    this.k2m_1 = convert;
    this.l2m_1 = this.i2m_1.u();
  }
  protoOf(DelegatingMutableSet).m2m = function (_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'io.ktor.util.DelegatingMutableSet.convert.<anonymous>' call
      var tmp$ret$0 = this.k2m_1(item);
      destination.i1(tmp$ret$0);
    }
    return destination;
  };
  protoOf(DelegatingMutableSet).n2m = function (_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'io.ktor.util.DelegatingMutableSet.convertTo.<anonymous>' call
      var tmp$ret$0 = this.j2m_1(item);
      destination.i1(tmp$ret$0);
    }
    return destination;
  };
  protoOf(DelegatingMutableSet).u = function () {
    return this.l2m_1;
  };
  protoOf(DelegatingMutableSet).o2m = function (element) {
    return this.i2m_1.i1(this.k2m_1(element));
  };
  protoOf(DelegatingMutableSet).i1 = function (element) {
    return this.o2m((element == null ? true : !(element == null)) ? element : THROW_CCE());
  };
  protoOf(DelegatingMutableSet).p2m = function (elements) {
    return this.i2m_1.m1(this.m2m(elements));
  };
  protoOf(DelegatingMutableSet).m1 = function (elements) {
    return this.p2m(elements);
  };
  protoOf(DelegatingMutableSet).n1 = function () {
    this.i2m_1.n1();
  };
  protoOf(DelegatingMutableSet).q2m = function (element) {
    return this.i2m_1.j1(this.k2m_1(element));
  };
  protoOf(DelegatingMutableSet).j1 = function (element) {
    if (!(element == null ? true : !(element == null)))
      return false;
    return this.q2m((element == null ? true : !(element == null)) ? element : THROW_CCE());
  };
  protoOf(DelegatingMutableSet).r2m = function (element) {
    return this.i2m_1.a1(this.k2m_1(element));
  };
  protoOf(DelegatingMutableSet).a1 = function (element) {
    if (!(element == null ? true : !(element == null)))
      return false;
    return this.r2m((element == null ? true : !(element == null)) ? element : THROW_CCE());
  };
  protoOf(DelegatingMutableSet).s2m = function (elements) {
    return this.i2m_1.b1(this.m2m(elements));
  };
  protoOf(DelegatingMutableSet).b1 = function (elements) {
    return this.s2m(elements);
  };
  protoOf(DelegatingMutableSet).c1 = function () {
    return this.i2m_1.c1();
  };
  protoOf(DelegatingMutableSet).w = function () {
    return new DelegatingMutableSet$iterator$1(this);
  };
  protoOf(DelegatingMutableSet).hashCode = function () {
    return hashCode(this.i2m_1);
  };
  protoOf(DelegatingMutableSet).equals = function (other) {
    var tmp;
    if (other == null) {
      tmp = true;
    } else {
      tmp = !(!(other == null) ? isInterface(other, Set) : false);
    }
    if (tmp)
      return false;
    var elements = this.n2m(this.i2m_1);
    var tmp_0;
    if (other.b1(elements)) {
      // Inline function 'kotlin.collections.containsAll' call
      tmp_0 = elements.b1(other);
    } else {
      tmp_0 = false;
    }
    return tmp_0;
  };
  protoOf(DelegatingMutableSet).toString = function () {
    return toString_0(this.n2m(this.i2m_1));
  };
  var Platform_Jvm_instance;
  var Platform_Native_instance;
  var Platform_Browser_instance;
  var Platform_Node_instance;
  var Platform_entriesInitialized;
  function Platform_initEntries() {
    if (Platform_entriesInitialized)
      return Unit_instance;
    Platform_entriesInitialized = true;
    Platform_Jvm_instance = new Platform('Jvm', 0);
    Platform_Native_instance = new Platform('Native', 1);
    Platform_Browser_instance = new Platform('Browser', 2);
    Platform_Node_instance = new Platform('Node', 3);
  }
  function Platform(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function PlatformUtils() {
    PlatformUtils_instance = this;
    this.t2m_1 = get_platform(this).equals(Platform_Browser_getInstance());
    this.u2m_1 = get_platform(this).equals(Platform_Node_getInstance());
    this.v2m_1 = get_platform(this).equals(Platform_Jvm_getInstance());
    this.w2m_1 = get_platform(this).equals(Platform_Native_getInstance());
    this.x2m_1 = get_isDevelopmentMode(this);
    this.y2m_1 = get_isNewMemoryModel(this);
  }
  var PlatformUtils_instance;
  function PlatformUtils_getInstance() {
    if (PlatformUtils_instance == null)
      new PlatformUtils();
    return PlatformUtils_instance;
  }
  function Platform_Jvm_getInstance() {
    Platform_initEntries();
    return Platform_Jvm_instance;
  }
  function Platform_Native_getInstance() {
    Platform_initEntries();
    return Platform_Native_instance;
  }
  function Platform_Browser_getInstance() {
    Platform_initEntries();
    return Platform_Browser_instance;
  }
  function Platform_Node_getInstance() {
    Platform_initEntries();
    return Platform_Node_instance;
  }
  function StringValues() {
  }
  function ensureListForKey($this, name) {
    var tmp0_elvis_lhs = $this.f2n_1.q(name);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.collections.mutableListOf' call
      var this_0 = ArrayList_init_$Create$_0();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'io.ktor.util.StringValuesBuilderImpl.ensureListForKey.<anonymous>' call
      $this.g2n(name);
      // Inline function 'kotlin.collections.set' call
      $this.f2n_1.s(name, this_0);
      tmp = this_0;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function StringValuesBuilderImpl$appendAll$lambda(this$0) {
    return function (name, values) {
      this$0.h2n(name, values);
      return Unit_instance;
    };
  }
  function StringValuesBuilderImpl(caseInsensitiveName, size) {
    caseInsensitiveName = caseInsensitiveName === VOID ? false : caseInsensitiveName;
    size = size === VOID ? 8 : size;
    this.e2n_1 = caseInsensitiveName;
    this.f2n_1 = this.e2n_1 ? caseInsensitiveMap() : LinkedHashMap_init_$Create$_0(size);
  }
  protoOf(StringValuesBuilderImpl).z2m = function () {
    return this.e2n_1;
  };
  protoOf(StringValuesBuilderImpl).a2n = function (name) {
    return this.f2n_1.q(name);
  };
  protoOf(StringValuesBuilderImpl).i2n = function (name, value) {
    var tmp0_safe_receiver = this.f2n_1.q(name);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1(value);
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(StringValuesBuilderImpl).b2n = function () {
    return this.f2n_1.o2();
  };
  protoOf(StringValuesBuilderImpl).c1 = function () {
    return this.f2n_1.c1();
  };
  protoOf(StringValuesBuilderImpl).c2n = function () {
    return unmodifiable(this.f2n_1.q2());
  };
  protoOf(StringValuesBuilderImpl).j2n = function (name, value) {
    this.k2n(value);
    var list = ensureListForKey(this, name);
    list.n1();
    list.i1(value);
  };
  protoOf(StringValuesBuilderImpl).ba = function (name) {
    var tmp0_safe_receiver = this.a2n(name);
    return tmp0_safe_receiver == null ? null : firstOrNull(tmp0_safe_receiver);
  };
  protoOf(StringValuesBuilderImpl).l2n = function (name, value) {
    this.k2n(value);
    ensureListForKey(this, name).i1(value);
  };
  protoOf(StringValuesBuilderImpl).m2n = function (stringValues) {
    stringValues.d2n(StringValuesBuilderImpl$appendAll$lambda(this));
  };
  protoOf(StringValuesBuilderImpl).h2n = function (name, values) {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    var list = ensureListForKey(this, name);
    var tmp0_iterator = values.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.ktor.util.StringValuesBuilderImpl.appendAll.<anonymous>.<anonymous>' call
      this.k2n(element);
      list.i1(element);
    }
  };
  protoOf(StringValuesBuilderImpl).n2n = function (name) {
    this.f2n_1.u2(name);
  };
  protoOf(StringValuesBuilderImpl).n1 = function () {
    this.f2n_1.n1();
  };
  protoOf(StringValuesBuilderImpl).g2n = function (name) {
  };
  protoOf(StringValuesBuilderImpl).k2n = function (value) {
  };
  function listForKey($this, name) {
    return $this.p2n_1.q(name);
  }
  function StringValuesImpl(caseInsensitiveName, values) {
    caseInsensitiveName = caseInsensitiveName === VOID ? false : caseInsensitiveName;
    values = values === VOID ? emptyMap() : values;
    this.o2n_1 = caseInsensitiveName;
    var tmp;
    if (this.o2n_1) {
      tmp = caseInsensitiveMap();
    } else {
      // Inline function 'kotlin.collections.mutableMapOf' call
      tmp = LinkedHashMap_init_$Create$();
    }
    var newMap = tmp;
    // Inline function 'kotlin.collections.forEach' call
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = values.q2().w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.ktor.util.StringValuesImpl.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var key = element.s2();
      // Inline function 'kotlin.collections.component2' call
      var value = element.t2();
      // Inline function 'kotlin.collections.set' call
      // Inline function 'kotlin.collections.List' call
      // Inline function 'kotlin.collections.MutableList' call
      var size = value.u();
      var list = ArrayList_init_$Create$(size);
      // Inline function 'kotlin.repeat' call
      // Inline function 'kotlin.contracts.contract' call
      var inductionVariable = 0;
      if (inductionVariable < size)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'kotlin.collections.MutableList.<anonymous>' call
          // Inline function 'io.ktor.util.StringValuesImpl.<anonymous>.<anonymous>' call
          var tmp$ret$4 = value.v(index);
          list.i1(tmp$ret$4);
        }
         while (inductionVariable < size);
      newMap.s(key, list);
    }
    this.p2n_1 = newMap;
  }
  protoOf(StringValuesImpl).z2m = function () {
    return this.o2n_1;
  };
  protoOf(StringValuesImpl).ba = function (name) {
    var tmp0_safe_receiver = listForKey(this, name);
    return tmp0_safe_receiver == null ? null : firstOrNull(tmp0_safe_receiver);
  };
  protoOf(StringValuesImpl).a2n = function (name) {
    return listForKey(this, name);
  };
  protoOf(StringValuesImpl).b2n = function () {
    return unmodifiable(this.p2n_1.o2());
  };
  protoOf(StringValuesImpl).c1 = function () {
    return this.p2n_1.c1();
  };
  protoOf(StringValuesImpl).c2n = function () {
    return unmodifiable(this.p2n_1.q2());
  };
  protoOf(StringValuesImpl).d2n = function (body) {
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = this.p2n_1.q2().w();
    while (tmp0_iterator.f()) {
      var tmp1_loop_parameter = tmp0_iterator.e();
      // Inline function 'kotlin.collections.component1' call
      var key = tmp1_loop_parameter.s2();
      // Inline function 'kotlin.collections.component2' call
      var value = tmp1_loop_parameter.t2();
      body(key, value);
    }
  };
  protoOf(StringValuesImpl).toString = function () {
    return 'StringValues(case=' + !this.o2n_1 + ') ' + this.c2n();
  };
  protoOf(StringValuesImpl).equals = function (other) {
    if (this === other)
      return true;
    if (!(!(other == null) ? isInterface(other, StringValues) : false))
      return false;
    if (!(this.o2n_1 === other.z2m()))
      return false;
    return entriesEquals(this.c2n(), other.c2n());
  };
  protoOf(StringValuesImpl).hashCode = function () {
    return entriesHashCode(this.c2n(), imul(31, getBooleanHashCode(this.o2n_1)));
  };
  function appendAll(_this__u8e3s4, builder) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'io.ktor.util.appendAll.<anonymous>' call
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = builder.c2n().w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.ktor.util.appendAll.<anonymous>.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var name = element.s2();
      // Inline function 'kotlin.collections.component2' call
      var values = element.t2();
      _this__u8e3s4.h2n(name, values);
    }
    return _this__u8e3s4;
  }
  function entriesEquals(a, b) {
    return equals(a, b);
  }
  function entriesHashCode(entries, seed) {
    return imul(seed, 31) + hashCode(entries) | 0;
  }
  function toLowerCasePreservingASCIIRules(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.text.indexOfFirst' call
      var inductionVariable = 0;
      var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (inductionVariable <= last)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'io.ktor.util.toLowerCasePreservingASCIIRules.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!(toLowerCasePreservingASCII(it) === it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var firstIndex = tmp$ret$1;
    if (firstIndex === -1) {
      return _this__u8e3s4;
    }
    var original = _this__u8e3s4;
    // Inline function 'kotlin.text.buildString' call
    var capacity = _this__u8e3s4.length;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$(capacity);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'io.ktor.util.toLowerCasePreservingASCIIRules.<anonymous>' call
    this_0.s8(original, 0, firstIndex);
    var inductionVariable_0 = firstIndex;
    var last_0 = get_lastIndex(original);
    if (inductionVariable_0 <= last_0)
      do {
        var index_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + 1 | 0;
        this_0.z5(toLowerCasePreservingASCII(charSequenceGet(original, index_0)));
      }
       while (!(index_0 === last_0));
    return this_0.toString();
  }
  function toLowerCasePreservingASCII(ch) {
    var tmp;
    if (_Char___init__impl__6a9atx(65) <= ch ? ch <= _Char___init__impl__6a9atx(90) : false) {
      tmp = Char__plus_impl_qi7pgj(ch, 32);
    } else if (_Char___init__impl__6a9atx(0) <= ch ? ch <= _Char___init__impl__6a9atx(127) : false) {
      tmp = ch;
    } else {
      // Inline function 'kotlin.text.lowercaseChar' call
      // Inline function 'kotlin.text.lowercase' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$2 = toString(ch).toLowerCase();
      tmp = charSequenceGet(tmp$ret$2, 0);
    }
    return tmp;
  }
  function CaseInsensitiveString(content) {
    this.w2l_1 = content;
    var tmp = this;
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$1 = this.w2l_1.toLowerCase();
    tmp.x2l_1 = getStringHashCode(tmp$ret$1);
  }
  protoOf(CaseInsensitiveString).equals = function (other) {
    var tmp0_safe_receiver = other instanceof CaseInsensitiveString ? other : null;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w2l_1;
    return (tmp1_safe_receiver == null ? null : equals_0(tmp1_safe_receiver, this.w2l_1, true)) === true;
  };
  protoOf(CaseInsensitiveString).hashCode = function () {
    return this.x2l_1;
  };
  protoOf(CaseInsensitiveString).toString = function () {
    return this.w2l_1;
  };
  function caseInsensitive(_this__u8e3s4) {
    return new CaseInsensitiveString(_this__u8e3s4);
  }
  function CopyOnWriteHashMap() {
    this.q2n_1 = atomic$ref$1(emptyMap());
  }
  protoOf(CopyOnWriteHashMap).r2n = function (key) {
    return this.q2n_1.kotlinx$atomicfu$value.q(key);
  };
  function Companion() {
    Companion_instance_0 = this;
    this.s2n_1 = GMTDate_0(new Long(0, 0));
  }
  var Companion_instance_0;
  function Companion_getInstance() {
    if (Companion_instance_0 == null)
      new Companion();
    return Companion_instance_0;
  }
  function GMTDate(seconds, minutes, hours, dayOfWeek, dayOfMonth, dayOfYear, month, year, timestamp) {
    Companion_getInstance();
    this.t2n_1 = seconds;
    this.u2n_1 = minutes;
    this.v2n_1 = hours;
    this.w2n_1 = dayOfWeek;
    this.x2n_1 = dayOfMonth;
    this.y2n_1 = dayOfYear;
    this.z2n_1 = month;
    this.a2o_1 = year;
    this.b2o_1 = timestamp;
  }
  protoOf(GMTDate).c2o = function (other) {
    return this.b2o_1.c7(other.b2o_1);
  };
  protoOf(GMTDate).d = function (other) {
    return this.c2o(other instanceof GMTDate ? other : THROW_CCE());
  };
  protoOf(GMTDate).toString = function () {
    return 'GMTDate(seconds=' + this.t2n_1 + ', minutes=' + this.u2n_1 + ', hours=' + this.v2n_1 + ', dayOfWeek=' + this.w2n_1 + ', dayOfMonth=' + this.x2n_1 + ', dayOfYear=' + this.y2n_1 + ', month=' + this.z2n_1 + ', year=' + this.a2o_1 + ', timestamp=' + this.b2o_1.toString() + ')';
  };
  protoOf(GMTDate).hashCode = function () {
    var result = this.t2n_1;
    result = imul(result, 31) + this.u2n_1 | 0;
    result = imul(result, 31) + this.v2n_1 | 0;
    result = imul(result, 31) + this.w2n_1.hashCode() | 0;
    result = imul(result, 31) + this.x2n_1 | 0;
    result = imul(result, 31) + this.y2n_1 | 0;
    result = imul(result, 31) + this.z2n_1.hashCode() | 0;
    result = imul(result, 31) + this.a2o_1 | 0;
    result = imul(result, 31) + this.b2o_1.hashCode() | 0;
    return result;
  };
  protoOf(GMTDate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof GMTDate))
      return false;
    var tmp0_other_with_cast = other instanceof GMTDate ? other : THROW_CCE();
    if (!(this.t2n_1 === tmp0_other_with_cast.t2n_1))
      return false;
    if (!(this.u2n_1 === tmp0_other_with_cast.u2n_1))
      return false;
    if (!(this.v2n_1 === tmp0_other_with_cast.v2n_1))
      return false;
    if (!this.w2n_1.equals(tmp0_other_with_cast.w2n_1))
      return false;
    if (!(this.x2n_1 === tmp0_other_with_cast.x2n_1))
      return false;
    if (!(this.y2n_1 === tmp0_other_with_cast.y2n_1))
      return false;
    if (!this.z2n_1.equals(tmp0_other_with_cast.z2n_1))
      return false;
    if (!(this.a2o_1 === tmp0_other_with_cast.a2o_1))
      return false;
    if (!this.b2o_1.equals(tmp0_other_with_cast.b2o_1))
      return false;
    return true;
  };
  var WeekDay_MONDAY_instance;
  var WeekDay_TUESDAY_instance;
  var WeekDay_WEDNESDAY_instance;
  var WeekDay_THURSDAY_instance;
  var WeekDay_FRIDAY_instance;
  var WeekDay_SATURDAY_instance;
  var WeekDay_SUNDAY_instance;
  function Companion_0() {
  }
  protoOf(Companion_0).d2o = function (ordinal) {
    return values()[ordinal];
  };
  var Companion_instance_1;
  function Companion_getInstance_0() {
    return Companion_instance_1;
  }
  function values() {
    return [WeekDay_MONDAY_getInstance(), WeekDay_TUESDAY_getInstance(), WeekDay_WEDNESDAY_getInstance(), WeekDay_THURSDAY_getInstance(), WeekDay_FRIDAY_getInstance(), WeekDay_SATURDAY_getInstance(), WeekDay_SUNDAY_getInstance()];
  }
  var WeekDay_entriesInitialized;
  function WeekDay_initEntries() {
    if (WeekDay_entriesInitialized)
      return Unit_instance;
    WeekDay_entriesInitialized = true;
    WeekDay_MONDAY_instance = new WeekDay('MONDAY', 0, 'Mon');
    WeekDay_TUESDAY_instance = new WeekDay('TUESDAY', 1, 'Tue');
    WeekDay_WEDNESDAY_instance = new WeekDay('WEDNESDAY', 2, 'Wed');
    WeekDay_THURSDAY_instance = new WeekDay('THURSDAY', 3, 'Thu');
    WeekDay_FRIDAY_instance = new WeekDay('FRIDAY', 4, 'Fri');
    WeekDay_SATURDAY_instance = new WeekDay('SATURDAY', 5, 'Sat');
    WeekDay_SUNDAY_instance = new WeekDay('SUNDAY', 6, 'Sun');
  }
  function WeekDay(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.g2o_1 = value;
  }
  var Month_JANUARY_instance;
  var Month_FEBRUARY_instance;
  var Month_MARCH_instance;
  var Month_APRIL_instance;
  var Month_MAY_instance;
  var Month_JUNE_instance;
  var Month_JULY_instance;
  var Month_AUGUST_instance;
  var Month_SEPTEMBER_instance;
  var Month_OCTOBER_instance;
  var Month_NOVEMBER_instance;
  var Month_DECEMBER_instance;
  function Companion_1() {
  }
  protoOf(Companion_1).d2o = function (ordinal) {
    return values_0()[ordinal];
  };
  var Companion_instance_2;
  function Companion_getInstance_1() {
    return Companion_instance_2;
  }
  function values_0() {
    return [Month_JANUARY_getInstance(), Month_FEBRUARY_getInstance(), Month_MARCH_getInstance(), Month_APRIL_getInstance(), Month_MAY_getInstance(), Month_JUNE_getInstance(), Month_JULY_getInstance(), Month_AUGUST_getInstance(), Month_SEPTEMBER_getInstance(), Month_OCTOBER_getInstance(), Month_NOVEMBER_getInstance(), Month_DECEMBER_getInstance()];
  }
  var Month_entriesInitialized;
  function Month_initEntries() {
    if (Month_entriesInitialized)
      return Unit_instance;
    Month_entriesInitialized = true;
    Month_JANUARY_instance = new Month('JANUARY', 0, 'Jan');
    Month_FEBRUARY_instance = new Month('FEBRUARY', 1, 'Feb');
    Month_MARCH_instance = new Month('MARCH', 2, 'Mar');
    Month_APRIL_instance = new Month('APRIL', 3, 'Apr');
    Month_MAY_instance = new Month('MAY', 4, 'May');
    Month_JUNE_instance = new Month('JUNE', 5, 'Jun');
    Month_JULY_instance = new Month('JULY', 6, 'Jul');
    Month_AUGUST_instance = new Month('AUGUST', 7, 'Aug');
    Month_SEPTEMBER_instance = new Month('SEPTEMBER', 8, 'Sep');
    Month_OCTOBER_instance = new Month('OCTOBER', 9, 'Oct');
    Month_NOVEMBER_instance = new Month('NOVEMBER', 10, 'Nov');
    Month_DECEMBER_instance = new Month('DECEMBER', 11, 'Dec');
  }
  function Month(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.j2o_1 = value;
  }
  function WeekDay_MONDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_MONDAY_instance;
  }
  function WeekDay_TUESDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_TUESDAY_instance;
  }
  function WeekDay_WEDNESDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_WEDNESDAY_instance;
  }
  function WeekDay_THURSDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_THURSDAY_instance;
  }
  function WeekDay_FRIDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_FRIDAY_instance;
  }
  function WeekDay_SATURDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_SATURDAY_instance;
  }
  function WeekDay_SUNDAY_getInstance() {
    WeekDay_initEntries();
    return WeekDay_SUNDAY_instance;
  }
  function Month_JANUARY_getInstance() {
    Month_initEntries();
    return Month_JANUARY_instance;
  }
  function Month_FEBRUARY_getInstance() {
    Month_initEntries();
    return Month_FEBRUARY_instance;
  }
  function Month_MARCH_getInstance() {
    Month_initEntries();
    return Month_MARCH_instance;
  }
  function Month_APRIL_getInstance() {
    Month_initEntries();
    return Month_APRIL_instance;
  }
  function Month_MAY_getInstance() {
    Month_initEntries();
    return Month_MAY_instance;
  }
  function Month_JUNE_getInstance() {
    Month_initEntries();
    return Month_JUNE_instance;
  }
  function Month_JULY_getInstance() {
    Month_initEntries();
    return Month_JULY_instance;
  }
  function Month_AUGUST_getInstance() {
    Month_initEntries();
    return Month_AUGUST_instance;
  }
  function Month_SEPTEMBER_getInstance() {
    Month_initEntries();
    return Month_SEPTEMBER_instance;
  }
  function Month_OCTOBER_getInstance() {
    Month_initEntries();
    return Month_OCTOBER_instance;
  }
  function Month_NOVEMBER_getInstance() {
    Month_initEntries();
    return Month_NOVEMBER_instance;
  }
  function Month_DECEMBER_getInstance() {
    Month_initEntries();
    return Month_DECEMBER_instance;
  }
  function proceedLoop($this, $completion) {
    var tmp = new $proceedLoopCOROUTINE$1($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $proceedLoopCOROUTINE$1(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.s2o_1 = _this__u8e3s4;
  }
  protoOf($proceedLoopCOROUTINE$1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.t2o_1 = this.s2o_1.a2p_1;
            if (this.t2o_1 === -1) {
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            this.u2o_1 = this.s2o_1.x2o_1;
            if (this.t2o_1 >= this.u2o_1.u()) {
              this.s2o_1.b2p();
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.v2o_1 = this.u2o_1.v(this.t2o_1);
            this.s2o_1.a2p_1 = this.t2o_1 + 1 | 0;
            this.hd_1 = 4;
            var tmp_0 = this.v2o_1;
            suspendResult = (isSuspendFunction(tmp_0, 2) ? tmp_0 : THROW_CCE())(this.s2o_1, this.s2o_1.z2o_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 1;
            continue $sm;
          case 5:
            return this.s2o_1.z2o_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function DebugPipelineContext(context, interceptors, subject, coroutineContext) {
    PipelineContext.call(this, context);
    this.x2o_1 = interceptors;
    this.y2o_1 = coroutineContext;
    this.z2o_1 = subject;
    this.a2p_1 = 0;
  }
  protoOf(DebugPipelineContext).cq = function () {
    return this.y2o_1;
  };
  protoOf(DebugPipelineContext).c2p = function () {
    return this.z2o_1;
  };
  protoOf(DebugPipelineContext).b2p = function () {
    this.a2p_1 = -1;
  };
  protoOf(DebugPipelineContext).d2p = function (subject, $completion) {
    this.z2o_1 = subject;
    return this.e2p($completion);
  };
  protoOf(DebugPipelineContext).e2p = function ($completion) {
    var index = this.a2p_1;
    if (index < 0)
      return this.z2o_1;
    if (index >= this.x2o_1.u()) {
      this.b2p();
      return this.z2o_1;
    }
    return proceedLoop(this, $completion);
  };
  protoOf(DebugPipelineContext).f2p = function (initial, $completion) {
    this.a2p_1 = 0;
    this.z2o_1 = initial;
    return this.e2p($completion);
  };
  function PhaseContent_init_$Init$(phase, relation, $this) {
    var tmp = Companion_getInstance_2().g2p_1;
    PhaseContent.call($this, phase, relation, isInterface(tmp, MutableList) ? tmp : THROW_CCE());
    // Inline function 'kotlin.check' call
    // Inline function 'kotlin.contracts.contract' call
    if (!Companion_getInstance_2().g2p_1.c1()) {
      // Inline function 'io.ktor.util.pipeline.PhaseContent.<init>.<anonymous>' call
      var message = 'The shared empty array list has been modified';
      throw IllegalStateException_init_$Create$(toString_0(message));
    }
    return $this;
  }
  function PhaseContent_init_$Create$(phase, relation) {
    return PhaseContent_init_$Init$(phase, relation, objectCreate(protoOf(PhaseContent)));
  }
  function copyInterceptors($this) {
    $this.j2p_1 = $this.l2p();
    $this.k2p_1 = false;
  }
  function Companion_2() {
    Companion_instance_3 = this;
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.g2p_1 = ArrayList_init_$Create$_0();
  }
  var Companion_instance_3;
  function Companion_getInstance_2() {
    if (Companion_instance_3 == null)
      new Companion_2();
    return Companion_instance_3;
  }
  function PhaseContent(phase, relation, interceptors) {
    Companion_getInstance_2();
    this.h2p_1 = phase;
    this.i2p_1 = relation;
    this.j2p_1 = interceptors;
    this.k2p_1 = true;
  }
  protoOf(PhaseContent).t26 = function () {
    return this.j2p_1.c1();
  };
  protoOf(PhaseContent).u = function () {
    return this.j2p_1.u();
  };
  protoOf(PhaseContent).m2p = function (interceptor) {
    if (this.k2p_1) {
      copyInterceptors(this);
    }
    this.j2p_1.i1(interceptor);
  };
  protoOf(PhaseContent).n2p = function (destination) {
    var interceptors = this.j2p_1;
    if (destination instanceof ArrayList) {
      destination.g3(destination.u() + interceptors.u() | 0);
    }
    var inductionVariable = 0;
    var last = interceptors.u();
    if (inductionVariable < last)
      do {
        var index = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        destination.i1(interceptors.v(index));
      }
       while (inductionVariable < last);
  };
  protoOf(PhaseContent).o2p = function () {
    this.k2p_1 = true;
    return this.j2p_1;
  };
  protoOf(PhaseContent).l2p = function () {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.collections.mutableListOf' call
    var this_0 = ArrayList_init_$Create$_0();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'io.ktor.util.pipeline.PhaseContent.copiedInterceptors.<anonymous>' call
    this_0.m1(this.j2p_1);
    return this_0;
  };
  protoOf(PhaseContent).toString = function () {
    return 'Phase `' + this.h2p_1.p2p_1 + '`, ' + this.u() + ' handlers';
  };
  function _set_interceptors__wod97b($this, value) {
    $this.u2p_1.kotlinx$atomicfu$value = value;
  }
  function _get_interceptors__h4min7($this) {
    return $this.u2p_1.kotlinx$atomicfu$value;
  }
  function createContext($this, context, subject, coroutineContext) {
    return pipelineContextFor(context, sharedInterceptorsList($this), subject, coroutineContext, $this.x2p());
  }
  function findPhase($this, phase) {
    var phasesList = $this.s2p_1;
    var inductionVariable = 0;
    var last = phasesList.u();
    if (inductionVariable < last)
      do {
        var index = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var current = phasesList.v(index);
        if (current === phase) {
          var content = PhaseContent_init_$Create$(phase, Last_getInstance());
          phasesList.f1(index, content);
          return content;
        }
        var tmp;
        if (current instanceof PhaseContent) {
          tmp = current.h2p_1 === phase;
        } else {
          tmp = false;
        }
        if (tmp) {
          return current instanceof PhaseContent ? current : THROW_CCE();
        }
      }
       while (inductionVariable < last);
    return null;
  }
  function findPhaseIndex($this, phase) {
    var phasesList = $this.s2p_1;
    var inductionVariable = 0;
    var last = phasesList.u();
    if (inductionVariable < last)
      do {
        var index = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var current = phasesList.v(index);
        var tmp;
        if (current === phase) {
          tmp = true;
        } else {
          var tmp_0;
          if (current instanceof PhaseContent) {
            tmp_0 = current.h2p_1 === phase;
          } else {
            tmp_0 = false;
          }
          tmp = tmp_0;
        }
        if (tmp) {
          return index;
        }
      }
       while (inductionVariable < last);
    return -1;
  }
  function hasPhase($this, phase) {
    var phasesList = $this.s2p_1;
    var inductionVariable = 0;
    var last = phasesList.u();
    if (inductionVariable < last)
      do {
        var index = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var current = phasesList.v(index);
        var tmp;
        if (current === phase) {
          tmp = true;
        } else {
          var tmp_0;
          if (current instanceof PhaseContent) {
            tmp_0 = current.h2p_1 === phase;
          } else {
            tmp_0 = false;
          }
          tmp = tmp_0;
        }
        if (tmp) {
          return true;
        }
      }
       while (inductionVariable < last);
    return false;
  }
  function cacheInterceptors($this) {
    var interceptorsQuantity = $this.t2p_1;
    if (interceptorsQuantity === 0) {
      notSharedInterceptorsList($this, emptyList());
      return emptyList();
    }
    var phases = $this.s2p_1;
    if (interceptorsQuantity === 1) {
      var inductionVariable = 0;
      var last = get_lastIndex_0(phases);
      if (inductionVariable <= last)
        $l$loop_0: do {
          var phaseIndex = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          var tmp = phases.v(phaseIndex);
          var tmp1_elvis_lhs = tmp instanceof PhaseContent ? tmp : null;
          var tmp_0;
          if (tmp1_elvis_lhs == null) {
            continue $l$loop_0;
          } else {
            tmp_0 = tmp1_elvis_lhs;
          }
          var phaseContent = tmp_0;
          if (phaseContent.t26())
            continue $l$loop_0;
          var interceptors = phaseContent.o2p();
          setInterceptorsListFromPhase($this, phaseContent);
          return interceptors;
        }
         while (!(phaseIndex === last));
    }
    // Inline function 'kotlin.collections.mutableListOf' call
    var destination = ArrayList_init_$Create$_0();
    var inductionVariable_0 = 0;
    var last_0 = get_lastIndex_0(phases);
    if (inductionVariable_0 <= last_0)
      $l$loop_1: do {
        var phaseIndex_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + 1 | 0;
        var tmp_1 = phases.v(phaseIndex_0);
        var tmp3_elvis_lhs = tmp_1 instanceof PhaseContent ? tmp_1 : null;
        var tmp_2;
        if (tmp3_elvis_lhs == null) {
          continue $l$loop_1;
        } else {
          tmp_2 = tmp3_elvis_lhs;
        }
        var phase = tmp_2;
        phase.n2p(destination);
      }
       while (!(phaseIndex_0 === last_0));
    notSharedInterceptorsList($this, destination);
    return destination;
  }
  function sharedInterceptorsList($this) {
    if (_get_interceptors__h4min7($this) == null) {
      cacheInterceptors($this);
    }
    $this.v2p_1 = true;
    return ensureNotNull(_get_interceptors__h4min7($this));
  }
  function resetInterceptorsList($this) {
    _set_interceptors__wod97b($this, null);
    $this.v2p_1 = false;
    $this.w2p_1 = null;
  }
  function notSharedInterceptorsList($this, list) {
    _set_interceptors__wod97b($this, list);
    $this.v2p_1 = false;
    $this.w2p_1 = null;
  }
  function setInterceptorsListFromPhase($this, phaseContent) {
    _set_interceptors__wod97b($this, phaseContent.o2p());
    $this.v2p_1 = false;
    $this.w2p_1 = phaseContent.h2p_1;
  }
  function tryAddToPhaseFastPath($this, phase, block) {
    var currentInterceptors = _get_interceptors__h4min7($this);
    if ($this.s2p_1.c1() ? true : currentInterceptors == null) {
      return false;
    }
    var tmp;
    if ($this.v2p_1) {
      tmp = true;
    } else {
      tmp = !(!(currentInterceptors == null) ? isInterface(currentInterceptors, MutableList) : false);
    }
    if (tmp) {
      return false;
    }
    if (equals($this.w2p_1, phase)) {
      currentInterceptors.i1(block);
      return true;
    }
    if (equals(phase, last($this.s2p_1)) ? true : findPhaseIndex($this, phase) === get_lastIndex_0($this.s2p_1)) {
      ensureNotNull(findPhase($this, phase)).m2p(block);
      currentInterceptors.i1(block);
      return true;
    }
    return false;
  }
  function Pipeline(phases) {
    this.q2p_1 = AttributesJsFn(true);
    this.r2p_1 = false;
    this.s2p_1 = mutableListOf(phases.slice());
    this.t2p_1 = 0;
    this.u2p_1 = atomic$ref$1(null);
    this.v2p_1 = false;
    this.w2p_1 = null;
  }
  protoOf(Pipeline).x2p = function () {
    return this.r2p_1;
  };
  protoOf(Pipeline).y2p = function (context, subject, $completion) {
    // Inline function 'kotlin.js.getCoroutineContext' call
    var tmp$ret$0 = $completion.od();
    return createContext(this, context, subject, tmp$ret$0).f2p(subject, $completion);
  };
  protoOf(Pipeline).a2q = function (reference, phase) {
    if (hasPhase(this, phase))
      return Unit_instance;
    var index = findPhaseIndex(this, reference);
    if (index === -1) {
      throw new InvalidPhaseException('Phase ' + reference + ' was not registered for this pipeline');
    }
    var lastRelatedPhaseIndex = index;
    var inductionVariable = index + 1 | 0;
    var last = get_lastIndex_0(this.s2p_1);
    if (inductionVariable <= last)
      $l$loop_0: do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var tmp = this.s2p_1.v(i);
        var tmp1_safe_receiver = tmp instanceof PhaseContent ? tmp : null;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i2p_1;
        var tmp_0;
        if (tmp2_elvis_lhs == null) {
          break $l$loop_0;
        } else {
          tmp_0 = tmp2_elvis_lhs;
        }
        var relation = tmp_0;
        var tmp3_safe_receiver = relation instanceof After ? relation : null;
        var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.b2q_1;
        var tmp_1;
        if (tmp4_elvis_lhs == null) {
          continue $l$loop_0;
        } else {
          tmp_1 = tmp4_elvis_lhs;
        }
        var relatedTo = tmp_1;
        lastRelatedPhaseIndex = equals(relatedTo, reference) ? i : lastRelatedPhaseIndex;
      }
       while (!(i === last));
    this.s2p_1.c2(lastRelatedPhaseIndex + 1 | 0, PhaseContent_init_$Create$(phase, new After(reference)));
  };
  protoOf(Pipeline).c2q = function (reference, phase) {
    if (hasPhase(this, phase))
      return Unit_instance;
    var index = findPhaseIndex(this, reference);
    if (index === -1) {
      throw new InvalidPhaseException('Phase ' + reference + ' was not registered for this pipeline');
    }
    this.s2p_1.c2(index, PhaseContent_init_$Create$(phase, new Before(reference)));
  };
  protoOf(Pipeline).d2q = function (phase, block) {
    var tmp0_elvis_lhs = findPhase(this, phase);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw new InvalidPhaseException('Phase ' + phase + ' was not registered for this pipeline');
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var phaseContent = tmp;
    if (typeof block !== 'function')
      THROW_CCE();
    if (tryAddToPhaseFastPath(this, phase, block)) {
      this.t2p_1 = this.t2p_1 + 1 | 0;
      return Unit_instance;
    }
    phaseContent.m2p(block);
    this.t2p_1 = this.t2p_1 + 1 | 0;
    resetInterceptorsList(this);
    this.e2q();
  };
  protoOf(Pipeline).e2q = function () {
  };
  function PipelineContext(context) {
    this.z2p_1 = context;
  }
  function pipelineContextFor(context, interceptors, subject, coroutineContext, debugMode) {
    debugMode = debugMode === VOID ? false : debugMode;
    var tmp;
    if (get_DISABLE_SFG() ? true : debugMode) {
      tmp = new DebugPipelineContext(context, interceptors, subject, coroutineContext);
    } else {
      tmp = new SuspendFunctionGun(subject, context, interceptors);
    }
    return tmp;
  }
  function PipelinePhase(name) {
    this.p2p_1 = name;
  }
  protoOf(PipelinePhase).toString = function () {
    return "Phase('" + this.p2p_1 + "')";
  };
  function InvalidPhaseException(message) {
    extendThrowable(this, message);
    captureStack(this, InvalidPhaseException);
  }
  function After(relativeTo) {
    PipelinePhaseRelation.call(this);
    this.b2q_1 = relativeTo;
  }
  function Before(relativeTo) {
    PipelinePhaseRelation.call(this);
    this.f2q_1 = relativeTo;
  }
  function Last() {
    Last_instance = this;
    PipelinePhaseRelation.call(this);
  }
  var Last_instance;
  function Last_getInstance() {
    if (Last_instance == null)
      new Last();
    return Last_instance;
  }
  function PipelinePhaseRelation() {
  }
  function recoverStackTraceBridge(exception, continuation) {
    var tmp;
    try {
      tmp = withCause(recoverStackTrace(exception, continuation), exception.cause);
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var _ = $p;
        tmp_0 = exception;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function loop($this, direct) {
    do {
      var currentIndex = $this.m2q_1;
      if (currentIndex === $this.h2q_1.u()) {
        if (!direct) {
          // Inline function 'kotlin.Companion.success' call
          var value = $this.j2q_1;
          var tmp$ret$0 = _Result___init__impl__xyqfz8(value);
          resumeRootWith($this, tmp$ret$0);
          return false;
        }
        return true;
      }
      $this.m2q_1 = currentIndex + 1 | 0;
      var next = $this.h2q_1.v(currentIndex);
      try {
        var result = next($this, $this.j2q_1, $this.i2q_1);
        if (result === get_COROUTINE_SUSPENDED())
          return false;
      } catch ($p) {
        if ($p instanceof Error) {
          var cause = $p;
          // Inline function 'kotlin.Companion.failure' call
          var tmp$ret$1 = _Result___init__impl__xyqfz8(createFailure(cause));
          resumeRootWith($this, tmp$ret$1);
          return false;
        } else {
          throw $p;
        }
      }
    }
     while (true);
  }
  function resumeRootWith($this, result) {
    if ($this.l2q_1 < 0) {
      // Inline function 'kotlin.error' call
      var message = 'No more continuations to resume';
      throw IllegalStateException_init_$Create$(toString_0(message));
    }
    var next = ensureNotNull($this.k2q_1[$this.l2q_1]);
    var tmp1 = $this.l2q_1;
    $this.l2q_1 = tmp1 - 1 | 0;
    $this.k2q_1[tmp1] = null;
    if (!_Result___get_isFailure__impl__jpiriv(result)) {
      next.vd(result);
    } else {
      var exception = recoverStackTraceBridge(ensureNotNull(Result__exceptionOrNull_impl_p6xea9(result)), next);
      // Inline function 'kotlin.coroutines.resumeWithException' call
      // Inline function 'kotlin.Companion.failure' call
      var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(exception));
      next.vd(tmp$ret$0);
    }
  }
  function discardLastRootContinuation($this) {
    if ($this.l2q_1 < 0)
      throw IllegalStateException_init_$Create$('No more continuations to resume');
    var tmp1 = $this.l2q_1;
    $this.l2q_1 = tmp1 - 1 | 0;
    $this.k2q_1[tmp1] = null;
  }
  function addContinuation($this, continuation) {
    $this.l2q_1 = $this.l2q_1 + 1 | 0;
    $this.k2q_1[$this.l2q_1] = continuation;
  }
  function SuspendFunctionGun$continuation$1(this$0) {
    this.o2q_1 = this$0;
    this.n2q_1 = IntCompanionObject_instance.MIN_VALUE;
  }
  protoOf(SuspendFunctionGun$continuation$1).od = function () {
    var tmp0_safe_receiver = this.o2q_1.k2q_1[this.o2q_1.l2q_1];
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.od();
    var tmp;
    if (tmp1_elvis_lhs == null) {
      var message = 'Not started';
      throw IllegalStateException_init_$Create$(toString_0(message));
    } else {
      tmp = tmp1_elvis_lhs;
    }
    return tmp;
  };
  protoOf(SuspendFunctionGun$continuation$1).ng = function (result) {
    if (_Result___get_isFailure__impl__jpiriv(result)) {
      // Inline function 'kotlin.Companion.failure' call
      var exception = ensureNotNull(Result__exceptionOrNull_impl_p6xea9(result));
      var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(exception));
      resumeRootWith(this.o2q_1, tmp$ret$0);
      return Unit_instance;
    }
    loop(this.o2q_1, false);
  };
  protoOf(SuspendFunctionGun$continuation$1).vd = function (result) {
    return this.ng(result);
  };
  function SuspendFunctionGun(initial, context, blocks) {
    PipelineContext.call(this, context);
    this.h2q_1 = blocks;
    var tmp = this;
    tmp.i2q_1 = new SuspendFunctionGun$continuation$1(this);
    this.j2q_1 = initial;
    var tmp_0 = this;
    // Inline function 'kotlin.arrayOfNulls' call
    var size = this.h2q_1.u();
    tmp_0.k2q_1 = fillArrayVal(Array(size), null);
    this.l2q_1 = -1;
    this.m2q_1 = 0;
  }
  protoOf(SuspendFunctionGun).cq = function () {
    return this.i2q_1.od();
  };
  protoOf(SuspendFunctionGun).c2p = function () {
    return this.j2q_1;
  };
  protoOf(SuspendFunctionGun).e2p = function ($completion) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'io.ktor.util.pipeline.SuspendFunctionGun.proceed.<anonymous>' call
      if (this.m2q_1 === this.h2q_1.u()) {
        tmp$ret$0 = this.j2q_1;
        break $l$block_0;
      }
      addContinuation(this, intercepted($completion));
      if (loop(this, true)) {
        discardLastRootContinuation(this);
        tmp$ret$0 = this.j2q_1;
        break $l$block_0;
      }
      tmp$ret$0 = get_COROUTINE_SUSPENDED();
    }
    return tmp$ret$0;
  };
  protoOf(SuspendFunctionGun).d2p = function (subject, $completion) {
    this.j2q_1 = subject;
    return this.e2p($completion);
  };
  protoOf(SuspendFunctionGun).f2p = function (initial, $completion) {
    this.m2q_1 = 0;
    if (this.m2q_1 === this.h2q_1.u())
      return initial;
    this.j2q_1 = initial;
    if (this.l2q_1 >= 0)
      throw IllegalStateException_init_$Create$('Already started');
    return this.e2p($completion);
  };
  function TypeInfo(type, reifiedType, kotlinType) {
    kotlinType = kotlinType === VOID ? null : kotlinType;
    this.p2q_1 = type;
    this.q2q_1 = reifiedType;
    this.r2q_1 = kotlinType;
  }
  protoOf(TypeInfo).toString = function () {
    return 'TypeInfo(type=' + this.p2q_1 + ', reifiedType=' + this.q2q_1 + ', kotlinType=' + this.r2q_1 + ')';
  };
  protoOf(TypeInfo).hashCode = function () {
    var result = this.p2q_1.hashCode();
    result = imul(result, 31) + hashCode(this.q2q_1) | 0;
    result = imul(result, 31) + (this.r2q_1 == null ? 0 : hashCode(this.r2q_1)) | 0;
    return result;
  };
  protoOf(TypeInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TypeInfo))
      return false;
    var tmp0_other_with_cast = other instanceof TypeInfo ? other : THROW_CCE();
    if (!this.p2q_1.equals(tmp0_other_with_cast.p2q_1))
      return false;
    if (!equals(this.q2q_1, tmp0_other_with_cast.q2q_1))
      return false;
    if (!equals(this.r2q_1, tmp0_other_with_cast.r2q_1))
      return false;
    return true;
  };
  function AttributesJsFn(concurrent) {
    concurrent = concurrent === VOID ? false : concurrent;
    return new AttributesJs();
  }
  function AttributesJs() {
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.s2q_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(AttributesJs).h2l = function (key) {
    var tmp = this.s2q_1.q(key);
    return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
  };
  protoOf(AttributesJs).i2l = function (key) {
    return this.s2q_1.r(key);
  };
  protoOf(AttributesJs).j2l = function (key, value) {
    // Inline function 'kotlin.collections.set' call
    this.s2q_1.s(key, value);
  };
  protoOf(AttributesJs).k2l = function (key) {
    this.s2q_1.u2(key);
  };
  protoOf(AttributesJs).l2l = function (key, block) {
    var tmp0_safe_receiver = this.s2q_1.q(key);
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      return !(tmp0_safe_receiver == null) ? tmp0_safe_receiver : THROW_CCE();
    }
    // Inline function 'kotlin.also' call
    var this_0 = block();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'io.ktor.util.AttributesJs.computeIfAbsent.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    this.s2q_1.s(key, this_0);
    return this_0;
  };
  protoOf(AttributesJs).m2l = function () {
    return toList(this.s2q_1.o2());
  };
  function unmodifiable(_this__u8e3s4) {
    return _this__u8e3s4;
  }
  function get_platform(_this__u8e3s4) {
    var tmp = typeof process !== 'undefined' && process.versions != null && process.versions.node != null || (typeof window !== 'undefined' && typeof window.process !== 'undefined' && window.process.versions != null && window.process.versions.node != null);
    var hasNodeApi = (!(tmp == null) ? typeof tmp === 'boolean' : false) ? tmp : THROW_CCE();
    return hasNodeApi ? Platform_Node_getInstance() : Platform_Browser_getInstance();
  }
  function get_isDevelopmentMode(_this__u8e3s4) {
    return false;
  }
  function get_isNewMemoryModel(_this__u8e3s4) {
    return true;
  }
  function GMTDate_0(timestamp) {
    timestamp = timestamp === VOID ? null : timestamp;
    var tmp1_safe_receiver = timestamp == null ? null : timestamp.a7();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'io.ktor.util.date.GMTDate.<anonymous>' call
      tmp = new Date(tmp1_safe_receiver);
    }
    var tmp2_elvis_lhs = tmp;
    var date = tmp2_elvis_lhs == null ? new Date() : tmp2_elvis_lhs;
    if (isNaN_0(date.getTime()))
      throw new InvalidTimestampException(ensureNotNull(timestamp));
    // Inline function 'kotlin.with' call
    // Inline function 'kotlin.contracts.contract' call
    var dayOfWeek = Companion_instance_1.d2o((date.getUTCDay() + 6 | 0) % 7 | 0);
    var month = Companion_instance_2.d2o(date.getUTCMonth());
    return new GMTDate(date.getUTCSeconds(), date.getUTCMinutes(), date.getUTCHours(), dayOfWeek, date.getUTCDate(), date.getUTCFullYear(), month, date.getUTCFullYear(), numberToLong(date.getTime()));
  }
  function InvalidTimestampException(timestamp) {
    IllegalStateException_init_$Init$('Invalid date timestamp exception: ' + timestamp.toString(), this);
    captureStack(this, InvalidTimestampException);
  }
  function KtorSimpleLogger(name) {
    return new KtorSimpleLogger$1();
  }
  function KtorSimpleLogger$1() {
    var tmp = this;
    var tmp_0;
    switch (PlatformUtils_getInstance().u2m_1) {
      case true:
        // Inline function 'kotlin.Result.getOrNull' call

        // Inline function 'kotlin.runCatching' call

        var tmp_1;
        try {
          // Inline function 'kotlin.Companion.success' call
          // Inline function 'io.ktor.util.logging.<no name provided>.level.<anonymous>' call
          var tmp_2 = process.env.KTOR_LOG_LEVEL;
          var value = (tmp_2 == null ? true : typeof tmp_2 === 'string') ? tmp_2 : THROW_CCE();
          tmp_1 = _Result___init__impl__xyqfz8(value);
        } catch ($p) {
          var tmp_3;
          if ($p instanceof Error) {
            var e = $p;
            // Inline function 'kotlin.Companion.failure' call
            tmp_3 = _Result___init__impl__xyqfz8(createFailure(e));
          } else {
            throw $p;
          }
          tmp_1 = tmp_3;
        }

        var this_0 = tmp_1;
        var tmp_4;
        if (_Result___get_isFailure__impl__jpiriv(this_0)) {
          tmp_4 = null;
        } else {
          var tmp_5 = _Result___get_value__impl__bjfvqg(this_0);
          tmp_4 = (tmp_5 == null ? true : !(tmp_5 == null)) ? tmp_5 : THROW_CCE();
        }

        var tmp1_safe_receiver = tmp_4;
        var tmp_6;
        if (tmp1_safe_receiver == null) {
          tmp_6 = null;
        } else {
          // Inline function 'kotlin.let' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'io.ktor.util.logging.<no name provided>.level.<anonymous>' call
          var tmp$ret$6;
          $l$block: {
            // Inline function 'kotlin.collections.firstOrNull' call
            var indexedObject = values_1();
            var inductionVariable = 0;
            var last = indexedObject.length;
            while (inductionVariable < last) {
              var element = indexedObject[inductionVariable];
              inductionVariable = inductionVariable + 1 | 0;
              // Inline function 'io.ktor.util.logging.<no name provided>.level.<anonymous>.<anonymous>' call
              if (element.ya_1 === tmp1_safe_receiver) {
                tmp$ret$6 = element;
                break $l$block;
              }
            }
            tmp$ret$6 = null;
          }
          tmp_6 = tmp$ret$6;
        }

        var tmp2_elvis_lhs = tmp_6;
        tmp_0 = tmp2_elvis_lhs == null ? LogLevel_INFO_getInstance() : tmp2_elvis_lhs;
        break;
      case false:
        tmp_0 = LogLevel_TRACE_getInstance();
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    tmp.t2q_1 = tmp_0;
  }
  protoOf(KtorSimpleLogger$1).u2q = function (message) {
    if (this.t2q_1.ab(LogLevel_TRACE_getInstance()) > 0)
      return Unit_instance;
    console.debug('TRACE: ' + message);
  };
  var LogLevel_TRACE_instance;
  var LogLevel_DEBUG_instance;
  var LogLevel_INFO_instance;
  var LogLevel_WARN_instance;
  var LogLevel_ERROR_instance;
  var LogLevel_NONE_instance;
  function values_1() {
    return [LogLevel_TRACE_getInstance(), LogLevel_DEBUG_getInstance(), LogLevel_INFO_getInstance(), LogLevel_WARN_getInstance(), LogLevel_ERROR_getInstance(), LogLevel_NONE_getInstance()];
  }
  var LogLevel_entriesInitialized;
  function LogLevel_initEntries() {
    if (LogLevel_entriesInitialized)
      return Unit_instance;
    LogLevel_entriesInitialized = true;
    LogLevel_TRACE_instance = new LogLevel('TRACE', 0);
    LogLevel_DEBUG_instance = new LogLevel('DEBUG', 1);
    LogLevel_INFO_instance = new LogLevel('INFO', 2);
    LogLevel_WARN_instance = new LogLevel('WARN', 3);
    LogLevel_ERROR_instance = new LogLevel('ERROR', 4);
    LogLevel_NONE_instance = new LogLevel('NONE', 5);
  }
  function LogLevel(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LogLevel_TRACE_getInstance() {
    LogLevel_initEntries();
    return LogLevel_TRACE_instance;
  }
  function LogLevel_DEBUG_getInstance() {
    LogLevel_initEntries();
    return LogLevel_DEBUG_instance;
  }
  function LogLevel_INFO_getInstance() {
    LogLevel_initEntries();
    return LogLevel_INFO_instance;
  }
  function LogLevel_WARN_getInstance() {
    LogLevel_initEntries();
    return LogLevel_WARN_instance;
  }
  function LogLevel_ERROR_getInstance() {
    LogLevel_initEntries();
    return LogLevel_ERROR_instance;
  }
  function LogLevel_NONE_getInstance() {
    LogLevel_initEntries();
    return LogLevel_NONE_instance;
  }
  function get_DISABLE_SFG() {
    return DISABLE_SFG;
  }
  var DISABLE_SFG;
  function withCause(_this__u8e3s4, cause) {
    return _this__u8e3s4;
  }
  function instanceOf(_this__u8e3s4, type) {
    return type.g7(_this__u8e3s4);
  }
  function typeInfoImpl(reifiedType, kClass, kType) {
    return new TypeInfo(kClass, reifiedType, kType);
  }
  function JsType() {
  }
  var JsType_instance;
  function JsType_getInstance() {
    return JsType_instance;
  }
  //region block: post-declaration
  protoOf(AttributesJs).g2l = get;
  //endregion
  //region block: init
  Companion_instance_1 = new Companion_0();
  Companion_instance_2 = new Companion_1();
  DISABLE_SFG = false;
  JsType_instance = new JsType();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = toByteArray;
  _.$_$.b = JsType_instance;
  _.$_$.c = PlatformUtils_getInstance;
  _.$_$.d = CopyOnWriteHashMap;
  _.$_$.e = GMTDate_0;
  _.$_$.f = KtorSimpleLogger;
  _.$_$.g = PipelineContext;
  _.$_$.h = PipelinePhase;
  _.$_$.i = Pipeline;
  _.$_$.j = instanceOf;
  _.$_$.k = typeInfoImpl;
  _.$_$.l = AttributeKey;
  _.$_$.m = AttributesJsFn;
  _.$_$.n = SilentSupervisor;
  _.$_$.o = forEach;
  _.$_$.p = get_0;
  _.$_$.q = StringValuesBuilderImpl;
  _.$_$.r = StringValuesImpl;
  _.$_$.s = StringValues;
  _.$_$.t = appendAll;
  _.$_$.u = decodeBase64Bytes;
  _.$_$.v = encodeBase64;
  _.$_$.w = isLowerCase;
  _.$_$.x = get_platform;
  _.$_$.y = putAll;
  _.$_$.z = toCharArray;
  _.$_$.a1 = toLowerCasePreservingASCIIRules;
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-io.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-atomicfu.js')));

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