content: package kotlinx.coroutines;
  
  import java.util.concurrent.CancellationException;
  import kotlin.Deprecated;
  import kotlin.DeprecationLevel;
  import kotlin.Metadata;
  import kotlin.Unit;
  import kotlin.coroutines.Continuation;
  import kotlin.coroutines.CoroutineContext;
  import kotlin.coroutines.intrinsics.IntrinsicsKt;
  import kotlin.jvm.internal.Intrinsics;
  import kotlin.sequences.Sequence;
  import kotlinx.coroutines.Job;
  import mt.Log1F380D;
  
  @Metadata(d1 = {"\u0000B\n\u0000\n\u0002\u0010\u000b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u0012\u0010\b\u001a\u00020\t2\n\b\u0002\u0010\n\u001a\u0004\u0018\u00010\u0005\u001a\u0019\u0010\u000b\u001a\u00020\u00052\n\b\u0002\u0010\n\u001a\u0004\u0018\u00010\u0005H\u0007¢\u0006\u0002\b\b\u001a\f\u0010\f\u001a\u00020\r*\u00020\u0002H\u0007\u001a\u0018\u0010\f\u001a\u00020\u0001*\u00020\u00022\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007\u001a\u001c\u0010\f\u001a\u00020\r*\u00020\u00022\u0010\b\u0002\u0010\u000e\u001a\n\u0018\u00010\u0010j\u0004\u0018\u0001`\u0011\u001a\u001e\u0010\f\u001a\u00020\r*\u00020\u00052\u0006\u0010\u0012\u001a\u00020\u00132\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000f\u001a\u0015\u0010\u0014\u001a\u00020\r*\u00020\u0005H@ø\u0001\u0000¢\u0006\u0002\u0010\u0015\u001a\f\u0010\u0016\u001a\u00020\r*\u00020\u0002H\u0007\u001a\u0018\u0010\u0016\u001a\u00020\r*\u00020\u00022\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007\u001a\u001c\u0010\u0016\u001a\u00020\r*\u00020\u00022\u0010\b\u0002\u0010\u000e\u001a\n\u0018\u00010\u0010j\u0004\u0018\u0001`\u0011\u001a\f\u0010\u0016\u001a\u00020\r*\u00020\u0005H\u0007\u001a\u0018\u0010\u0016\u001a\u00020\r*\u00020\u00052\n\b\u0002\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007\u001a\u001c\u0010\u0016\u001a\u00020\r*\u00020\u00052\u0010\b\u0002\u0010\u000e\u001a\n\u0018\u00010\u0010j\u0004\u0018\u0001`\u0011\u001a\u0014\u0010\u0017\u001a\u00020\u0018*\u00020\u00052\u0006\u0010\u0019\u001a\u00020\u0018H\u0000\u001a\n\u0010\u001a\u001a\u00020\r*\u00020\u0002\u001a\n\u0010\u001a\u001a\u00020\r*\u00020\u0005\u001a\u001b\u0010\u001b\u001a\u00020\u000f*\u0004\u0018\u00010\u000f2\u0006\u0010\u0004\u001a\u00020\u0005H\u0002¢\u0006\u0002\b\u001c\"\u0015\u0010\u0000\u001a\u00020\u0001*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0000\u0010\u0003\"\u0015\u0010\u0004\u001a\u00020\u0005*\u00020\u00028F¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0007\u0002\u0004\n\u0002\b\u0019¨\u0006\u001d"}, d2 = {"isActive", "", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlin/coroutines/CoroutineContext;)Z", "job", "Lkotlinx/coroutines/Job;", "getJob", "(Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/Job;", "Job", "Lkotlinx/coroutines/CompletableJob;", "parent", "Job0", "cancel", "", "cause", "", "Ljava/util/concurrent/CancellationException;", "Lkotlinx/coroutines/CancellationException;", "message", "", "cancelAndJoin", "(Lkotlinx/coroutines/Job;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "cancelChildren", "disposeOnCompletion", "Lkotlinx/coroutines/DisposableHandle;", "handle", "ensureActive", "orCancellation", "orCancellation$JobKt__JobKt", "kotlinx-coroutines-core"}, k = 5, mv = {1, 6, 0}, xi = 48, xs = "kotlinx/coroutines/JobKt")
  /* compiled from: 0178 */
  final /* synthetic */ class JobKt__JobKt {
      public static final CompletableJob Job(Job parent) {
          return new JobImpl(parent);
      }
  
      public static final void cancel(CoroutineContext $this$cancel, CancellationException cause) {
          Job job = (Job) $this$cancel.get(Job.Key);
          if (job != null) {
              job.cancel(cause);
          }
      }
  
      public static final void cancel(Job $this$cancel, String message, Throwable cause) {
          $this$cancel.cancel(ExceptionsKt.CancellationException(message, cause));
      }
  
      @Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
      public static final /* synthetic */ boolean cancel(CoroutineContext $this$cancel, Throwable cause) {
          CoroutineContext.Element element = $this$cancel.get(Job.Key);
          JobSupport jobSupport = element instanceof JobSupport ? (JobSupport) element : null;
          if (jobSupport == null) {
              return false;
          }
          jobSupport.cancelInternal(orCancellation$JobKt__JobKt(cause, jobSupport));
          return true;
      }
  
      public static /* synthetic */ void cancel$default(CoroutineContext coroutineContext, CancellationException cancellationException, int i, Object obj) {
          if ((i & 1) != 0) {
              cancellationException = null;
          }
          JobKt.cancel(coroutineContext, cancellationException);
      }
  
      public static /* synthetic */ void cancel$default(Job job, String str, Throwable th, int i, Object obj) {
          if ((i & 2) != 0) {
              th = null;
          }
          JobKt.cancel(job, str, th);
      }
  
      public static /* synthetic */ boolean cancel$default(CoroutineContext coroutineContext, Throwable th, int i, Object obj) {
          if ((i & 1) != 0) {
              th = null;
          }
          return cancel(coroutineContext, th);
      }
  
      public static final Object cancelAndJoin(Job $this$cancelAndJoin, Continuation<? super Unit> $completion) {
          Job.DefaultImpls.cancel$default($this$cancelAndJoin, (CancellationException) null, 1, (Object) null);
          Object join = $this$cancelAndJoin.join($completion);
          return join == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? join : Unit.INSTANCE;
      }
  
      @Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
      public static final /* synthetic */ void cancelChildren(CoroutineContext $this$cancelChildren, Throwable cause) {
          Job job = (Job) $this$cancelChildren.get(Job.Key);
          if (job != null) {
              for (Job next : job.getChildren()) {
                  JobSupport jobSupport = next instanceof JobSupport ? (JobSupport) next : null;
                  if (jobSupport != null) {
                      jobSupport.cancelInternal(orCancellation$JobKt__JobKt(cause, job));
                  }
              }
          }
      }
  
      public static final void cancelChildren(CoroutineContext $this$cancelChildren, CancellationException cause) {
          Sequence<Job> children;
          Job job = (Job) $this$cancelChildren.get(Job.Key);
          if (job != null && (children = job.getChildren()) != null) {
              for (Job cancel : children) {
                  cancel.cancel(cause);
              }
          }
      }
  
      @Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
      public static final /* synthetic */ void cancelChildren(Job $this$cancelChildren, Throwable cause) {
          for (Job next : $this$cancelChildren.getChildren()) {
              JobSupport jobSupport = next instanceof JobSupport ? (JobSupport) next : null;
              if (jobSupport != null) {
                  jobSupport.cancelInternal(orCancellation$JobKt__JobKt(cause, $this$cancelChildren));
              }
          }
      }
  
      public static final void cancelChildren(Job $this$cancelChildren, CancellationException cause) {
          for (Job cancel : $this$cancelChildren.getChildren()) {
              cancel.cancel(cause);
          }
      }
  
      public static /* synthetic */ void cancelChildren$default(CoroutineContext coroutineContext, Throwable th, int i, Object obj) {
          if ((i & 1) != 0) {
              th = null;
          }
          cancelChildren(coroutineContext, th);
      }
  
      public static /* synthetic */ void cancelChildren$default(CoroutineContext coroutineContext, CancellationException cancellationException, int i, Object obj) {
          if ((i & 1) != 0) {
              cancellationException = null;
          }
          JobKt.cancelChildren(coroutineContext, cancellationException);
      }
  
      public static /* synthetic */ void cancelChildren$default(Job job, Throwable th, int i, Object obj) {
          if ((i & 1) != 0) {
              th = null;
          }
          cancelChildren(job, th);
      }
  
      public static /* synthetic */ void cancelChildren$default(Job job, CancellationException cancellationException, int i, Object obj) {
          if ((i & 1) != 0) {
              cancellationException = null;
          }
          JobKt.cancelChildren(job, cancellationException);
      }
  
      public static final DisposableHandle disposeOnCompletion(Job $this$disposeOnCompletion, DisposableHandle handle) {
          return $this$disposeOnCompletion.invokeOnCompletion(new DisposeOnCompletion(handle));
      }
  
      public static final void ensureActive(CoroutineContext $this$ensureActive) {
          Job job = (Job) $this$ensureActive.get(Job.Key);
          if (job != null) {
              JobKt.ensureActive(job);
          }
      }
  
      public static final void ensureActive(Job $this$ensureActive) {
          if (!$this$ensureActive.isActive()) {
              throw $this$ensureActive.getCancellationException();
          }
      }
  
      public static final Job getJob(CoroutineContext $this$job) {
          Job job = (Job) $this$job.get(Job.Key);
          if (job != null) {
              return job;
          }
          String stringPlus = Intrinsics.stringPlus("Current context doesn't contain Job in it: ", $this$job);
          Log1F380D.a((Object) stringPlus);
          throw new IllegalStateException(stringPlus.toString());
      }
  
      public static final boolean isActive(CoroutineContext $this$isActive) {
          Job job = (Job) $this$isActive.get(Job.Key);
          return job != null && job.isActive();
      }
  
      private static final Throwable orCancellation$JobKt__JobKt(Throwable $this$orCancellation, Job job) {
          return $this$orCancellation == null ? new JobCancellationException("Job was cancelled", (Throwable) null, job) : $this$orCancellation;
      }
  }
  