(function (_, kotlin_kotlin) {
  'use strict';
  //region block: imports
  var protoOf = kotlin_kotlin.$_$.wc;
  var classMeta = kotlin_kotlin.$_$.lb;
  var setMetadataFor = kotlin_kotlin.$_$.xc;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var Enum = kotlin_kotlin.$_$.uh;
  var Collection = kotlin_kotlin.$_$.p5;
  var isInterface = kotlin_kotlin.$_$.gc;
  var VOID = kotlin_kotlin.$_$.f;
  var objectMeta = kotlin_kotlin.$_$.vc;
  var emptyList = kotlin_kotlin.$_$.i7;
  var objectCreate = kotlin_kotlin.$_$.uc;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
  var AbstractList = kotlin_kotlin.$_$.n5;
  var THROW_CCE = kotlin_kotlin.$_$.hi;
  //endregion
  //region block: pre-declaration
  setMetadataFor(Antilog, 'Antilog', classMeta);
  setMetadataFor(LogLevel, 'LogLevel', classMeta, Enum);
  setMetadataFor(Napier, 'Napier', objectMeta);
  setMetadataFor(AtomicMutableList, 'AtomicMutableList', classMeta, AbstractList, VOID, AtomicMutableList_init_$Create$);
  setMetadataFor(AtomicRef, 'AtomicRef', classMeta);
  //endregion
  function Antilog() {
  }
  protoOf(Antilog).t5d = function (priority, tag) {
    return true;
  };
  protoOf(Antilog).u5d = function (priority, tag, throwable, message) {
    this.v5d(priority, tag, throwable, message);
  };
  var LogLevel_VERBOSE_instance;
  var LogLevel_DEBUG_instance;
  var LogLevel_INFO_instance;
  var LogLevel_WARNING_instance;
  var LogLevel_ERROR_instance;
  var LogLevel_ASSERT_instance;
  var LogLevel_entriesInitialized;
  function LogLevel_initEntries() {
    if (LogLevel_entriesInitialized)
      return Unit_instance;
    LogLevel_entriesInitialized = true;
    LogLevel_VERBOSE_instance = new LogLevel('VERBOSE', 0);
    LogLevel_DEBUG_instance = new LogLevel('DEBUG', 1);
    LogLevel_INFO_instance = new LogLevel('INFO', 2);
    LogLevel_WARNING_instance = new LogLevel('WARNING', 3);
    LogLevel_ERROR_instance = new LogLevel('ERROR', 4);
    LogLevel_ASSERT_instance = new LogLevel('ASSERT', 5);
  }
  function LogLevel(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LogLevel_VERBOSE_getInstance() {
    LogLevel_initEntries();
    return LogLevel_VERBOSE_instance;
  }
  function LogLevel_DEBUG_getInstance() {
    LogLevel_initEntries();
    return LogLevel_DEBUG_instance;
  }
  function LogLevel_INFO_getInstance() {
    LogLevel_initEntries();
    return LogLevel_INFO_instance;
  }
  function LogLevel_WARNING_getInstance() {
    LogLevel_initEntries();
    return LogLevel_WARNING_instance;
  }
  function LogLevel_ERROR_getInstance() {
    LogLevel_initEntries();
    return LogLevel_ERROR_instance;
  }
  function LogLevel_ASSERT_getInstance() {
    LogLevel_initEntries();
    return LogLevel_ASSERT_instance;
  }
  function Napier() {
    Napier_instance = this;
    this.w5d_1 = AtomicMutableList_init_$Create$();
  }
  protoOf(Napier).x5d = function (antilog) {
    this.w5d_1.z5d(antilog);
  };
  protoOf(Napier).t5d = function (priority, tag) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.w5d_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.c1();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'io.github.aakira.napier.Napier.isEnable.<anonymous>' call
        if (element.t5d(priority, tag)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  protoOf(Napier).u5d = function (priority, tag, throwable, message) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = this.w5d_1.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'io.github.aakira.napier.Napier.rawLog.<anonymous>' call
      element.u5d(priority, tag, throwable, message);
    }
  };
  protoOf(Napier).a5e = function (message, throwable, tag) {
    this.b5e(LogLevel_VERBOSE_getInstance(), tag, throwable, message);
  };
  protoOf(Napier).c5e = function (message, throwable, tag, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.a5e(message, throwable, tag);
      tmp = Unit_instance;
    } else {
      tmp = $super.a5e.call(this, message, throwable, tag);
    }
    return tmp;
  };
  protoOf(Napier).d5e = function (throwable, tag, message) {
    this.b5e(LogLevel_VERBOSE_getInstance(), tag, throwable, message());
  };
  protoOf(Napier).e5e = function (throwable, tag, message, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.d5e(throwable, tag, message);
      tmp = Unit_instance;
    } else {
      tmp = $super.d5e.call(this, throwable, tag, message);
    }
    return tmp;
  };
  protoOf(Napier).f5e = function (message, throwable, tag) {
    this.b5e(LogLevel_INFO_getInstance(), tag, throwable, message);
  };
  protoOf(Napier).g5e = function (message, throwable, tag, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.f5e(message, throwable, tag);
      tmp = Unit_instance;
    } else {
      tmp = $super.f5e.call(this, message, throwable, tag);
    }
    return tmp;
  };
  protoOf(Napier).h5e = function (message, throwable, tag) {
    this.b5e(LogLevel_DEBUG_getInstance(), tag, throwable, message);
  };
  protoOf(Napier).i5e = function (message, throwable, tag, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.h5e(message, throwable, tag);
      tmp = Unit_instance;
    } else {
      tmp = $super.h5e.call(this, message, throwable, tag);
    }
    return tmp;
  };
  protoOf(Napier).j5e = function (throwable, tag, message) {
    this.b5e(LogLevel_DEBUG_getInstance(), tag, throwable, message());
  };
  protoOf(Napier).k5e = function (throwable, tag, message, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.j5e(throwable, tag, message);
      tmp = Unit_instance;
    } else {
      tmp = $super.j5e.call(this, throwable, tag, message);
    }
    return tmp;
  };
  protoOf(Napier).l5e = function (message, throwable, tag) {
    this.b5e(LogLevel_WARNING_getInstance(), tag, throwable, message);
  };
  protoOf(Napier).m5e = function (message, throwable, tag, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.l5e(message, throwable, tag);
      tmp = Unit_instance;
    } else {
      tmp = $super.l5e.call(this, message, throwable, tag);
    }
    return tmp;
  };
  protoOf(Napier).n5e = function (throwable, tag, message) {
    this.b5e(LogLevel_WARNING_getInstance(), tag, throwable, message());
  };
  protoOf(Napier).o5e = function (throwable, tag, message, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.n5e(throwable, tag, message);
      tmp = Unit_instance;
    } else {
      tmp = $super.n5e.call(this, throwable, tag, message);
    }
    return tmp;
  };
  protoOf(Napier).p5e = function (message, throwable, tag) {
    this.b5e(LogLevel_ERROR_getInstance(), tag, throwable, message);
  };
  protoOf(Napier).q5e = function (message, throwable, tag, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.p5e(message, throwable, tag);
      tmp = Unit_instance;
    } else {
      tmp = $super.p5e.call(this, message, throwable, tag);
    }
    return tmp;
  };
  protoOf(Napier).r5e = function (throwable, tag, message) {
    this.b5e(LogLevel_ERROR_getInstance(), tag, throwable, message());
  };
  protoOf(Napier).s5e = function (throwable, tag, message, $super) {
    throwable = throwable === VOID ? null : throwable;
    tag = tag === VOID ? null : tag;
    var tmp;
    if ($super === VOID) {
      this.r5e(throwable, tag, message);
      tmp = Unit_instance;
    } else {
      tmp = $super.r5e.call(this, throwable, tag, message);
    }
    return tmp;
  };
  protoOf(Napier).b5e = function (priority, tag, throwable, message) {
    if (this.t5d(priority, tag)) {
      this.u5d(priority, tag, throwable, message);
    }
  };
  var Napier_instance;
  function Napier_getInstance() {
    if (Napier_instance == null)
      new Napier();
    return Napier_instance;
  }
  function AtomicMutableList_init_$Init$($this) {
    // Inline function 'kotlin.collections.listOf' call
    var tmp$ret$0 = emptyList();
    AtomicMutableList.call($this, tmp$ret$0);
    return $this;
  }
  function AtomicMutableList_init_$Create$() {
    return AtomicMutableList_init_$Init$(objectCreate(protoOf(AtomicMutableList)));
  }
  function modify($this, capacityDiff, block) {
    var newValue = ArrayList_init_$Create$($this.u() + capacityDiff | 0);
    newValue.m1($this);
    var result = block(newValue);
    $this.y5d_1.t5e_1 = newValue;
    return result;
  }
  function AtomicMutableList$add$lambda($index, $element) {
    return function ($this$modify) {
      $this$modify.c2($index, $element);
      return Unit_instance;
    };
  }
  function AtomicMutableList(value) {
    AbstractList.call(this);
    this.y5d_1 = new AtomicRef(value);
  }
  protoOf(AtomicMutableList).u5e = function (element, index) {
    return modify(this, 1, AtomicMutableList$add$lambda(index, element));
  };
  protoOf(AtomicMutableList).z5d = function (element, index, $super) {
    var tmp;
    if (index === VOID) {
      // Inline function 'kotlin.collections.count' call
      tmp = this.u();
    } else {
      tmp = index;
    }
    index = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.u5e(element, index);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.u5e.call(this, element, index);
    }
    return tmp_0;
  };
  protoOf(AtomicMutableList).u = function () {
    return this.y5d_1.t5e_1.u();
  };
  protoOf(AtomicMutableList).c1 = function () {
    return this.y5d_1.t5e_1.c1();
  };
  protoOf(AtomicMutableList).uf = function (element) {
    return this.y5d_1.t5e_1.a1(element);
  };
  protoOf(AtomicMutableList).a1 = function (element) {
    if (!(element == null ? true : !(element == null)))
      return false;
    return this.uf((element == null ? true : !(element == null)) ? element : THROW_CCE());
  };
  protoOf(AtomicMutableList).v = function (index) {
    return this.y5d_1.t5e_1.v(index);
  };
  protoOf(AtomicMutableList).v5e = function (element) {
    return this.y5d_1.t5e_1.x(element);
  };
  protoOf(AtomicMutableList).x = function (element) {
    if (!(element == null ? true : !(element == null)))
      return -1;
    return this.v5e((element == null ? true : !(element == null)) ? element : THROW_CCE());
  };
  protoOf(AtomicMutableList).w = function () {
    return this.y5d_1.t5e_1.w();
  };
  function AtomicRef(value) {
    this.t5e_1 = value;
  }
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = LogLevel_ASSERT_getInstance;
  _.$_$.b = LogLevel_DEBUG_getInstance;
  _.$_$.c = LogLevel_ERROR_getInstance;
  _.$_$.d = LogLevel_INFO_getInstance;
  _.$_$.e = LogLevel_VERBOSE_getInstance;
  _.$_$.f = LogLevel_WARNING_getInstance;
  _.$_$.g = Napier_getInstance;
  _.$_$.h = Antilog;
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js')));

//# sourceMappingURL=Napier-napier-js-ir.js.map
